From 55a1e03273dd98797d43dff040f8e99827b9be3c Mon Sep 17 00:00:00 2001 From: QuantumExplorer Date: Thu, 16 Jan 2025 15:30:42 +0700 Subject: [PATCH 1/6] feat(platform)!: token base support (#2383) --- .github/package-filters/js-packages.yml | 6 + .github/package-filters/rs-packages.yml | 5 + Cargo.lock | 60 +- Cargo.toml | 1 + Dockerfile | 4 + package.json | 4 +- packages/dapi-grpc/build.rs | 12 +- .../protos/platform/v0/platform.proto | 365 ++ packages/data-contracts/Cargo.toml | 1 + packages/data-contracts/src/error.rs | 17 + packages/data-contracts/src/lib.rs | 10 + .../meta_schemas/token/v0/token-meta.json | 245 + packages/rs-dpp/src/balances/credits.rs | 6 + packages/rs-dpp/src/balances/mod.rs | 1 + .../src/balances/total_tokens_balance/mod.rs | 53 + .../rs-dpp/src/data_contract/accessors/mod.rs | 176 +- .../src/data_contract/accessors/v1/mod.rs | 57 + .../src/data_contract/associated_token/mod.rs | 1 + .../token_configuration/accessors/mod.rs | 255 + .../token_configuration/accessors/v0/mod.rs | 105 + .../token_configuration/methods/mod.rs | 1 + .../mod.rs | 43 + .../v0/mod.rs | 283 + .../token_configuration/mod.rs | 33 + .../token_configuration/v0/accessors.rs | 191 + .../token_configuration/v0/mod.rs | 220 + .../authorized_action_takers.rs | 80 + .../data_contract/change_control_rules/mod.rs | 57 + .../change_control_rules/v0/mod.rs | 115 + .../src/data_contract/conversion/cbor/mod.rs | 16 +- .../src/data_contract/conversion/json/mod.rs | 11 +- .../src/data_contract/conversion/value/mod.rs | 8 +- .../mod.rs | 17 +- .../v0/mod.rs | 1 + .../v1/mod.rs | 66 + .../class_methods/try_from_schema/v0/mod.rs | 48 +- .../src/data_contract/document_type/mod.rs | 2 + .../document_type/property/mod.rs | 3 +- .../document_type/restricted_creation/mod.rs | 2 +- .../schema/enrich_with_base_schema/v0/mod.rs | 5 +- .../data_contract/extra/drive_api_tests.rs | 61 +- .../src/data_contract/factory/v0/mod.rs | 13 +- .../src/data_contract/group/accessors/mod.rs | 1 + .../data_contract/group/accessors/v0/mod.rs | 33 + .../rs-dpp/src/data_contract/group/mod.rs | 83 + .../rs-dpp/src/data_contract/group/v0/mod.rs | 68 + .../src/data_contract/methods/schema/mod.rs | 22 + packages/rs-dpp/src/data_contract/mod.rs | 71 +- .../data_contract/serialized_version/mod.rs | 173 +- .../serialized_version/v0/mod.rs | 33 +- .../serialized_version/v1/mod.rs | 136 + .../src/data_contract/v0/conversion/cbor.rs | 2 +- .../src/data_contract/v0/conversion/value.rs | 7 +- .../src/data_contract/v0/methods/schema.rs | 1 + .../data_contract/v0/serialization/bincode.rs | 31 - .../src/data_contract/v0/serialization/mod.rs | 117 +- .../src/data_contract/v1/accessors/mod.rs | 225 + .../src/data_contract/v1/conversion/cbor.rs | 98 + .../src/data_contract/v1/conversion/json.rs | 38 + .../src/data_contract/v1/conversion/mod.rs | 8 + .../src/data_contract/v1/conversion/value.rs | 78 + .../src/data_contract/v1/data_contract.rs | 75 + .../src/data_contract/v1/methods/mod.rs | 1 + .../src/data_contract/v1/methods/schema.rs | 198 + packages/rs-dpp/src/data_contract/v1/mod.rs | 7 + .../src/data_contract/v1/serialization/mod.rs | 194 + .../src/document/document_factory/mod.rs | 7 +- .../src/document/document_factory/v0/mod.rs | 18 +- packages/rs-dpp/src/document/errors.rs | 2 +- .../specialized_document_factory/mod.rs | 7 +- .../specialized_document_factory/v0/mod.rs | 18 +- .../src/errors/consensus/basic/basic_error.rs | 64 +- ...ntract_token_configuration_update_error.rs | 63 + .../invalid_token_base_supply_error.rs | 41 + .../consensus/basic/data_contract/mod.rs | 8 + ...ntiguous_contract_group_positions_error.rs | 52 + ...ntiguous_contract_token_positions_error.rs | 52 + ..._action_not_allowed_on_transition_error.rs | 31 + .../src/errors/consensus/basic/group/mod.rs | 3 + ...set_lock_transaction_is_not_found_error.rs | 12 - .../rs-dpp/src/errors/consensus/basic/mod.rs | 2 + ..._token_mint_recipient_not_allowed_error.rs | 31 + .../token/contract_has_no_tokens_error.rs | 31 + ...dentity_for_token_minting_not_set_error.rs | 33 + .../basic/token/invalid_action_id_error.rs | 43 + .../token/invalid_group_position_error.rs | 47 + .../basic/token/invalid_token_id_error.rs | 43 + .../token/invalid_token_position_error.rs | 47 + .../src/errors/consensus/basic/token/mod.rs | 17 + .../token_transfer_to_ourselves_error.rs | 44 + packages/rs-dpp/src/errors/consensus/codes.rs | 32 +- .../consensus/state/data_trigger/mod.rs | 2 +- .../group_action_already_completed_error.rs | 55 + ...action_already_signed_by_identity_error.rs | 64 + .../group_action_does_not_exist_error.rs | 56 + .../identity_not_member_of_group_error.rs | 56 + .../src/errors/consensus/state/group/mod.rs | 9 + .../errors/consensus/state/identity/mod.rs | 3 + ...recipient_identity_does_not_exist_error.rs | 31 + .../rs-dpp/src/errors/consensus/state/mod.rs | 2 + .../src/errors/consensus/state/state_error.rs | 33 +- ...oes_not_have_enough_token_balance_error.rs | 70 + .../identity_token_account_frozen_error.rs | 51 + ...identity_token_account_not_frozen_error.rs | 51 + .../src/errors/consensus/state/token/mod.rs | 9 + .../token/unauthorized_token_action_error.rs | 64 + packages/rs-dpp/src/errors/protocol_error.rs | 16 + packages/rs-dpp/src/group/action_event.rs | 12 + packages/rs-dpp/src/group/group_action/mod.rs | 14 + .../rs-dpp/src/group/group_action/v0/mod.rs | 12 + packages/rs-dpp/src/group/mod.rs | 66 + .../chain/chain_asset_lock_proof.rs | 1 - .../state_transition/asset_lock_proof/mod.rs | 2 +- packages/rs-dpp/src/lib.rs | 17 + .../rs-dpp/src/multi_identity_events/mod.rs | 7 + packages/rs-dpp/src/nft/mod.rs | 1 - packages/rs-dpp/src/state_transition/mod.rs | 82 +- .../src/state_transition/serialization.rs | 12 +- .../state_transition_types.rs | 2 +- .../batch_transition/accessors/mod.rs | 99 + .../batch_transition/accessors/v0/mod.rs | 19 + .../document_base_transition_trait.rs | 16 + .../document_base_transition/fields.rs | 2 +- .../document_base_transition/from_document.rs | 4 +- .../document_base_transition/mod.rs | 3 +- .../v0/from_document.rs | 4 +- .../document_base_transition/v0/mod.rs | 2 +- .../document_base_transition/v0/v0_methods.rs | 2 +- .../document_base_transition/v0_methods.rs | 4 +- .../document_create_transition/convertible.rs | 14 +- .../from_document.rs | 4 +- .../document_create_transition/mod.rs | 2 +- .../v0/from_document.rs | 4 +- .../document_create_transition/v0/mod.rs | 16 +- .../v0/v0_methods.rs | 24 +- .../document_create_transition/v0_methods.rs | 11 +- .../from_document.rs | 4 +- .../document_delete_transition/mod.rs | 0 .../v0/from_document.rs | 10 +- .../document_delete_transition/v0/mod.rs | 2 +- .../v0/v0_methods.rs | 17 + .../document_delete_transition/v0_methods.rs | 8 +- .../from_document.rs | 4 +- .../document_purchase_transition/mod.rs | 0 .../v0/from_document.rs | 10 +- .../document_purchase_transition/v0/mod.rs | 2 +- .../v0/v0_methods.rs | 24 +- .../v0_methods.rs | 11 +- .../from_document.rs | 10 +- .../document_replace_transition/mod.rs | 0 .../v0/from_document.rs | 10 +- .../document_replace_transition/v0/mod.rs | 4 +- .../v0/v0_methods.rs | 21 +- .../document_replace_transition/v0_methods.rs | 11 +- .../from_document.rs | 12 +- .../document_transfer_transition/mod.rs | 0 .../v0/from_document.rs | 12 +- .../document_transfer_transition/v0/mod.rs | 2 +- .../v0/v0_methods.rs | 21 +- .../v0_methods.rs | 11 +- .../document_transition.rs} | 158 +- .../document_transition_action_type.rs} | 8 +- .../from_document.rs | 4 +- .../document_update_price_transition/mod.rs | 0 .../v0/from_document.rs | 4 +- .../v0/mod.rs | 2 +- .../v0/v0_methods.rs | 21 +- .../v0_methods.rs | 11 +- .../batched_transition/mod.rs | 140 + .../batched_transition/multi_party_action.rs | 5 + .../batched_transition/resolvers.rs | 185 + .../token_base_transition/fields.rs | 12 + .../token_base_transition/mod.rs | 106 + .../token_base_transition_accessors.rs | 16 + .../token_base_transition/v0/mod.rs | 117 + .../token_base_transition/v0/v0_methods.rs | 102 + .../token_base_transition/v0_methods.rs | 86 + .../token_burn_transition/mod.rs | 24 + .../token_burn_transition/v0/mod.rs | 38 + .../token_burn_transition/v0/v0_methods.rs | 76 + .../token_burn_transition/v0_methods.rs | 66 + .../mod.rs | 25 + .../v0/mod.rs | 25 + .../v0/v0_methods.rs | 78 + .../v0_methods.rs | 87 + .../token_emergency_action_transition/mod.rs | 25 + .../v0/mod.rs | 30 + .../v0/v0_methods.rs | 80 + .../v0_methods.rs | 86 + .../token_freeze_transition/mod.rs | 24 + .../token_freeze_transition/v0/mod.rs | 45 + .../token_freeze_transition/v0/v0_methods.rs | 78 + .../token_freeze_transition/v0_methods.rs | 85 + .../token_mint_transition/mod.rs | 24 + .../token_mint_transition/v0/mod.rs | 59 + .../token_mint_transition/v0/v0_methods.rs | 86 + .../token_mint_transition/v0_methods.rs | 98 + .../token_transfer_transition/mod.rs | 18 + .../token_transfer_transition/v0/mod.rs | 67 + .../v0/v0_methods.rs | 195 + .../token_transfer_transition/v0_methods.rs | 156 + .../batched_transition/token_transition.rs | 218 + .../token_transition_action_type.rs | 71 + .../token_unfreeze_transition/mod.rs | 24 + .../token_unfreeze_transition/v0/mod.rs | 45 + .../v0/v0_methods.rs | 78 + .../token_unfreeze_transition/v0_methods.rs | 85 + .../fields.rs | 2 +- .../batch_transition/identity_signed.rs | 26 + .../json_conversion.rs | 17 +- .../document/batch_transition/methods/mod.rs | 862 ++++ .../methods/v0/mod.rs | 35 +- .../batch_transition/methods/v1/mod.rs | 157 + .../document/batch_transition/mod.rs | 115 + .../batch_transition/resolvers/mod.rs | 1 + .../batch_transition/resolvers/v0/mod.rs | 26 + .../batch_transition/state_transition_like.rs | 79 + .../v0/cbor_conversion.rs | 0 .../v0/identity_signed.rs | 4 +- .../batch_transition/v0/json_conversion.rs | 4 + .../v0/mod.rs | 4 +- .../v0/state_transition_like.rs | 20 +- .../v0/types.rs | 8 +- .../v0/v0_methods.rs | 90 +- .../batch_transition/v0/value_conversion.rs | 4 + .../v0/version.rs | 4 +- .../batch_transition/v1/identity_signed.rs | 23 + .../batch_transition/v1/json_conversion.rs | 4 + .../document/batch_transition/v1/mod.rs | 37 + .../v1/state_transition_like.rs | 92 + .../document/batch_transition/v1/types.rs | 18 + .../batch_transition/v1/v0_methods.rs | 894 ++++ .../batch_transition/v1/value_conversion.rs | 4 + .../document/batch_transition/v1/version.rs | 9 + .../validation/find_duplicates_by_id/mod.rs | 2 +- .../find_duplicates_by_id/v0/mod.rs | 23 +- .../validation/mod.rs | 0 .../validate_basic_structure/mod.rs | 4 +- .../validate_basic_structure/v0/mod.rs | 191 + .../value_conversion.rs | 51 +- .../document/batch_transition/version.rs | 12 + .../accessors/mod.rs | 19 - .../accessors/v0/mod.rs | 6 - .../v0/v0_methods.rs | 29 - .../identity_signed.rs | 27 - .../documents_batch_transition/methods/mod.rs | 326 -- .../documents_batch_transition/mod.rs | 598 --- .../state_transition_like.rs | 71 - .../v0/json_conversion.rs | 4 - .../v0/value_conversion.rs | 4 - .../validate_basic_structure/v0/mod.rs | 104 - .../documents_batch_transition/version.rs | 11 - .../state_transitions/document/mod.rs | 2 +- .../methods/v0/mod.rs | 4 +- .../v0/v0_methods.rs | 2 + .../value_conversion.rs | 2 +- .../traits/state_transition_like.rs | 3 +- .../get_document_transitions_fixture.rs | 17 +- .../rs-dpp/src/tokens/allowed_currency.rs | 7 + .../rs-dpp/src/tokens/emergency_action.rs | 30 + packages/rs-dpp/src/tokens/errors.rs | 9 + packages/rs-dpp/src/tokens/info/methods.rs | 16 + packages/rs-dpp/src/tokens/info/mod.rs | 44 + packages/rs-dpp/src/tokens/info/v0/mod.rs | 26 + packages/rs-dpp/src/tokens/mod.rs | 16 + packages/rs-dpp/src/tokens/status/methods.rs | 16 + packages/rs-dpp/src/tokens/status/mod.rs | 44 + packages/rs-dpp/src/tokens/status/v0/mod.rs | 26 + packages/rs-dpp/src/tokens/token_event.rs | 205 + .../src/validation/meta_validators/mod.rs | 65 +- .../contender_structs/contender/v0/mod.rs | 2 +- .../src/voting/contender_structs/mod.rs | 2 +- .../mod.rs | 2 +- .../mod.rs | 2 +- packages/rs-dpp/src/voting/vote_polls/mod.rs | 2 +- .../src/voting/votes/resource_vote/mod.rs | 2 +- packages/rs-drive-abci/src/config.rs | 9 + .../src/execution/check_tx/v0/mod.rs | 940 +++- .../engine/run_block_proposal/v0/mod.rs | 2 +- .../mod.rs | 0 .../v0/mod.rs | 0 .../mod.rs | 2 +- .../mod.rs | 17 +- .../v0/mod.rs | 4 +- .../v1/mod.rs | 54 + .../tests.rs | 42 +- .../create_genesis_state/common.rs | 101 + .../create_genesis_state/mod.rs | 10 +- .../create_genesis_state/v0/mod.rs | 93 +- .../create_genesis_state/v1/mod.rs | 125 + .../src/execution/platform_events/mod.rs | 3 +- .../v0/mod.rs | 84 +- .../execution/platform_events/tokens/mod.rs | 1 + .../validate_token_aggregated_balance/mod.rs | 54 + .../v0/mod.rs | 37 + .../v0/mod.rs | 4 +- .../execution/types/execution_event/mod.rs | 2 +- .../types/execution_operation/mod.rs | 14 + .../v0/mod.rs | 2 +- .../v0/mod.rs | 2 +- .../state_transition/processor/v0/mod.rs | 28 +- .../document_create_transition_action/mod.rs | 12 +- .../state_v0/mod.rs | 8 +- .../state_v1/mod.rs | 8 +- .../structure_v0/mod.rs | 4 +- .../document_delete_transition_action/mod.rs | 10 +- .../state_v0/mod.rs | 8 +- .../structure_v0/mod.rs | 6 +- .../mod.rs | 10 +- .../state_v0/mod.rs | 4 +- .../structure_v0/mod.rs | 4 +- .../document_replace_transition_action/mod.rs | 10 +- .../state_v0/mod.rs | 4 +- .../structure_v0/mod.rs | 4 +- .../mod.rs | 10 +- .../state_v0/mod.rs | 4 +- .../structure_v0/mod.rs | 4 +- .../mod.rs | 10 +- .../state_v0/mod.rs | 4 +- .../structure_v0/mod.rs | 4 +- .../batch/action_validation/mod.rs | 14 + .../token_base_transition_action/mod.rs | 86 + .../state_v0/mod.rs | 67 + .../structure_v0/mod.rs | 49 + .../token_burn_transition_action/mod.rs | 86 + .../state_v0/mod.rs | 108 + .../structure_v0/mod.rs | 25 + .../mod.rs | 86 + .../state_v0/mod.rs | 109 + .../structure_v0/mod.rs | 27 + .../mod.rs | 86 + .../state_v0/mod.rs | 83 + .../structure_v0/mod.rs | 27 + .../token_freeze_transition_action/mod.rs | 86 + .../state_v0/mod.rs | 81 + .../structure_v0/mod.rs | 25 + .../token_mint_transition_action/mod.rs | 86 + .../state_v0/mod.rs | 166 + .../structure_v0/mod.rs | 25 + .../token_transfer_transition_action/mod.rs | 88 + .../state_v0/mod.rs | 103 + .../structure_v0/mod.rs | 29 + .../token_unfreeze_transition_action/mod.rs | 86 + .../state_v0/mod.rs | 107 + .../structure_v0/mod.rs | 25 + .../advanced_structure/mod.rs | 0 .../batch/advanced_structure/v0/mod.rs | 339 ++ .../{documents_batch => batch}/balance/mod.rs | 8 +- .../balance/v0/mod.rs | 15 +- .../bindings/data_trigger_binding/mod.rs | 4 +- .../bindings/data_trigger_binding/v0/mod.rs | 4 +- .../data_triggers/bindings/list/mod.rs | 4 +- .../data_triggers/bindings/list/v0/mod.rs | 12 +- .../data_triggers/bindings/mod.rs | 0 .../data_triggers/context.rs | 0 .../data_triggers/executor.rs | 27 +- .../data_triggers/mod.rs | 2 +- .../data_triggers/triggers/dashpay/mod.rs | 8 +- .../data_triggers/triggers/dashpay/v0/mod.rs | 50 +- .../data_triggers/triggers/dpns/mod.rs | 14 +- .../data_triggers/triggers/dpns/v0/mod.rs | 105 +- .../triggers/feature_flags/mod.rs | 8 +- .../triggers/feature_flags/v0/mod.rs | 34 +- .../data_triggers/triggers/mod.rs | 0 .../data_triggers/triggers/reject/mod.rs | 14 +- .../data_triggers/triggers/reject/v0/mod.rs | 21 +- .../data_triggers/triggers/withdrawals/mod.rs | 8 +- .../triggers/withdrawals/v0/mod.rs | 28 +- .../identity_contract_nonce/mod.rs | 0 .../identity_contract_nonce/v0/mod.rs | 11 +- .../is_allowed/mod.rs | 8 +- .../is_allowed/v0/mod.rs | 11 +- .../{documents_batch => batch}/mod.rs | 4553 ++++++++++++++++- .../{documents_batch => batch}/state/mod.rs | 0 .../state/v0/data_triggers.rs | 10 +- .../state/v0/fetch_contender.rs | 0 .../state/v0/fetch_documents.rs | 4 +- .../state_transitions/batch/state/v0/mod.rs | 302 ++ .../transformer/mod.rs | 0 .../transformer/v0/mod.rs | 394 +- .../advanced_structure/v0/mod.rs | 36 +- .../data_contract_create/mod.rs | 266 + .../data_contract_create/state/v0/mod.rs | 109 +- .../data_contract_update/state/v0/mod.rs | 14 +- .../documents_batch/action_validation/mod.rs | 6 - .../advanced_structure/v0/mod.rs | 219 - .../documents_batch/state/v0/mod.rs | 231 - .../state_transitions/identity_create/mod.rs | 601 ++- .../state_transitions/identity_top_up/mod.rs | 135 +- .../state_transition/state_transitions/mod.rs | 77 +- .../state_transition/transformer/mod.rs | 2 +- packages/rs-drive-abci/src/main.rs | 4 +- .../src/platform_types/platform/mod.rs | 16 +- .../v0/for_saving.rs | 3 +- .../v0/for_saving_v1.rs | 3 +- .../src/query/group_queries/group_info/mod.rs | 53 + .../query/group_queries/group_info/v0/mod.rs | 95 + .../query/group_queries/group_infos/mod.rs | 53 + .../query/group_queries/group_infos/v0/mod.rs | 127 + .../src/query/group_queries/mod.rs | 2 + packages/rs-drive-abci/src/query/mod.rs | 2 + packages/rs-drive-abci/src/query/service.rs | 107 +- .../identities_token_balances/mod.rs | 66 + .../identities_token_balances/v0/mod.rs | 88 + .../identities_token_infos/mod.rs | 62 + .../identities_token_infos/v0/mod.rs | 94 + .../identity_token_balances/mod.rs | 62 + .../identity_token_balances/v0/mod.rs | 86 + .../token_queries/identity_token_infos/mod.rs | 62 + .../identity_token_infos/v0/mod.rs | 89 + .../src/query/token_queries/mod.rs | 5 + .../query/token_queries/token_status/mod.rs | 59 + .../token_queries/token_status/v0/mod.rs | 73 + .../tests/strategy_tests/main.rs | 115 +- .../tests/strategy_tests/strategy.rs | 305 +- .../tests/strategy_tests/token_tests.rs | 329 ++ .../verify_state_transitions.rs | 625 ++- .../tests/strategy_tests/voting_tests.rs | 159 +- .../contract/basic-token/basic-token.json | 18 + .../crypto-card-game-in-game-currency.json | 135 + packages/rs-drive/Cargo.toml | 13 +- .../rs-drive/src/cache/system_contracts.rs | 11 + .../v0/mod.rs | 9 +- .../fetch_asset_lock_outpoint_info/v0/mod.rs | 4 +- packages/rs-drive/src/drive/balances/mod.rs | 60 +- .../v0/mod.rs | 5 +- .../v0/mod.rs | 8 +- .../insert/add_contract_to_storage/v0/mod.rs | 8 +- .../contract/insert/insert_contract/mod.rs | 18 +- .../contract/insert/insert_contract/v0/mod.rs | 2 +- .../contract/insert/insert_contract/v1/mod.rs | 278 + .../contract/update/update_contract/mod.rs | 34 +- .../contract/update/update_contract/v0/mod.rs | 10 +- .../contract/update/update_contract/v1/mod.rs | 253 + .../credit_pools/epochs/operations_factory.rs | 20 +- .../v0/mod.rs | 2 +- .../get_unpaid_epoch_index/v0/mod.rs | 2 +- .../v0/mod.rs | 4 +- .../v0/mod.rs | 4 +- .../rs-drive/src/drive/document/delete/mod.rs | 24 +- .../v0/mod.rs | 6 +- .../v0/mod.rs | 6 +- .../v0/mod.rs | 6 +- .../v0/mod.rs | 8 +- .../v0/mod.rs | 4 +- .../v0/mod.rs | 8 +- .../mod.rs | 6 +- .../v0/mod.rs | 6 +- .../mod.rs | 2 +- .../v0/mod.rs | 4 +- .../mod.rs | 2 +- .../v0/mod.rs | 4 +- .../mod.rs | 2 +- .../v0/mod.rs | 4 +- .../mod.rs | 2 +- .../v0/mod.rs | 4 +- .../mod.rs | 2 +- .../v0/mod.rs | 4 +- .../v0/mod.rs | 4 +- .../add_document_to_primary_storage/v0/mod.rs | 10 +- .../v0/mod.rs | 14 +- .../v0/mod.rs | 12 +- .../v0/mod.rs | 12 +- .../rs-drive/src/drive/document/insert/mod.rs | 25 +- .../v0/mod.rs | 4 +- .../v0/mod.rs | 18 +- .../v0/mod.rs | 6 +- .../v0/mod.rs | 12 +- .../v0/mod.rs | 12 +- .../v0/mod.rs | 14 +- .../rs-drive/src/drive/document/update/mod.rs | 54 +- .../for_add_group_action/mod.rs | 79 + .../for_add_group_action/v0/mod.rs | 173 + .../src/drive/group/estimated_costs/mod.rs | 1 + .../fetch/fetch_action_id_has_signer/mod.rs | 118 + .../fetch_action_id_has_signer/v0/mod.rs | 165 + .../group/fetch/fetch_action_id_info/mod.rs | 121 + .../fetch/fetch_action_id_info/v0/mod.rs | 91 + .../mod.rs | 120 + .../v0/mod.rs | 132 + .../fetch_action_id_signers_power/mod.rs | 78 + .../fetch_action_id_signers_power/v0/mod.rs | 132 + .../drive/group/fetch/fetch_group_info/mod.rs | 103 + .../group/fetch/fetch_group_info/v0/mod.rs | 83 + .../group/fetch/fetch_group_infos/mod.rs | 99 + .../group/fetch/fetch_group_infos/v0/mod.rs | 79 + .../rs-drive/src/drive/group/fetch/mod.rs | 7 + .../rs-drive/src/drive/group/fetch/queries.rs | 47 + .../group/insert/add_group_action/mod.rs | 128 + .../group/insert/add_group_action/v0/mod.rs | 244 + .../drive/group/insert/add_new_groups/mod.rs | 99 + .../group/insert/add_new_groups/v0/mod.rs | 217 + .../rs-drive/src/drive/group/insert/mod.rs | 2 + packages/rs-drive/src/drive/group/mod.rs | 10 + packages/rs-drive/src/drive/group/paths.rs | 256 + .../rs-drive/src/drive/group/prove/mod.rs | 2 + .../drive/group/prove/prove_group_info/mod.rs | 99 + .../group/prove/prove_group_info/v0/mod.rs | 45 + .../group/prove/prove_group_infos/mod.rs | 99 + .../group/prove/prove_group_infos/v0/mod.rs | 50 + .../fetch_identity_contract_nonce/v0/mod.rs | 4 +- .../merge_identity_contract_nonce/v0/mod.rs | 12 +- .../v0/mod.rs | 10 +- .../v0/mod.rs | 4 +- .../estimation_costs/for_balances/v0/mod.rs | 9 +- .../for_identity_contract_info/v0/mod.rs | 10 +- .../v0/mod.rs | 4 +- .../v0/mod.rs | 4 +- .../v0/mod.rs | 4 +- .../for_keys_for_identity_id/v0/mod.rs | 10 +- .../for_negative_credit/v0/mod.rs | 6 +- .../v0/mod.rs | 4 +- .../for_root_key_reference_tree/v0/mod.rs | 4 +- .../for_update_nonce/v0/mod.rs | 8 +- .../for_update_revision/v0/mod.rs | 8 +- .../balance/fetch_identity_balance/v0/mod.rs | 4 +- .../fetch_identity_negative_balance/v0/mod.rs | 4 +- .../fetch/fetch_by_public_key_hashes/mod.rs | 2 +- .../nonce/fetch_identity_nonce/v0/mod.rs | 4 +- .../fetch_identity_revision/v0/mod.rs | 4 +- .../identity/insert/add_new_identity/mod.rs | 6 +- .../insert/add_new_identity/v0/mod.rs | 10 +- .../src/drive/identity/key/fetch/mod.rs | 8 +- .../v0/mod.rs | 6 +- .../v0/mod.rs | 6 +- .../v0/mod.rs | 4 +- .../rs-drive/src/drive/identity/update/mod.rs | 29 +- .../merge_identity_nonce_operations/v0/mod.rs | 2 +- .../rs-drive/src/drive/initialization/mod.rs | 4 +- .../src/drive/initialization/v0/mod.rs | 385 +- .../src/drive/initialization/v1/mod.rs | 81 + packages/rs-drive/src/drive/mod.rs | 29 +- .../v1/mod.rs | 4 +- .../v1/mod.rs | 4 +- .../v0/mod.rs | 4 +- .../v0/mod.rs | 11 +- .../fetch/single_balance/v0/mod.rs | 4 +- .../v0/mod.rs | 4 +- .../v0/mod.rs | 19 +- .../v0/mod.rs | 15 +- .../v0/mod.rs | 6 +- .../v0/mod.rs | 6 +- .../for_total_system_credits_update/v0/mod.rs | 9 +- .../src/drive/system/genesis_time/mod.rs | 6 +- .../add_transaction_history_operations/mod.rs | 55 + .../v0/mod.rs | 61 + .../src/drive/tokens/apply_status/mod.rs | 93 + .../src/drive/tokens/apply_status/v0/mod.rs | 107 + .../add_to_previous_token_balance/mod.rs | 119 + .../add_to_previous_token_balance/v0/mod.rs | 141 + .../fetch_identities_token_balances/mod.rs | 152 + .../fetch_identities_token_balances/v0/mod.rs | 63 + .../fetch_identity_token_balance/mod.rs | 135 + .../fetch_identity_token_balance/v0/mod.rs | 83 + .../fetch_identity_token_balances/mod.rs | 151 + .../fetch_identity_token_balances/v0/mod.rs | 83 + .../rs-drive/src/drive/tokens/balance/mod.rs | 17 + .../prove_identities_token_balances/mod.rs | 149 + .../prove_identities_token_balances/v0/mod.rs | 359 ++ .../prove_identity_token_balances/mod.rs | 149 + .../prove_identity_token_balances/v0/mod.rs | 55 + .../src/drive/tokens/balance/queries.rs | 72 + .../remove_from_identity_token_balance/mod.rs | 117 + .../v0/mod.rs | 129 + .../src/drive/tokens/balance/update.rs | 896 ++++ .../rs-drive/src/drive/tokens/burn/mod.rs | 100 + .../rs-drive/src/drive/tokens/burn/v0/mod.rs | 108 + .../calculate_total_tokens_balance/mod.rs | 42 + .../calculate_total_tokens_balance/v0/mod.rs | 47 + .../estimated_costs/for_token_balances/mod.rs | 57 + .../for_token_balances/v0/mod.rs | 102 + .../for_token_identity_infos/mod.rs | 57 + .../for_token_identity_infos/v0/mod.rs | 81 + .../for_token_status_infos/mod.rs | 55 + .../for_token_status_infos/v0/mod.rs | 68 + .../for_token_total_supply/mod.rs | 50 + .../for_token_total_supply/v0/mod.rs | 101 + .../src/drive/tokens/estimated_costs/mod.rs | 11 + .../rs-drive/src/drive/tokens/freeze/mod.rs | 95 + .../src/drive/tokens/freeze/v0/mod.rs | 147 + .../info/fetch_identities_token_infos/mod.rs | 151 + .../fetch_identities_token_infos/v0/mod.rs | 66 + .../info/fetch_identity_token_info/mod.rs | 134 + .../info/fetch_identity_token_info/v0/mod.rs | 73 + .../info/fetch_identity_token_infos/mod.rs | 151 + .../info/fetch_identity_token_infos/v0/mod.rs | 87 + .../rs-drive/src/drive/tokens/info/mod.rs | 12 + .../info/prove_identities_token_infos/mod.rs | 149 + .../prove_identities_token_infos/v0/mod.rs | 353 ++ .../info/prove_identity_token_infos/mod.rs | 149 + .../info/prove_identity_token_infos/v0/mod.rs | 55 + .../rs-drive/src/drive/tokens/info/queries.rs | 72 + .../rs-drive/src/drive/tokens/mint/mod.rs | 106 + .../rs-drive/src/drive/tokens/mint/v0/mod.rs | 115 + packages/rs-drive/src/drive/tokens/mod.rs | 54 + packages/rs-drive/src/drive/tokens/paths.rs | 105 + .../tokens/status/fetch_token_status/mod.rs | 110 + .../status/fetch_token_status/v0/mod.rs | 70 + .../tokens/status/fetch_token_statuses/mod.rs | 126 + .../status/fetch_token_statuses/v0/mod.rs | 76 + .../rs-drive/src/drive/tokens/status/mod.rs | 7 + .../tokens/status/prove_token_statuses/mod.rs | 124 + .../status/prove_token_statuses/v0/mod.rs | 52 + .../system/add_to_token_total_supply/mod.rs | 119 + .../add_to_token_total_supply/v0/mod.rs | 148 + .../tokens/system/create_token_trees/mod.rs | 124 + .../system/create_token_trees/v0/mod.rs | 220 + .../rs-drive/src/drive/tokens/system/mod.rs | 3 + .../remove_from_token_total_supply/mod.rs | 112 + .../remove_from_token_total_supply/v0/mod.rs | 128 + .../rs-drive/src/drive/tokens/transfer/mod.rs | 106 + .../src/drive/tokens/transfer/v0/mod.rs | 114 + .../rs-drive/src/drive/tokens/unfreeze/mod.rs | 95 + .../src/drive/tokens/unfreeze/v0/mod.rs | 147 + .../v0/mod.rs | 6 +- .../v0/mod.rs | 4 +- .../v1/mod.rs | 8 +- .../v0/mod.rs | 6 +- .../v1/mod.rs | 6 +- .../v0/mod.rs | 4 +- .../v1/mod.rs | 4 +- .../v0/mod.rs | 4 +- .../v0/mod.rs | 4 +- .../v0/mod.rs | 6 +- .../v0/mod.rs | 4 +- .../v0/mod.rs | 6 +- .../v0/mod.rs | 14 +- .../resolve.rs | 2 + packages/rs-drive/src/fees/op.rs | 98 +- packages/rs-drive/src/open/mod.rs | 21 +- ..._resource_votes_given_by_identity_query.rs | 6 + .../query/drive_contested_document_query.rs | 2 + packages/rs-drive/src/query/mod.rs | 14 +- .../src/query/vote_poll_vote_state_query.rs | 2 + .../batch/batch_transition.rs | 28 + .../document/document_create_transition.rs | 10 +- .../document/document_delete_transition.rs | 12 +- .../document/document_purchase_transition.rs | 10 +- .../document/document_replace_transition.rs | 10 +- .../document/document_transfer_transition.rs | 10 +- .../document/document_transition.rs | 25 +- .../document_update_price_transition.rs | 10 +- .../document/documents_batch_transition.rs | 8 +- .../batch/document/mod.rs | 8 + .../{document => batch}/mod.rs | 15 +- .../batch/token/mod.rs | 8 + .../batch/token/token_burn_transition.rs | 102 + .../token_destroy_frozen_funds_transition.rs | 107 + .../token_emergency_action_transition.rs | 105 + .../batch/token/token_freeze_transition.rs | 105 + .../batch/token/token_mint_transition.rs | 111 + .../batch/token/token_transfer_transition.rs | 84 + .../batch/token/token_transition.rs | 105 + .../batch/token/token_unfreeze_transition.rs | 107 + .../action_convert_to_operations/mod.rs | 4 +- .../document_base_transition_action/mod.rs | 0 .../transformer.rs | 8 +- .../document_base_transition_action/v0/mod.rs | 0 .../v0/transformer.rs | 4 +- .../document_create_transition_action/mod.rs | 2 +- .../transformer.rs | 8 +- .../v0/mod.rs | 2 +- .../v0/transformer.rs | 10 +- .../document_delete_transition_action/mod.rs | 4 +- .../transformer.rs | 8 +- .../v0/mod.rs | 2 +- .../v0/transformer.rs | 10 +- .../mod.rs | 2 +- .../transformer.rs | 4 +- .../v0/mod.rs | 2 +- .../v0/transformer.rs | 8 +- .../document_replace_transition_action/mod.rs | 2 +- .../transformer.rs | 4 +- .../v0/mod.rs | 2 +- .../v0/transformer.rs | 8 +- .../mod.rs | 2 +- .../transformer.rs | 4 +- .../v0/mod.rs | 2 +- .../v0/transformer.rs | 8 +- .../document_transition_action_type.rs} | 11 +- .../mod.rs | 2 +- .../transformer.rs | 4 +- .../v0/mod.rs | 2 +- .../v0/transformer.rs | 8 +- .../document_transition/mod.rs | 54 +- .../batch/batched_transition/mod.rs | 40 + .../token_transition/mod.rs | 144 + .../token_base_transition_action/mod.rs | 79 + .../transformer.rs | 69 + .../token_base_transition_action/v0/mod.rs | 112 + .../v0/transformer.rs | 242 + .../token_burn_transition_action/mod.rs | 60 + .../transformer.rs | 125 + .../token_burn_transition_action/v0/mod.rs | 102 + .../v0/transformer.rs | 229 + .../mod.rs | 76 + .../transformer.rs | 117 + .../v0/mod.rs | 115 + .../v0/transformer.rs | 311 ++ .../mod.rs | 63 + .../transformer.rs | 117 + .../v0/mod.rs | 97 + .../v0/transformer.rs | 232 + .../token_freeze_transition_action/mod.rs | 61 + .../transformer.rs | 117 + .../token_freeze_transition_action/v0/mod.rs | 96 + .../v0/transformer.rs | 232 + .../token_mint_transition_action/mod.rs | 73 + .../transformer.rs | 117 + .../token_mint_transition_action/v0/mod.rs | 112 + .../v0/transformer.rs | 367 ++ .../token_transfer_transition_action/mod.rs | 157 + .../transformer.rs | 112 + .../v0/mod.rs | 266 + .../v0/transformer.rs | 177 + .../token_transition_action_type.rs | 22 + .../token_unfreeze_transition_action/mod.rs | 61 + .../transformer.rs | 117 + .../v0/mod.rs | 96 + .../v0/transformer.rs | 232 + .../documents_batch => batch}/mod.rs | 86 +- .../documents_batch => batch}/v0/mod.rs | 39 +- .../state_transition_action/document/mod.rs | 2 - .../src/state_transition_action/mod.rs | 12 +- .../transformer.rs | 173 +- .../v0/transformer.rs | 90 +- .../v0/mod.rs | 2 +- .../src/util/batch/drive_op_batch/group.rs | 68 + .../src/util/batch/drive_op_batch/mod.rs | 37 +- .../src/util/batch/drive_op_batch/token.rs | 212 + .../util/batch/drive_op_batch/withdrawals.rs | 8 +- .../src/util/batch/grovedb_op_batch/mod.rs | 12 +- .../grove_operations/batch_delete/v0/mod.rs | 2 +- .../v0/mod.rs | 16 +- .../batch_insert_empty_sum_tree/mod.rs | 52 + .../batch_insert_empty_sum_tree/v0/mod.rs | 53 + .../mod.rs | 6 +- .../v0/mod.rs | 86 +- .../batch_insert_if_changed_value/v0/mod.rs | 3 +- .../batch_insert_if_not_exists/v0/mod.rs | 3 +- .../v0/mod.rs | 3 +- .../mod.rs | 71 + .../v0/mod.rs | 230 + .../v0/mod.rs | 4 +- .../batch_move_items_in_path_query/v0/mod.rs | 18 +- .../batch_remove_raw/v0/mod.rs | 6 +- .../v0/mod.rs | 2 +- .../grove_apply_operation/v0/mod.rs | 2 +- .../v0/mod.rs | 2 +- .../grove_batch_operations_costs/v0/mod.rs | 2 +- .../grove_operations/grove_clear/v0/mod.rs | 2 +- .../grove_operations/grove_delete/v0/mod.rs | 2 +- .../util/grove_operations/grove_get/v0/mod.rs | 8 +- .../grove_get_big_sum_tree_total_value/mod.rs | 58 + .../v0/mod.rs | 67 + .../mod.rs | 58 + .../v0/mod.rs | 72 + .../grove_get_path_query/v0/mod.rs | 2 +- .../v0/mod.rs | 2 +- .../v0/mod.rs | 2 +- .../v0/mod.rs | 2 +- .../grove_get_proved_path_query/v0/mod.rs | 2 +- .../v0/mod.rs | 2 +- .../grove_operations/grove_get_raw/v0/mod.rs | 8 +- .../grove_get_raw_item/mod.rs | 55 + .../grove_get_raw_item/v0/mod.rs | 83 + .../grove_get_raw_optional/v0/mod.rs | 6 +- .../grove_get_raw_optional_item/mod.rs | 59 + .../grove_get_raw_optional_item/v0/mod.rs | 84 + .../grove_get_raw_path_query/v0/mod.rs | 2 +- .../v0/mod.rs | 2 +- .../v0/mod.rs | 2 +- .../grove_get_sum_tree_total_value/v0/mod.rs | 6 +- .../grove_operations/grove_has_raw/v0/mod.rs | 8 +- .../grove_operations/grove_insert/v0/mod.rs | 2 +- .../grove_insert_empty_sum_tree/v0/mod.rs | 2 +- .../grove_insert_empty_tree/v0/mod.rs | 2 +- .../grove_insert_if_not_exists/v0/mod.rs | 2 +- .../v0/mod.rs | 2 +- .../rs-drive/src/util/grove_operations/mod.rs | 83 +- .../util/object_size_info/contract_info.rs | 5 + .../apply_batch_grovedb_operations/v0/mod.rs | 2 +- .../rs-drive/src/util/test_helpers/mod.rs | 13 +- .../rs-drive/src/util/test_helpers/setup.rs | 19 +- packages/rs-drive/src/util/type_constants.rs | 2 + packages/rs-drive/src/verify/mod.rs | 1 + .../v0/mod.rs | 346 +- packages/rs-drive/src/verify/tokens/mod.rs | 2 + .../mod.rs | 80 + .../v0/mod.rs | 71 + .../mod.rs | 79 + .../v0/mod.rs | 65 + .../rs-drive/tests/deterministic_root_hash.rs | 41 +- packages/rs-drive/tests/query_tests.rs | 1708 ++++++- .../rs-drive/tests/query_tests_history.rs | 1409 ++++- .../tokens/token-example-contract.json | 23 + packages/rs-platform-version/Cargo.toml | 2 +- .../dpp_versions/dpp_contract_versions/mod.rs | 1 + .../dpp_versions/dpp_contract_versions/v2.rs | 54 + .../mod.rs | 3 +- .../v1.rs | 2 +- .../v2.rs | 105 + .../dpp_versions/dpp_token_versions/mod.rs | 9 + .../dpp_versions/dpp_token_versions/v1.rs | 6 + .../dpp_validation_versions/mod.rs | 1 + .../dpp_validation_versions/v1.rs | 1 + .../dpp_validation_versions/v2.rs | 1 + .../src/version/dpp_versions/mod.rs | 3 + .../drive_abci_method_versions/mod.rs | 9 +- .../drive_abci_method_versions/v1.rs | 8 +- .../drive_abci_method_versions/v2.rs | 8 +- .../drive_abci_method_versions/v3.rs | 8 +- .../drive_abci_method_versions/v4.rs | 8 +- .../drive_abci_method_versions/v5.rs | 8 +- .../drive_abci_method_versions/v6.rs | 126 + .../drive_abci_query_versions/mod.rs | 17 + .../drive_abci_query_versions/v1.rs | 46 +- .../drive_abci_validation_versions/mod.rs | 17 +- .../drive_abci_validation_versions/v1.rs | 17 +- .../drive_abci_validation_versions/v2.rs | 17 +- .../drive_abci_validation_versions/v3.rs | 17 +- .../drive_abci_validation_versions/v4.rs | 17 +- .../drive_abci_validation_versions/v5.rs | 17 +- .../drive_contract_method_versions/mod.rs | 1 + .../drive_contract_method_versions/v2.rs | 33 + .../drive_group_method_versions/mod.rs | 38 + .../drive_group_method_versions/v1.rs | 26 + .../drive_grove_method_versions/mod.rs | 6 + .../drive_grove_method_versions/v1.rs | 6 + .../drive_identity_method_versions/mod.rs | 3 + .../drive_identity_method_versions/v1.rs | 3 + .../mod.rs | 7 + .../v1.rs | 7 + .../drive_token_method_versions/mod.rs | 50 + .../drive_token_method_versions/v1.rs | 41 + .../drive_verify_method_versions/mod.rs | 8 + .../drive_verify_method_versions/v1.rs | 7 +- .../src/version/drive_versions/mod.rs | 7 + .../src/version/drive_versions/v1.rs | 4 + .../src/version/drive_versions/v2.rs | 4 + .../src/version/drive_versions/v3.rs | 4 + .../src/version/drive_versions/v4.rs | 105 + .../src/version/fee/processing/mod.rs | 4 + .../src/version/fee/processing/v1.rs | 1 + .../src/version/mocks/v2_test.rs | 52 +- .../src/version/mocks/v3_test.rs | 10 +- .../rs-platform-version/src/version/mod.rs | 5 +- .../src/version/protocol_version.rs | 5 +- .../rs-platform-version/src/version/v1.rs | 2 + .../rs-platform-version/src/version/v2.rs | 2 + .../rs-platform-version/src/version/v3.rs | 2 + .../rs-platform-version/src/version/v4.rs | 2 + .../rs-platform-version/src/version/v5.rs | 2 + .../rs-platform-version/src/version/v6.rs | 2 + .../rs-platform-version/src/version/v7.rs | 2 + .../rs-platform-version/src/version/v8.rs | 2 + .../rs-platform-version/src/version/v9.rs | 66 + .../platform/transition/purchase_document.rs | 6 +- .../src/platform/transition/put_document.rs | 6 +- .../platform/transition/transfer_document.rs | 6 +- .../transition/update_price_of_document.rs | 32 +- .../src/platform/transition/waitable.rs | 2 +- packages/search-contract/.eslintrc | 18 + packages/search-contract/.mocharc.yml | 2 + packages/search-contract/Cargo.toml | 13 + packages/search-contract/LICENSE | 20 + packages/search-contract/README.md | 26 + packages/search-contract/lib/systemIds.js | 4 + packages/search-contract/package.json | 29 + .../schema/v1/search-contract-documents.json | 62 + packages/search-contract/src/error.rs | 17 + packages/search-contract/src/lib.rs | 37 + packages/search-contract/src/v1/mod.rs | 27 + packages/search-contract/test/.eslintrc | 12 + packages/search-contract/test/bootstrap.js | 30 + .../test/unit/searchContract.spec.js | 187 + packages/strategy-tests/src/lib.rs | 125 +- packages/strategy-tests/src/operations.rs | 118 +- packages/strategy-tests/src/transitions.rs | 13 +- packages/token-history-contract/.eslintrc | 18 + packages/token-history-contract/.mocharc.yml | 2 + packages/token-history-contract/Cargo.toml | 13 + packages/token-history-contract/LICENSE | 20 + packages/token-history-contract/README.md | 26 + .../token-history-contract/lib/systemIds.js | 4 + packages/token-history-contract/package.json | 29 + .../v1/token-history-contract-documents.json | 580 +++ packages/token-history-contract/src/error.rs | 17 + packages/token-history-contract/src/lib.rs | 37 + packages/token-history-contract/src/v1/mod.rs | 21 + .../token-history-contract/test/.eslintrc | 12 + .../token-history-contract/test/bootstrap.js | 30 + .../test/unit/tokenHistoryContract.spec.js | 451 ++ .../wasm-dpp/src/document/document_facade.rs | 4 +- .../errors/document_already_exists_error.rs | 2 +- .../errors/document_not_provided_error.rs | 2 +- .../errors/invalid_document_action_error.rs | 4 +- packages/wasm-dpp/src/document/factory.rs | 6 +- .../batched_transition/mod.rs | 18 + .../document_create_transition.rs | 2 +- .../document_delete_transition.rs | 0 .../document_replace_transition.rs | 0 .../document_transition/mod.rs | 11 +- .../mod.rs | 53 +- .../batch_transition/token_transition/mod.rs | 18 + .../validation/basic/find_duplicates_by_id.rs | 0 .../basic/find_duplicates_by_indices.rs | 0 .../validation/basic/mod.rs | 0 ...lidate_documents_batch_transition_basic.rs | 0 .../validate_partial_compound_indices.rs | 0 .../validation/mod.rs | 0 .../state/fetch_extended_documents.rs | 0 .../validation/state/mod.rs | 0 ...idate_documents_batch_transitions_state.rs | 0 ...alidate_documents_uniqueness_by_indices.rs | 0 .../src/document/state_transition/mod.rs | 2 +- .../src/errors/consensus/consensus_error.rs | 77 +- .../state_transition/transition_types.rs | 2 +- .../state_transition_factory.rs | 6 +- 919 files changed, 51292 insertions(+), 4825 deletions(-) create mode 100644 packages/rs-dpp/schema/meta_schemas/token/v0/token-meta.json create mode 100644 packages/rs-dpp/src/balances/total_tokens_balance/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/accessors/v1/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/v0/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/accessors.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/change_control_rules/authorized_action_takers.rs create mode 100644 packages/rs-dpp/src/data_contract/change_control_rules/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/change_control_rules/v0/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/v1/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/group/accessors/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/group/accessors/v0/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/group/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/group/v0/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/serialized_version/v1/mod.rs delete mode 100644 packages/rs-dpp/src/data_contract/v0/serialization/bincode.rs create mode 100644 packages/rs-dpp/src/data_contract/v1/accessors/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/v1/conversion/cbor.rs create mode 100644 packages/rs-dpp/src/data_contract/v1/conversion/json.rs create mode 100644 packages/rs-dpp/src/data_contract/v1/conversion/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/v1/conversion/value.rs create mode 100644 packages/rs-dpp/src/data_contract/v1/data_contract.rs create mode 100644 packages/rs-dpp/src/data_contract/v1/methods/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/v1/methods/schema.rs create mode 100644 packages/rs-dpp/src/data_contract/v1/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/v1/serialization/mod.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/data_contract/data_contract_token_configuration_update_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/data_contract/invalid_token_base_supply_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/data_contract/non_contiguous_contract_group_positions_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/data_contract/non_contiguous_contract_token_positions_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/group/group_action_not_allowed_on_transition_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/group/mod.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/token/choosing_token_mint_recipient_not_allowed_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/token/contract_has_no_tokens_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/token/destination_identity_for_token_minting_not_set_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/token/invalid_action_id_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/token/invalid_group_position_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/token/invalid_token_id_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/token/invalid_token_position_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/token/mod.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/token/token_transfer_to_ourselves_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/state/group/group_action_already_completed_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/state/group/group_action_already_signed_by_identity_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/state/group/group_action_does_not_exist_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/state/group/identity_not_member_of_group_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/state/group/mod.rs create mode 100644 packages/rs-dpp/src/errors/consensus/state/identity/recipient_identity_does_not_exist_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/state/token/identity_does_not_have_enough_token_balance_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/state/token/identity_token_account_frozen_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/state/token/identity_token_account_not_frozen_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/state/token/mod.rs create mode 100644 packages/rs-dpp/src/errors/consensus/state/token/unauthorized_token_action_error.rs create mode 100644 packages/rs-dpp/src/group/action_event.rs create mode 100644 packages/rs-dpp/src/group/group_action/mod.rs create mode 100644 packages/rs-dpp/src/group/group_action/v0/mod.rs create mode 100644 packages/rs-dpp/src/group/mod.rs create mode 100644 packages/rs-dpp/src/multi_identity_events/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/accessors/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/accessors/v0/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/document_base_transition_trait.rs rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_base_transition/fields.rs (75%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_base_transition/from_document.rs (84%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_base_transition/mod.rs (96%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_base_transition/v0/from_document.rs (77%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_base_transition/v0/mod.rs (98%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_base_transition/v0/v0_methods.rs (94%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_base_transition/v0_methods.rs (87%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_create_transition/convertible.rs (90%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_create_transition/from_document.rs (86%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_create_transition/mod.rs (97%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_create_transition/v0/from_document.rs (84%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_create_transition/v0/mod.rs (97%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_create_transition/v0/v0_methods.rs (76%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_create_transition/v0_methods.rs (80%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_delete_transition/from_document.rs (85%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_delete_transition/mod.rs (100%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_delete_transition/v0/from_document.rs (69%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_delete_transition/v0/mod.rs (85%) create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0/v0_methods.rs rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_delete_transition/v0_methods.rs (51%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_purchase_transition/from_document.rs (85%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_purchase_transition/mod.rs (100%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_purchase_transition/v0/from_document.rs (79%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_purchase_transition/v0/mod.rs (90%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_purchase_transition/v0/v0_methods.rs (53%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_purchase_transition/v0_methods.rs (65%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_replace_transition/from_document.rs (79%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_replace_transition/mod.rs (100%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_replace_transition/v0/from_document.rs (79%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_replace_transition/v0/mod.rs (98%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_replace_transition/v0/v0_methods.rs (68%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_replace_transition/v0_methods.rs (71%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_transfer_transition/from_document.rs (84%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_transfer_transition/mod.rs (100%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_transfer_transition/v0/from_document.rs (79%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_transfer_transition/v0/mod.rs (92%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_transfer_transition/v0/v0_methods.rs (69%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_transfer_transition/v0_methods.rs (72%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition/mod.rs => batch_transition/batched_transition/document_transition.rs} (74%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition/action_type.rs => batch_transition/batched_transition/document_transition_action_type.rs} (78%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_update_price_transition/from_document.rs (85%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_update_price_transition/mod.rs (100%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_update_price_transition/v0/from_document.rs (82%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_update_price_transition/v0/mod.rs (99%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_update_price_transition/v0/v0_methods.rs (62%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition/document_transition => batch_transition/batched_transition}/document_update_price_transition/v0_methods.rs (68%) create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/multi_party_action.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/resolvers.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/fields.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/token_base_transition_accessors.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/v0/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/v0/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition_action_type.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0_methods.rs rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/fields.rs (93%) create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/identity_signed.rs rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/json_conversion.rs (52%) create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/methods/v0/mod.rs (81%) create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/resolvers/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/resolvers/v0/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/state_transition_like.rs rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/v0/cbor_conversion.rs (100%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/v0/identity_signed.rs (83%) create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/json_conversion.rs rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/v0/mod.rs (86%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/v0/state_transition_like.rs (72%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/v0/types.rs (53%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/v0/v0_methods.rs (77%) create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/value_conversion.rs rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/v0/version.rs (52%) create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/identity_signed.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/json_conversion.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/state_transition_like.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/types.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/value_conversion.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/version.rs rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/validation/find_duplicates_by_id/mod.rs (84%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/validation/find_duplicates_by_id/v0/mod.rs (73%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/validation/mod.rs (100%) rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/validation/validate_basic_structure/mod.rs (88%) create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/validate_basic_structure/v0/mod.rs rename packages/rs-dpp/src/state_transition/state_transitions/document/{documents_batch_transition => batch_transition}/value_conversion.rs (61%) create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/version.rs delete mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/accessors/mod.rs delete mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/accessors/v0/mod.rs delete mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/v0_methods.rs delete mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/identity_signed.rs delete mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/methods/mod.rs delete mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/mod.rs delete mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/state_transition_like.rs delete mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/json_conversion.rs delete mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/value_conversion.rs delete mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/validate_basic_structure/v0/mod.rs delete mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/version.rs create mode 100644 packages/rs-dpp/src/tokens/allowed_currency.rs create mode 100644 packages/rs-dpp/src/tokens/emergency_action.rs create mode 100644 packages/rs-dpp/src/tokens/errors.rs create mode 100644 packages/rs-dpp/src/tokens/info/methods.rs create mode 100644 packages/rs-dpp/src/tokens/info/mod.rs create mode 100644 packages/rs-dpp/src/tokens/info/v0/mod.rs create mode 100644 packages/rs-dpp/src/tokens/mod.rs create mode 100644 packages/rs-dpp/src/tokens/status/methods.rs create mode 100644 packages/rs-dpp/src/tokens/status/mod.rs create mode 100644 packages/rs-dpp/src/tokens/status/v0/mod.rs create mode 100644 packages/rs-dpp/src/tokens/token_event.rs rename packages/rs-drive-abci/src/execution/platform_events/{block_fee_processing => block_processing_end_events}/add_process_epoch_change_operations/mod.rs (100%) rename packages/rs-drive-abci/src/execution/platform_events/{block_fee_processing => block_processing_end_events}/add_process_epoch_change_operations/v0/mod.rs (100%) rename packages/rs-drive-abci/src/execution/platform_events/{block_fee_processing => block_processing_end_events}/mod.rs (56%) rename packages/rs-drive-abci/src/execution/platform_events/{block_fee_processing/process_block_fees => block_processing_end_events/process_block_fees_and_validate_sum_trees}/mod.rs (79%) rename packages/rs-drive-abci/src/execution/platform_events/{block_fee_processing/process_block_fees => block_processing_end_events/process_block_fees_and_validate_sum_trees}/v0/mod.rs (99%) create mode 100644 packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/process_block_fees_and_validate_sum_trees/v1/mod.rs rename packages/rs-drive-abci/src/execution/platform_events/{block_fee_processing => block_processing_end_events}/tests.rs (95%) create mode 100644 packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/common.rs create mode 100644 packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/v1/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/platform_events/tokens/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/platform_events/tokens/validate_token_aggregated_balance/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/platform_events/tokens/validate_token_aggregated_balance/v0/mod.rs rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_create_transition_action/mod.rs (83%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_create_transition_action/state_v0/mod.rs (96%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_create_transition_action/state_v1/mod.rs (96%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_create_transition_action/structure_v0/mod.rs (97%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_delete_transition_action/mod.rs (84%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_delete_transition_action/state_v0/mod.rs (92%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_delete_transition_action/structure_v0/mod.rs (91%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_purchase_transition_action/mod.rs (84%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_purchase_transition_action/state_v0/mod.rs (95%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_purchase_transition_action/structure_v0/mod.rs (95%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_replace_transition_action/mod.rs (84%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_replace_transition_action/state_v0/mod.rs (95%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_replace_transition_action/structure_v0/mod.rs (94%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_transfer_transition_action/mod.rs (84%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_transfer_transition_action/state_v0/mod.rs (95%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_transfer_transition_action/structure_v0/mod.rs (94%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_update_price_transition_action/mod.rs (84%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_update_price_transition_action/state_v0/mod.rs (95%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/action_validation/document_update_price_transition_action/structure_v0/mod.rs (94%) create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/state_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/structure_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/state_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/structure_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/state_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/structure_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/state_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/structure_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/state_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/structure_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/state_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/structure_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/state_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/structure_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/state_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/structure_v0/mod.rs rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/advanced_structure/mod.rs (100%) create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/advanced_structure/v0/mod.rs rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/balance/mod.rs (76%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/balance/v0/mod.rs (89%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/bindings/data_trigger_binding/mod.rs (89%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/bindings/data_trigger_binding/v0/mod.rs (96%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/bindings/list/mod.rs (79%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/bindings/list/v0/mod.rs (88%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/bindings/mod.rs (100%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/context.rs (100%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/executor.rs (58%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/mod.rs (94%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/triggers/dashpay/mod.rs (74%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/triggers/dashpay/v0/mod.rs (86%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/triggers/dpns/mod.rs (70%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/triggers/dpns/v0/mod.rs (79%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/triggers/feature_flags/mod.rs (70%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/triggers/feature_flags/v0/mod.rs (83%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/triggers/mod.rs (100%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/triggers/reject/mod.rs (69%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/triggers/reject/v0/mod.rs (68%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/triggers/withdrawals/mod.rs (74%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/data_triggers/triggers/withdrawals/v0/mod.rs (91%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/identity_contract_nonce/mod.rs (100%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/identity_contract_nonce/v0/mod.rs (82%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/is_allowed/mod.rs (86%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/is_allowed/v0/mod.rs (75%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/mod.rs (66%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/state/mod.rs (100%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/state/v0/data_triggers.rs (76%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/state/v0/fetch_contender.rs (100%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/state/v0/fetch_documents.rs (97%) create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/mod.rs rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/transformer/mod.rs (100%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/{documents_batch => batch}/transformer/v0/mod.rs (60%) delete mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/mod.rs delete mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/advanced_structure/v0/mod.rs delete mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/mod.rs create mode 100644 packages/rs-drive-abci/src/query/group_queries/group_info/mod.rs create mode 100644 packages/rs-drive-abci/src/query/group_queries/group_info/v0/mod.rs create mode 100644 packages/rs-drive-abci/src/query/group_queries/group_infos/mod.rs create mode 100644 packages/rs-drive-abci/src/query/group_queries/group_infos/v0/mod.rs create mode 100644 packages/rs-drive-abci/src/query/group_queries/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/identities_token_balances/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/identities_token_balances/v0/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/identities_token_infos/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/identities_token_infos/v0/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/identity_token_balances/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/identity_token_balances/v0/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/identity_token_infos/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/identity_token_infos/v0/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/token_status/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/token_status/v0/mod.rs create mode 100644 packages/rs-drive-abci/tests/strategy_tests/token_tests.rs create mode 100644 packages/rs-drive-abci/tests/supporting_files/contract/basic-token/basic-token.json create mode 100644 packages/rs-drive-abci/tests/supporting_files/contract/crypto-card-game/crypto-card-game-in-game-currency.json create mode 100644 packages/rs-drive/src/drive/contract/insert/insert_contract/v1/mod.rs create mode 100644 packages/rs-drive/src/drive/contract/update/update_contract/v1/mod.rs create mode 100644 packages/rs-drive/src/drive/group/estimated_costs/for_add_group_action/mod.rs create mode 100644 packages/rs-drive/src/drive/group/estimated_costs/for_add_group_action/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/estimated_costs/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_action_id_has_signer/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_action_id_has_signer/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_action_id_info_keep_serialized/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_action_id_info_keep_serialized/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_action_id_signers_power/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_action_id_signers_power/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_group_info/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_group_info/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_group_infos/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_group_infos/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/queries.rs create mode 100644 packages/rs-drive/src/drive/group/insert/add_group_action/mod.rs create mode 100644 packages/rs-drive/src/drive/group/insert/add_group_action/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/insert/add_new_groups/mod.rs create mode 100644 packages/rs-drive/src/drive/group/insert/add_new_groups/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/insert/mod.rs create mode 100644 packages/rs-drive/src/drive/group/mod.rs create mode 100644 packages/rs-drive/src/drive/group/paths.rs create mode 100644 packages/rs-drive/src/drive/group/prove/mod.rs create mode 100644 packages/rs-drive/src/drive/group/prove/prove_group_info/mod.rs create mode 100644 packages/rs-drive/src/drive/group/prove/prove_group_info/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/prove/prove_group_infos/mod.rs create mode 100644 packages/rs-drive/src/drive/group/prove/prove_group_infos/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/initialization/v1/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/add_transaction_history_operations/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/add_transaction_history_operations/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/apply_status/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/apply_status/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/add_to_previous_token_balance/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/add_to_previous_token_balance/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/fetch_identities_token_balances/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/fetch_identities_token_balances/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balance/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balance/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balances/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balances/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/prove_identities_token_balances/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/prove_identities_token_balances/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/prove_identity_token_balances/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/prove_identity_token_balances/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/queries.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/remove_from_identity_token_balance/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/remove_from_identity_token_balance/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/balance/update.rs create mode 100644 packages/rs-drive/src/drive/tokens/burn/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/burn/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/estimated_costs/for_token_balances/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/estimated_costs/for_token_balances/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/estimated_costs/for_token_identity_infos/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/estimated_costs/for_token_identity_infos/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/estimated_costs/for_token_status_infos/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/estimated_costs/for_token_status_infos/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/estimated_costs/for_token_total_supply/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/estimated_costs/for_token_total_supply/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/estimated_costs/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/freeze/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/freeze/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/info/fetch_identities_token_infos/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/info/fetch_identities_token_infos/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/info/fetch_identity_token_info/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/info/fetch_identity_token_info/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/info/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/info/prove_identities_token_infos/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/info/prove_identities_token_infos/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/info/prove_identity_token_infos/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/info/prove_identity_token_infos/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/info/queries.rs create mode 100644 packages/rs-drive/src/drive/tokens/mint/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/mint/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/paths.rs create mode 100644 packages/rs-drive/src/drive/tokens/status/fetch_token_status/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/status/fetch_token_status/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/status/fetch_token_statuses/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/status/fetch_token_statuses/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/status/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/status/prove_token_statuses/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/status/prove_token_statuses/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/add_to_token_total_supply/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/add_to_token_total_supply/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/create_token_trees/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/create_token_trees/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/remove_from_token_total_supply/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/remove_from_token_total_supply/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/transfer/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/transfer/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/unfreeze/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/unfreeze/v0/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/batch_transition.rs rename packages/rs-drive/src/state_transition_action/action_convert_to_operations/{ => batch}/document/document_create_transition.rs (95%) rename packages/rs-drive/src/state_transition_action/action_convert_to_operations/{ => batch}/document/document_delete_transition.rs (86%) rename packages/rs-drive/src/state_transition_action/action_convert_to_operations/{ => batch}/document/document_purchase_transition.rs (92%) rename packages/rs-drive/src/state_transition_action/action_convert_to_operations/{ => batch}/document/document_replace_transition.rs (91%) rename packages/rs-drive/src/state_transition_action/action_convert_to_operations/{ => batch}/document/document_transfer_transition.rs (91%) rename packages/rs-drive/src/state_transition_action/action_convert_to_operations/{ => batch}/document/document_transition.rs (63%) rename packages/rs-drive/src/state_transition_action/action_convert_to_operations/{ => batch}/document/document_update_price_transition.rs (90%) rename packages/rs-drive/src/state_transition_action/action_convert_to_operations/{ => batch}/document/documents_batch_transition.rs (84%) create mode 100644 packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/mod.rs rename packages/rs-drive/src/state_transition_action/action_convert_to_operations/{document => batch}/mod.rs (57%) create mode 100644 packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_burn_transition.rs create mode 100644 packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_destroy_frozen_funds_transition.rs create mode 100644 packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_emergency_action_transition.rs create mode 100644 packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_freeze_transition.rs create mode 100644 packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_mint_transition.rs create mode 100644 packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_transfer_transition.rs create mode 100644 packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_transition.rs create mode 100644 packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_unfreeze_transition.rs rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_base_transition_action/mod.rs (100%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_base_transition_action/transformer.rs (81%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_base_transition_action/v0/mod.rs (100%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_base_transition_action/v0/transformer.rs (90%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_create_transition_action/mod.rs (98%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_create_transition_action/transformer.rs (86%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_create_transition_action/v0/mod.rs (99%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_create_transition_action/v0/transformer.rs (95%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_delete_transition_action/mod.rs (87%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_delete_transition_action/transformer.rs (78%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_delete_transition_action/v0/mod.rs (89%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_delete_transition_action/v0/transformer.rs (74%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_purchase_transition_action/mod.rs (97%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_purchase_transition_action/transformer.rs (87%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_purchase_transition_action/v0/mod.rs (94%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_purchase_transition_action/v0/transformer.rs (86%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_replace_transition_action/mod.rs (98%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_replace_transition_action/transformer.rs (91%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_replace_transition_action/v0/mod.rs (99%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_replace_transition_action/v0/transformer.rs (88%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_transfer_transition_action/mod.rs (97%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_transfer_transition_action/transformer.rs (87%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_transfer_transition_action/v0/mod.rs (92%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_transfer_transition_action/v0/transformer.rs (85%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch/document_transition/action_type.rs => batch/batched_transition/document_transition/document_transition_action_type.rs} (63%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_update_price_transition_action/mod.rs (97%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_update_price_transition_action/transformer.rs (87%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_update_price_transition_action/v0/mod.rs (93%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/document_update_price_transition_action/v0/transformer.rs (84%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch/batched_transition}/document_transition/mod.rs (51%) create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/v0/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/v0/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/v0/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/v0/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/v0/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/v0/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/v0/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/v0/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/v0/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/v0/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/v0/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/v0/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transition_action_type.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/v0/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/v0/transformer.rs rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch}/mod.rs (60%) rename packages/rs-drive/src/state_transition_action/{document/documents_batch => batch}/v0/mod.rs (68%) delete mode 100644 packages/rs-drive/src/state_transition_action/document/mod.rs create mode 100644 packages/rs-drive/src/util/batch/drive_op_batch/group.rs create mode 100644 packages/rs-drive/src/util/batch/drive_op_batch/token.rs create mode 100644 packages/rs-drive/src/util/grove_operations/batch_insert_empty_sum_tree/mod.rs create mode 100644 packages/rs-drive/src/util/grove_operations/batch_insert_empty_sum_tree/v0/mod.rs create mode 100644 packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_if_not_exists/mod.rs create mode 100644 packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_if_not_exists/v0/mod.rs create mode 100644 packages/rs-drive/src/util/grove_operations/grove_get_big_sum_tree_total_value/mod.rs create mode 100644 packages/rs-drive/src/util/grove_operations/grove_get_big_sum_tree_total_value/v0/mod.rs create mode 100644 packages/rs-drive/src/util/grove_operations/grove_get_optional_sum_tree_total_value/mod.rs create mode 100644 packages/rs-drive/src/util/grove_operations/grove_get_optional_sum_tree_total_value/v0/mod.rs create mode 100644 packages/rs-drive/src/util/grove_operations/grove_get_raw_item/mod.rs create mode 100644 packages/rs-drive/src/util/grove_operations/grove_get_raw_item/v0/mod.rs create mode 100644 packages/rs-drive/src/util/grove_operations/grove_get_raw_optional_item/mod.rs create mode 100644 packages/rs-drive/src/util/grove_operations/grove_get_raw_optional_item/v0/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_ids/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_ids/v0/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_ids/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_ids/v0/mod.rs create mode 100644 packages/rs-drive/tests/supporting_files/contract/tokens/token-example-contract.json create mode 100644 packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/v2.rs create mode 100644 packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_serialization_versions/v2.rs create mode 100644 packages/rs-platform-version/src/version/dpp_versions/dpp_token_versions/mod.rs create mode 100644 packages/rs-platform-version/src/version/dpp_versions/dpp_token_versions/v1.rs create mode 100644 packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.rs create mode 100644 packages/rs-platform-version/src/version/drive_versions/drive_contract_method_versions/v2.rs create mode 100644 packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/mod.rs create mode 100644 packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/v1.rs create mode 100644 packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs create mode 100644 packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs create mode 100644 packages/rs-platform-version/src/version/drive_versions/v4.rs create mode 100644 packages/rs-platform-version/src/version/v9.rs create mode 100644 packages/search-contract/.eslintrc create mode 100644 packages/search-contract/.mocharc.yml create mode 100644 packages/search-contract/Cargo.toml create mode 100644 packages/search-contract/LICENSE create mode 100644 packages/search-contract/README.md create mode 100644 packages/search-contract/lib/systemIds.js create mode 100644 packages/search-contract/package.json create mode 100644 packages/search-contract/schema/v1/search-contract-documents.json create mode 100644 packages/search-contract/src/error.rs create mode 100644 packages/search-contract/src/lib.rs create mode 100644 packages/search-contract/src/v1/mod.rs create mode 100644 packages/search-contract/test/.eslintrc create mode 100644 packages/search-contract/test/bootstrap.js create mode 100644 packages/search-contract/test/unit/searchContract.spec.js create mode 100644 packages/token-history-contract/.eslintrc create mode 100644 packages/token-history-contract/.mocharc.yml create mode 100644 packages/token-history-contract/Cargo.toml create mode 100644 packages/token-history-contract/LICENSE create mode 100644 packages/token-history-contract/README.md create mode 100644 packages/token-history-contract/lib/systemIds.js create mode 100644 packages/token-history-contract/package.json create mode 100644 packages/token-history-contract/schema/v1/token-history-contract-documents.json create mode 100644 packages/token-history-contract/src/error.rs create mode 100644 packages/token-history-contract/src/lib.rs create mode 100644 packages/token-history-contract/src/v1/mod.rs create mode 100644 packages/token-history-contract/test/.eslintrc create mode 100644 packages/token-history-contract/test/bootstrap.js create mode 100644 packages/token-history-contract/test/unit/tokenHistoryContract.spec.js create mode 100644 packages/wasm-dpp/src/document/state_transition/batch_transition/batched_transition/mod.rs rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/document_transition/document_create_transition.rs (98%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/document_transition/document_delete_transition.rs (100%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/document_transition/document_replace_transition.rs (100%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/document_transition/mod.rs (90%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/mod.rs (89%) create mode 100644 packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/mod.rs rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/validation/basic/find_duplicates_by_id.rs (100%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/validation/basic/find_duplicates_by_indices.rs (100%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/validation/basic/mod.rs (100%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/validation/basic/validate_documents_batch_transition_basic.rs (100%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/validation/basic/validate_partial_compound_indices.rs (100%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/validation/mod.rs (100%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/validation/state/fetch_extended_documents.rs (100%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/validation/state/mod.rs (100%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/validation/state/validate_documents_batch_transitions_state.rs (100%) rename packages/wasm-dpp/src/document/state_transition/{document_batch_transition => batch_transition}/validation/state/validate_documents_uniqueness_by_indices.rs (100%) diff --git a/.github/package-filters/js-packages.yml b/.github/package-filters/js-packages.yml index b42237f81b..0c4e0260fa 100644 --- a/.github/package-filters/js-packages.yml +++ b/.github/package-filters/js-packages.yml @@ -2,6 +2,10 @@ - .github/workflows/tests* - packages/wallet-utils-contract/** +'@dashevo/token-history-contract': &token-history-contract + - .github/workflows/tests* + - packages/token-history-contract/** + '@dashevo/dashpay-contract': &dashpay-contract - .github/workflows/tests* - packages/dashpay-contract/** @@ -30,6 +34,7 @@ - *dpns-contract - *withdrawals-contract - *wallet-utils-contract + - *token-history-contract - packages/rs-platform-serialization/** - packages/rs-platform-serialization-derive/** - packages/rs-platform-value/** @@ -80,6 +85,7 @@ dashmate: - *masternode-reward-shares-contract - *dpns-contract - *withdrawals-contract + - *token-history-contract - *wallet-lib - *dapi-client diff --git a/.github/package-filters/rs-packages.yml b/.github/package-filters/rs-packages.yml index c813323e1d..7e31bd9992 100644 --- a/.github/package-filters/rs-packages.yml +++ b/.github/package-filters/rs-packages.yml @@ -2,6 +2,10 @@ wallet-utils-contract: &wallet-utils-contract - .github/workflows/tests* - packages/wallet-utils-contract/** +token-history-contract: &token-history-contract + - .github/workflows/tests* + - packages/token-history-contract/** + dashpay-contract: &dashpay-contract - .github/workflows/tests* - packages/dashpay-contract/** @@ -30,6 +34,7 @@ dpp: &dpp - *dpns-contract - *withdrawals-contract - *wallet-utils-contract + - *token-history-contract - *json-schema-compatibility-validator - packages/rs-platform-serialization/** - packages/rs-platform-serialization-derive/** diff --git a/Cargo.lock b/Cargo.lock index e3f0fe93d7..930e2769ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1318,6 +1318,7 @@ dependencies = [ "platform-version", "serde_json", "thiserror 1.0.64", + "token-history-contract", "wallet-utils-contract", "withdrawals-contract", ] @@ -2097,9 +2098,8 @@ dependencies = [ [[package]] name = "grovedb" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebf36cc41af86d8ccb8b7f64fd15006cd83ec979c49cd2ad30628bf855c54d7d" +version = "3.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" dependencies = [ "axum", "bincode", @@ -2129,9 +2129,8 @@ dependencies = [ [[package]] name = "grovedb-costs" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cc526a58bdca58cb86340632081e27264e3557a73608cf29f6738ad9bfab316" +version = "3.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" dependencies = [ "integer-encoding", "intmap", @@ -2140,9 +2139,8 @@ dependencies = [ [[package]] name = "grovedb-epoch-based-storage-flags" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abd5f01eb50ff57b2c24e856377684d42dacdbd04de7c0189bf2e0e0cd109692" +version = "3.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" dependencies = [ "grovedb-costs", "hex", @@ -2153,12 +2151,12 @@ dependencies = [ [[package]] name = "grovedb-merk" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce3b133a76e9935f3a57e08598769849d79df582244e1ac99509177e23c2605" +version = "3.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" dependencies = [ "bincode", "blake3", + "byteorder", "colored", "ed", "grovedb-costs", @@ -2176,15 +2174,16 @@ dependencies = [ [[package]] name = "grovedb-path" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67dc8bc00b9be473f7b25670d1422daadd706c9b09ed6aa5cf2caf8722a487ac" +version = "3.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" +dependencies = [ + "hex", +] [[package]] name = "grovedb-storage" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "905cff776de89b9ee1e96979861e254b0912170b35d89678ad782f487a22a2e3" +version = "3.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" dependencies = [ "blake3", "grovedb-costs", @@ -2202,9 +2201,8 @@ dependencies = [ [[package]] name = "grovedb-version" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a987e051c8c9cf8fa381b29b243d4951f8c1f24f9c90ceed52afca3ac460986c" +version = "3.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" dependencies = [ "thiserror 2.0.11", "versioned-feature-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2212,9 +2210,8 @@ dependencies = [ [[package]] name = "grovedb-visualize" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56eee6f57d324505611de0042af2b6b9933235e704a1a6542ff7ba5b5c56f64e" +version = "3.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" dependencies = [ "hex", "itertools 0.14.0", @@ -2222,9 +2219,8 @@ dependencies = [ [[package]] name = "grovedbg-types" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cfa37a90579ba2c71e074d6047c1dcfc19caa458fbcefd4e8e31a02f6a9fe38" +version = "3.0.0" +source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" dependencies = [ "serde", "serde_with 3.9.0", @@ -5042,6 +5038,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +[[package]] +name = "token-history-contract" +version = "1.6.2" +dependencies = [ + "platform-value", + "platform-version", + "serde_json", + "thiserror 1.0.64", +] + [[package]] name = "tokio" version = "1.40.0" diff --git a/Cargo.toml b/Cargo.toml index 02295b6b47..b8444e3bd1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,7 @@ members = [ "packages/rs-json-schema-compatibility-validator", "packages/check-features", "packages/wallet-utils-contract", + "packages/token-history-contract" ] [workspace.package] diff --git a/Dockerfile b/Dockerfile index 0050ed916a..709ea2b5b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -353,6 +353,7 @@ COPY --parents \ packages/feature-flags-contract \ packages/dpns-contract \ packages/wallet-utils-contract \ + packages/token-history-contract \ packages/data-contracts \ packages/strategy-tests \ packages/simple-signer \ @@ -419,6 +420,7 @@ COPY --parents \ packages/rs-drive-abci \ packages/dashpay-contract \ packages/wallet-utils-contract \ + packages/token-history-contract \ packages/withdrawals-contract \ packages/masternode-reward-shares-contract \ packages/feature-flags-contract \ @@ -508,6 +510,7 @@ COPY --parents \ packages/dashpay-contract \ packages/withdrawals-contract \ packages/wallet-utils-contract \ + packages/token-history-contract \ packages/masternode-reward-shares-contract \ packages/feature-flags-contract \ packages/dpns-contract \ @@ -628,6 +631,7 @@ COPY --from=build-dashmate-helper /platform/packages/js-grpc-common packages/js- COPY --from=build-dashmate-helper /platform/packages/dapi-grpc packages/dapi-grpc COPY --from=build-dashmate-helper /platform/packages/dash-spv packages/dash-spv COPY --from=build-dashmate-helper /platform/packages/wallet-utils-contract packages/wallet-utils-contract +COPY --from=build-dashmate-helper /platform/packages/token-history-contract packages/token-history-contract COPY --from=build-dashmate-helper /platform/packages/withdrawals-contract packages/withdrawals-contract COPY --from=build-dashmate-helper /platform/packages/masternode-reward-shares-contract packages/masternode-reward-shares-contract COPY --from=build-dashmate-helper /platform/packages/feature-flags-contract packages/feature-flags-contract diff --git a/package.json b/package.json index 4e8f3efa73..958f8f9793 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "test:dashpay-contract": "ultra -r --filter \"packages/@(dashpay-contract|js-dash-sdk|js-drive|js-dapi-client|wasm-dpp|wallet-lib|dapi|platform-test-suite)\" test", "test:dpns-contract": "ultra -r --filter \"packages/@(dpns-contract|js-dash-sdk|js-drive|js-dapi-client|wasm-dpp|wallet-lib|dapi|platform-test-suite)\" test", "test:feature-flags-contract": "ultra -r --filter \"packages/@(feature-flags-contract|js-dash-sdk|js-drive|js-dapi-client|wasm-dpp|wallet-lib|dapi|platform-test-suite)\" test", + "test:token-history-contract": "ultra -r --filter \"packages/@(token-history-contract|js-dash-sdk|js-drive|js-dapi-client|wasm-dpp|wallet-lib|dapi|platform-test-suite)\" test", "test:dapi-client": "ultra -r --filter \"packages/@(js-dapi-client|wallet-lib|js-dash-sdk|platform-test-suite)\" test", "test:sdk": "ultra -r --filter \"packages/@(js-dash-sdk|platform-test-suite)\" test", "test:spv": "ultra -r --filter \"packages/@(dash-spv|js-dapi-client)\" test", @@ -65,7 +66,8 @@ "packages/masternode-reward-shares-contract", "packages/dash-spv", "packages/wasm-dpp", - "packages/withdrawals-contract" + "packages/withdrawals-contract", + "packages/token-history-contract" ], "resolutions": { "elliptic": "6.5.7", diff --git a/packages/dapi-grpc/build.rs b/packages/dapi-grpc/build.rs index 642b614ab9..49b9c29032 100644 --- a/packages/dapi-grpc/build.rs +++ b/packages/dapi-grpc/build.rs @@ -47,7 +47,7 @@ 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; 30] = [ + const VERSIONED_REQUESTS: [&str; 34] = [ "GetDataContractHistoryRequest", "GetDataContractRequest", "GetDataContractsRequest", @@ -78,6 +78,10 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig { "GetEvonodesProposedEpochBlocksByIdsRequest", "GetEvonodesProposedEpochBlocksByRangeRequest", "GetStatusRequest", + "GetIdentityTokenBalancesRequest", + "GetIdentitiesTokenBalancesRequest", + "GetIdentityTokenInfosRequest", + "GetIdentitiesTokenInfosRequest", ]; // The following responses are excluded as they don't support proofs: @@ -85,7 +89,7 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig { // - "GetStatusResponse" // // "GetEvonodesProposedEpochBlocksResponse" is used for 2 Requests - const VERSIONED_RESPONSES: [&str; 29] = [ + const VERSIONED_RESPONSES: [&str; 33] = [ "GetDataContractHistoryResponse", "GetDataContractResponse", "GetDataContractsResponse", @@ -115,6 +119,10 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig { "GetVotePollsByEndDateResponse", "GetTotalCreditsInPlatformResponse", "GetEvonodesProposedEpochBlocksResponse", + "GetIdentityTokenBalancesResponse", + "GetIdentitiesTokenBalancesResponse", + "GetIdentityTokenInfosResponse", + "GetIdentitiesTokenInfosResponse", ]; check_unique(&VERSIONED_REQUESTS).expect("VERSIONED_REQUESTS"); diff --git a/packages/dapi-grpc/protos/platform/v0/platform.proto b/packages/dapi-grpc/protos/platform/v0/platform.proto index b46d784ceb..81da114443 100644 --- a/packages/dapi-grpc/protos/platform/v0/platform.proto +++ b/packages/dapi-grpc/protos/platform/v0/platform.proto @@ -55,6 +55,14 @@ service Platform { rpc getPathElements(GetPathElementsRequest) returns (GetPathElementsResponse); rpc getStatus(GetStatusRequest) returns (GetStatusResponse); rpc getCurrentQuorumsInfo(GetCurrentQuorumsInfoRequest) returns (GetCurrentQuorumsInfoResponse); + rpc getIdentityTokenBalances(GetIdentityTokenBalancesRequest) returns (GetIdentityTokenBalancesResponse); + rpc getIdentitiesTokenBalances(GetIdentitiesTokenBalancesRequest) returns (GetIdentitiesTokenBalancesResponse); + rpc getIdentityTokenInfos(GetIdentityTokenInfosRequest) returns (GetIdentityTokenInfosResponse); + rpc getIdentitiesTokenInfos(GetIdentitiesTokenInfosRequest) returns (GetIdentitiesTokenInfosResponse); + rpc getTokenStatuses(GetTokenStatusesRequest) returns (GetTokenStatusesResponse); + rpc getGroupInfo(GetGroupInfoRequest) returns (GetGroupInfoResponse); +// rpc getActiveGroupActions(GetActiveGroupActionsRequest) returns (GetActiveGroupActionsResponse); +// rpc getClosedGroupActions(GetClosedGroupActionsRequest) returns (GetClosedGroupActionsResponse); } // Proof message includes cryptographic proofs for validating responses @@ -1215,3 +1223,360 @@ message GetCurrentQuorumsInfoResponse { } oneof version { GetCurrentQuorumsInfoResponseV0 v0 = 1; } } + +message GetIdentityTokenBalancesRequest { + message GetIdentityTokenBalancesRequestV0 { + bytes identity_id = 1; // ID of the identity + repeated bytes token_ids = 2; // List of token IDs + bool prove = 3; // Flag to request a proof as the response + } + oneof version { + GetIdentityTokenBalancesRequestV0 v0 = 1; + } +} + +message GetIdentityTokenBalancesResponse { + message GetIdentityTokenBalancesResponseV0 { + message TokenBalanceEntry { + bytes token_id = 1; // Token ID + optional uint64 balance = 2; // Token balance for the contract + } + + message TokenBalances { + repeated TokenBalanceEntry token_balances = 1; // List of token balances + } + + oneof result { + TokenBalances token_balances = 1; // Actual token balances + Proof proof = 2; // Proof of the token balances, if requested + } + ResponseMetadata metadata = 3; // Metadata about the blockchain state + } + oneof version { + GetIdentityTokenBalancesResponseV0 v0 = 1; + } +} + +message GetIdentitiesTokenBalancesRequest { + message GetIdentitiesTokenBalancesRequestV0 { + bytes token_id = 1; // Token ID + repeated bytes identity_ids = 2; // List of identity IDs + bool prove = 3; // Flag to request a proof as the response + } + oneof version { + GetIdentitiesTokenBalancesRequestV0 v0 = 1; + } +} + +message GetIdentitiesTokenBalancesResponse { + message GetIdentitiesTokenBalancesResponseV0 { + message IdentityTokenBalanceEntry { + bytes identity_id = 1; // Identity ID + optional uint64 balance = 2; // Token balance for the identity + } + + message IdentityTokenBalances { + repeated IdentityTokenBalanceEntry identity_token_balances = 1; // List of identity token balances + } + + oneof result { + IdentityTokenBalances identity_token_balances = 1; // Actual identity token balances + Proof proof = 2; // Proof of the balances, if requested + } + ResponseMetadata metadata = 3; // Metadata about the blockchain state + } + oneof version { + GetIdentitiesTokenBalancesResponseV0 v0 = 1; + } +} + + + +message GetIdentityTokenInfosRequest { + message GetIdentityTokenInfosRequestV0 { + bytes identity_id = 1; + repeated bytes token_ids = 2; + bool prove = 3; + } + oneof version { + GetIdentityTokenInfosRequestV0 v0 = 1; + } +} + +message GetIdentityTokenInfosResponse { + message GetIdentityTokenInfosResponseV0 { + message TokenIdentityInfoEntry { + bool frozen = 1; + } + + message TokenInfoEntry { + bytes token_id = 1; + optional TokenIdentityInfoEntry info = 2; + } + + message TokenInfos { + repeated TokenInfoEntry token_infos = 1; + } + + oneof result { + TokenInfos token_infos = 1; + Proof proof = 2; + } + ResponseMetadata metadata = 3; + } + oneof version { + GetIdentityTokenInfosResponseV0 v0 = 1; + } +} + +message GetIdentitiesTokenInfosRequest { + message GetIdentitiesTokenInfosRequestV0 { + bytes token_id = 1; + repeated bytes identity_ids = 2; + bool prove = 3; + } + oneof version { + GetIdentitiesTokenInfosRequestV0 v0 = 1; + } +} + +message GetIdentitiesTokenInfosResponse { + message GetIdentitiesTokenInfosResponseV0 { + message TokenIdentityInfoEntry { + bool frozen = 1; + } + + message TokenInfoEntry { + bytes identity_id = 1; + optional TokenIdentityInfoEntry info = 2; + } + + message IdentityTokenInfos { + repeated TokenInfoEntry token_infos = 1; + } + + oneof result { + IdentityTokenInfos identity_token_infos = 1; + Proof proof = 2; + } + ResponseMetadata metadata = 3; + } + oneof version { + GetIdentitiesTokenInfosResponseV0 v0 = 1; + } +} + +message GetTokenStatusesRequest { + message GetTokenStatusesRequestV0 { + repeated bytes token_ids = 1; + bool prove = 2; + } + oneof version { + GetTokenStatusesRequestV0 v0 = 1; + } +} + +message GetTokenStatusesResponse { + message GetTokenStatusesResponseV0 { + message TokenStatusEntry { + bytes token_id = 1; + optional bool paused = 2; + } + + message TokenStatuses { + repeated TokenStatusEntry token_statuses = 1; + } + + oneof result { + TokenStatuses token_statuses = 1; + Proof proof = 2; + } + ResponseMetadata metadata = 3; + } + oneof version { + GetTokenStatusesResponseV0 v0 = 1; + } +} + +message GetGroupInfoRequest { + message GetGroupInfoRequestV0 { + bytes contract_id = 1; + uint32 group_contract_position = 2; + bool prove = 3; + } + oneof version { + GetGroupInfoRequestV0 v0 = 1; + } +} + +message GetGroupInfoResponse { + message GetGroupInfoResponseV0 { + message GroupMemberEntry { + bytes member_id = 1; + uint32 power = 2; + } + + message GroupInfoEntry { + repeated GroupMemberEntry members = 1; + uint32 group_required_power = 2; + } + + message GroupInfo { + optional GroupInfoEntry group_info = 1; + } + + oneof result { + GroupInfo group_info = 1; + Proof proof = 2; + } + ResponseMetadata metadata = 4; + } + oneof version { + GetGroupInfoResponseV0 v0 = 1; + } +} + +message GetGroupInfosRequest { + message StartAtGroupContractPosition { + uint32 start_group_contract_position = 1; + bool start_group_contract_position_included = 2; + } + + message GetGroupInfosRequestV0 { + bytes contract_id = 1; + optional StartAtGroupContractPosition start_at_group_contract_position = 2; + optional uint32 count = 3; + bool prove = 4; + } + oneof version { + GetGroupInfosRequestV0 v0 = 1; + } +} + +message GetGroupInfosResponse { + message GetGroupInfosResponseV0 { + message GroupMemberEntry { + bytes member_id = 1; + uint32 power = 2; + } + + message GroupPositionInfoEntry { + uint32 group_contract_position = 1; + repeated GroupMemberEntry members = 2; + uint32 group_required_power = 3; + } + + message GroupInfos { + repeated GroupPositionInfoEntry group_infos = 1; + } + + oneof result { + GroupInfos group_infos = 1; + Proof proof = 2; + } + ResponseMetadata metadata = 4; + } + oneof version { + GetGroupInfosResponseV0 v0 = 1; + } +} + +message GetActiveGroupActionsRequest { + message GetActiveGroupActionsRequestV0 { + bytes contract_id = 1; + uint32 group_contract_position = 2; + bool prove = 3; + } + oneof version { + GetActiveGroupActionsRequestV0 v0 = 1; + } +} + +message GetActiveGroupActionsResponse { + message GetActiveGroupActionsResponseV0 { + // Mint event + message MintEvent { + uint64 amount = 1; // Amount to mint + bytes recipient_id = 2; // Recipient identifier + string public_note = 3; // Public note + } + + // Burn event + message BurnEvent { + uint64 amount = 1; // Amount to burn + string public_note = 2; // Public note + } + + // Freeze event + message FreezeEvent { + bytes frozen_id = 1; // Identifier of the frozen entity + string public_note = 2; // Public note + } + + // Unfreeze event + message UnfreezeEvent { + bytes frozen_id = 1; // Identifier of the unfrozen entity + string public_note = 2; // Public note + } + + // Destroy frozen funds event + message DestroyFrozenFundsEvent { + bytes frozen_id = 1; // Identifier of the frozen entity + uint64 amount = 2; // Amount to destroy + string public_note = 3; // Public note + } + + // Transfer event + message TransferEvent { + bytes recipient_id = 1; // Recipient identifier + string public_note = 2; // Public note + bytes shared_encrypted_note = 3; // Shared encrypted note + bytes personal_encrypted_note = 4; // Personal encrypted note + uint64 amount = 5; // Amount transferred + } + + // Emergency action event + message EmergencyActionEvent { + string action_type = 1; // Emergency action type + string public_note = 2; // Public note + } + + // Event associated with this action + message GroupActionEvent { + oneof event_type { + TokenEvent token_event = 1; // Token event details + } + } + + // Details for token events + message TokenEvent { + oneof type { + MintEvent mint = 1; // Mint event details + BurnEvent burn = 2; // Burn event details + FreezeEvent freeze = 3; // Freeze event details + UnfreezeEvent unfreeze = 4; // Unfreeze event details + DestroyFrozenFundsEvent destroy_frozen_funds = 5; // Destroy frozen funds + TransferEvent transfer = 6; // Transfer event details + EmergencyActionEvent emergency_action = 7; // Emergency action details + } + } + + message GroupActionEntry { + bytes action_id = 1; // Unique identifier for the action + GroupActionEvent event = 2; // The event data + } + + message GroupActions { + repeated GroupActionEntry group_actions = 1; + } + + oneof result { + GroupActions group_actions = 1; + Proof proof = 2; + } + ResponseMetadata metadata = 3; + } + oneof version { + GetActiveGroupActionsResponseV0 v0 = 1; + } +} \ No newline at end of file diff --git a/packages/data-contracts/Cargo.toml b/packages/data-contracts/Cargo.toml index e9ad5401a6..4008b43aee 100644 --- a/packages/data-contracts/Cargo.toml +++ b/packages/data-contracts/Cargo.toml @@ -17,3 +17,4 @@ dashpay-contract = { path = "../dashpay-contract" } feature-flags-contract = { path = "../feature-flags-contract" } platform-value = { path = "../rs-platform-value" } wallet-utils-contract = { path = "../wallet-utils-contract" } +token-history-contract = { path = "../token-history-contract" } diff --git a/packages/data-contracts/src/error.rs b/packages/data-contracts/src/error.rs index 0550873b01..7c0c802b71 100644 --- a/packages/data-contracts/src/error.rs +++ b/packages/data-contracts/src/error.rs @@ -119,3 +119,20 @@ impl From for Error { } } } + +impl From for Error { + fn from(e: token_history_contract::Error) -> Self { + match e { + token_history_contract::Error::UnknownVersionMismatch { + method, + known_versions, + received, + } => Error::UnknownVersionMismatch { + method, + known_versions, + received, + }, + token_history_contract::Error::InvalidSchemaJson(e) => Error::InvalidSchemaJson(e), + } + } +} diff --git a/packages/data-contracts/src/lib.rs b/packages/data-contracts/src/lib.rs index 65f324137f..a78ffefc37 100644 --- a/packages/data-contracts/src/lib.rs +++ b/packages/data-contracts/src/lib.rs @@ -9,6 +9,7 @@ pub use feature_flags_contract; pub use masternode_reward_shares_contract; use platform_value::Identifier; use platform_version::version::PlatformVersion; +pub use token_history_contract; pub use wallet_utils_contract; pub use withdrawals_contract; @@ -21,6 +22,7 @@ pub enum SystemDataContract { DPNS = 3, Dashpay = 4, WalletUtils = 5, + TokenHistory = 6, } pub struct DataContractSource { @@ -40,6 +42,7 @@ impl SystemDataContract { SystemDataContract::DPNS => dpns_contract::ID_BYTES, SystemDataContract::Dashpay => dashpay_contract::ID_BYTES, SystemDataContract::WalletUtils => wallet_utils_contract::ID_BYTES, + SystemDataContract::TokenHistory => token_history_contract::ID_BYTES, }; Identifier::new(bytes) } @@ -92,6 +95,13 @@ impl SystemDataContract { definitions: wallet_utils_contract::load_definitions(platform_version)?, document_schemas: wallet_utils_contract::load_documents_schemas(platform_version)?, }, + SystemDataContract::TokenHistory => DataContractSource { + id_bytes: token_history_contract::ID_BYTES, + owner_id_bytes: token_history_contract::OWNER_ID_BYTES, + version: platform_version.system_data_contracts.wallet as u32, + definitions: token_history_contract::load_definitions(platform_version)?, + document_schemas: token_history_contract::load_documents_schemas(platform_version)?, + }, }; Ok(data) diff --git a/packages/rs-dpp/schema/meta_schemas/token/v0/token-meta.json b/packages/rs-dpp/schema/meta_schemas/token/v0/token-meta.json new file mode 100644 index 0000000000..7e5d833fc8 --- /dev/null +++ b/packages/rs-dpp/schema/meta_schemas/token/v0/token-meta.json @@ -0,0 +1,245 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/dashpay/platform/blob/master/packages/rs-dpp/schema/meta_schemas/document/v0/document-meta.json", + "type": "object", + "$defs": { + "localization": { + "type": "string", + "pattern": "^[\\p{L}\\p{N}]*$", + "minLength": 1, + "maxLength": 64, + "$comment": "Allow only alphanumeric characters" + }, + "identifier": { + "type": "string", + "contentMediaType": "application/x.dash.dpp.identifier", + "byteArray": true, + "minLength": 32, + "maxLength": 32, + "description": "A 32-byte identifier" + }, + "optionalIdentifier": { + "type": ["string", "null"], + "contentMediaType": "application/x.dash.dpp.identifier", + "byteArray": true, + "minLength": 32, + "maxLength": 32, + "description": "A 32-byte identifier" + }, + "authorizedActionTakers": { + "description": "Specifies who is authorized to take certain actions", + "oneOf": [ + { + "type": "object", + "properties": { + "type": { "const": "noOne" } + }, + "required": ["type"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { "const": "contractOwner" } + }, + "required": ["type"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { "const": "mainGroup" } + }, + "required": ["type"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "type": { "const": "specifiedIdentities" }, + "identifiers": { + "type": "array", + "description": "An array of authorized identifiers", + "items": { + "$ref": "#/$defs/identifier" + }, + "uniqueItems": true + }, + "requiredSignersCount": { + "$ref": "#/$defs/requiredSignersCount", + "description": "Rules for required signers within these specified identities" + } + }, + "required": ["type", "identifiers", "requiredSignersCount"], + "additionalProperties": false + } + ] + }, + "changeControlRules": { + "type": "object", + "description": "Defines who can make changes to certain parameters and who can change that ability", + "properties": { + "authorizedToMakeChange": { + "$ref": "#/$defs/authorizedActionTakers", + "description": "Who is authorized to make the relevant change" + }, + "authorizedToChangeAuthorizedActionTakers": { + "$ref": "#/$defs/authorizedActionTakers", + "description": "Who is authorized to modify the list of people who can make the change" + }, + "changingAuthorizedActionTakersToNoOneAllowed": { + "type": "boolean", + "description": "Whether it is allowed to change the authorized action takers to no one in the future" + }, + "changingAuthorizedActionTakersToContractOwnerAllowed": { + "type": "boolean", + "description": "Whether it is allowed to change the authorized action takers to contract owner in the future" + } + }, + "required": [ + "authorizedToMakeChange", + "authorizedToChangeAuthorizedActionTakers", + "changingAuthorizedActionTakersToNoOneAllowed", + "changingAuthorizedActionTakersToContractOwnerAllowed" + ], + "additionalProperties": false + }, + "requiredSignersCount": { + "type": "integer", + "description": "How many signers are required to authorize actions", + "minimum": 1, + "maximum": 255 + } + }, + "properties": { + "description": { + "type": "string", + "maxLength": 1024, + "description": "Token description" + }, + "displayConventions": { + "type": "object", + "description": "Token display conventions including capitalization and localization", + "properties": { + "capitalize": { + "type": "boolean", + "description": "Indicates whether token names should be capitalized" + }, + "localizations": { + "type": "object", + "description": "A map of locale keys to their corresponding singular/plural forms", + "additionalProperties": { + "type": "object", + "description": "Localization forms for a given locale key", + "properties": { + "singularForm": { + "$ref": "#/$defs/localization" + }, + "pluralForm": { + "$ref": "#/$defs/localization" + } + }, + "required": [ + "singularForm", + "pluralForm" + ], + "additionalProperties": false + }, + "maxProperties": 255, + "minProperties": 1, + "propertyNames": { + "type": "string", + "minLength": 1, + "maxLength": 255 + } + }, + "decimals": { + "type": "integer", + "minimum": 0, + "description": "The number of decimal places the token supports" + } + }, + "required": ["capitalize", "localizations", "decimals"], + "additionalProperties": false + }, + "initialSupply": { + "type": "integer", + "minimum": 0, + "description": "The initial (base) supply of the token at creation time" + }, + "initialSupplyDestinationIdentityId": { + "$ref": "#/$defs/optionalIdentifier", + "description": "Optional identity where initial supply tokens are sent. If not set, the data contract owner identity is used" + }, + "maxSupply": { + "type": ["integer", "null"], + "minimum": 1, + "description": "The maximum supply the token can ever have, or null if there is no maximum" + }, + "maxSupplyChangeRules": { + "$ref": "#/$defs/changeControlRules", + "description": "Rules governing who can change the max supply and under what conditions" + }, + "mintedTokensDestinationIdentityId": { + "$ref": "#/$defs/optionalIdentifier", + "description": "Optional identity where newly minted tokens are sent. If set then minted tokens can be sent only to this identity" + }, + "mintedTokensDestinationIdentityRules": { + "$ref": "#/$defs/changeControlRules", + "description": "Rules for changing the new tokens destination identity" + }, + "mintingRules": { + "$ref": "#/$defs/changeControlRules", + "description": "Rules governing who and how new tokens can be minted manually" + }, + "burningRules": { + "$ref": "#/$defs/changeControlRules", + "description": "Rules governing who and how tokens can be burned manually" + }, + "mainControlGroup": { + "type": "array", + "description": "The main control group, if present", + "items": { + "type": "object", + "properties": { + "identifiers": { + "type": "array", + "description": "A set of identities representing members of the control group", + "items": { + "$ref": "#/$defs/identifier" + }, + "uniqueItems": true + }, + "requiredSignersCount": { + "$ref": "#/$defs/requiredSignersCount" + } + }, + "required": ["identifiers", "requiredSignersCount"], + "additionalProperties": false + } + }, + "mainControlGroupCanBeModified": { + "$ref": "#/$defs/authorizedActionTakers", + "description": "Specifies which entities are authorized to modify the main control group" + }, + "metadata": { + "type": "object", + "propertyNames": { + "type": "string", + "maxLength": 255 + }, + "additionalProperties": { + "type": "string", + "maxLength": 1024 + }, + "minProperties": 1, + "maxProperties": 255, + "description": "Token arbitrary metadata" + } + }, + "required": [ + "displayConventions", + "initialSupply" + ], + "additionalProperties": false +} diff --git a/packages/rs-dpp/src/balances/credits.rs b/packages/rs-dpp/src/balances/credits.rs index d0f9e2805b..4376686a96 100644 --- a/packages/rs-dpp/src/balances/credits.rs +++ b/packages/rs-dpp/src/balances/credits.rs @@ -19,6 +19,12 @@ pub type Duffs = u64; pub type Credits = u64; +/// Token Amount type +pub type TokenAmount = u64; + +/// Sum token amount +pub type SumTokenAmount = i128; + /// Signed Credits type is used for internal computations and total credits /// balance verification diff --git a/packages/rs-dpp/src/balances/mod.rs b/packages/rs-dpp/src/balances/mod.rs index a6b4881120..c0f505ac78 100644 --- a/packages/rs-dpp/src/balances/mod.rs +++ b/packages/rs-dpp/src/balances/mod.rs @@ -1,3 +1,4 @@ pub mod total_credits_balance; pub mod credits; +pub mod total_tokens_balance; diff --git a/packages/rs-dpp/src/balances/total_tokens_balance/mod.rs b/packages/rs-dpp/src/balances/total_tokens_balance/mod.rs new file mode 100644 index 0000000000..84aa157643 --- /dev/null +++ b/packages/rs-dpp/src/balances/total_tokens_balance/mod.rs @@ -0,0 +1,53 @@ +use crate::balances::credits::SumTokenAmount; +use crate::ProtocolError; +use std::fmt; + +/// The outcome of verifying token balances +#[derive(Copy, Clone, Debug)] +pub struct TotalTokensBalance { + /// all the tokens in platform + pub total_tokens_in_platform: SumTokenAmount, + /// all the tokens in identity token balances + pub total_identity_token_balances: SumTokenAmount, +} + +impl fmt::Display for TotalTokensBalance { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + writeln!(f, "TotalTokensBalance {{")?; + writeln!( + f, + " total_tokens_in_platform: {},", + self.total_tokens_in_platform + )?; + writeln!( + f, + " total_identity_token_balances: {}", + self.total_identity_token_balances + )?; + write!(f, "}}") + } +} +impl TotalTokensBalance { + /// Is the outcome okay? basically do the values match up + /// Errors in case of overflow + pub fn ok(&self) -> Result { + let TotalTokensBalance { + total_tokens_in_platform, + total_identity_token_balances, + } = *self; + + if total_tokens_in_platform < 0 { + return Err(ProtocolError::CriticalCorruptedCreditsCodeExecution( + "Tokens in platform are less than 0".to_string(), + )); + } + + if total_identity_token_balances < 0 { + return Err(ProtocolError::CriticalCorruptedCreditsCodeExecution( + "Tokens in identity balances are less than 0".to_string(), + )); + } + + Ok(total_tokens_in_platform == total_identity_token_balances) + } +} diff --git a/packages/rs-dpp/src/data_contract/accessors/mod.rs b/packages/rs-dpp/src/data_contract/accessors/mod.rs index fc5dc0789b..92fdb99bd9 100644 --- a/packages/rs-dpp/src/data_contract/accessors/mod.rs +++ b/packages/rs-dpp/src/data_contract/accessors/mod.rs @@ -1,45 +1,58 @@ use crate::data_contract::accessors::v0::{DataContractV0Getters, DataContractV0Setters}; use crate::data_contract::config::DataContractConfig; use crate::data_contract::document_type::{DocumentType, DocumentTypeRef}; -use crate::data_contract::DocumentName; +use crate::data_contract::{ + DocumentName, GroupContractPosition, TokenContractPosition, EMPTY_GROUPS, EMPTY_TOKENS, +}; use crate::metadata::Metadata; use crate::prelude::DataContract; use platform_value::Identifier; +use crate::data_contract::accessors::v1::{DataContractV1Getters, DataContractV1Setters}; +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; use crate::data_contract::errors::DataContractError; +use crate::data_contract::group::Group; +use crate::tokens::errors::TokenError; +use crate::ProtocolError; use std::collections::BTreeMap; pub mod v0; +pub mod v1; impl DataContractV0Getters for DataContract { fn id(&self) -> Identifier { match self { DataContract::V0(v0) => v0.id(), + DataContract::V1(v1) => v1.id(), } } fn id_ref(&self) -> &Identifier { match self { DataContract::V0(v0) => v0.id_ref(), + DataContract::V1(v1) => v1.id_ref(), } } fn version(&self) -> u32 { match self { DataContract::V0(v0) => v0.version(), + DataContract::V1(v1) => v1.version(), } } fn owner_id(&self) -> Identifier { match self { DataContract::V0(v0) => v0.owner_id(), + DataContract::V1(v1) => v1.owner_id(), } } fn document_type_cloned_for_name(&self, name: &str) -> Result { match self { DataContract::V0(v0) => v0.document_type_cloned_for_name(name), + DataContract::V1(v1) => v1.document_type_cloned_for_name(name), } } @@ -49,72 +62,84 @@ impl DataContractV0Getters for DataContract { ) -> Result<&DocumentType, DataContractError> { match self { DataContract::V0(v0) => v0.document_type_borrowed_for_name(name), + DataContract::V1(v1) => v1.document_type_borrowed_for_name(name), } } fn document_type_for_name(&self, name: &str) -> Result { match self { DataContract::V0(v0) => v0.document_type_for_name(name), + DataContract::V1(v1) => v1.document_type_for_name(name), } } fn document_type_optional_for_name(&self, name: &str) -> Option { match self { DataContract::V0(v0) => v0.document_type_optional_for_name(name), + DataContract::V1(v1) => v1.document_type_optional_for_name(name), } } fn document_type_cloned_optional_for_name(&self, name: &str) -> Option { match self { DataContract::V0(v0) => v0.document_type_cloned_optional_for_name(name), + DataContract::V1(v1) => v1.document_type_cloned_optional_for_name(name), } } fn has_document_type_for_name(&self, name: &str) -> bool { match self { DataContract::V0(v0) => v0.has_document_type_for_name(name), + DataContract::V1(v1) => v1.has_document_type_for_name(name), } } fn document_types_with_contested_indexes(&self) -> BTreeMap<&DocumentName, &DocumentType> { match self { DataContract::V0(v0) => v0.document_types_with_contested_indexes(), + DataContract::V1(v1) => v1.document_types_with_contested_indexes(), } } fn document_types(&self) -> &BTreeMap { match self { DataContract::V0(v0) => v0.document_types(), + DataContract::V1(v1) => v1.document_types(), } } fn document_types_mut(&mut self) -> &mut BTreeMap { match self { DataContract::V0(v0) => v0.document_types_mut(), + DataContract::V1(v1) => v1.document_types_mut(), } } fn metadata(&self) -> Option<&Metadata> { match self { DataContract::V0(v0) => v0.metadata(), + DataContract::V1(v1) => v1.metadata(), } } fn metadata_mut(&mut self) -> Option<&mut Metadata> { match self { DataContract::V0(v0) => v0.metadata_mut(), + DataContract::V1(v1) => v1.metadata_mut(), } } fn config(&self) -> &DataContractConfig { match self { DataContract::V0(v0) => v0.config(), + DataContract::V1(v1) => v1.config(), } } fn config_mut(&mut self) -> &mut DataContractConfig { match self { DataContract::V0(v0) => v0.config_mut(), + DataContract::V1(v1) => v1.config_mut(), } } } @@ -123,36 +148,185 @@ impl DataContractV0Setters for DataContract { fn set_id(&mut self, id: Identifier) { match self { DataContract::V0(v0) => v0.set_id(id), + DataContract::V1(v1) => v1.set_id(id), } } fn set_version(&mut self, version: u32) { match self { DataContract::V0(v0) => v0.set_version(version), + DataContract::V1(v1) => v1.set_version(version), } } fn increment_version(&mut self) { match self { DataContract::V0(v0) => v0.increment_version(), + DataContract::V1(v1) => v1.increment_version(), } } fn set_owner_id(&mut self, owner_id: Identifier) { match self { DataContract::V0(v0) => v0.set_owner_id(owner_id), + DataContract::V1(v1) => v1.set_owner_id(owner_id), } } fn set_metadata(&mut self, metadata: Option) { match self { DataContract::V0(v0) => v0.set_metadata(metadata), + DataContract::V1(v1) => v1.set_metadata(metadata), } } fn set_config(&mut self, config: DataContractConfig) { match self { DataContract::V0(v0) => v0.set_config(config), + DataContract::V1(v1) => v1.set_config(config), + } + } +} + +/// Implementing DataContractV1Getters for DataContract +impl DataContractV1Getters for DataContract { + /// Returns a reference to the groups map. + fn group(&self, position: GroupContractPosition) -> Result<&Group, ProtocolError> { + match self { + DataContract::V0(_) => Err(ProtocolError::GroupNotFound( + "There can not be a group in v0 data contracts".to_string(), + )), + DataContract::V1(v1) => v1.group(position), + } + } + + /// Returns a reference to the groups map. + fn groups(&self) -> &BTreeMap { + match self { + DataContract::V0(_) => &EMPTY_GROUPS, + DataContract::V1(v1) => &v1.groups, + } + } + + /// Returns a mutable reference to the groups map. + /// Returns `None` for V0 since it doesn't have groups. + fn groups_mut(&mut self) -> Option<&mut BTreeMap> { + match self { + DataContract::V0(_) => None, + DataContract::V1(v1) => Some(&mut v1.groups), + } + } + + /// Returns a reference to a group or an error. + /// Returns an Error for V0 since it doesn't have groups. + fn expected_group(&self, position: GroupContractPosition) -> Result<&Group, ProtocolError> { + match self { + DataContract::V0(_) => Err(ProtocolError::GroupNotFound( + "Group not found in contract V0".to_string(), + )), + DataContract::V1(v1) => { + v1.groups + .get(&position) + .ok_or(ProtocolError::GroupNotFound(format!( + "Group not found at position {} in contract {}", + position, + self.id() + ))) + } + } + } + + /// Returns a reference to the tokens map. + fn tokens(&self) -> &BTreeMap { + match self { + DataContract::V0(_) => &EMPTY_TOKENS, + DataContract::V1(v1) => &v1.tokens, + } + } + + /// Returns a mutable reference to the tokens map. + /// Returns `None` for V0 since it doesn't have tokens. + fn tokens_mut(&mut self) -> Option<&mut BTreeMap> { + match self { + DataContract::V0(_) => None, + DataContract::V1(v1) => Some(&mut v1.tokens), + } + } + + /// Returns a mutable reference to a token configuration or an error. + /// Returns an Error for V0 since it doesn't have tokens. + fn expected_token_configuration( + &self, + position: TokenContractPosition, + ) -> Result<&TokenConfiguration, ProtocolError> { + match self { + DataContract::V0(_) => Err(ProtocolError::Token( + TokenError::TokenNotFoundOnContractVersion.into(), + )), + DataContract::V1(v1) => v1.tokens.get(&position).ok_or(ProtocolError::Token( + TokenError::TokenNotFoundAtPositionError.into(), + )), + } + } + + /// Returns a mutable reference to a token configuration + /// Returns `None` for V0 since it doesn't have tokens. + fn token_configuration_mut( + &mut self, + position: TokenContractPosition, + ) -> Option<&mut TokenConfiguration> { + match self { + DataContract::V0(_) => None, + DataContract::V1(v1) => v1.tokens.get_mut(&position), + } + } + + fn token_id(&self, position: TokenContractPosition) -> Option { + match self { + DataContract::V0(_) => None, + DataContract::V1(v1) => v1.token_id(position), + } + } +} + +impl DataContractV1Setters for DataContract { + /// Sets the groups map for the data contract. + fn set_groups(&mut self, groups: BTreeMap) { + match self { + DataContract::V0(_) => {} + DataContract::V1(v1) => { + v1.groups = groups; + } + } + } + + /// Sets the tokens map for the data contract. + fn set_tokens(&mut self, tokens: BTreeMap) { + match self { + DataContract::V0(_) => {} + DataContract::V1(v1) => { + v1.tokens = tokens; + } + } + } + + /// Adds or updates a single group in the groups map. + fn add_group(&mut self, position: GroupContractPosition, group: Group) { + match self { + DataContract::V0(_) => {} + DataContract::V1(v1) => { + v1.groups.insert(position, group); + } + } + } + + /// Adds or updates a single token configuration in the tokens map. + fn add_token(&mut self, id: TokenContractPosition, token: TokenConfiguration) { + match self { + DataContract::V0(_) => {} + DataContract::V1(v1) => { + v1.tokens.insert(id, token); + } } } } diff --git a/packages/rs-dpp/src/data_contract/accessors/v1/mod.rs b/packages/rs-dpp/src/data_contract/accessors/v1/mod.rs new file mode 100644 index 0000000000..0727a24a21 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/accessors/v1/mod.rs @@ -0,0 +1,57 @@ +use crate::data_contract::accessors::v0::{DataContractV0Getters, DataContractV0Setters}; +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::group::Group; +use crate::data_contract::{GroupContractPosition, TokenContractPosition}; +use crate::ProtocolError; +use platform_value::Identifier; +use std::collections::BTreeMap; + +pub trait DataContractV1Getters: DataContractV0Getters { + /// Gets a group at a certain position + fn group(&self, position: GroupContractPosition) -> Result<&Group, ProtocolError>; + /// Returns a reference to the groups map. + fn groups(&self) -> &BTreeMap; + + /// Returns a mutable reference to the groups map. + fn groups_mut(&mut self) -> Option<&mut BTreeMap>; + /// Returns a reference to a group or an error. + /// Returns an Error for V0 since it doesn't have groups. + fn expected_group(&self, position: GroupContractPosition) -> Result<&Group, ProtocolError>; + + /// Returns a reference to the tokens map. + fn tokens(&self) -> &BTreeMap; + + /// Returns a mutable reference to the tokens map. + fn tokens_mut(&mut self) -> Option<&mut BTreeMap>; + + /// Returns a mutable reference to a token configuration or an error. + /// Returns an Error for V0 since it doesn't have tokens. + fn expected_token_configuration( + &self, + position: TokenContractPosition, + ) -> Result<&TokenConfiguration, ProtocolError>; + + /// Returns a mutable reference to a token configuration + /// Returns `None` for V0 since it doesn't have tokens. + fn token_configuration_mut( + &mut self, + position: TokenContractPosition, + ) -> Option<&mut TokenConfiguration>; + + /// Returns the token id at a certain position + fn token_id(&self, position: TokenContractPosition) -> Option; +} + +pub trait DataContractV1Setters: DataContractV0Setters { + /// Sets the groups map for the data contract. + fn set_groups(&mut self, groups: BTreeMap); + + /// Sets the tokens map for the data contract. + fn set_tokens(&mut self, tokens: BTreeMap); + + /// Adds or updates a single group in the groups map. + fn add_group(&mut self, pos: GroupContractPosition, group: Group); + + /// Adds or updates a single token configuration in the tokens map. + fn add_token(&mut self, pos: TokenContractPosition, token: TokenConfiguration); +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/mod.rs new file mode 100644 index 0000000000..ad9156e391 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/mod.rs @@ -0,0 +1 @@ +pub mod token_configuration; diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/mod.rs new file mode 100644 index 0000000000..46c82e7995 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/mod.rs @@ -0,0 +1,255 @@ +pub mod v0; + +use crate::data_contract::associated_token::token_configuration::accessors::v0::{ + TokenConfigurationV0Getters, TokenConfigurationV0Setters, +}; +use crate::data_contract::associated_token::token_configuration::v0::TokenConfigurationConventionV0; +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; +use crate::data_contract::change_control_rules::ChangeControlRules; +use crate::data_contract::GroupContractPosition; +use platform_value::Identifier; + +/// Implementing TokenConfigurationV0Getters for TokenConfiguration +impl TokenConfigurationV0Getters for TokenConfiguration { + /// Returns a reference to the conventions. + fn conventions(&self) -> &TokenConfigurationConventionV0 { + match self { + TokenConfiguration::V0(v0) => v0.conventions(), + } + } + + /// Returns a mutable reference to the conventions. + fn conventions_mut(&mut self) -> &mut TokenConfigurationConventionV0 { + match self { + TokenConfiguration::V0(v0) => v0.conventions_mut(), + } + } + + /// Returns the base supply. + fn base_supply(&self) -> u64 { + match self { + TokenConfiguration::V0(v0) => v0.base_supply(), + } + } + + /// Returns if we keep history. + fn keeps_history(&self) -> bool { + match self { + TokenConfiguration::V0(v0) => v0.keeps_history(), + } + } + + /// Returns if we start as paused. + fn start_as_paused(&self) -> bool { + match self { + TokenConfiguration::V0(v0) => v0.start_as_paused(), + } + } + + /// Returns the maximum supply. + fn max_supply(&self) -> Option { + match self { + TokenConfiguration::V0(v0) => v0.max_supply(), + } + } + + /// Returns the max supply change rules. + fn max_supply_change_rules(&self) -> &ChangeControlRules { + match self { + TokenConfiguration::V0(v0) => v0.max_supply_change_rules(), + } + } + + /// Returns the new tokens destination identity. + fn new_tokens_destination_identity(&self) -> Option { + match self { + TokenConfiguration::V0(v0) => v0.new_tokens_destination_identity(), + } + } + + /// Returns the new tokens destination identity rules. + fn new_tokens_destination_identity_rules(&self) -> &ChangeControlRules { + match self { + TokenConfiguration::V0(v0) => v0.new_tokens_destination_identity_rules(), + } + } + /// Returns whether minting allows choosing a destination. + fn minting_allow_choosing_destination(&self) -> bool { + match self { + TokenConfiguration::V0(v0) => v0.minting_allow_choosing_destination(), + } + } + + /// Returns the rules for minting destination selection. + fn minting_allow_choosing_destination_rules(&self) -> &ChangeControlRules { + match self { + TokenConfiguration::V0(v0) => v0.minting_allow_choosing_destination_rules(), + } + } + + /// Returns the manual minting rules. + fn manual_minting_rules(&self) -> &ChangeControlRules { + match self { + TokenConfiguration::V0(v0) => v0.manual_minting_rules(), + } + } + + /// Returns the manual burning rules. + fn manual_burning_rules(&self) -> &ChangeControlRules { + match self { + TokenConfiguration::V0(v0) => v0.manual_burning_rules(), + } + } + + /// Returns the freeze rules. + fn freeze_rules(&self) -> &ChangeControlRules { + match self { + TokenConfiguration::V0(v0) => v0.freeze_rules(), + } + } + + /// Returns the unfreeze rules. + fn unfreeze_rules(&self) -> &ChangeControlRules { + match self { + TokenConfiguration::V0(v0) => v0.unfreeze_rules(), + } + } + + fn destroy_frozen_funds_rules(&self) -> &ChangeControlRules { + match self { + TokenConfiguration::V0(v0) => v0.destroy_frozen_funds_rules(), + } + } + + fn emergency_action_rules(&self) -> &ChangeControlRules { + match self { + TokenConfiguration::V0(v0) => v0.emergency_action_rules(), + } + } + + /// Returns the main control group. + fn main_control_group(&self) -> Option { + match self { + TokenConfiguration::V0(v0) => v0.main_control_group(), + } + } + + /// Returns the main control group can be modified. + fn main_control_group_can_be_modified(&self) -> &AuthorizedActionTakers { + match self { + TokenConfiguration::V0(v0) => v0.main_control_group_can_be_modified(), + } + } +} + +/// Implementing TokenConfigurationV0Setters for TokenConfiguration +impl TokenConfigurationV0Setters for TokenConfiguration { + /// Sets the conventions. + fn set_conventions(&mut self, conventions: TokenConfigurationConventionV0) { + match self { + TokenConfiguration::V0(v0) => v0.set_conventions(conventions), + } + } + + /// Sets the base supply. + fn set_base_supply(&mut self, base_supply: u64) { + match self { + TokenConfiguration::V0(v0) => v0.set_base_supply(base_supply), + } + } + + /// Sets the maximum supply. + fn set_max_supply(&mut self, max_supply: Option) { + match self { + TokenConfiguration::V0(v0) => v0.set_max_supply(max_supply), + } + } + + /// Sets the max supply change rules. + fn set_max_supply_change_rules(&mut self, rules: ChangeControlRules) { + match self { + TokenConfiguration::V0(v0) => v0.set_max_supply_change_rules(rules), + } + } + + /// Sets the new tokens destination identity. + fn set_new_tokens_destination_identity(&mut self, id: Option) { + match self { + TokenConfiguration::V0(v0) => v0.set_new_tokens_destination_identity(id), + } + } + + /// Sets the new tokens destination identity rules. + fn set_new_tokens_destination_identity_rules(&mut self, rules: ChangeControlRules) { + match self { + TokenConfiguration::V0(v0) => v0.set_new_tokens_destination_identity_rules(rules), + } + } + + /// Sets the manual minting rules. + fn set_manual_minting_rules(&mut self, rules: ChangeControlRules) { + match self { + TokenConfiguration::V0(v0) => v0.set_manual_minting_rules(rules), + } + } + + /// Sets the manual burning rules. + fn set_manual_burning_rules(&mut self, rules: ChangeControlRules) { + match self { + TokenConfiguration::V0(v0) => v0.set_manual_burning_rules(rules), + } + } + + /// Sets the freeze rules. + fn set_freeze_rules(&mut self, rules: ChangeControlRules) { + match self { + TokenConfiguration::V0(v0) => v0.set_freeze_rules(rules), + } + } + + /// Sets the unfreeze rules. + fn set_unfreeze_rules(&mut self, rules: ChangeControlRules) { + match self { + TokenConfiguration::V0(v0) => v0.set_unfreeze_rules(rules), + } + } + + fn set_destroy_frozen_funds_rules(&mut self, rules: ChangeControlRules) { + match self { + TokenConfiguration::V0(v0) => v0.set_destroy_frozen_funds_rules(rules), + } + } + + fn set_emergency_action_rules(&mut self, rules: ChangeControlRules) { + match self { + TokenConfiguration::V0(v0) => v0.set_emergency_action_rules(rules), + } + } + + /// Sets the main control group. + fn set_main_control_group(&mut self, group: Option) { + match self { + TokenConfiguration::V0(v0) => v0.set_main_control_group(group), + } + } + + /// Sets the main control group can be modified. + fn set_main_control_group_can_be_modified(&mut self, action_takers: AuthorizedActionTakers) { + match self { + TokenConfiguration::V0(v0) => v0.set_main_control_group_can_be_modified(action_takers), + } + } + + fn set_minting_allow_choosing_destination(&mut self, value: bool) { + match self { + TokenConfiguration::V0(v0) => v0.set_minting_allow_choosing_destination(value), + } + } + + fn set_minting_allow_choosing_destination_rules(&mut self, rules: ChangeControlRules) { + match self { + TokenConfiguration::V0(v0) => v0.set_minting_allow_choosing_destination_rules(rules), + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/v0/mod.rs new file mode 100644 index 0000000000..83fde97a8e --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/v0/mod.rs @@ -0,0 +1,105 @@ +use crate::data_contract::associated_token::token_configuration::v0::TokenConfigurationConventionV0; +use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; +use crate::data_contract::change_control_rules::ChangeControlRules; +use crate::data_contract::GroupContractPosition; +use platform_value::Identifier; + +/// Accessor trait for getters of `TokenConfigurationV0` +pub trait TokenConfigurationV0Getters { + /// Returns a reference to the conventions. + fn conventions(&self) -> &TokenConfigurationConventionV0; + + /// Returns a mutable reference to the conventions. + fn conventions_mut(&mut self) -> &mut TokenConfigurationConventionV0; + + /// Returns the base supply. + fn base_supply(&self) -> u64; + /// Returns the base supply. + fn keeps_history(&self) -> bool; + fn start_as_paused(&self) -> bool; + + /// Returns the maximum supply. + fn max_supply(&self) -> Option; + + /// Returns the max supply change rules. + fn max_supply_change_rules(&self) -> &ChangeControlRules; + + /// Returns the new tokens destination identity. + fn new_tokens_destination_identity(&self) -> Option; + + /// Returns the new tokens destination identity rules. + fn new_tokens_destination_identity_rules(&self) -> &ChangeControlRules; + /// Returns whether minting allows choosing a destination. + fn minting_allow_choosing_destination(&self) -> bool; + /// Returns the rules for minting destination selection. + fn minting_allow_choosing_destination_rules(&self) -> &ChangeControlRules; + + /// Returns the manual minting rules. + fn manual_minting_rules(&self) -> &ChangeControlRules; + + /// Returns the manual burning rules. + fn manual_burning_rules(&self) -> &ChangeControlRules; + + /// Returns the freeze rules. + fn freeze_rules(&self) -> &ChangeControlRules; + + /// Returns the unfreeze rules. + fn unfreeze_rules(&self) -> &ChangeControlRules; + /// Returns the destroy frozen funds rules. + fn destroy_frozen_funds_rules(&self) -> &ChangeControlRules; + /// Returns the emergency action rules. + fn emergency_action_rules(&self) -> &ChangeControlRules; + + /// Returns the main control group. + fn main_control_group(&self) -> Option; + + /// Returns the main control group can be modified. + fn main_control_group_can_be_modified(&self) -> &AuthorizedActionTakers; +} + +/// Accessor trait for setters of `TokenConfigurationV0` +pub trait TokenConfigurationV0Setters { + /// Sets the conventions. + fn set_conventions(&mut self, conventions: TokenConfigurationConventionV0); + + /// Sets the base supply. + fn set_base_supply(&mut self, base_supply: u64); + + /// Sets the maximum supply. + fn set_max_supply(&mut self, max_supply: Option); + + /// Sets the max supply change rules. + fn set_max_supply_change_rules(&mut self, rules: ChangeControlRules); + + /// Sets the new tokens destination identity. + fn set_new_tokens_destination_identity(&mut self, id: Option); + + /// Sets the new tokens destination identity rules. + fn set_new_tokens_destination_identity_rules(&mut self, rules: ChangeControlRules); + + /// Sets the manual minting rules. + fn set_manual_minting_rules(&mut self, rules: ChangeControlRules); + + /// Sets the manual burning rules. + fn set_manual_burning_rules(&mut self, rules: ChangeControlRules); + + /// Sets the freeze rules. + fn set_freeze_rules(&mut self, rules: ChangeControlRules); + + /// Sets the unfreeze rules. + fn set_unfreeze_rules(&mut self, rules: ChangeControlRules); + /// Sets the `destroy frozen funds` rules. + fn set_destroy_frozen_funds_rules(&mut self, rules: ChangeControlRules); + /// Sets the emergency action rules. + fn set_emergency_action_rules(&mut self, rules: ChangeControlRules); + + /// Sets the main control group. + fn set_main_control_group(&mut self, group: Option); + + /// Sets the main control group can be modified. + fn set_main_control_group_can_be_modified(&mut self, action_takers: AuthorizedActionTakers); + /// Sets whether minting allows choosing a destination. + fn set_minting_allow_choosing_destination(&mut self, value: bool); + /// Sets the rules for minting destination selection. + fn set_minting_allow_choosing_destination_rules(&mut self, rules: ChangeControlRules); +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/mod.rs new file mode 100644 index 0000000000..5e5a7181a5 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/mod.rs @@ -0,0 +1 @@ +mod validate_token_configuration_update; diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/mod.rs new file mode 100644 index 0000000000..9dda53c984 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/mod.rs @@ -0,0 +1,43 @@ +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::group::Group; +use crate::data_contract::GroupContractPosition; +use crate::multi_identity_events::ActionTaker; +use crate::validation::SimpleConsensusValidationResult; +use crate::ProtocolError; +use platform_value::Identifier; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +mod v0; + +impl TokenConfiguration { + pub fn validate_token_config_update( + &self, + new_config: &TokenConfiguration, + contract_owner_id: &Identifier, + main_group: Option<&Group>, + groups: &BTreeMap, + action_taker: &ActionTaker, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .dpp + .validation + .data_contract + .validate_token_config_update + { + 0 => Ok(self.validate_token_config_update_v0( + new_config, + contract_owner_id, + main_group, + groups, + action_taker, + )), + version => Err(ProtocolError::UnknownVersionMismatch { + method: "validate_token_config_update".to_string(), + known_versions: vec![0], + received: version, + }), + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs new file mode 100644 index 0000000000..a11f775a57 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs @@ -0,0 +1,283 @@ +use crate::consensus::basic::data_contract::DataContractTokenConfigurationUpdateError; +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::group::Group; +use crate::data_contract::GroupContractPosition; +use crate::multi_identity_events::ActionTaker; +use crate::validation::SimpleConsensusValidationResult; +use platform_value::Identifier; +use std::collections::BTreeMap; + +impl TokenConfiguration { + #[inline(always)] + pub(super) fn validate_token_config_update_v0( + &self, + new_config: &TokenConfiguration, + contract_owner_id: &Identifier, + main_group: Option<&Group>, + groups: &BTreeMap, + action_taker: &ActionTaker, + ) -> SimpleConsensusValidationResult { + let old = self.as_cow_v0(); + let new = new_config.as_cow_v0(); + + // Check immutable fields: conventions + if old.conventions != new.conventions { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "conventions".to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + + // Check immutable fields: base_supply + if old.base_supply != new.base_supply { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "baseSupply".to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + + // Check changes to max_supply and max_supply_change_rules + if old.max_supply != new.max_supply + || old.max_supply_change_rules != new.max_supply_change_rules + { + if !old.max_supply_change_rules.can_change_to( + &new.max_supply_change_rules, + contract_owner_id, + main_group, + groups, + action_taker, + ) { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "maxSupply or maxSupplyChangeRules".to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + } + + // Check changes to new_tokens_destination_identity and rules + if old.new_tokens_destination_identity != new.new_tokens_destination_identity + || old.new_tokens_destination_identity_rules + != new.new_tokens_destination_identity_rules + { + if !old.new_tokens_destination_identity_rules.can_change_to( + &new.new_tokens_destination_identity_rules, + contract_owner_id, + main_group, + groups, + action_taker, + ) { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "newTokensDestinationIdentity or newTokensDestinationIdentityRules" + .to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + } + + // Check changes to minting_allow_choosing_destination and its rules + if old.minting_allow_choosing_destination != new.minting_allow_choosing_destination + || old.minting_allow_choosing_destination_rules + != new.minting_allow_choosing_destination_rules + { + if !old.minting_allow_choosing_destination_rules.can_change_to( + &new.minting_allow_choosing_destination_rules, + contract_owner_id, + main_group, + groups, + action_taker, + ) { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "mintingAllowChoosingDestination or mintingAllowChoosingDestinationRules" + .to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + } + + // Check changes to manual_minting_rules + if old.manual_minting_rules != new.manual_minting_rules { + if !old.manual_minting_rules.can_change_to( + &new.manual_minting_rules, + contract_owner_id, + main_group, + groups, + action_taker, + ) { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "manualMintingRules".to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + } + + // Check changes to manual_burning_rules + if old.manual_burning_rules != new.manual_burning_rules { + if !old.manual_burning_rules.can_change_to( + &new.manual_burning_rules, + contract_owner_id, + main_group, + groups, + action_taker, + ) { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "manualBurningRules".to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + } + + // Check changes to freeze_rules + if old.freeze_rules != new.freeze_rules { + if !old.freeze_rules.can_change_to( + &new.freeze_rules, + contract_owner_id, + main_group, + groups, + action_taker, + ) { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "freezeRules".to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + } + + // Check changes to unfreeze_rules + if old.unfreeze_rules != new.unfreeze_rules { + if !old.unfreeze_rules.can_change_to( + &new.unfreeze_rules, + contract_owner_id, + main_group, + groups, + action_taker, + ) { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "unfreezeRules".to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + } + + // Check changes to destroy_frozen_funds_rules + if old.destroy_frozen_funds_rules != new.destroy_frozen_funds_rules { + if !old.destroy_frozen_funds_rules.can_change_to( + &new.destroy_frozen_funds_rules, + contract_owner_id, + main_group, + groups, + action_taker, + ) { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "destroyFrozenFundsRules".to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + } + + // Check changes to emergency_action_rules + if old.emergency_action_rules != new.emergency_action_rules { + if !old.emergency_action_rules.can_change_to( + &new.emergency_action_rules, + contract_owner_id, + main_group, + groups, + action_taker, + ) { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "emergencyActionRules".to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + } + + // Check changes to main_control_group + if old.main_control_group != new.main_control_group { + if !old + .main_control_group_can_be_modified + .allowed_for_action_taker(contract_owner_id, main_group, groups, action_taker) + { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "mainControlGroup".to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + } + + // Check changes to main_control_group_can_be_modified + if old.main_control_group_can_be_modified != new.main_control_group_can_be_modified { + // Assuming this is immutable + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "mainControlGroupCanBeModified".to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } + + // If we reach here with no errors, return an empty result + SimpleConsensusValidationResult::new() + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/mod.rs new file mode 100644 index 0000000000..e5e34c6664 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/mod.rs @@ -0,0 +1,33 @@ +use crate::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; +use bincode::{Decode, Encode}; +use derive_more::From; +use serde::{Deserialize, Serialize}; +use std::borrow::Cow; +use std::fmt; + +pub mod accessors; +mod methods; +pub mod v0; + +#[derive(Serialize, Deserialize, Encode, Decode, Debug, Clone, PartialEq, Eq, From)] +#[serde(tag = "$format_version")] +pub enum TokenConfiguration { + #[serde(rename = "0")] + V0(TokenConfigurationV0), +} + +impl TokenConfiguration { + pub fn as_cow_v0(&self) -> Cow { + match self { + TokenConfiguration::V0(v0) => Cow::Borrowed(v0), + } + } +} + +impl fmt::Display for TokenConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + TokenConfiguration::V0(v0) => write!(f, "{}", v0), + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/accessors.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/accessors.rs new file mode 100644 index 0000000000..d0115ead55 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/accessors.rs @@ -0,0 +1,191 @@ +use crate::data_contract::associated_token::token_configuration::accessors::v0::{ + TokenConfigurationV0Getters, TokenConfigurationV0Setters, +}; +use crate::data_contract::associated_token::token_configuration::v0::{ + TokenConfigurationConventionV0, TokenConfigurationV0, +}; +use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; +use crate::data_contract::change_control_rules::ChangeControlRules; +use crate::data_contract::GroupContractPosition; +use platform_value::Identifier; + +/// Implementing `TokenConfigurationV0Getters` for `TokenConfigurationV0` +impl TokenConfigurationV0Getters for TokenConfigurationV0 { + /// Returns a reference to the conventions. + fn conventions(&self) -> &TokenConfigurationConventionV0 { + &self.conventions + } + + /// Returns a mutable reference to the conventions. + fn conventions_mut(&mut self) -> &mut TokenConfigurationConventionV0 { + &mut self.conventions + } + + /// Returns the base supply. + fn base_supply(&self) -> u64 { + self.base_supply + } + + /// Returns if we keep history. + fn keeps_history(&self) -> bool { + self.keeps_history + } + + /// Returns if we start off as paused + fn start_as_paused(&self) -> bool { + self.start_as_paused + } + + /// Returns the maximum supply. + fn max_supply(&self) -> Option { + self.max_supply + } + + /// Returns the max supply change rules. + fn max_supply_change_rules(&self) -> &ChangeControlRules { + &self.max_supply_change_rules + } + + /// Returns the new tokens destination identity. + fn new_tokens_destination_identity(&self) -> Option { + self.new_tokens_destination_identity + } + + /// Returns the new tokens destination identity rules. + fn new_tokens_destination_identity_rules(&self) -> &ChangeControlRules { + &self.new_tokens_destination_identity_rules + } + + /// Returns whether minting allows choosing a destination. + fn minting_allow_choosing_destination(&self) -> bool { + self.minting_allow_choosing_destination + } + + /// Returns the rules for minting destination selection. + fn minting_allow_choosing_destination_rules(&self) -> &ChangeControlRules { + &self.minting_allow_choosing_destination_rules + } + + /// Returns the manual minting rules. + fn manual_minting_rules(&self) -> &ChangeControlRules { + &self.manual_minting_rules + } + + /// Returns the manual burning rules. + fn manual_burning_rules(&self) -> &ChangeControlRules { + &self.manual_burning_rules + } + + /// Returns the freeze rules. + fn freeze_rules(&self) -> &ChangeControlRules { + &self.freeze_rules + } + + /// Returns the unfreeze rules. + fn unfreeze_rules(&self) -> &ChangeControlRules { + &self.unfreeze_rules + } + + /// Returns the `destroy frozen funds` rules. + fn destroy_frozen_funds_rules(&self) -> &ChangeControlRules { + &self.destroy_frozen_funds_rules + } + + /// Returns the emergency action rules. + fn emergency_action_rules(&self) -> &ChangeControlRules { + &self.emergency_action_rules + } + + /// Returns the main control group. + fn main_control_group(&self) -> Option { + self.main_control_group + } + + /// Returns the main control group can be modified. + fn main_control_group_can_be_modified(&self) -> &AuthorizedActionTakers { + &self.main_control_group_can_be_modified + } +} + +/// Implementing `TokenConfigurationV0Setters` for `TokenConfigurationV0` +impl TokenConfigurationV0Setters for TokenConfigurationV0 { + /// Sets the conventions. + fn set_conventions(&mut self, conventions: TokenConfigurationConventionV0) { + self.conventions = conventions; + } + + /// Sets the base supply. + fn set_base_supply(&mut self, base_supply: u64) { + self.base_supply = base_supply; + } + + /// Sets the maximum supply. + fn set_max_supply(&mut self, max_supply: Option) { + self.max_supply = max_supply; + } + + /// Sets the max supply change rules. + fn set_max_supply_change_rules(&mut self, rules: ChangeControlRules) { + self.max_supply_change_rules = rules; + } + + /// Sets the new tokens destination identity. + fn set_new_tokens_destination_identity(&mut self, id: Option) { + self.new_tokens_destination_identity = id; + } + + /// Sets the new tokens destination identity rules. + fn set_new_tokens_destination_identity_rules(&mut self, rules: ChangeControlRules) { + self.new_tokens_destination_identity_rules = rules; + } + + /// Sets the manual minting rules. + fn set_manual_minting_rules(&mut self, rules: ChangeControlRules) { + self.manual_minting_rules = rules; + } + + /// Sets the manual burning rules. + fn set_manual_burning_rules(&mut self, rules: ChangeControlRules) { + self.manual_burning_rules = rules; + } + + /// Sets the freeze rules. + fn set_freeze_rules(&mut self, rules: ChangeControlRules) { + self.freeze_rules = rules; + } + + /// Sets the unfreeze rules. + fn set_unfreeze_rules(&mut self, rules: ChangeControlRules) { + self.unfreeze_rules = rules; + } + + /// Sets the destroy frozen funds rules. + fn set_destroy_frozen_funds_rules(&mut self, rules: ChangeControlRules) { + self.destroy_frozen_funds_rules = rules; + } + + /// Sets the emergency action rules. + fn set_emergency_action_rules(&mut self, rules: ChangeControlRules) { + self.emergency_action_rules = rules; + } + + /// Sets the main control group. + fn set_main_control_group(&mut self, group: Option) { + self.main_control_group = group; + } + + /// Sets the main control group can be modified. + fn set_main_control_group_can_be_modified(&mut self, action_takers: AuthorizedActionTakers) { + self.main_control_group_can_be_modified = action_takers; + } + + /// Sets whether minting allows choosing a destination. + fn set_minting_allow_choosing_destination(&mut self, value: bool) { + self.minting_allow_choosing_destination = value; + } + + /// Sets the rules for minting destination selection. + fn set_minting_allow_choosing_destination_rules(&mut self, rules: ChangeControlRules) { + self.minting_allow_choosing_destination_rules = rules; + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs new file mode 100644 index 0000000000..4aed4bdc11 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs @@ -0,0 +1,220 @@ +mod accessors; + +use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; +use crate::data_contract::change_control_rules::v0::ChangeControlRulesV0; +use crate::data_contract::change_control_rules::ChangeControlRules; +use crate::data_contract::GroupContractPosition; +use bincode::{Decode, Encode}; +use platform_value::Identifier; +use serde::{Deserialize, Serialize}; +use std::collections::BTreeMap; +use std::fmt; + +#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct TokenConfigurationLocalizationsV0 { + pub should_capitalize: bool, + pub singular_form: String, + pub plural_form: String, +} + +#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq, Default)] +#[serde(rename_all = "camelCase")] +pub struct TokenConfigurationConventionV0 { + #[serde(default)] + pub localizations: BTreeMap, + #[serde(default = "default_decimals")] + pub decimals: u16, +} + +// Default function for `decimals` +fn default_decimals() -> u16 { + 8 // Default value for decimals +} + +#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct TokenConfigurationV0 { + pub conventions: TokenConfigurationConventionV0, + /// The supply at the creation of the token + pub base_supply: u64, + /// The maximum supply the token can ever have + #[serde(default)] + pub max_supply: Option, + /// Do we keep history, default is true. + #[serde(default = "default_keeps_history")] + pub keeps_history: bool, + /// Do we start off as paused, meaning that we can not transfer till we unpause. + #[serde(default = "default_starts_as_paused")] + pub start_as_paused: bool, + /// Who can change the max supply + /// Even if set no one can ever change this under the base supply + #[serde(default = "default_change_control_rules")] + pub max_supply_change_rules: ChangeControlRules, + #[serde(default)] + pub new_tokens_destination_identity: Option, + #[serde(default = "default_change_control_rules")] + pub new_tokens_destination_identity_rules: ChangeControlRules, + #[serde(default = "default_minting_allow_choosing_destination")] + pub minting_allow_choosing_destination: bool, + #[serde(default = "default_change_control_rules")] + pub minting_allow_choosing_destination_rules: ChangeControlRules, + #[serde(default = "default_contract_owner_change_control_rules")] + pub manual_minting_rules: ChangeControlRules, + #[serde(default = "default_contract_owner_change_control_rules")] + pub manual_burning_rules: ChangeControlRules, + #[serde(default = "default_change_control_rules")] + pub freeze_rules: ChangeControlRules, + #[serde(default = "default_change_control_rules")] + pub unfreeze_rules: ChangeControlRules, + #[serde(default = "default_change_control_rules")] + pub destroy_frozen_funds_rules: ChangeControlRules, + #[serde(default = "default_change_control_rules")] + pub emergency_action_rules: ChangeControlRules, + #[serde(default)] + pub main_control_group: Option, + #[serde(default)] + pub main_control_group_can_be_modified: AuthorizedActionTakers, +} + +// Default function for `minting_allow_choosing_destination` to return `true` +fn default_minting_allow_choosing_destination() -> bool { + true +} + +// Default function for `keeps_history` +fn default_keeps_history() -> bool { + true // Default to `true` for keeps_history +} + +// Default function for `starts_as_paused` +fn default_starts_as_paused() -> bool { + false +} + +fn default_change_control_rules() -> ChangeControlRules { + ChangeControlRules::V0(ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::NoOne, + authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + }) +} + +fn default_contract_owner_change_control_rules() -> ChangeControlRules { + ChangeControlRules::V0(ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::ContractOwner, + authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + }) +} + +impl fmt::Display for TokenConfigurationV0 { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!( + f, + "TokenConfigurationV0 {{\n conventions: {:?},\n base_supply: {},\n max_supply: {:?},\n keeps_history: {},\n start_as_paused: {},\n max_supply_change_rules: {:?},\n new_tokens_destination_identity: {:?},\n new_tokens_destination_identity_rules: {:?},\n minting_allow_choosing_destination: {},\n minting_allow_choosing_destination_rules: {:?},\n manual_minting_rules: {:?},\n manual_burning_rules: {:?},\n freeze_rules: {:?},\n unfreeze_rules: {:?},\n destroy_frozen_funds_rules: {:?},\n emergency_action_rules: {:?},\n main_control_group: {:?},\n main_control_group_can_be_modified: {:?}\n}}", + self.conventions, + self.base_supply, + self.max_supply, + self.keeps_history, + self.start_as_paused, + self.max_supply_change_rules, + self.new_tokens_destination_identity, + self.new_tokens_destination_identity_rules, + self.minting_allow_choosing_destination, + self.minting_allow_choosing_destination_rules, + self.manual_minting_rules, + self.manual_burning_rules, + self.freeze_rules, + self.unfreeze_rules, + self.destroy_frozen_funds_rules, + self.emergency_action_rules, + self.main_control_group, + self.main_control_group_can_be_modified + ) + } +} + +impl TokenConfigurationV0 { + pub fn default_most_restrictive() -> Self { + Self { + conventions: TokenConfigurationConventionV0 { + localizations: Default::default(), + decimals: 8, + }, + base_supply: 100000, + max_supply: None, + keeps_history: true, + start_as_paused: false, + max_supply_change_rules: ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::NoOne, + authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + } + .into(), + new_tokens_destination_identity: None, + new_tokens_destination_identity_rules: ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::NoOne, + authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + } + .into(), + minting_allow_choosing_destination: true, + minting_allow_choosing_destination_rules: ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::NoOne, + authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + } + .into(), + manual_minting_rules: ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::NoOne, + authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + } + .into(), + manual_burning_rules: ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::NoOne, + authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + } + .into(), + freeze_rules: ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::NoOne, + authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + } + .into(), + unfreeze_rules: ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::NoOne, + authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + } + .into(), + destroy_frozen_funds_rules: ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::NoOne, + authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + } + .into(), + emergency_action_rules: ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::NoOne, + authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + } + .into(), + main_control_group: None, + main_control_group_can_be_modified: AuthorizedActionTakers::NoOne, + } + } +} diff --git a/packages/rs-dpp/src/data_contract/change_control_rules/authorized_action_takers.rs b/packages/rs-dpp/src/data_contract/change_control_rules/authorized_action_takers.rs new file mode 100644 index 0000000000..7a23c4259d --- /dev/null +++ b/packages/rs-dpp/src/data_contract/change_control_rules/authorized_action_takers.rs @@ -0,0 +1,80 @@ +use crate::data_contract::group::accessors::v0::GroupV0Getters; +use crate::data_contract::group::{Group, GroupMemberPower}; +use crate::data_contract::GroupContractPosition; +use crate::multi_identity_events::ActionTaker; +use bincode::{Decode, Encode}; +use platform_value::Identifier; +use serde::{Deserialize, Serialize}; +use std::collections::BTreeMap; + +#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq, Default)] +pub enum AuthorizedActionTakers { + #[default] + NoOne, + ContractOwner, + MainGroup, + Group(GroupContractPosition), +} + +impl AuthorizedActionTakers { + pub fn allowed_for_action_taker( + &self, + contract_owner_id: &Identifier, + main_group: Option<&Group>, + groups: &BTreeMap, + action_taker: &ActionTaker, + ) -> bool { + match self { + // No one is allowed + AuthorizedActionTakers::NoOne => false, + + // Only the contract owner is allowed + AuthorizedActionTakers::ContractOwner => match action_taker { + ActionTaker::SingleIdentity(action_taker) => action_taker == contract_owner_id, + ActionTaker::SpecifiedIdentities(action_takers) => { + action_takers.contains(contract_owner_id) + } + }, + + // MainGroup allows multiparty actions with specific power requirements + AuthorizedActionTakers::MainGroup => { + if let Some(main_group) = main_group { + Self::is_action_taker_authorized(main_group, action_taker) + } else { + false + } + } + + // Group-specific permissions with power aggregation logic + AuthorizedActionTakers::Group(group_contract_position) => { + if let Some(group) = groups.get(group_contract_position) { + Self::is_action_taker_authorized(group, action_taker) + } else { + false + } + } + } + } + + /// Helper method to check if action takers meet the group's required power threshold. + fn is_action_taker_authorized(group: &Group, action_taker: &ActionTaker) -> bool { + match action_taker { + ActionTaker::SingleIdentity(member_id) => { + let power = group.members().get(member_id).cloned().unwrap_or_default(); + power >= group.required_power() + } + ActionTaker::SpecifiedIdentities(action_takers) => { + // Calculate the total power of action takers who are members of the group + let total_power: GroupMemberPower = group + .members() + .iter() + .filter(|(member_id, _)| action_takers.contains(*member_id)) + .map(|(_, power)| *power) + .sum(); + + // Compare total power to the group's required power + total_power >= group.required_power() as GroupMemberPower + } + } + } +} diff --git a/packages/rs-dpp/src/data_contract/change_control_rules/mod.rs b/packages/rs-dpp/src/data_contract/change_control_rules/mod.rs new file mode 100644 index 0000000000..2385e11435 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/change_control_rules/mod.rs @@ -0,0 +1,57 @@ +pub mod authorized_action_takers; +pub mod v0; + +use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; +use crate::data_contract::change_control_rules::v0::ChangeControlRulesV0; +use crate::data_contract::group::Group; +use crate::data_contract::GroupContractPosition; +use crate::multi_identity_events::ActionTaker; +use bincode::{Decode, Encode}; +use derive_more::From; +use platform_value::Identifier; +use serde::{Deserialize, Serialize}; +use std::collections::BTreeMap; + +#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq, From)] +pub enum ChangeControlRules { + V0(ChangeControlRulesV0), +} + +impl ChangeControlRules { + pub fn authorized_to_make_change_action_takers(&self) -> &AuthorizedActionTakers { + match self { + ChangeControlRules::V0(v0) => &v0.authorized_to_make_change, + } + } + pub fn can_make_change( + &self, + contract_owner_id: &Identifier, + main_group: Option<&Group>, + groups: &BTreeMap, + action_taker: &ActionTaker, + ) -> bool { + match self { + ChangeControlRules::V0(v0) => { + v0.can_make_change(contract_owner_id, main_group, groups, action_taker) + } + } + } + pub fn can_change_to( + &self, + other: &ChangeControlRules, + contract_owner_id: &Identifier, + main_group: Option<&Group>, + groups: &BTreeMap, + action_taker: &ActionTaker, + ) -> bool { + match (self, other) { + (ChangeControlRules::V0(v0), ChangeControlRules::V0(v0_other)) => v0.can_change_to( + v0_other, + contract_owner_id, + main_group, + groups, + action_taker, + ), + } + } +} diff --git a/packages/rs-dpp/src/data_contract/change_control_rules/v0/mod.rs b/packages/rs-dpp/src/data_contract/change_control_rules/v0/mod.rs new file mode 100644 index 0000000000..41261680ce --- /dev/null +++ b/packages/rs-dpp/src/data_contract/change_control_rules/v0/mod.rs @@ -0,0 +1,115 @@ +use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; +use crate::data_contract::group::Group; +use crate::data_contract::GroupContractPosition; +use crate::multi_identity_events::ActionTaker; +use bincode::{Decode, Encode}; +use platform_value::Identifier; +use serde::{Deserialize, Serialize}; +use std::collections::BTreeMap; + +#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq, Default)] +pub struct ChangeControlRulesV0 { + /// This is who is authorized to make such a change + pub authorized_to_make_change: AuthorizedActionTakers, + /// This is who is authorized to make such a change to the people authorized to make a change + pub authorized_to_change_authorized_action_takers: AuthorizedActionTakers, + /// Are we allowed to change to None in the future + pub changing_authorized_action_takers_to_no_one_allowed: bool, + /// Are we allowed to change to None in the future + pub changing_authorized_action_takers_to_contract_owner_allowed: bool, +} + +impl ChangeControlRulesV0 { + pub fn can_make_change( + &self, + contract_owner_id: &Identifier, + main_group: Option<&Group>, + groups: &BTreeMap, + action_taker: &ActionTaker, + ) -> bool { + self.authorized_to_make_change.allowed_for_action_taker( + contract_owner_id, + main_group, + groups, + action_taker, + ) + } + pub fn can_change_to( + &self, + other: &ChangeControlRulesV0, + contract_owner_id: &Identifier, + main_group: Option<&Group>, + groups: &BTreeMap, + action_taker: &ActionTaker, + ) -> bool { + // First, check if the action taker is allowed to make any changes at all + if !self.authorized_to_make_change.allowed_for_action_taker( + contract_owner_id, + main_group, + groups, + action_taker, + ) { + return false; + } + + // Check if authorized_to_make_change is being modified + if self.authorized_to_make_change != other.authorized_to_make_change { + // Changing the authorized action takers requires the action_taker to be allowed by + // authorized_to_change_authorized_action_takers in the current rules + if !self + .authorized_to_change_authorized_action_takers + .allowed_for_action_taker(contract_owner_id, main_group, groups, action_taker) + { + return false; + } + + // If we are changing to NoOne, ensure it's allowed + if let AuthorizedActionTakers::NoOne = other.authorized_to_make_change { + if !self.changing_authorized_action_takers_to_no_one_allowed { + return false; + } + } + + // If we are changing to ContractOwner, ensure it's allowed + if let AuthorizedActionTakers::ContractOwner = other.authorized_to_make_change { + if !self.changing_authorized_action_takers_to_contract_owner_allowed { + return false; + } + } + } + + // Check if authorized_to_change_authorized_action_takers is being modified + if self.authorized_to_change_authorized_action_takers + != other.authorized_to_change_authorized_action_takers + { + // Must be allowed by the current authorized_to_change_authorized_action_takers + if !self + .authorized_to_change_authorized_action_takers + .allowed_for_action_taker(contract_owner_id, main_group, groups, action_taker) + { + return false; + } + + // If we are changing to NoOne, ensure it's allowed + if let AuthorizedActionTakers::NoOne = + other.authorized_to_change_authorized_action_takers + { + if !self.changing_authorized_action_takers_to_no_one_allowed { + return false; + } + } + + // If we are changing to ContractOwner, ensure it's allowed + if let AuthorizedActionTakers::ContractOwner = + other.authorized_to_change_authorized_action_takers + { + if !self.changing_authorized_action_takers_to_contract_owner_allowed { + return false; + } + } + } + + // If we reach here, the changes are allowed + true + } +} diff --git a/packages/rs-dpp/src/data_contract/conversion/cbor/mod.rs b/packages/rs-dpp/src/data_contract/conversion/cbor/mod.rs index 541fabd5ba..8683b2dbb4 100644 --- a/packages/rs-dpp/src/data_contract/conversion/cbor/mod.rs +++ b/packages/rs-dpp/src/data_contract/conversion/cbor/mod.rs @@ -1,6 +1,7 @@ mod v0; use crate::data_contract::v0::DataContractV0; +use crate::data_contract::v1::DataContractV1; use crate::prelude::DataContract; use crate::util::cbor_value::CborCanonicalMap; use crate::version::PlatformVersion; @@ -27,9 +28,16 @@ impl DataContractCborConversionMethodsV0 for DataContract { platform_version, )? .into()), + 1 => Ok(DataContractV1::from_cbor_with_id( + cbor_bytes, + contract_id, + full_validation, + platform_version, + )? + .into()), version => Err(ProtocolError::UnknownVersionMismatch { method: "DataContract::from_cbor_with_id".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, }), } @@ -48,9 +56,12 @@ impl DataContractCborConversionMethodsV0 for DataContract { 0 => Ok( DataContractV0::from_cbor(cbor_bytes, full_validation, platform_version)?.into(), ), + 1 => Ok( + DataContractV1::from_cbor(cbor_bytes, full_validation, platform_version)?.into(), + ), version => Err(ProtocolError::UnknownVersionMismatch { method: "DataContract::from_cbor".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, }), } @@ -59,6 +70,7 @@ impl DataContractCborConversionMethodsV0 for DataContract { fn to_cbor(&self, platform_version: &PlatformVersion) -> Result, ProtocolError> { match self { DataContract::V0(v0) => v0.to_cbor(platform_version), + DataContract::V1(v1) => v1.to_cbor(platform_version), } } diff --git a/packages/rs-dpp/src/data_contract/conversion/json/mod.rs b/packages/rs-dpp/src/data_contract/conversion/json/mod.rs index b06f6ff2ff..2e4147653c 100644 --- a/packages/rs-dpp/src/data_contract/conversion/json/mod.rs +++ b/packages/rs-dpp/src/data_contract/conversion/json/mod.rs @@ -2,7 +2,7 @@ mod v0; pub use v0::*; use crate::data_contract::v0::DataContractV0; -use crate::data_contract::DataContract; +use crate::data_contract::{DataContract, DataContractV1}; use crate::version::PlatformVersion; use crate::ProtocolError; use serde_json::Value as JsonValue; @@ -24,9 +24,12 @@ impl DataContractJsonConversionMethodsV0 for DataContract { 0 => Ok( DataContractV0::from_json(json_value, full_validation, platform_version)?.into(), ), + 1 => Ok( + DataContractV1::from_json(json_value, full_validation, platform_version)?.into(), + ), version => Err(ProtocolError::UnknownVersionMismatch { - method: "DataContract::from_json_object".to_string(), - known_versions: vec![0], + method: "DataContract::from_json".to_string(), + known_versions: vec![0, 1], received: version, }), } @@ -35,6 +38,7 @@ impl DataContractJsonConversionMethodsV0 for DataContract { fn to_json(&self, platform_version: &PlatformVersion) -> Result { match self { DataContract::V0(v0) => v0.to_json(platform_version), + DataContract::V1(v1) => v1.to_json(platform_version), } } @@ -44,6 +48,7 @@ impl DataContractJsonConversionMethodsV0 for DataContract { ) -> Result { match self { DataContract::V0(v0) => v0.to_validating_json(platform_version), + DataContract::V1(v1) => v1.to_validating_json(platform_version), } } } diff --git a/packages/rs-dpp/src/data_contract/conversion/value/mod.rs b/packages/rs-dpp/src/data_contract/conversion/value/mod.rs index bc54e6e80a..59d07245ca 100644 --- a/packages/rs-dpp/src/data_contract/conversion/value/mod.rs +++ b/packages/rs-dpp/src/data_contract/conversion/value/mod.rs @@ -2,6 +2,7 @@ pub mod v0; use crate::data_contract::conversion::value::v0::DataContractValueConversionMethodsV0; use crate::data_contract::v0::DataContractV0; +use crate::data_contract::v1::DataContractV1; use crate::data_contract::DataContract; use crate::version::PlatformVersion; use crate::ProtocolError; @@ -21,9 +22,12 @@ impl DataContractValueConversionMethodsV0 for DataContract { 0 => Ok( DataContractV0::from_value(raw_object, full_validation, platform_version)?.into(), ), + 1 => Ok( + DataContractV1::from_value(raw_object, full_validation, platform_version)?.into(), + ), version => Err(ProtocolError::UnknownVersionMismatch { method: "DataContract::from_object".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, }), } @@ -32,12 +36,14 @@ impl DataContractValueConversionMethodsV0 for DataContract { fn to_value(&self, platform_version: &PlatformVersion) -> Result { match self { DataContract::V0(v0) => v0.to_value(platform_version), + DataContract::V1(v1) => v1.to_value(platform_version), } } fn into_value(self, platform_version: &PlatformVersion) -> Result { match self { DataContract::V0(v0) => v0.into_value(platform_version), + DataContract::V1(v1) => v1.into_value(platform_version), } } } diff --git a/packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/mod.rs b/packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/mod.rs index c9c8ee76e9..cdd1666e02 100644 --- a/packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/mod.rs +++ b/packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/mod.rs @@ -1,4 +1,5 @@ mod v0; +mod v1; use crate::data_contract::document_type::v0::DocumentTypeV0; use crate::data_contract::document_type::DocumentType; @@ -41,6 +42,7 @@ impl DocumentType { documents_mutable_contract_default: bool, documents_can_be_deleted_contract_default: bool, full_validation: bool, + has_tokens: bool, validation_operations: &mut Vec, platform_version: &PlatformVersion, ) -> Result, ProtocolError> { @@ -62,9 +64,22 @@ impl DocumentType { validation_operations, platform_version, ), + // in v1 we add the ability to have contracts without documents and just tokens + 1 => DocumentTypeV0::create_document_types_from_document_schemas_v1( + data_contract_id, + document_schemas, + schema_defs, + documents_keep_history_contract_default, + documents_mutable_contract_default, + documents_can_be_deleted_contract_default, + full_validation, + has_tokens, + validation_operations, + platform_version, + ), version => Err(ProtocolError::UnknownVersionMismatch { method: "create_document_types_from_document_schemas".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, }), } diff --git a/packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/v0/mod.rs b/packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/v0/mod.rs index 1050a4c228..69b497eeea 100644 --- a/packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/v0/mod.rs @@ -88,6 +88,7 @@ mod tests { false, false, false, + false, &mut vec![], PlatformVersion::latest(), ); diff --git a/packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/v1/mod.rs b/packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/v1/mod.rs new file mode 100644 index 0000000000..720dc9fe83 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/document_type/class_methods/create_document_types_from_document_schemas/v1/mod.rs @@ -0,0 +1,66 @@ +use crate::consensus::basic::data_contract::DocumentTypesAreMissingError; +use crate::data_contract::document_type::class_methods::consensus_or_protocol_data_contract_error; +use crate::data_contract::document_type::v0::DocumentTypeV0; +use crate::data_contract::document_type::DocumentType; +use crate::data_contract::DocumentName; +use crate::validation::operations::ProtocolValidationOperation; +use crate::version::PlatformVersion; +use crate::ProtocolError; +use platform_value::{Identifier, Value}; +use std::collections::BTreeMap; + +impl DocumentTypeV0 { + pub(in crate::data_contract) fn create_document_types_from_document_schemas_v1( + data_contract_id: Identifier, + document_schemas: BTreeMap, + schema_defs: Option<&BTreeMap>, + documents_keep_history_contract_default: bool, + documents_mutable_contract_default: bool, + documents_can_be_deleted_contract_default: bool, + full_validation: bool, + has_tokens: bool, + validation_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, ProtocolError> { + let mut contract_document_types: BTreeMap = BTreeMap::new(); + + if document_schemas.is_empty() && !has_tokens { + return Err(consensus_or_protocol_data_contract_error( + DocumentTypesAreMissingError::new(data_contract_id).into(), + )); + } + + for (name, schema) in document_schemas.into_iter() { + let document_type = match platform_version + .dpp + .contract_versions + .document_type_versions + .structure_version + { + 0 => DocumentType::try_from_schema( + data_contract_id, + &name, + schema, + schema_defs, + documents_keep_history_contract_default, + documents_mutable_contract_default, + documents_can_be_deleted_contract_default, + full_validation, + validation_operations, + platform_version, + )?, + version => { + return Err(ProtocolError::UnknownVersionMismatch { + method: "get_document_types_from_value_array_v0 inner document type" + .to_string(), + known_versions: vec![0], + received: version, + }) + } + }; + + contract_document_types.insert(name.to_string(), document_type); + } + Ok(contract_document_types) + } +} 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 57b3bffb37..3394b0f6fc 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 @@ -744,7 +744,53 @@ fn insert_values_nested( let is_transient = known_transient.contains(&property_key); let field_type = match type_value { - "integer" => DocumentPropertyType::I64, + "integer" => { + DocumentPropertyType::I64 + // todo: we might want to do the following in the future (must be versioned) + // let minimum = inner_properties.get_optional_integer::(property_names::MINIMUM)?; + // let maximum = inner_properties.get_optional_integer::(property_names::MAXIMUM)?; + // + // match (minimum, maximum) { + // (Some(min), Some(max)) => { + // if min >= 0 { + // if max <= u8::MAX as i64 { + // DocumentPropertyType::U8 + // } else if max <= u16::MAX as i64 { + // DocumentPropertyType::U16 + // } else if max <= u32::MAX as i64 { + // DocumentPropertyType::U32 + // } else { + // DocumentPropertyType::U64 + // } + // } else { + // if min >= i8::MIN as i64 && max <= i8::MAX as i64 { + // DocumentPropertyType::I8 + // } else if min >= i16::MIN as i64 && max <= i16::MAX as i64 { + // DocumentPropertyType::I16 + // } else if min >= i32::MIN as i64 && max <= i32::MAX as i64 { + // DocumentPropertyType::I32 + // } else { + // DocumentPropertyType::I64 + // } + // } + // } + // (Some(min), None) => { + // if min >= 0 { + // DocumentPropertyType::U64 + // } else { + // DocumentPropertyType::I64 + // } + // } + // (None, Some(max)) => { + // if max >= 0 { + // DocumentPropertyType::U64 + // } else { + // DocumentPropertyType::I64 + // } + // } + // (None, None) => DocumentPropertyType::I64, + // } + } "number" => DocumentPropertyType::F64, "string" => DocumentPropertyType::String(StringPropertySizes { min_length: inner_properties.get_optional_integer(property_names::MIN_LENGTH)?, diff --git a/packages/rs-dpp/src/data_contract/document_type/mod.rs b/packages/rs-dpp/src/data_contract/document_type/mod.rs index a87ceb3c9c..23382dab53 100644 --- a/packages/rs-dpp/src/data_contract/document_type/mod.rs +++ b/packages/rs-dpp/src/data_contract/document_type/mod.rs @@ -53,6 +53,8 @@ mod property_names { pub const CREATED_AT: &str = "$createdAt"; pub const UPDATED_AT: &str = "$updatedAt"; pub const TRANSFERRED_AT: &str = "$transferredAt"; + pub const MINIMUM: &str = "minimum"; + pub const MAXIMUM: &str = "maximum"; pub const MIN_ITEMS: &str = "minItems"; pub const MAX_ITEMS: &str = "maxItems"; pub const MIN_LENGTH: &str = "minLength"; diff --git a/packages/rs-dpp/src/data_contract/document_type/property/mod.rs b/packages/rs-dpp/src/data_contract/document_type/property/mod.rs index 927fb561a1..e95fa7560a 100644 --- a/packages/rs-dpp/src/data_contract/document_type/property/mod.rs +++ b/packages/rs-dpp/src/data_contract/document_type/property/mod.rs @@ -1730,6 +1730,7 @@ impl DocumentPropertyType { } pub fn encode_u16(val: u16) -> Vec { + //todo this should just be to_be_bytes (and for all unsigned integers) // Positive integers are represented in binary with the signed bit set to 0 // Negative integers are represented in 2's complement form @@ -1754,7 +1755,7 @@ impl DocumentPropertyType { wtr } - /// Decodes an unsigned integer on 32 bits. + /// Decodes an unsigned integer on 16 bits. pub fn decode_u16(val: &[u8]) -> Option { // Flip the sign bit // to deal with interaction between the domains diff --git a/packages/rs-dpp/src/data_contract/document_type/restricted_creation/mod.rs b/packages/rs-dpp/src/data_contract/document_type/restricted_creation/mod.rs index 81194382f4..e875a6fe2c 100644 --- a/packages/rs-dpp/src/data_contract/document_type/restricted_creation/mod.rs +++ b/packages/rs-dpp/src/data_contract/document_type/restricted_creation/mod.rs @@ -1,8 +1,8 @@ use crate::consensus::basic::data_contract::UnknownDocumentCreationRestrictionModeError; use crate::consensus::basic::BasicError; use crate::consensus::ConsensusError; -use crate::identity::state_transition::asset_lock_proof::{Decode, Encode}; use crate::ProtocolError; +use bincode::{Decode, Encode}; use std::fmt; use std::fmt::{Display, Formatter}; diff --git a/packages/rs-dpp/src/data_contract/document_type/schema/enrich_with_base_schema/v0/mod.rs b/packages/rs-dpp/src/data_contract/document_type/schema/enrich_with_base_schema/v0/mod.rs index 3560e2b930..620fb15497 100644 --- a/packages/rs-dpp/src/data_contract/document_type/schema/enrich_with_base_schema/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/document_type/schema/enrich_with_base_schema/v0/mod.rs @@ -1,11 +1,14 @@ use crate::data_contract::document_type::property_names; use crate::data_contract::errors::DataContractError; -use crate::data_contract::serialized_version::v0::property_names as contract_property_names; +use crate::data_contract::serialized_version::property_names as contract_property_names; use platform_value::{Value, ValueMapHelper}; pub const DATA_CONTRACT_SCHEMA_URI_V0: &str = "https://github.com/dashpay/platform/blob/master/packages/rs-dpp/schema/meta_schemas/document/v0/document-meta.json"; +pub const TOKEN_SCHEMA_URI_V0: &str = + "https://github.com/dashpay/platform/blob/master/packages/rs-dpp/schema/meta_schemas/document/v0/token-meta.json"; + pub const PROPERTY_SCHEMA: &str = "$schema"; const SYSTEM_GENERATED_FIELDS: [&str; 9] = [ diff --git a/packages/rs-dpp/src/data_contract/extra/drive_api_tests.rs b/packages/rs-dpp/src/data_contract/extra/drive_api_tests.rs index beafe720de..67ab7eb856 100644 --- a/packages/rs-dpp/src/data_contract/extra/drive_api_tests.rs +++ b/packages/rs-dpp/src/data_contract/extra/drive_api_tests.rs @@ -107,7 +107,6 @@ mod test { let data_contract = DataContract::from_cbor(cbor_bytes, true, platform_version) .expect("contract should be deserialized"); - assert_eq!(0, data_contract.feature_version()); assert_eq!(expect_id, data_contract.id().as_bytes()); assert_eq!(expect_owner_id, data_contract.owner_id().as_bytes()); @@ -143,7 +142,7 @@ mod test { platform_version, ) .expect("expected to get a contract") - .into_v0() + .into_latest() .unwrap(); assert!(contract.config.documents_mutable_contract_default()); @@ -196,6 +195,58 @@ mod test { assert!(contact_info_indices[1].properties[0].ascending); } + #[test] + #[cfg(feature = "data-contract-cbor-conversion")] + fn mutability_properties_should_be_stored_and_restored_during_cbor_serialization_contract_v0() { + let platform_version = PlatformVersion::get(7).expect("expected version 7"); + + let mut contract = json_document_to_contract( + "../rs-drive/tests/supporting_files/contract/dashpay/dashpay-contract.json", + false, + platform_version, + ) + .expect("expected to get a cbor document") + .into_v0() + .unwrap(); + + assert!(!contract.config().readonly()); + assert!(!contract.config.keeps_history()); + assert!(contract.config.documents_mutable_contract_default()); + assert!(!contract.config.documents_keep_history_contract_default()); + + contract.config.set_readonly(true); + contract.config.set_keeps_history(true); + contract + .config + .set_documents_mutable_contract_default(false); + contract + .config + .set_documents_can_be_deleted_contract_default(false); + contract + .config + .set_documents_keep_history_contract_default(true); + + let contract_cbor = contract + .to_cbor(platform_version) + .expect("serialization shouldn't fail"); + let deserialized_contract = DataContract::from_cbor(contract_cbor, true, platform_version) + .expect("deserialization shouldn't fail"); + + assert_matches!( + deserialized_contract.config(), + DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: true, + keeps_history: true, + documents_mutable_contract_default: false, + documents_keep_history_contract_default: true, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }) + ); + } + #[test] #[cfg(feature = "data-contract-cbor-conversion")] fn mutability_properties_should_be_stored_and_restored_during_cbor_serialization() { @@ -207,7 +258,7 @@ mod test { platform_version, ) .expect("expected to get a cbor document") - .into_v0() + .into_v1() .unwrap(); assert!(!contract.config().readonly()); @@ -259,7 +310,7 @@ mod test { ) .expect("expected to decode a contract"); - let contract_v0 = contract.as_v0_mut().unwrap(); + let contract_v0 = contract.as_latest_mut().unwrap(); assert!(!contract_v0.config().readonly()); assert!(!contract_v0.config.keeps_history()); @@ -286,7 +337,7 @@ mod test { .expect("deserialization shouldn't fail"); assert_eq!( - deserialized_contract.as_v0().unwrap().config, + deserialized_contract.as_latest().unwrap().config, DataContractConfig::V0(DataContractConfigV0 { can_be_deleted: false, readonly: true, diff --git a/packages/rs-dpp/src/data_contract/factory/v0/mod.rs b/packages/rs-dpp/src/data_contract/factory/v0/mod.rs index 7b9949e5f8..0c07d25a61 100644 --- a/packages/rs-dpp/src/data_contract/factory/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/factory/v0/mod.rs @@ -9,10 +9,10 @@ use crate::data_contract::config::DataContractConfig; #[cfg(feature = "data-contract-value-conversion")] use crate::data_contract::conversion::value::v0::DataContractValueConversionMethodsV0; use crate::data_contract::created_data_contract::CreatedDataContract; -#[cfg(feature = "data-contract-value-conversion")] -use crate::data_contract::data_contract::DataContractV0; use crate::data_contract::serialized_version::v0::DataContractInSerializationFormatV0; use crate::data_contract::serialized_version::DataContractInSerializationFormat; +#[cfg(feature = "data-contract-value-conversion")] +use crate::data_contract::v0::DataContractV0; use crate::data_contract::{DataContract, INITIAL_DATA_CONTRACT_VERSION}; use crate::serialization::PlatformDeserializableWithPotentialValidationFromVersionedStructure; #[cfg(feature = "state-transitions")] @@ -20,6 +20,7 @@ use crate::state_transition::data_contract_create_transition::DataContractCreate #[cfg(feature = "state-transitions")] use crate::state_transition::data_contract_update_transition::DataContractUpdateTransition; +use crate::data_contract::v1::DataContractV1; use crate::prelude::IdentityNonce; use crate::version::PlatformVersion; use crate::{errors::ProtocolError, prelude::Identifier}; @@ -117,9 +118,15 @@ impl DataContractFactoryV0 { platform_version, )? .into()), + 1 => Ok(DataContractV1::from_value( + data_contract_object, + full_validation, + platform_version, + )? + .into()), version => Err(ProtocolError::UnknownVersionMismatch { method: "DataContractFactoryV0::create_from_object".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, }), } diff --git a/packages/rs-dpp/src/data_contract/group/accessors/mod.rs b/packages/rs-dpp/src/data_contract/group/accessors/mod.rs new file mode 100644 index 0000000000..2d24cd45f5 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/group/accessors/mod.rs @@ -0,0 +1 @@ +pub mod v0; diff --git a/packages/rs-dpp/src/data_contract/group/accessors/v0/mod.rs b/packages/rs-dpp/src/data_contract/group/accessors/v0/mod.rs new file mode 100644 index 0000000000..55353dd047 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/group/accessors/v0/mod.rs @@ -0,0 +1,33 @@ +use crate::data_contract::group::GroupRequiredPower; +use crate::ProtocolError; +use platform_value::Identifier; +use std::collections::BTreeMap; + +/// Getters for GroupV0 +pub trait GroupV0Getters { + /// Returns the member power + fn member_power(&self, member_id: Identifier) -> Result; + /// Returns the members map of the group + fn members(&self) -> &BTreeMap; + + /// Returns a mutable reference to the members map of the group + fn members_mut(&mut self) -> &mut BTreeMap; + + /// Returns the required power of the group + fn required_power(&self) -> GroupRequiredPower; +} + +/// Setters for GroupV0 +pub trait GroupV0Setters { + /// Sets the members of the group + fn set_members(&mut self, members: BTreeMap); + + /// Inserts or updates a member with a specific power + fn set_member_power(&mut self, member_id: Identifier, power: u32); + + /// Removes a member from the group + fn remove_member(&mut self, member_id: &Identifier) -> bool; + + /// Sets the required power of the group + fn set_required_power(&mut self, required_power: GroupRequiredPower); +} diff --git a/packages/rs-dpp/src/data_contract/group/mod.rs b/packages/rs-dpp/src/data_contract/group/mod.rs new file mode 100644 index 0000000000..26e3c03629 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/group/mod.rs @@ -0,0 +1,83 @@ +use crate::data_contract::group::accessors::v0::{GroupV0Getters, GroupV0Setters}; +use crate::data_contract::group::v0::GroupV0; +use crate::errors::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use platform_value::Identifier; +use serde::{Deserialize, Serialize}; +use std::collections::BTreeMap; + +pub mod accessors; +pub mod v0; +pub type RequiredSigners = u8; + +pub type GroupMemberPower = u32; +pub type GroupSumPower = u32; +pub type GroupRequiredPower = u32; +#[derive( + Serialize, + Deserialize, + Decode, + Encode, + PlatformSerialize, + PlatformDeserialize, + Debug, + Clone, + PartialEq, + Eq, +)] +#[platform_serialize(unversioned)] +pub enum Group { + V0(GroupV0), +} + +impl GroupV0Getters for Group { + fn member_power(&self, member_id: Identifier) -> Result { + match self { + Group::V0(group_v0) => group_v0.member_power(member_id), + } + } + fn members(&self) -> &BTreeMap { + match self { + Group::V0(group_v0) => group_v0.members(), + } + } + + fn members_mut(&mut self) -> &mut BTreeMap { + match self { + Group::V0(group_v0) => group_v0.members_mut(), + } + } + + fn required_power(&self) -> GroupRequiredPower { + match self { + Group::V0(group_v0) => group_v0.required_power(), + } + } +} + +impl GroupV0Setters for Group { + fn set_members(&mut self, members: BTreeMap) { + match self { + Group::V0(group_v0) => group_v0.set_members(members), + } + } + + fn set_member_power(&mut self, member_id: Identifier, power: u32) { + match self { + Group::V0(group_v0) => group_v0.set_member_power(member_id, power), + } + } + + fn remove_member(&mut self, member_id: &Identifier) -> bool { + match self { + Group::V0(group_v0) => group_v0.remove_member(member_id), + } + } + + fn set_required_power(&mut self, required_power: GroupRequiredPower) { + match self { + Group::V0(group_v0) => group_v0.set_required_power(required_power), + } + } +} diff --git a/packages/rs-dpp/src/data_contract/group/v0/mod.rs b/packages/rs-dpp/src/data_contract/group/v0/mod.rs new file mode 100644 index 0000000000..c53696e9b2 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/group/v0/mod.rs @@ -0,0 +1,68 @@ +use crate::data_contract::group::accessors::v0::{GroupV0Getters, GroupV0Setters}; +use crate::data_contract::group::{GroupMemberPower, GroupRequiredPower}; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use platform_value::Identifier; +use serde::{Deserialize, Serialize}; +use std::collections::BTreeMap; + +#[derive( + Serialize, + Deserialize, + Decode, + Encode, + PlatformSerialize, + PlatformDeserialize, + Debug, + Clone, + PartialEq, + Eq, +)] +#[platform_serialize(unversioned)] +pub struct GroupV0 { + pub members: BTreeMap, + pub required_power: GroupRequiredPower, +} + +impl GroupV0Getters for GroupV0 { + fn member_power(&self, member_id: Identifier) -> Result { + self.members + .get(&member_id) + .cloned() + .ok_or(ProtocolError::GroupMemberNotFound(format!( + "Group member {} not found", + member_id + ))) + } + + fn members(&self) -> &BTreeMap { + &self.members + } + + fn members_mut(&mut self) -> &mut BTreeMap { + &mut self.members + } + + fn required_power(&self) -> GroupRequiredPower { + self.required_power + } +} + +impl GroupV0Setters for GroupV0 { + fn set_members(&mut self, members: BTreeMap) { + self.members = members; + } + + fn set_member_power(&mut self, member_id: Identifier, power: u32) { + self.members.insert(member_id, power); + } + + fn remove_member(&mut self, member_id: &Identifier) -> bool { + self.members.remove(member_id).is_some() + } + + fn set_required_power(&mut self, required_power: GroupRequiredPower) { + self.required_power = required_power; + } +} diff --git a/packages/rs-dpp/src/data_contract/methods/schema/mod.rs b/packages/rs-dpp/src/data_contract/methods/schema/mod.rs index 63748fb45f..b048cd44ff 100644 --- a/packages/rs-dpp/src/data_contract/methods/schema/mod.rs +++ b/packages/rs-dpp/src/data_contract/methods/schema/mod.rs @@ -26,6 +26,13 @@ impl DataContractSchemaMethodsV0 for DataContract { validation_operations, platform_version, ), + DataContract::V1(v1) => v1.set_document_schemas( + schemas, + defs, + full_validation, + validation_operations, + platform_version, + ), } } @@ -45,18 +52,27 @@ impl DataContractSchemaMethodsV0 for DataContract { validation_operations, platform_version, ), + DataContract::V1(v1) => v1.set_document_schema( + name, + schema, + full_validation, + validation_operations, + platform_version, + ), } } fn document_schemas(&self) -> BTreeMap { match self { DataContract::V0(v0) => v0.document_schemas(), + DataContract::V1(v1) => v1.document_schemas(), } } fn schema_defs(&self) -> Option<&BTreeMap> { match self { DataContract::V0(v0) => v0.schema_defs(), + DataContract::V1(v1) => v1.schema_defs(), } } @@ -74,6 +90,12 @@ impl DataContractSchemaMethodsV0 for DataContract { validation_operations, platform_version, ), + DataContract::V1(v1) => v1.set_schema_defs( + defs, + full_validation, + validation_operations, + platform_version, + ), } } } diff --git a/packages/rs-dpp/src/data_contract/mod.rs b/packages/rs-dpp/src/data_contract/mod.rs index 5fd8f7b56f..818bc3f621 100644 --- a/packages/rs-dpp/src/data_contract/mod.rs +++ b/packages/rs-dpp/src/data_contract/mod.rs @@ -3,10 +3,12 @@ use crate::serialization::{ PlatformDeserializableWithPotentialValidationFromVersionedStructure, PlatformLimitDeserializableFromVersionedStructure, PlatformSerializableWithPlatformVersion, }; +use std::collections::BTreeMap; use derive_more::From; use bincode::config::{BigEndian, Configuration}; +use once_cell::sync::Lazy; pub mod errors; pub mod extra; @@ -17,7 +19,8 @@ mod generate_data_contract; pub mod created_data_contract; pub mod document_type; -mod v0; +pub mod v0; +pub mod v1; #[cfg(feature = "factories")] pub mod factory; @@ -32,11 +35,12 @@ mod methods; pub mod serialized_version; pub use methods::*; pub mod accessors; +pub mod associated_token; +pub mod change_control_rules; pub mod config; +pub mod group; pub mod storage_requirements; -pub use v0::*; - use crate::data_contract::serialized_version::{ DataContractInSerializationFormat, CONTRACT_DESERIALIZATION_LIMIT, }; @@ -46,6 +50,10 @@ use crate::version::{FeatureVersion, PlatformVersion}; use crate::ProtocolError; use crate::ProtocolError::{PlatformDeserializationError, PlatformSerializationError}; +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::group::Group; +use crate::data_contract::v0::DataContractV0; +use crate::data_contract::v1::DataContractV1; use platform_version::TryIntoPlatformVersioned; use platform_versioning::PlatformVersioned; pub use serde_json::Value as JsonValue; @@ -53,10 +61,18 @@ pub use serde_json::Value as JsonValue; type JsonSchema = JsonValue; type DefinitionName = String; pub type DocumentName = String; +pub type TokenName = String; +pub type GroupContractPosition = u16; +pub type TokenContractPosition = u16; type PropertyPath = String; pub const INITIAL_DATA_CONTRACT_VERSION: u32 = 1; +// Define static empty BTreeMaps +static EMPTY_GROUPS: Lazy> = Lazy::new(|| BTreeMap::new()); +static EMPTY_TOKENS: Lazy> = + Lazy::new(|| BTreeMap::new()); + /// Understanding Data Contract versioning /// Data contract versioning is both for the code structure and for serialization. /// @@ -85,6 +101,7 @@ pub const INITIAL_DATA_CONTRACT_VERSION: u32 = 1; #[derive(Debug, Clone, PartialEq, From, PlatformVersioned)] pub enum DataContract { V0(DataContractV0), + V1(DataContractV1), } impl PlatformSerializableWithPlatformVersion for DataContract { @@ -214,18 +231,66 @@ impl DataContract { pub fn as_v0(&self) -> Option<&DataContractV0> { match self { DataContract::V0(v0) => Some(v0), + _ => None, } } pub fn as_v0_mut(&mut self) -> Option<&mut DataContractV0> { match self { DataContract::V0(v0) => Some(v0), + _ => None, } } pub fn into_v0(self) -> Option { match self { DataContract::V0(v0) => Some(v0), + _ => None, + } + } + + pub fn as_v1(&self) -> Option<&DataContractV1> { + match self { + DataContract::V1(v1) => Some(v1), + _ => None, + } + } + + pub fn as_v1_mut(&mut self) -> Option<&mut DataContractV1> { + match self { + DataContract::V1(v1) => Some(v1), + _ => None, + } + } + + pub fn into_v1(self) -> Option { + match self { + DataContract::V1(v1) => Some(v1), + _ => None, + } + } + + /// This should only ever be used in tests, as it will change + #[cfg(test)] + pub fn into_latest(self) -> Option { + self.into_v1() + } + + /// This should only ever be used in tests, as it will change + #[cfg(test)] + pub fn as_latest(&self) -> Option<&DataContractV1> { + match self { + DataContract::V1(v1) => Some(v1), + _ => None, + } + } + + /// This should only ever be used in tests, as it will change + #[cfg(test)] + pub fn as_latest_mut(&mut self) -> Option<&mut DataContractV1> { + match self { + DataContract::V1(v1) => Some(v1), + _ => None, } } diff --git a/packages/rs-dpp/src/data_contract/serialized_version/mod.rs b/packages/rs-dpp/src/data_contract/serialized_version/mod.rs index 150bc6a28b..a88d93413b 100644 --- a/packages/rs-dpp/src/data_contract/serialized_version/mod.rs +++ b/packages/rs-dpp/src/data_contract/serialized_version/mod.rs @@ -1,9 +1,16 @@ -use crate::data_contract::data_contract::DataContractV0; use crate::data_contract::serialized_version::v0::DataContractInSerializationFormatV0; -use crate::data_contract::{DataContract, DefinitionName, DocumentName}; +use crate::data_contract::{ + DataContract, DefinitionName, DocumentName, GroupContractPosition, TokenContractPosition, + EMPTY_GROUPS, EMPTY_TOKENS, +}; use crate::version::PlatformVersion; use std::collections::BTreeMap; +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::group::Group; +use crate::data_contract::serialized_version::v1::DataContractInSerializationFormatV1; +use crate::data_contract::v0::DataContractV0; +use crate::data_contract::v1::DataContractV1; use crate::validation::operations::ProtocolValidationOperation; use crate::ProtocolError; use bincode::{Decode, Encode}; @@ -15,6 +22,14 @@ use platform_versioning::PlatformVersioned; use serde::{Deserialize, Serialize}; pub(in crate::data_contract) mod v0; +pub(in crate::data_contract) mod v1; + +pub mod property_names { + pub const ID: &str = "id"; + pub const OWNER_ID: &str = "ownerId"; + pub const VERSION: &str = "version"; + pub const DEFINITIONS: &str = "$defs"; +} pub const CONTRACT_DESERIALIZATION_LIMIT: usize = 15000; @@ -27,6 +42,8 @@ pub const CONTRACT_DESERIALIZATION_LIMIT: usize = 15000; pub enum DataContractInSerializationFormat { #[cfg_attr(feature = "data-contract-serde-conversion", serde(rename = "0"))] V0(DataContractInSerializationFormatV0), + #[cfg_attr(feature = "data-contract-serde-conversion", serde(rename = "1"))] + V1(DataContractInSerializationFormatV1), } impl DataContractInSerializationFormat { @@ -34,6 +51,7 @@ impl DataContractInSerializationFormat { pub fn id(&self) -> Identifier { match self { DataContractInSerializationFormat::V0(v0) => v0.id, + DataContractInSerializationFormat::V1(v1) => v1.id, } } @@ -41,24 +59,41 @@ impl DataContractInSerializationFormat { pub fn owner_id(&self) -> Identifier { match self { DataContractInSerializationFormat::V0(v0) => v0.owner_id, + DataContractInSerializationFormat::V1(v1) => v1.owner_id, } } pub fn document_schemas(&self) -> &BTreeMap { match self { DataContractInSerializationFormat::V0(v0) => &v0.document_schemas, + DataContractInSerializationFormat::V1(v1) => &v1.document_schemas, } } pub fn schema_defs(&self) -> Option<&BTreeMap> { match self { DataContractInSerializationFormat::V0(v0) => v0.schema_defs.as_ref(), + DataContractInSerializationFormat::V1(v1) => v1.schema_defs.as_ref(), } } pub fn version(&self) -> u32 { match self { DataContractInSerializationFormat::V0(v0) => v0.version, + DataContractInSerializationFormat::V1(v1) => v1.version, + } + } + + pub fn groups(&self) -> &BTreeMap { + match self { + DataContractInSerializationFormat::V0(_) => &EMPTY_GROUPS, + DataContractInSerializationFormat::V1(v1) => &v1.groups, + } + } + pub fn tokens(&self) -> &BTreeMap { + match self { + DataContractInSerializationFormat::V0(_) => &EMPTY_TOKENS, + DataContractInSerializationFormat::V1(v1) => &v1.tokens, } } } @@ -80,9 +115,13 @@ impl TryFromPlatformVersioned for DataContractInSerializationFor let v0_format: DataContractInSerializationFormatV0 = DataContract::V0(value).into(); Ok(v0_format.into()) } + 1 => { + let v1_format: DataContractInSerializationFormatV1 = DataContract::V0(value).into(); + Ok(v1_format.into()) + } version => Err(ProtocolError::UnknownVersionMismatch { method: "DataContract::serialize_to_default_current_version".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, }), } @@ -107,9 +146,76 @@ impl TryFromPlatformVersioned<&DataContractV0> for DataContractInSerializationFo DataContract::V0(value.to_owned()).into(); Ok(v0_format.into()) } + 1 => { + let v1_format: DataContractInSerializationFormatV1 = + DataContract::V0(value.to_owned()).into(); + Ok(v1_format.into()) + } + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DataContract::serialize_to_default_current_version".to_string(), + known_versions: vec![0, 1], + received: version, + }), + } + } +} + +impl TryFromPlatformVersioned for DataContractInSerializationFormat { + type Error = ProtocolError; + + fn try_from_platform_versioned( + value: DataContractV1, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .dpp + .contract_versions + .contract_serialization_version + .default_current_version + { + 0 => { + let v0_format: DataContractInSerializationFormatV0 = DataContract::V1(value).into(); + Ok(v0_format.into()) + } + 1 => { + let v1_format: DataContractInSerializationFormatV1 = DataContract::V1(value).into(); + Ok(v1_format.into()) + } version => Err(ProtocolError::UnknownVersionMismatch { method: "DataContract::serialize_to_default_current_version".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], + received: version, + }), + } + } +} + +impl TryFromPlatformVersioned<&DataContractV1> for DataContractInSerializationFormat { + type Error = ProtocolError; + + fn try_from_platform_versioned( + value: &DataContractV1, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .dpp + .contract_versions + .contract_serialization_version + .default_current_version + { + 0 => { + let v0_format: DataContractInSerializationFormatV0 = + DataContract::V1(value.to_owned()).into(); + Ok(v0_format.into()) + } + 1 => { + let v1_format: DataContractInSerializationFormatV1 = + DataContract::V1(value.to_owned()).into(); + Ok(v1_format.into()) + } + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DataContract::serialize_to_default_current_version".to_string(), + known_versions: vec![0, 1], received: version, }), } @@ -133,9 +239,13 @@ impl TryFromPlatformVersioned<&DataContract> for DataContractInSerializationForm let v0_format: DataContractInSerializationFormatV0 = value.clone().into(); Ok(v0_format.into()) } + 1 => { + let v1_format: DataContractInSerializationFormatV1 = value.clone().into(); + Ok(v1_format.into()) + } version => Err(ProtocolError::UnknownVersionMismatch { method: "DataContract::serialize_to_default_current_version".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, }), } @@ -159,9 +269,13 @@ impl TryFromPlatformVersioned for DataContractInSerializationForma let v0_format: DataContractInSerializationFormatV0 = value.into(); Ok(v0_format.into()) } + 1 => { + let v1_format: DataContractInSerializationFormatV1 = value.into(); + Ok(v1_format.into()) + } version => Err(ProtocolError::UnknownVersionMismatch { method: "DataContract::serialize_consume_to_default_current_version".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, }), } @@ -175,29 +289,30 @@ impl DataContract { validation_operations: &mut Vec, platform_version: &PlatformVersion, ) -> Result { - match value { - DataContractInSerializationFormat::V0(serialization_format_v0) => { - match platform_version - .dpp - .contract_versions - .contract_structure_version - { - 0 => { - let data_contract = DataContractV0::try_from_platform_versioned_v0( - serialization_format_v0, - full_validation, - validation_operations, - platform_version, - )?; - Ok(data_contract.into()) - } - version => Err(ProtocolError::UnknownVersionMismatch { - method: "DataContract::from_serialization_format".to_string(), - known_versions: vec![0], - received: version, - }), - } - } + match platform_version + .dpp + .contract_versions + .contract_structure_version + { + 0 => DataContractV0::try_from_platform_versioned( + value, + full_validation, + validation_operations, + platform_version, + ) + .map(|contract| contract.into()), + 1 => DataContractV1::try_from_platform_versioned( + value, + full_validation, + validation_operations, + platform_version, + ) + .map(|contract| contract.into()), + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DataContract::try_from_platform_versioned".to_string(), + known_versions: vec![0, 1], + received: version, + }), } } } diff --git a/packages/rs-dpp/src/data_contract/serialized_version/v0/mod.rs b/packages/rs-dpp/src/data_contract/serialized_version/v0/mod.rs index 085b1d2a82..6cd119e3bf 100644 --- a/packages/rs-dpp/src/data_contract/serialized_version/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/serialized_version/v0/mod.rs @@ -3,19 +3,13 @@ use crate::data_contract::config::DataContractConfig; use crate::data_contract::document_type::accessors::DocumentTypeV0Getters; use crate::data_contract::v0::DataContractV0; +use crate::data_contract::v1::DataContractV1; use crate::data_contract::{DataContract, DefinitionName, DocumentName}; -use crate::identity::state_transition::asset_lock_proof::{Decode, Encode}; +use bincode::{Decode, Encode}; use platform_value::{Identifier, Value}; use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; -pub mod property_names { - pub const ID: &str = "id"; - pub const OWNER_ID: &str = "ownerId"; - pub const VERSION: &str = "version"; - pub const DEFINITIONS: &str = "$defs"; -} - #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Encode, Decode)] #[serde(rename_all = "camelCase")] pub struct DataContractInSerializationFormatV0 { @@ -53,6 +47,29 @@ impl From for DataContractInSerializationFormatV0 { .. } = v0; + DataContractInSerializationFormatV0 { + id, + config, + version, + owner_id, + document_schemas: document_types + .into_iter() + .map(|(key, document_type)| (key, document_type.schema_owned())) + .collect(), + schema_defs, + } + } + DataContract::V1(v1) => { + let DataContractV1 { + id, + config, + version, + owner_id, + schema_defs, + document_types, + .. + } = v1; + DataContractInSerializationFormatV0 { id, config, diff --git a/packages/rs-dpp/src/data_contract/serialized_version/v1/mod.rs b/packages/rs-dpp/src/data_contract/serialized_version/v1/mod.rs new file mode 100644 index 0000000000..d24ed1402c --- /dev/null +++ b/packages/rs-dpp/src/data_contract/serialized_version/v1/mod.rs @@ -0,0 +1,136 @@ +use crate::data_contract::config::v0::DataContractConfigV0; +use crate::data_contract::config::DataContractConfig; +use crate::data_contract::document_type::accessors::DocumentTypeV0Getters; + +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::group::Group; +use crate::data_contract::v0::DataContractV0; +use crate::data_contract::v1::DataContractV1; +use crate::data_contract::{ + DataContract, DefinitionName, DocumentName, GroupContractPosition, TokenContractPosition, +}; +use bincode::{Decode, Encode}; +use platform_value::{Identifier, Value}; +use serde::{Deserialize, Serialize}; +use std::collections::BTreeMap; + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Encode, Decode)] +#[serde(rename_all = "camelCase")] +pub struct DataContractInSerializationFormatV1 { + /// A unique identifier for the data contract. + pub id: Identifier, + + /// Internal configuration for the contract. + #[serde(default = "DataContractConfigV0::default_with_version")] + pub config: DataContractConfig, + + /// The version of this data contract. + pub version: u32, + + /// The identifier of the contract owner. + pub owner_id: Identifier, + + /// Shared subschemas to reuse across documents as $defs object + pub schema_defs: Option>, + + /// Document JSON Schemas per type + pub document_schemas: BTreeMap, + + /// Groups that allow for specific multiparty actions on the contract + #[serde(default, deserialize_with = "deserialize_u16_group_map")] + pub groups: BTreeMap, + + /// The tokens on the contract. + #[serde(default, deserialize_with = "deserialize_u16_token_configuration_map")] + pub tokens: BTreeMap, +} + +fn deserialize_u16_group_map<'de, D>( + deserializer: D, +) -> Result, D::Error> +where + D: serde::Deserializer<'de>, +{ + let map: BTreeMap = BTreeMap::deserialize(deserializer)?; + map.into_iter() + .map(|(k, v)| { + k.parse::() + .map_err(serde::de::Error::custom) + .map(|key| (key, v)) + }) + .collect() +} +fn deserialize_u16_token_configuration_map<'de, D>( + deserializer: D, +) -> Result, D::Error> +where + D: serde::Deserializer<'de>, +{ + let map: BTreeMap = BTreeMap::deserialize(deserializer)?; + map.into_iter() + .map(|(k, v)| { + k.parse::() + .map_err(serde::de::Error::custom) + .map(|key| (key, v)) + }) + .collect() +} + +impl From for DataContractInSerializationFormatV1 { + fn from(value: DataContract) -> Self { + match value { + DataContract::V0(v0) => { + let DataContractV0 { + id, + config, + version, + owner_id, + schema_defs, + document_types, + .. + } = v0; + + DataContractInSerializationFormatV1 { + id, + config, + version, + owner_id, + schema_defs, + document_schemas: document_types + .into_iter() + .map(|(key, document_type)| (key, document_type.schema_owned())) + .collect(), + groups: Default::default(), + tokens: Default::default(), + } + } + DataContract::V1(v1) => { + let DataContractV1 { + id, + config, + version, + owner_id, + schema_defs, + document_types, + groups, + tokens, + .. + } = v1; + + DataContractInSerializationFormatV1 { + id, + config, + version, + owner_id, + schema_defs, + document_schemas: document_types + .into_iter() + .map(|(key, document_type)| (key, document_type.schema_owned())) + .collect(), + groups, + tokens, + } + } + } + } +} diff --git a/packages/rs-dpp/src/data_contract/v0/conversion/cbor.rs b/packages/rs-dpp/src/data_contract/v0/conversion/cbor.rs index af497027fd..c2aba05b12 100644 --- a/packages/rs-dpp/src/data_contract/v0/conversion/cbor.rs +++ b/packages/rs-dpp/src/data_contract/v0/conversion/cbor.rs @@ -1,6 +1,6 @@ use crate::data_contract::conversion::cbor::DataContractCborConversionMethodsV0; use crate::data_contract::conversion::value::v0::DataContractValueConversionMethodsV0; -use crate::data_contract::data_contract::DataContractV0; +use crate::data_contract::v0::DataContractV0; use crate::util::cbor_value::CborCanonicalMap; use crate::version::PlatformVersion; diff --git a/packages/rs-dpp/src/data_contract/v0/conversion/value.rs b/packages/rs-dpp/src/data_contract/v0/conversion/value.rs index 3ed0a98713..db16bc497d 100644 --- a/packages/rs-dpp/src/data_contract/v0/conversion/value.rs +++ b/packages/rs-dpp/src/data_contract/v0/conversion/value.rs @@ -1,9 +1,8 @@ use crate::data_contract::conversion::value::v0::DataContractValueConversionMethodsV0; -use crate::data_contract::data_contract::DataContractV0; -use crate::data_contract::serialized_version::v0::{ - property_names, DataContractInSerializationFormatV0, -}; +use crate::data_contract::serialized_version::property_names; +use crate::data_contract::serialized_version::v0::DataContractInSerializationFormatV0; use crate::data_contract::serialized_version::DataContractInSerializationFormat; +use crate::data_contract::v0::DataContractV0; use crate::version::PlatformVersion; use crate::ProtocolError; use platform_value::{ReplacementType, Value}; diff --git a/packages/rs-dpp/src/data_contract/v0/methods/schema.rs b/packages/rs-dpp/src/data_contract/v0/methods/schema.rs index d97cb54045..dddd285a6c 100644 --- a/packages/rs-dpp/src/data_contract/v0/methods/schema.rs +++ b/packages/rs-dpp/src/data_contract/v0/methods/schema.rs @@ -27,6 +27,7 @@ impl DataContractSchemaMethodsV0 for DataContractV0 { self.config.documents_mutable_contract_default(), self.config.documents_can_be_deleted_contract_default(), full_validation, + false, validation_operations, platform_version, )?; diff --git a/packages/rs-dpp/src/data_contract/v0/serialization/bincode.rs b/packages/rs-dpp/src/data_contract/v0/serialization/bincode.rs deleted file mode 100644 index 65d78beaa1..0000000000 --- a/packages/rs-dpp/src/data_contract/v0/serialization/bincode.rs +++ /dev/null @@ -1,31 +0,0 @@ -#[cfg(test)] -mod tests { - use crate::data_contract::DataContract; - use crate::identity::accessors::IdentityGettersV0; - use crate::identity::Identity; - use crate::serialization::{ - PlatformDeserializableWithPotentialValidationFromVersionedStructure, - PlatformSerializableWithPlatformVersion, - }; - use crate::tests::fixtures::get_data_contract_fixture; - use crate::version::PlatformVersion; - use platform_version::version::LATEST_PLATFORM_VERSION; - - #[test] - #[cfg(feature = "random-identities")] - fn data_contract_ser_de() { - let platform_version = PlatformVersion::latest(); - let identity = Identity::random_identity(5, Some(5), platform_version) - .expect("expected a random identity"); - let contract = - get_data_contract_fixture(Some(identity.id()), 0, platform_version.protocol_version) - .data_contract_owned(); - let bytes = contract - .serialize_to_bytes_with_platform_version(LATEST_PLATFORM_VERSION) - .expect("expected to serialize"); - let recovered_contract = - DataContract::versioned_deserialize(&bytes, false, platform_version) - .expect("expected to deserialize state transition"); - assert_eq!(contract, recovered_contract); - } -} diff --git a/packages/rs-dpp/src/data_contract/v0/serialization/mod.rs b/packages/rs-dpp/src/data_contract/v0/serialization/mod.rs index 104ede8844..2a79edd362 100644 --- a/packages/rs-dpp/src/data_contract/v0/serialization/mod.rs +++ b/packages/rs-dpp/src/data_contract/v0/serialization/mod.rs @@ -7,11 +7,10 @@ use crate::data_contract::DataContract; use crate::version::{PlatformVersion, PlatformVersionCurrentVersion}; use crate::ProtocolError; +use crate::data_contract::serialized_version::v1::DataContractInSerializationFormatV1; use crate::validation::operations::ProtocolValidationOperation; use serde::{Deserialize, Deserializer, Serialize, Serializer}; -pub mod bincode; - impl Serialize for DataContractV0 { fn serialize(&self, serializer: S) -> Result where @@ -51,27 +50,24 @@ impl DataContractV0 { ) -> Result { match value { DataContractInSerializationFormat::V0(serialization_format_v0) => { - match platform_version - .dpp - .contract_versions - .contract_structure_version - { - 0 => { - let data_contract = DataContractV0::try_from_platform_versioned_v0( - serialization_format_v0, - full_validation, - validation_operations, - platform_version, - )?; - - Ok(data_contract) - } - version => Err(ProtocolError::UnknownVersionMismatch { - method: "DataContractV0::from_serialization_format".to_string(), - known_versions: vec![0], - received: version, - }), - } + let data_contract = DataContractV0::try_from_platform_versioned_v0( + serialization_format_v0, + full_validation, + validation_operations, + platform_version, + )?; + + Ok(data_contract) + } + DataContractInSerializationFormat::V1(serialization_format_v1) => { + let data_contract = DataContractV0::try_from_platform_versioned_v1( + serialization_format_v1, + full_validation, + validation_operations, + platform_version, + )?; + + Ok(data_contract) } } } @@ -99,6 +95,7 @@ impl DataContractV0 { config.documents_mutable_contract_default(), config.documents_can_be_deleted_contract_default(), full_validation, + false, validation_operations, platform_version, )?; @@ -115,4 +112,78 @@ impl DataContractV0 { Ok(data_contract) } + + pub(in crate::data_contract) fn try_from_platform_versioned_v1( + data_contract_data: DataContractInSerializationFormatV1, + full_validation: bool, + validation_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result { + let DataContractInSerializationFormatV1 { + id, + config, + version, + owner_id, + document_schemas, + schema_defs, + .. + } = data_contract_data; + + let document_types = DocumentType::create_document_types_from_document_schemas( + id, + document_schemas, + schema_defs.as_ref(), + config.documents_keep_history_contract_default(), + config.documents_mutable_contract_default(), + config.documents_can_be_deleted_contract_default(), + full_validation, + false, + validation_operations, + platform_version, + )?; + + let data_contract = DataContractV0 { + id, + version, + owner_id, + document_types, + metadata: None, + config, + schema_defs, + }; + + Ok(data_contract) + } +} + +#[cfg(test)] +mod tests { + use crate::data_contract::DataContract; + use crate::identity::accessors::IdentityGettersV0; + use crate::identity::Identity; + use crate::serialization::{ + PlatformDeserializableWithPotentialValidationFromVersionedStructure, + PlatformSerializableWithPlatformVersion, + }; + use crate::tests::fixtures::get_data_contract_fixture; + use crate::version::PlatformVersion; + use platform_version::version::LATEST_PLATFORM_VERSION; + + #[test] + #[cfg(feature = "random-identities")] + fn data_contract_ser_de() { + let platform_version = PlatformVersion::first(); + let identity = Identity::random_identity(5, Some(5), platform_version) + .expect("expected a random identity"); + let contract = + get_data_contract_fixture(Some(identity.id()), 0, platform_version.protocol_version) + .data_contract_owned(); + let bytes = contract + .serialize_to_bytes_with_platform_version(LATEST_PLATFORM_VERSION) + .expect("expected to serialize"); + let recovered_contract = + DataContract::versioned_deserialize(&bytes, false, platform_version) + .expect("expected to deserialize state transition"); + assert_eq!(contract, recovered_contract); + } } diff --git a/packages/rs-dpp/src/data_contract/v1/accessors/mod.rs b/packages/rs-dpp/src/data_contract/v1/accessors/mod.rs new file mode 100644 index 0000000000..d62a46ddfd --- /dev/null +++ b/packages/rs-dpp/src/data_contract/v1/accessors/mod.rs @@ -0,0 +1,225 @@ +use crate::data_contract::accessors::v0::{DataContractV0Getters, DataContractV0Setters}; +use crate::data_contract::config::DataContractConfig; +use crate::data_contract::document_type::{DocumentType, DocumentTypeRef}; +use crate::data_contract::errors::DataContractError; + +use crate::data_contract::v1::DataContractV1; +use crate::data_contract::{DocumentName, GroupContractPosition, TokenContractPosition}; +use crate::metadata::Metadata; + +use crate::data_contract::accessors::v1::{DataContractV1Getters, DataContractV1Setters}; +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::document_type::accessors::DocumentTypeV0Getters; +use crate::data_contract::group::Group; +use crate::tokens::calculate_token_id; +use crate::tokens::errors::TokenError; +use crate::ProtocolError; +use platform_value::Identifier; +use std::collections::BTreeMap; + +impl DataContractV0Getters for DataContractV1 { + fn id(&self) -> Identifier { + self.id + } + + fn id_ref(&self) -> &Identifier { + &self.id + } + + fn version(&self) -> u32 { + self.version + } + + fn owner_id(&self) -> Identifier { + self.owner_id + } + + fn document_type_cloned_for_name(&self, name: &str) -> Result { + self.document_type_cloned_optional_for_name(name) + .ok_or_else(|| { + DataContractError::DocumentTypeNotFound( + "can not get document type from contract".to_string(), + ) + }) + } + + fn document_type_borrowed_for_name( + &self, + name: &str, + ) -> Result<&DocumentType, DataContractError> { + self.document_types.get(name).ok_or_else(|| { + DataContractError::DocumentTypeNotFound( + "can not get document type from contract".to_string(), + ) + }) + } + + fn document_type_for_name(&self, name: &str) -> Result { + self.document_type_optional_for_name(name).ok_or_else(|| { + DataContractError::DocumentTypeNotFound( + "can not get document type from contract".to_string(), + ) + }) + } + + fn document_type_optional_for_name(&self, name: &str) -> Option { + self.document_types + .get(name) + .map(|document_type| document_type.as_ref()) + } + + fn document_type_cloned_optional_for_name(&self, name: &str) -> Option { + self.document_types.get(name).cloned() + } + + fn has_document_type_for_name(&self, name: &str) -> bool { + self.document_types.get(name).is_some() + } + + fn document_types_with_contested_indexes(&self) -> BTreeMap<&DocumentName, &DocumentType> { + self.document_types + .iter() + .filter(|(_, document_type)| { + document_type + .indexes() + .iter() + .any(|(_, index)| index.contested_index.is_some()) + }) + .collect() + } + + fn document_types(&self) -> &BTreeMap { + &self.document_types + } + + fn document_types_mut(&mut self) -> &mut BTreeMap { + &mut self.document_types + } + + fn metadata(&self) -> Option<&Metadata> { + self.metadata.as_ref() + } + + fn metadata_mut(&mut self) -> Option<&mut Metadata> { + self.metadata.as_mut() + } + + fn config(&self) -> &DataContractConfig { + &self.config + } + + fn config_mut(&mut self) -> &mut DataContractConfig { + &mut self.config + } +} + +impl DataContractV0Setters for DataContractV1 { + fn set_id(&mut self, id: Identifier) { + self.id = id; + + self.document_types + .iter_mut() + .for_each(|(_, document_type)| match document_type { + DocumentType::V0(v0) => v0.data_contract_id = id, + }) + } + + fn set_version(&mut self, version: u32) { + self.version = version; + } + + fn increment_version(&mut self) { + self.version += 1; + } + + fn set_owner_id(&mut self, owner_id: Identifier) { + self.owner_id = owner_id; + } + + fn set_metadata(&mut self, metadata: Option) { + self.metadata = metadata; + } + + fn set_config(&mut self, config: DataContractConfig) { + self.config = config; + } +} + +impl DataContractV1Getters for DataContractV1 { + fn group(&self, position: GroupContractPosition) -> Result<&Group, ProtocolError> { + self.groups + .get(&position) + .ok_or(ProtocolError::GroupNotFound(format!( + "Group not found in contract {} at position {}", + self.id(), + position + ))) + } + + fn groups(&self) -> &BTreeMap { + &self.groups + } + + fn groups_mut(&mut self) -> Option<&mut BTreeMap> { + Some(&mut self.groups) + } + + fn expected_group(&self, position: GroupContractPosition) -> Result<&Group, ProtocolError> { + self.groups + .get(&position) + .ok_or(ProtocolError::GroupNotFound(format!( + "Group not found at position {} in contract {}", + position, + self.id() + ))) + } + + fn tokens(&self) -> &BTreeMap { + &self.tokens + } + + fn tokens_mut(&mut self) -> Option<&mut BTreeMap> { + Some(&mut self.tokens) + } + + fn expected_token_configuration( + &self, + position: TokenContractPosition, + ) -> Result<&TokenConfiguration, ProtocolError> { + self.tokens.get(&position).ok_or(ProtocolError::Token( + TokenError::TokenNotFoundAtPositionError.into(), + )) + } + + fn token_configuration_mut( + &mut self, + position: TokenContractPosition, + ) -> Option<&mut TokenConfiguration> { + self.tokens.get_mut(&position) + } + + /// Returns the token id if a token exists at that position + fn token_id(&self, position: TokenContractPosition) -> Option { + self.tokens + .get(&position) + .map(|_| calculate_token_id(self.id.as_bytes(), position).into()) + } +} + +impl DataContractV1Setters for DataContractV1 { + fn set_groups(&mut self, groups: BTreeMap) { + self.groups = groups; + } + + fn set_tokens(&mut self, tokens: BTreeMap) { + self.tokens = tokens; + } + + fn add_group(&mut self, group_position: GroupContractPosition, group: Group) { + self.groups.insert(group_position, group); + } + + fn add_token(&mut self, name: TokenContractPosition, token: TokenConfiguration) { + self.tokens.insert(name, token); + } +} diff --git a/packages/rs-dpp/src/data_contract/v1/conversion/cbor.rs b/packages/rs-dpp/src/data_contract/v1/conversion/cbor.rs new file mode 100644 index 0000000000..08e5e70081 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/v1/conversion/cbor.rs @@ -0,0 +1,98 @@ +use crate::data_contract::conversion::cbor::DataContractCborConversionMethodsV0; +use crate::data_contract::conversion::value::v0::DataContractValueConversionMethodsV0; +use crate::util::cbor_value::CborCanonicalMap; + +use crate::data_contract::DataContractV1; +use crate::version::PlatformVersion; +use crate::ProtocolError; +use ciborium::Value as CborValue; +use platform_value::{Identifier, Value}; +use std::convert::TryFrom; + +impl DataContractCborConversionMethodsV0 for DataContractV1 { + // TODO: Do we need to use this? + fn from_cbor_with_id( + cbor_bytes: impl AsRef<[u8]>, + contract_id: Option, + full_validation: bool, + platform_version: &PlatformVersion, + ) -> Result { + let mut data_contract = Self::from_cbor(cbor_bytes, full_validation, platform_version)?; + if let Some(id) = contract_id { + data_contract.id = id; + } + Ok(data_contract) + } + + fn from_cbor( + cbor_bytes: impl AsRef<[u8]>, + full_validation: bool, + platform_version: &PlatformVersion, + ) -> Result { + let data_contract_cbor_value: CborValue = ciborium::de::from_reader(cbor_bytes.as_ref()) + .map_err(|_| { + ProtocolError::DecodingError("unable to decode contract from cbor".to_string()) + })?; + + let data_contract_value: Value = + Value::try_from(data_contract_cbor_value).map_err(ProtocolError::ValueError)?; + + Self::from_value(data_contract_value, full_validation, platform_version) + } + + fn to_cbor(&self, platform_version: &PlatformVersion) -> Result, ProtocolError> { + let value = self.to_value(platform_version)?; + + let mut buf: Vec = Vec::new(); + + ciborium::ser::into_writer(&value, &mut buf) + .map_err(|e| ProtocolError::EncodingError(e.to_string()))?; + + Ok(buf) + } + + // /// Returns Data Contract as a Buffer + // fn to_cbor_buffer(&self) -> Result, ProtocolError> { + // let mut object = self.to_object()?; + // if self.defs.is_none() { + // object.remove(property_names::DEFINITIONS)?; + // } + // object + // .to_map_mut() + // .unwrap() + // .sort_by_lexicographical_byte_ordering_keys_and_inner_maps(); + // + // // we are on version 0 here + // cbor_serializer::serializable_value_to_cbor(&object, Some(0)) + // } + + // TODO: Revisit + fn to_cbor_canonical_map( + &self, + _platform_version: &PlatformVersion, + ) -> Result { + unimplemented!(); + + // let mut contract_cbor_map = CborCanonicalMap::new(); + // + // contract_cbor_map.insert(property_names::ID, self.id.to_buffer().to_vec()); + // contract_cbor_map.insert(property_names::SCHEMA, self.schema.as_str()); + // contract_cbor_map.insert(property_names::VERSION, self.version); + // contract_cbor_map.insert(property_names::OWNER_ID, self.owner_id.to_buffer().to_vec()); + // + // let docs = CborValue::serialized(&self.documents) + // .map_err(|e| ProtocolError::EncodingError(e.to_string()))?; + // + // contract_cbor_map.insert(property_names::DOCUMENTS, docs); + // + // if let Some(_defs) = &self.defs { + // contract_cbor_map.insert( + // property_names::DEFINITIONS, + // CborValue::serialized(&self.defs) + // .map_err(|e| ProtocolError::EncodingError(e.to_string()))?, + // ); + // }; + // + // Ok(contract_cbor_map) + } +} diff --git a/packages/rs-dpp/src/data_contract/v1/conversion/json.rs b/packages/rs-dpp/src/data_contract/v1/conversion/json.rs new file mode 100644 index 0000000000..56478ddb8f --- /dev/null +++ b/packages/rs-dpp/src/data_contract/v1/conversion/json.rs @@ -0,0 +1,38 @@ +use crate::data_contract::conversion::json::DataContractJsonConversionMethodsV0; +use crate::data_contract::conversion::value::v0::DataContractValueConversionMethodsV0; + +use crate::version::PlatformVersion; +use crate::ProtocolError; + +use crate::data_contract::DataContractV1; +use serde_json::Value as JsonValue; +use std::convert::TryInto; + +impl DataContractJsonConversionMethodsV0 for DataContractV1 { + fn from_json( + json_value: JsonValue, + full_validation: bool, + platform_version: &PlatformVersion, + ) -> Result { + Self::from_value(json_value.into(), full_validation, platform_version) + } + + /// Returns Data Contract as a JSON Value + fn to_json(&self, platform_version: &PlatformVersion) -> Result { + self.to_value(platform_version)? + .try_into() + .map_err(ProtocolError::ValueError) + + // TODO: I guess we should convert the binary fields back to base64/base58? + } + + /// Returns Data Contract as a JSON Value that can be used for validation + fn to_validating_json( + &self, + platform_version: &PlatformVersion, + ) -> Result { + self.to_value(platform_version)? + .try_into_validating_json() + .map_err(ProtocolError::ValueError) + } +} diff --git a/packages/rs-dpp/src/data_contract/v1/conversion/mod.rs b/packages/rs-dpp/src/data_contract/v1/conversion/mod.rs new file mode 100644 index 0000000000..eb58a91c43 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/v1/conversion/mod.rs @@ -0,0 +1,8 @@ +#[cfg(feature = "data-contract-cbor-conversion")] +mod cbor; +#[cfg(feature = "data-contract-json-conversion")] +mod json; +#[cfg(feature = "data-contract-value-conversion")] +mod value; + +// TODO: We need from_* / from_*_value / to_* / to_*_value methods for all types: cbor, json, platform_value (value?) diff --git a/packages/rs-dpp/src/data_contract/v1/conversion/value.rs b/packages/rs-dpp/src/data_contract/v1/conversion/value.rs new file mode 100644 index 0000000000..ab8452716c --- /dev/null +++ b/packages/rs-dpp/src/data_contract/v1/conversion/value.rs @@ -0,0 +1,78 @@ +use crate::data_contract::conversion::value::v0::DataContractValueConversionMethodsV0; + +use crate::data_contract::serialized_version::v0::DataContractInSerializationFormatV0; +use crate::data_contract::serialized_version::v1::DataContractInSerializationFormatV1; +use crate::data_contract::serialized_version::{property_names, DataContractInSerializationFormat}; +use crate::data_contract::DataContractV1; +use crate::version::PlatformVersion; +use crate::ProtocolError; +use platform_value::{ReplacementType, Value}; +use platform_version::TryFromPlatformVersioned; + +pub const DATA_CONTRACT_IDENTIFIER_FIELDS_V0: [&str; 2] = + [property_names::ID, property_names::OWNER_ID]; + +impl DataContractValueConversionMethodsV0 for DataContractV1 { + fn from_value( + mut value: Value, + full_validation: bool, + platform_version: &PlatformVersion, + ) -> Result { + value.replace_at_paths( + DATA_CONTRACT_IDENTIFIER_FIELDS_V0, + ReplacementType::Identifier, + )?; + let format_version = value.get_str("$format_version")?; + match format_version { + "0" => { + let data_contract_data: DataContractInSerializationFormatV0 = + platform_value::from_value(value).map_err(ProtocolError::ValueError)?; + + DataContractV1::try_from_platform_versioned( + data_contract_data.into(), + full_validation, + &mut vec![], // this is not used in consensus code + platform_version, + ) + } + "1" => { + let data_contract_data: DataContractInSerializationFormatV1 = + platform_value::from_value(value).map_err(ProtocolError::ValueError)?; + + DataContractV1::try_from_platform_versioned( + data_contract_data.into(), + full_validation, + &mut vec![], // this is not used in consensus code + platform_version, + ) + } + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DataContractV1::from_value".to_string(), + known_versions: vec![0, 1], + received: version + .parse() + .map_err(|_| ProtocolError::Generic("Conversion error".to_string()))?, + }), + } + } + + fn to_value(&self, platform_version: &PlatformVersion) -> Result { + let data_contract_data = + DataContractInSerializationFormat::try_from_platform_versioned(self, platform_version)?; + + let value = + platform_value::to_value(data_contract_data).map_err(ProtocolError::ValueError)?; + + Ok(value) + } + + fn into_value(self, platform_version: &PlatformVersion) -> Result { + let data_contract_data = + DataContractInSerializationFormat::try_from_platform_versioned(self, platform_version)?; + + let value = + platform_value::to_value(data_contract_data).map_err(ProtocolError::ValueError)?; + + Ok(value) + } +} diff --git a/packages/rs-dpp/src/data_contract/v1/data_contract.rs b/packages/rs-dpp/src/data_contract/v1/data_contract.rs new file mode 100644 index 0000000000..60a6527fd0 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/v1/data_contract.rs @@ -0,0 +1,75 @@ +use std::collections::BTreeMap; + +use platform_value::Identifier; +use platform_value::Value; + +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::config::DataContractConfig; +use crate::data_contract::document_type::DocumentType; +use crate::data_contract::group::Group; +use crate::data_contract::{ + DefinitionName, DocumentName, GroupContractPosition, TokenContractPosition, +}; +use crate::metadata::Metadata; + +/// `DataContractV1` represents a data contract in a decentralized platform. +/// +/// It contains information about the contract, such as its protocol version, unique identifier, +/// schema, version, and owner identifier. The struct also includes details about the document +/// types, metadata, configuration, and document schemas associated with the contract. +/// +/// Additionally, `DataContractV1` holds definitions for JSON schemas, entropy, and binary properties +/// of the documents. +/// +/// # Changes from `DataContractV0` to `DataContractV1` +/// +/// In `DataContractV1`, two significant features were introduced to enhance contract governance +/// and support token-related operations: +/// +/// 1. **Groups** (`groups: BTreeMap`) +/// - Groups allow for specific multiparty actions on the contract. Each group is defined with a +/// set of members (`Identifier`) and their corresponding member power (`u32`). +/// - Groups facilitate fine-grained access control and decision-making processes by enabling +/// required power thresholds for group actions. +/// - This is particularly useful for contracts where multiple parties are involved in controlling +/// or managing contract-specific features. +/// +/// 2. **Tokens** (`tokens: BTreeMap`) +/// - Tokens introduce configurable token-related functionality within the contract, such as +/// base supply, maximum supply, and manual minting/burning rules. +/// - Token configurations include change control rules, ensuring proper governance for +/// modifying supply limits and token-related settings. +/// - This addition enables contracts to define and manage tokens while ensuring compliance +/// with governance rules (e.g., who can mint or burn tokens). +/// +#[derive(Debug, Clone, PartialEq)] +pub struct DataContractV1 { + /// A unique identifier for the data contract. + /// This field must always present in all versions. + pub id: Identifier, + + /// The version of this data contract. + pub version: u32, + + /// The identifier of the contract owner. + pub owner_id: Identifier, + + /// A mapping of document names to their corresponding document types. + pub document_types: BTreeMap, + + // TODO: Move metadata from here + /// Optional metadata associated with the contract. + pub metadata: Option, + + /// Internal configuration for the contract. + pub config: DataContractConfig, + + /// Shared subschemas to reuse across documents (see $defs) + pub schema_defs: Option>, + + /// Groups that allow for specific multiparty actions on the contract + pub groups: BTreeMap, + + /// The tokens on the contract. + pub tokens: BTreeMap, +} diff --git a/packages/rs-dpp/src/data_contract/v1/methods/mod.rs b/packages/rs-dpp/src/data_contract/v1/methods/mod.rs new file mode 100644 index 0000000000..6bde67a2b1 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/v1/methods/mod.rs @@ -0,0 +1 @@ +mod schema; diff --git a/packages/rs-dpp/src/data_contract/v1/methods/schema.rs b/packages/rs-dpp/src/data_contract/v1/methods/schema.rs new file mode 100644 index 0000000000..901813af16 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/v1/methods/schema.rs @@ -0,0 +1,198 @@ +use crate::data_contract::config::v0::DataContractConfigGettersV0; +use crate::data_contract::document_type::accessors::DocumentTypeV0Getters; +use crate::data_contract::document_type::DocumentType; +use crate::data_contract::schema::DataContractSchemaMethodsV0; +use crate::data_contract::{DataContractV1, DefinitionName, DocumentName}; +use crate::validation::operations::ProtocolValidationOperation; +use crate::ProtocolError; +use platform_value::Value; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +impl DataContractSchemaMethodsV0 for DataContractV1 { + fn set_document_schemas( + &mut self, + schemas: BTreeMap, + defs: Option>, + full_validation: bool, + validation_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), ProtocolError> { + self.document_types = DocumentType::create_document_types_from_document_schemas( + self.id, + schemas, + defs.as_ref(), + self.config.documents_keep_history_contract_default(), + self.config.documents_mutable_contract_default(), + self.config.documents_can_be_deleted_contract_default(), + full_validation, + !self.tokens.is_empty(), + validation_operations, + platform_version, + )?; + + Ok(()) + } + + fn set_document_schema( + &mut self, + name: &str, + schema: Value, + full_validation: bool, + validation_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), ProtocolError> { + let document_type = DocumentType::try_from_schema( + self.id, + name, + schema, + self.schema_defs.as_ref(), + self.config.documents_keep_history_contract_default(), + self.config.documents_mutable_contract_default(), + self.config.documents_mutable_contract_default(), + full_validation, + validation_operations, + platform_version, + )?; + + self.document_types + .insert(document_type.name().clone(), document_type); + + Ok(()) + } + + fn document_schemas(&self) -> BTreeMap { + self.document_types + .iter() + .map(|(name, document_type)| (name.to_owned(), document_type.schema())) + .collect() + } + + fn schema_defs(&self) -> Option<&BTreeMap> { + self.schema_defs.as_ref() + } + + fn set_schema_defs( + &mut self, + defs: Option>, + full_validation: bool, + validation_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), ProtocolError> { + let document_schemas = self + .document_types + .iter() + .map(|(name, document_type)| (name.to_owned(), document_type.schema().to_owned())) + .collect(); + + self.set_document_schemas( + document_schemas, + defs.clone(), + full_validation, + validation_operations, + platform_version, + )?; + + self.schema_defs = defs; + + Ok(()) + } +} + +#[cfg(test)] +mod test { + use super::*; + use crate::data_contract::config::DataContractConfig; + use crate::data_contract::serialized_version::v0::DataContractInSerializationFormatV0; + use crate::data_contract::v1::DataContractV1; + use platform_value::{platform_value, Identifier}; + + #[test] + fn should_set_a_new_schema_defs() { + let platform_version = PlatformVersion::latest(); + + let config = DataContractConfig::default_for_version(platform_version) + .expect("should create a default config"); + + let schema = platform_value!({ + "type": "object", + "properties": { + "a": { + "type": "string", + "maxLength": 10, + "position": 0 + } + }, + "additionalProperties": false, + }); + + let serialization_format = DataContractInSerializationFormatV0 { + id: Identifier::random(), + config, + version: 0, + owner_id: Default::default(), + schema_defs: None, + document_schemas: BTreeMap::from([("document_type_name".to_string(), schema.clone())]), + }; + + let mut data_contract = DataContractV1::try_from_platform_versioned( + serialization_format.into(), + true, + &mut vec![], + platform_version, + ) + .expect("should create a contract from serialization format"); + + let defs = platform_value!({ + "test": { + "type": "string", + }, + }); + + let defs_map = Some(defs.into_btree_string_map().expect("should convert to map")); + + data_contract + .set_schema_defs(defs_map.clone(), true, &mut vec![], platform_version) + .expect("should set defs"); + + assert_eq!(defs_map.as_ref(), data_contract.schema_defs()) + } + + fn should_set_empty_schema_defs() { + let platform_version = PlatformVersion::latest(); + + let config = DataContractConfig::default_for_version(platform_version) + .expect("should create a default config"); + + let defs = platform_value!({ + "test": { + "type": "string", + }, + }); + + let defs_map = Some(defs.into_btree_string_map().expect("should convert to map")); + + let serialization_format = DataContractInSerializationFormatV0 { + id: Identifier::random(), + config, + version: 0, + owner_id: Default::default(), + schema_defs: defs_map, + document_schemas: Default::default(), + }; + + let mut data_contract = DataContractV1::try_from_platform_versioned( + serialization_format.into(), + true, + &mut vec![], + platform_version, + ) + .expect("should create a contract from serialization format"); + + data_contract + .set_schema_defs(None, true, &mut vec![], platform_version) + .expect("should set defs"); + + assert_eq!(None, data_contract.schema_defs()) + } +} diff --git a/packages/rs-dpp/src/data_contract/v1/mod.rs b/packages/rs-dpp/src/data_contract/v1/mod.rs new file mode 100644 index 0000000000..c814a35c4b --- /dev/null +++ b/packages/rs-dpp/src/data_contract/v1/mod.rs @@ -0,0 +1,7 @@ +mod accessors; +mod conversion; +pub mod data_contract; +mod methods; +pub mod serialization; + +pub use data_contract::*; diff --git a/packages/rs-dpp/src/data_contract/v1/serialization/mod.rs b/packages/rs-dpp/src/data_contract/v1/serialization/mod.rs new file mode 100644 index 0000000000..9939a80e85 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/v1/serialization/mod.rs @@ -0,0 +1,194 @@ +use crate::data_contract::config::v0::DataContractConfigGettersV0; +use crate::data_contract::document_type::DocumentType; +use crate::data_contract::serialized_version::v0::DataContractInSerializationFormatV0; +use crate::data_contract::serialized_version::DataContractInSerializationFormat; +use crate::data_contract::{DataContract, DataContractV1}; +use crate::version::{PlatformVersion, PlatformVersionCurrentVersion}; +use crate::ProtocolError; + +use crate::data_contract::serialized_version::v1::DataContractInSerializationFormatV1; +use crate::validation::operations::ProtocolValidationOperation; +use serde::{Deserialize, Deserializer, Serialize, Serializer}; + +impl Serialize for DataContractV1 { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + let data_contract: DataContract = self.clone().into(); + let serialization_format = DataContractInSerializationFormatV1::from(data_contract); + serialization_format.serialize(serializer) + } +} + +impl<'de> Deserialize<'de> for DataContractV1 { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let serialization_format = DataContractInSerializationFormat::deserialize(deserializer)?; + let current_version = + PlatformVersion::get_current().map_err(|e| serde::de::Error::custom(e.to_string()))?; + // when deserializing from json/platform_value/cbor we always want to validate (as this is not coming from the state) + DataContractV1::try_from_platform_versioned( + serialization_format, + true, + &mut vec![], + current_version, + ) + .map_err(serde::de::Error::custom) + } +} + +impl DataContractV1 { + pub(in crate::data_contract) fn try_from_platform_versioned( + value: DataContractInSerializationFormat, + full_validation: bool, + validation_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result { + match value { + DataContractInSerializationFormat::V0(serialization_format_v0) => { + let data_contract = DataContractV1::try_from_platform_versioned_v0( + serialization_format_v0, + full_validation, + validation_operations, + platform_version, + )?; + + Ok(data_contract) + } + DataContractInSerializationFormat::V1(serialization_format_v1) => { + let data_contract = DataContractV1::try_from_platform_versioned_v1( + serialization_format_v1, + full_validation, + validation_operations, + platform_version, + )?; + + Ok(data_contract) + } + } + } + + pub(in crate::data_contract) fn try_from_platform_versioned_v0( + data_contract_data: DataContractInSerializationFormatV0, + full_validation: bool, + validation_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result { + let DataContractInSerializationFormatV0 { + id, + config, + version, + owner_id, + document_schemas, + schema_defs, + } = data_contract_data; + + let document_types = DocumentType::create_document_types_from_document_schemas( + id, + document_schemas, + schema_defs.as_ref(), + config.documents_keep_history_contract_default(), + config.documents_mutable_contract_default(), + config.documents_can_be_deleted_contract_default(), + full_validation, + false, + validation_operations, + platform_version, + )?; + + let data_contract = DataContractV1 { + id, + version, + owner_id, + document_types, + metadata: None, + config, + schema_defs, + groups: Default::default(), + tokens: Default::default(), + }; + + Ok(data_contract) + } + + pub(in crate::data_contract) fn try_from_platform_versioned_v1( + data_contract_data: DataContractInSerializationFormatV1, + full_validation: bool, + validation_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result { + let DataContractInSerializationFormatV1 { + id, + config, + version, + owner_id, + document_schemas, + schema_defs, + groups, + tokens, + } = data_contract_data; + + let document_types = DocumentType::create_document_types_from_document_schemas( + id, + document_schemas, + schema_defs.as_ref(), + config.documents_keep_history_contract_default(), + config.documents_mutable_contract_default(), + config.documents_can_be_deleted_contract_default(), + full_validation, + !tokens.is_empty(), + validation_operations, + platform_version, + )?; + + let data_contract = DataContractV1 { + id, + version, + owner_id, + document_types, + metadata: None, + config, + schema_defs, + groups, + tokens, + }; + + Ok(data_contract) + } +} + +#[cfg(test)] +mod tests { + use crate::data_contract::DataContract; + use crate::identity::accessors::IdentityGettersV0; + use crate::identity::Identity; + use crate::serialization::{ + PlatformDeserializableWithPotentialValidationFromVersionedStructure, + PlatformSerializableWithPlatformVersion, + }; + use crate::tests::fixtures::get_data_contract_fixture; + use crate::version::PlatformVersion; + use platform_version::version::LATEST_PLATFORM_VERSION; + + #[test] + #[cfg(feature = "random-identities")] + fn data_contract_ser_de() { + // V1 of the contract is first present in protocol version 7 + let platform_version = PlatformVersion::get(7).expect("expected protocol version 7"); + let identity = Identity::random_identity(5, Some(5), platform_version) + .expect("expected a random identity"); + let contract = + get_data_contract_fixture(Some(identity.id()), 0, platform_version.protocol_version) + .data_contract_owned(); + let bytes = contract + .serialize_to_bytes_with_platform_version(LATEST_PLATFORM_VERSION) + .expect("expected to serialize"); + let recovered_contract = + DataContract::versioned_deserialize(&bytes, false, platform_version) + .expect("expected to deserialize state transition"); + assert_eq!(contract, recovered_contract); + } +} diff --git a/packages/rs-dpp/src/document/document_factory/mod.rs b/packages/rs-dpp/src/document/document_factory/mod.rs index 75db720fd5..158daf9488 100644 --- a/packages/rs-dpp/src/document/document_factory/mod.rs +++ b/packages/rs-dpp/src/document/document_factory/mod.rs @@ -13,8 +13,9 @@ use crate::document::Document; #[cfg(feature = "extended-document")] use crate::document::ExtendedDocument; #[cfg(feature = "state-transitions")] -use crate::state_transition::documents_batch_transition::{ - document_transition::action_type::DocumentTransitionActionType, DocumentsBatchTransition, +use crate::state_transition::batch_transition::{ + batched_transition::document_transition_action_type::DocumentTransitionActionType, + BatchTransition, }; use crate::util::entropy_generator::EntropyGenerator; pub use v0::DocumentFactoryV0; @@ -120,7 +121,7 @@ impl DocumentFactory { ), >, nonce_counter: &mut BTreeMap<(Identifier, Identifier), u64>, //IdentityID/ContractID -> nonce - ) -> Result { + ) -> Result { match self { DocumentFactory::V0(v0) => v0.create_state_transition(documents_iter, nonce_counter), } diff --git a/packages/rs-dpp/src/document/document_factory/v0/mod.rs b/packages/rs-dpp/src/document/document_factory/v0/mod.rs index 58fc96de91..5fa252dc97 100644 --- a/packages/rs-dpp/src/document/document_factory/v0/mod.rs +++ b/packages/rs-dpp/src/document/document_factory/v0/mod.rs @@ -20,18 +20,20 @@ use crate::document::document_methods::DocumentMethodsV0; #[cfg(feature = "extended-document")] use crate::document::{ extended_document::v0::ExtendedDocumentV0, - serialization_traits::DocumentPlatformConversionMethodsV0, ExtendedDocument, + ExtendedDocument, serialization_traits::DocumentPlatformConversionMethodsV0, }; use crate::prelude::{BlockHeight, CoreBlockHeight, TimestampMillis}; #[cfg(feature = "state-transitions")] -use crate::state_transition::documents_batch_transition::{ - document_transition::{ - action_type::DocumentTransitionActionType, DocumentCreateTransition, - DocumentDeleteTransition, DocumentReplaceTransition, DocumentTransition, +use crate::state_transition::batch_transition::{ + batched_transition::{ + document_transition_action_type::DocumentTransitionActionType, DocumentCreateTransition, + DocumentDeleteTransition, DocumentReplaceTransition, }, - DocumentsBatchTransition, DocumentsBatchTransitionV0, + BatchTransition, BatchTransitionV0, }; use itertools::Itertools; +#[cfg(feature = "state-transitions")] +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::DocumentTransition; const PROPERTY_FEATURE_VERSION: &str = "$version"; const PROPERTY_ENTROPY: &str = "$entropy"; @@ -210,7 +212,7 @@ impl DocumentFactoryV0 { ), >, nonce_counter: &mut BTreeMap<(Identifier, Identifier), u64>, //IdentityID/ContractID -> nonce - ) -> Result { + ) -> Result { let platform_version = PlatformVersion::get(self.protocol_version)?; let documents: Vec<( DocumentTransitionActionType, @@ -275,7 +277,7 @@ impl DocumentFactoryV0 { return Err(DocumentError::NoDocumentsSuppliedError.into()); } - Ok(DocumentsBatchTransitionV0 { + Ok(BatchTransitionV0 { owner_id, transitions, user_fee_increase: 0, diff --git a/packages/rs-dpp/src/document/errors.rs b/packages/rs-dpp/src/document/errors.rs index d16ca16f1e..9df0c53b50 100644 --- a/packages/rs-dpp/src/document/errors.rs +++ b/packages/rs-dpp/src/document/errors.rs @@ -6,7 +6,7 @@ use crate::errors::consensus::ConsensusError; use crate::document::accessors::v0::DocumentV0Getters; use crate::document::Document; #[cfg(feature = "state-transitions")] -use crate::state_transition::documents_batch_transition::document_transition::DocumentTransition; +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::DocumentTransition; #[derive(Error, Debug)] pub enum DocumentError { diff --git a/packages/rs-dpp/src/document/specialized_document_factory/mod.rs b/packages/rs-dpp/src/document/specialized_document_factory/mod.rs index 8a9c438804..0d7a25b3dc 100644 --- a/packages/rs-dpp/src/document/specialized_document_factory/mod.rs +++ b/packages/rs-dpp/src/document/specialized_document_factory/mod.rs @@ -13,8 +13,9 @@ use crate::document::Document; #[cfg(feature = "extended-document")] use crate::document::ExtendedDocument; #[cfg(feature = "state-transitions")] -use crate::state_transition::documents_batch_transition::{ - document_transition::action_type::DocumentTransitionActionType, DocumentsBatchTransition, +use crate::state_transition::batch_transition::{ + batched_transition::document_transition_action_type::DocumentTransitionActionType, + BatchTransition, }; use crate::util::entropy_generator::EntropyGenerator; pub use v0::SpecializedDocumentFactoryV0; @@ -123,7 +124,7 @@ impl SpecializedDocumentFactory { ), >, nonce_counter: &mut BTreeMap<(Identifier, Identifier), u64>, //IdentityID/ContractID -> nonce - ) -> Result { + ) -> Result { match self { SpecializedDocumentFactory::V0(v0) => { v0.create_state_transition(documents_iter, nonce_counter) diff --git a/packages/rs-dpp/src/document/specialized_document_factory/v0/mod.rs b/packages/rs-dpp/src/document/specialized_document_factory/v0/mod.rs index e482d3822a..c89c7e3448 100644 --- a/packages/rs-dpp/src/document/specialized_document_factory/v0/mod.rs +++ b/packages/rs-dpp/src/document/specialized_document_factory/v0/mod.rs @@ -19,18 +19,20 @@ use crate::data_contract::document_type::methods::DocumentTypeV0Methods; #[cfg(feature = "extended-document")] use crate::document::{ extended_document::v0::ExtendedDocumentV0, - serialization_traits::DocumentPlatformConversionMethodsV0, ExtendedDocument, + ExtendedDocument, serialization_traits::DocumentPlatformConversionMethodsV0, }; use crate::prelude::{BlockHeight, CoreBlockHeight, TimestampMillis}; #[cfg(feature = "state-transitions")] -use crate::state_transition::documents_batch_transition::{ - document_transition::{ - action_type::DocumentTransitionActionType, DocumentCreateTransition, - DocumentDeleteTransition, DocumentReplaceTransition, DocumentTransition, +use crate::state_transition::batch_transition::{ + batched_transition::{ + document_transition_action_type::DocumentTransitionActionType, DocumentCreateTransition, + DocumentDeleteTransition, DocumentReplaceTransition, }, - DocumentsBatchTransition, DocumentsBatchTransitionV0, + BatchTransition, BatchTransitionV0, }; use itertools::Itertools; +#[cfg(feature = "state-transitions")] +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::DocumentTransition; const PROPERTY_FEATURE_VERSION: &str = "$version"; const PROPERTY_ENTROPY: &str = "$entropy"; @@ -218,7 +220,7 @@ impl SpecializedDocumentFactoryV0 { ), >, nonce_counter: &mut BTreeMap<(Identifier, Identifier), u64>, //IdentityID/ContractID -> nonce - ) -> Result { + ) -> Result { let platform_version = PlatformVersion::get(self.protocol_version)?; let documents: Vec<( DocumentTransitionActionType, @@ -283,7 +285,7 @@ impl SpecializedDocumentFactoryV0 { return Err(DocumentError::NoDocumentsSuppliedError.into()); } - Ok(DocumentsBatchTransitionV0 { + Ok(BatchTransitionV0 { owner_id, transitions, user_fee_increase: 0, diff --git a/packages/rs-dpp/src/errors/consensus/basic/basic_error.rs b/packages/rs-dpp/src/errors/consensus/basic/basic_error.rs index 2b24a1e280..e99398b757 100644 --- a/packages/rs-dpp/src/errors/consensus/basic/basic_error.rs +++ b/packages/rs-dpp/src/errors/consensus/basic/basic_error.rs @@ -9,15 +9,18 @@ use crate::consensus::basic::data_contract::InvalidJsonSchemaRefError; use crate::consensus::basic::data_contract::{ ContestedUniqueIndexOnMutableDocumentTypeError, ContestedUniqueIndexWithUniqueIndexError, DataContractHaveNewUniqueIndexError, DataContractImmutablePropertiesUpdateError, - DataContractInvalidIndexDefinitionUpdateError, DataContractUniqueIndicesChangedError, - DuplicateIndexError, DuplicateIndexNameError, IncompatibleDataContractSchemaError, - IncompatibleDocumentTypeSchemaError, IncompatibleRe2PatternError, InvalidCompoundIndexError, - InvalidDataContractIdError, InvalidDataContractVersionError, InvalidDocumentTypeNameError, + DataContractInvalidIndexDefinitionUpdateError, DataContractTokenConfigurationUpdateError, + DataContractUniqueIndicesChangedError, DuplicateIndexError, DuplicateIndexNameError, + IncompatibleDataContractSchemaError, IncompatibleDocumentTypeSchemaError, + IncompatibleRe2PatternError, InvalidCompoundIndexError, InvalidDataContractIdError, + InvalidDataContractVersionError, InvalidDocumentTypeNameError, InvalidDocumentTypeRequiredSecurityLevelError, InvalidIndexPropertyTypeError, - InvalidIndexedPropertyConstraintError, SystemPropertyIndexAlreadyPresentError, - UndefinedIndexPropertyError, UniqueIndicesLimitReachedError, - UnknownDocumentCreationRestrictionModeError, UnknownSecurityLevelError, - UnknownStorageKeyRequirementsError, UnknownTradeModeError, UnknownTransferableTypeError, + InvalidIndexedPropertyConstraintError, InvalidTokenBaseSupplyError, + NonContiguousContractGroupPositionsError, NonContiguousContractTokenPositionsError, + SystemPropertyIndexAlreadyPresentError, UndefinedIndexPropertyError, + UniqueIndicesLimitReachedError, UnknownDocumentCreationRestrictionModeError, + UnknownSecurityLevelError, UnknownStorageKeyRequirementsError, UnknownTradeModeError, + UnknownTransferableTypeError, }; use crate::consensus::basic::decode::{ ProtocolVersionParsingError, SerializedObjectParsingError, VersionError, @@ -64,7 +67,13 @@ use crate::consensus::basic::{ }; use crate::consensus::ConsensusError; +use crate::consensus::basic::group::GroupActionNotAllowedOnTransitionError; use crate::consensus::basic::overflow_error::OverflowError; +use crate::consensus::basic::token::{ + ChoosingTokenMintRecipientNotAllowedError, ContractHasNoTokensError, + DestinationIdentityForTokenMintingNotSetError, InvalidActionIdError, InvalidGroupPositionError, + InvalidTokenIdError, InvalidTokenPositionError, TokenTransferToOurselfError, +}; use crate::consensus::basic::unsupported_version_error::UnsupportedVersionError; use crate::consensus::basic::value_error::ValueError; #[cfg(feature = "json-schema-validation")] @@ -402,6 +411,45 @@ pub enum BasicError { #[error(transparent)] ContestedDocumentsTemporarilyNotAllowedError(ContestedDocumentsTemporarilyNotAllowedError), + + #[error(transparent)] + DataContractTokenConfigurationUpdateError(DataContractTokenConfigurationUpdateError), + + #[error(transparent)] + NonContiguousContractTokenPositionsError(NonContiguousContractTokenPositionsError), + + #[error(transparent)] + NonContiguousContractGroupPositionsError(NonContiguousContractGroupPositionsError), + + #[error(transparent)] + InvalidTokenBaseSupplyError(InvalidTokenBaseSupplyError), + + #[error(transparent)] + InvalidTokenIdError(InvalidTokenIdError), + + #[error(transparent)] + InvalidTokenPositionError(InvalidTokenPositionError), + + #[error(transparent)] + TokenTransferToOurselfError(TokenTransferToOurselfError), + + #[error(transparent)] + ContractHasNoTokensError(ContractHasNoTokensError), + + #[error(transparent)] + InvalidGroupPositionError(InvalidGroupPositionError), + + #[error(transparent)] + InvalidActionIdError(InvalidActionIdError), + + #[error(transparent)] + DestinationIdentityForTokenMintingNotSetError(DestinationIdentityForTokenMintingNotSetError), + + #[error(transparent)] + ChoosingTokenMintRecipientNotAllowedError(ChoosingTokenMintRecipientNotAllowedError), + + #[error(transparent)] + GroupActionNotAllowedOnTransitionError(GroupActionNotAllowedOnTransitionError), } impl From for ConsensusError { diff --git a/packages/rs-dpp/src/errors/consensus/basic/data_contract/data_contract_token_configuration_update_error.rs b/packages/rs-dpp/src/errors/consensus/basic/data_contract/data_contract_token_configuration_update_error.rs new file mode 100644 index 0000000000..a367fb8ad2 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/data_contract/data_contract_token_configuration_update_error.rs @@ -0,0 +1,63 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::errors::ProtocolError; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use bincode::{Decode, Encode}; + +#[derive( + Error, Debug, Clone, PartialEq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error("Forbidden operation '{operation}' on '{field_path}', old config is {old_config}, new config is {new_config}")] +#[platform_serialize(unversioned)] +pub struct DataContractTokenConfigurationUpdateError { + /* + + DO NOT CHANGE ORDER OF FIELDS WITHOUT INTRODUCING OF NEW VERSION + + */ + operation: String, + field_path: String, + old_config: TokenConfiguration, + new_config: TokenConfiguration, +} + +impl DataContractTokenConfigurationUpdateError { + pub fn new( + operation: String, + field_path: String, + old_config: TokenConfiguration, + new_config: TokenConfiguration, + ) -> Self { + Self { + operation, + field_path, + old_config, + new_config, + } + } + + pub fn operation(&self) -> String { + self.operation.clone() + } + + pub fn field_path(&self) -> String { + self.field_path.clone() + } + + pub fn old_config(&self) -> TokenConfiguration { + self.old_config.clone() + } + + pub fn new_config(&self) -> TokenConfiguration { + self.new_config.clone() + } +} + +impl From for ConsensusError { + fn from(err: DataContractTokenConfigurationUpdateError) -> Self { + Self::BasicError(BasicError::DataContractTokenConfigurationUpdateError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/data_contract/invalid_token_base_supply_error.rs b/packages/rs-dpp/src/errors/consensus/basic/data_contract/invalid_token_base_supply_error.rs new file mode 100644 index 0000000000..738be8b222 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/data_contract/invalid_token_base_supply_error.rs @@ -0,0 +1,41 @@ +use crate::consensus::basic::BasicError; +use crate::errors::ProtocolError; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +use crate::consensus::ConsensusError; + +use bincode::{Decode, Encode}; +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error( + "Invalid token base supply. Given base supply: {}, Max allowed base supply: {}", + base_supply, + i64::MAX +)] +#[platform_serialize(unversioned)] +pub struct InvalidTokenBaseSupplyError { + /* + + DO NOT CHANGE ORDER OF FIELDS WITHOUT INTRODUCING OF NEW VERSION + + */ + base_supply: u64, +} + +impl InvalidTokenBaseSupplyError { + pub fn new(base_supply: u64) -> Self { + Self { base_supply } + } + + pub fn base_supply(&self) -> u64 { + self.base_supply + } +} + +impl From for ConsensusError { + fn from(err: InvalidTokenBaseSupplyError) -> Self { + Self::BasicError(BasicError::InvalidTokenBaseSupplyError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/data_contract/mod.rs b/packages/rs-dpp/src/errors/consensus/basic/data_contract/mod.rs index 9e7bedab0d..2fc29ce57f 100644 --- a/packages/rs-dpp/src/errors/consensus/basic/data_contract/mod.rs +++ b/packages/rs-dpp/src/errors/consensus/basic/data_contract/mod.rs @@ -4,6 +4,7 @@ mod data_contract_have_new_unique_index_error; mod data_contract_immutable_properties_update_error; mod data_contract_invalid_index_definition_update_error; pub mod data_contract_max_depth_exceed_error; +mod data_contract_token_configuration_update_error; mod data_contract_unique_indices_changed_error; mod document_types_are_missing_error; mod duplicate_index_error; @@ -20,6 +21,9 @@ mod invalid_index_property_type_error; mod invalid_indexed_property_constraint_error; #[cfg(feature = "json-schema-validation")] mod invalid_json_schema_ref_error; +mod invalid_token_base_supply_error; +mod non_contiguous_contract_group_positions_error; +mod non_contiguous_contract_token_positions_error; mod system_property_index_already_present_error; mod undefined_index_property_error; mod unique_indices_limit_reached_error; @@ -32,6 +36,7 @@ mod unknown_transferable_type_error; pub use data_contract_have_new_unique_index_error::*; pub use data_contract_immutable_properties_update_error::*; pub use data_contract_invalid_index_definition_update_error::*; +pub use data_contract_token_configuration_update_error::*; pub use data_contract_unique_indices_changed_error::*; pub use document_types_are_missing_error::*; pub use duplicate_index_error::*; @@ -55,6 +60,9 @@ pub use contested_unique_index_on_mutable_document_type_error::*; pub use contested_unique_index_with_unique_index_error::*; pub use incompatible_document_type_schema_error::*; pub use invalid_document_type_name_error::*; +pub use invalid_token_base_supply_error::*; +pub use non_contiguous_contract_group_positions_error::*; +pub use non_contiguous_contract_token_positions_error::*; pub use unknown_document_creation_restriction_mode_error::*; pub use unknown_security_level_error::*; pub use unknown_storage_key_requirements_error::*; diff --git a/packages/rs-dpp/src/errors/consensus/basic/data_contract/non_contiguous_contract_group_positions_error.rs b/packages/rs-dpp/src/errors/consensus/basic/data_contract/non_contiguous_contract_group_positions_error.rs new file mode 100644 index 0000000000..3409e866f8 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/data_contract/non_contiguous_contract_group_positions_error.rs @@ -0,0 +1,52 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::data_contract::GroupContractPosition; +use crate::errors::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error( + "Contract Group Positions are not contiguous. Missing position: {}, Followed position: {}", + missing_position, + followed_position +)] +#[platform_serialize(unversioned)] +pub struct NonContiguousContractGroupPositionsError { + /* + + DO NOT CHANGE ORDER OF FIELDS WITHOUT INTRODUCING OF NEW VERSION + + */ + missing_position: GroupContractPosition, + followed_position: GroupContractPosition, +} + +impl NonContiguousContractGroupPositionsError { + pub fn new( + missing_position: GroupContractPosition, + followed_position: GroupContractPosition, + ) -> Self { + Self { + missing_position, + followed_position, + } + } + + pub fn missing_position(&self) -> u16 { + self.missing_position + } + + pub fn followed_position(&self) -> u16 { + self.followed_position + } +} + +impl From for ConsensusError { + fn from(err: NonContiguousContractGroupPositionsError) -> Self { + Self::BasicError(BasicError::NonContiguousContractGroupPositionsError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/data_contract/non_contiguous_contract_token_positions_error.rs b/packages/rs-dpp/src/errors/consensus/basic/data_contract/non_contiguous_contract_token_positions_error.rs new file mode 100644 index 0000000000..2875f2bb42 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/data_contract/non_contiguous_contract_token_positions_error.rs @@ -0,0 +1,52 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::data_contract::TokenContractPosition; +use crate::errors::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error( + "Contract Token Positions are not contiguous. Missing position: {}, Followed position: {}", + missing_position, + followed_position +)] +#[platform_serialize(unversioned)] +pub struct NonContiguousContractTokenPositionsError { + /* + + DO NOT CHANGE ORDER OF FIELDS WITHOUT INTRODUCING OF NEW VERSION + + */ + missing_position: TokenContractPosition, + followed_position: TokenContractPosition, +} + +impl NonContiguousContractTokenPositionsError { + pub fn new( + missing_position: TokenContractPosition, + followed_position: TokenContractPosition, + ) -> Self { + Self { + missing_position, + followed_position, + } + } + + pub fn missing_position(&self) -> u16 { + self.missing_position + } + + pub fn followed_position(&self) -> u16 { + self.followed_position + } +} + +impl From for ConsensusError { + fn from(err: NonContiguousContractTokenPositionsError) -> Self { + Self::BasicError(BasicError::NonContiguousContractTokenPositionsError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/group/group_action_not_allowed_on_transition_error.rs b/packages/rs-dpp/src/errors/consensus/basic/group/group_action_not_allowed_on_transition_error.rs new file mode 100644 index 0000000000..8f2862fa9a --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/group/group_action_not_allowed_on_transition_error.rs @@ -0,0 +1,31 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error("Group action is not allowed during transition: {}", transition_type)] +#[platform_serialize(unversioned)] +pub struct GroupActionNotAllowedOnTransitionError { + transition_type: String, +} + +impl GroupActionNotAllowedOnTransitionError { + pub fn new(transition_type: String) -> Self { + Self { transition_type } + } + + pub fn transition_type(&self) -> &str { + &self.transition_type + } +} + +impl From for ConsensusError { + fn from(err: GroupActionNotAllowedOnTransitionError) -> Self { + Self::BasicError(BasicError::GroupActionNotAllowedOnTransitionError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/group/mod.rs b/packages/rs-dpp/src/errors/consensus/basic/group/mod.rs new file mode 100644 index 0000000000..32c6ce2d35 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/group/mod.rs @@ -0,0 +1,3 @@ +mod group_action_not_allowed_on_transition_error; + +pub use group_action_not_allowed_on_transition_error::*; diff --git a/packages/rs-dpp/src/errors/consensus/basic/identity/identity_asset_lock_transaction_is_not_found_error.rs b/packages/rs-dpp/src/errors/consensus/basic/identity/identity_asset_lock_transaction_is_not_found_error.rs index 61aaa959d2..b4d39d261c 100644 --- a/packages/rs-dpp/src/errors/consensus/basic/identity/identity_asset_lock_transaction_is_not_found_error.rs +++ b/packages/rs-dpp/src/errors/consensus/basic/identity/identity_asset_lock_transaction_is_not_found_error.rs @@ -44,15 +44,3 @@ impl From for ConsensusError { Self::BasicError(BasicError::IdentityAssetLockTransactionIsNotFoundError(err)) } } - -#[cfg(test)] -mod test { - use crate::consensus::basic::identity::IdentityAssetLockTransactionIsNotFoundError; - - #[test] - pub fn test_message() { - let error = IdentityAssetLockTransactionIsNotFoundError::new([1; 32]); - - println!("{}", error); - } -} diff --git a/packages/rs-dpp/src/errors/consensus/basic/mod.rs b/packages/rs-dpp/src/errors/consensus/basic/mod.rs index b96be4629b..b05ec735e6 100644 --- a/packages/rs-dpp/src/errors/consensus/basic/mod.rs +++ b/packages/rs-dpp/src/errors/consensus/basic/mod.rs @@ -9,9 +9,11 @@ pub mod decode; pub mod document; pub mod identity; pub mod incompatible_protocol_version_error; +pub mod token; pub mod unsupported_protocol_version_error; pub mod basic_error; +pub mod group; pub mod invalid_identifier_error; #[cfg(feature = "json-schema-validation")] pub mod json_schema_compilation_error; diff --git a/packages/rs-dpp/src/errors/consensus/basic/token/choosing_token_mint_recipient_not_allowed_error.rs b/packages/rs-dpp/src/errors/consensus/basic/token/choosing_token_mint_recipient_not_allowed_error.rs new file mode 100644 index 0000000000..9d5f2dfc90 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/token/choosing_token_mint_recipient_not_allowed_error.rs @@ -0,0 +1,31 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::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("Choosing token mint recipient not allowed for token {}", token_id)] +#[platform_serialize(unversioned)] +pub struct ChoosingTokenMintRecipientNotAllowedError { + token_id: Identifier, +} + +impl ChoosingTokenMintRecipientNotAllowedError { + pub fn new(token_id: Identifier) -> Self { + Self { token_id } + } + pub fn token_id(&self) -> Identifier { + self.token_id + } +} + +impl From for ConsensusError { + fn from(err: ChoosingTokenMintRecipientNotAllowedError) -> Self { + Self::BasicError(BasicError::ChoosingTokenMintRecipientNotAllowedError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/token/contract_has_no_tokens_error.rs b/packages/rs-dpp/src/errors/consensus/basic/token/contract_has_no_tokens_error.rs new file mode 100644 index 0000000000..3fc49a2600 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/token/contract_has_no_tokens_error.rs @@ -0,0 +1,31 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::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("Contract {} has no tokens", contract_id)] +#[platform_serialize(unversioned)] +pub struct ContractHasNoTokensError { + contract_id: Identifier, +} + +impl ContractHasNoTokensError { + pub fn new(contract_id: Identifier) -> Self { + Self { contract_id } + } + pub fn contract_id(&self) -> Identifier { + self.contract_id + } +} + +impl From for ConsensusError { + fn from(err: ContractHasNoTokensError) -> Self { + Self::BasicError(BasicError::ContractHasNoTokensError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/token/destination_identity_for_token_minting_not_set_error.rs b/packages/rs-dpp/src/errors/consensus/basic/token/destination_identity_for_token_minting_not_set_error.rs new file mode 100644 index 0000000000..7136a46e66 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/token/destination_identity_for_token_minting_not_set_error.rs @@ -0,0 +1,33 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::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("Destination identity for minting not set for token {}", token_id)] +#[platform_serialize(unversioned)] +pub struct DestinationIdentityForTokenMintingNotSetError { + token_id: Identifier, +} + +impl DestinationIdentityForTokenMintingNotSetError { + pub fn new(token_id: Identifier) -> Self { + Self { token_id } + } + pub fn token_id(&self) -> Identifier { + self.token_id + } +} + +impl From for ConsensusError { + fn from(err: DestinationIdentityForTokenMintingNotSetError) -> Self { + Self::BasicError(BasicError::DestinationIdentityForTokenMintingNotSetError( + err, + )) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/token/invalid_action_id_error.rs b/packages/rs-dpp/src/errors/consensus/basic/token/invalid_action_id_error.rs new file mode 100644 index 0000000000..51587ab392 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/token/invalid_action_id_error.rs @@ -0,0 +1,43 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::prelude::Identifier; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error( + "Invalid action id {}, expected {}", + invalid_action_id, + expected_action_id +)] +#[platform_serialize(unversioned)] +pub struct InvalidActionIdError { + expected_action_id: Identifier, + invalid_action_id: Identifier, +} + +impl InvalidActionIdError { + pub fn new(expected_action_id: Identifier, invalid_action_id: Identifier) -> Self { + Self { + expected_action_id, + invalid_action_id, + } + } + + pub fn expected_action_id(&self) -> Identifier { + self.expected_action_id + } + + pub fn invalid_action_id(&self) -> Identifier { + self.invalid_action_id + } +} + +impl From for ConsensusError { + fn from(err: InvalidActionIdError) -> Self { + Self::BasicError(BasicError::InvalidActionIdError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/token/invalid_group_position_error.rs b/packages/rs-dpp/src/errors/consensus/basic/token/invalid_group_position_error.rs new file mode 100644 index 0000000000..8464f1064a --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/token/invalid_group_position_error.rs @@ -0,0 +1,47 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::data_contract::GroupContractPosition; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error( + "Invalid group position {}, expected {}", + invalid_group_position, + expected_group_position +)] +#[platform_serialize(unversioned)] +pub struct InvalidGroupPositionError { + expected_group_position: GroupContractPosition, + invalid_group_position: GroupContractPosition, +} + +impl InvalidGroupPositionError { + pub fn new( + expected_group_position: GroupContractPosition, + invalid_group_position: GroupContractPosition, + ) -> Self { + Self { + expected_group_position, + invalid_group_position, + } + } + + pub fn expected_group_position(&self) -> GroupContractPosition { + self.expected_group_position + } + + pub fn invalid_group_position(&self) -> GroupContractPosition { + self.invalid_group_position + } +} + +impl From for ConsensusError { + fn from(err: InvalidGroupPositionError) -> Self { + Self::BasicError(BasicError::InvalidGroupPositionError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/token/invalid_token_id_error.rs b/packages/rs-dpp/src/errors/consensus/basic/token/invalid_token_id_error.rs new file mode 100644 index 0000000000..635f126158 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/token/invalid_token_id_error.rs @@ -0,0 +1,43 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::prelude::Identifier; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error( + "Invalid token id {}, expected {}", + invalid_token_id, + expected_token_id +)] +#[platform_serialize(unversioned)] +pub struct InvalidTokenIdError { + expected_token_id: Identifier, + invalid_token_id: Identifier, +} + +impl InvalidTokenIdError { + pub fn new(expected_token_id: Identifier, invalid_token_id: Identifier) -> Self { + Self { + expected_token_id, + invalid_token_id, + } + } + + pub fn expected_token_id(&self) -> Identifier { + self.expected_token_id + } + + pub fn invalid_token_id(&self) -> Identifier { + self.invalid_token_id + } +} + +impl From for ConsensusError { + fn from(err: InvalidTokenIdError) -> Self { + Self::BasicError(BasicError::InvalidTokenIdError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/token/invalid_token_position_error.rs b/packages/rs-dpp/src/errors/consensus/basic/token/invalid_token_position_error.rs new file mode 100644 index 0000000000..ac157f4193 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/token/invalid_token_position_error.rs @@ -0,0 +1,47 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::data_contract::TokenContractPosition; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error( + "Invalid token position {}, max {}", + invalid_token_position, + max_token_position +)] +#[platform_serialize(unversioned)] +pub struct InvalidTokenPositionError { + max_token_position: TokenContractPosition, + invalid_token_position: TokenContractPosition, +} + +impl InvalidTokenPositionError { + pub fn new( + max_token_position: TokenContractPosition, + invalid_token_position: TokenContractPosition, + ) -> Self { + Self { + max_token_position, + invalid_token_position, + } + } + + pub fn max_token_position(&self) -> TokenContractPosition { + self.max_token_position + } + + pub fn invalid_token_position(&self) -> TokenContractPosition { + self.invalid_token_position + } +} + +impl From for ConsensusError { + fn from(err: InvalidTokenPositionError) -> Self { + Self::BasicError(BasicError::InvalidTokenPositionError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/token/mod.rs b/packages/rs-dpp/src/errors/consensus/basic/token/mod.rs new file mode 100644 index 0000000000..efdcadc77a --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/token/mod.rs @@ -0,0 +1,17 @@ +mod choosing_token_mint_recipient_not_allowed_error; +mod contract_has_no_tokens_error; +mod destination_identity_for_token_minting_not_set_error; +mod invalid_action_id_error; +mod invalid_group_position_error; +mod invalid_token_id_error; +mod invalid_token_position_error; +mod token_transfer_to_ourselves_error; + +pub use choosing_token_mint_recipient_not_allowed_error::*; +pub use contract_has_no_tokens_error::*; +pub use destination_identity_for_token_minting_not_set_error::*; +pub use invalid_action_id_error::*; +pub use invalid_group_position_error::*; +pub use invalid_token_id_error::*; +pub use invalid_token_position_error::*; +pub use token_transfer_to_ourselves_error::*; diff --git a/packages/rs-dpp/src/errors/consensus/basic/token/token_transfer_to_ourselves_error.rs b/packages/rs-dpp/src/errors/consensus/basic/token/token_transfer_to_ourselves_error.rs new file mode 100644 index 0000000000..dbd1ee747c --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/token/token_transfer_to_ourselves_error.rs @@ -0,0 +1,44 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::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( + "Token transfer to the same identity is not allowed. Token ID: {}, Identity ID: {}", + token_id, + identity_id +)] +#[platform_serialize(unversioned)] +pub struct TokenTransferToOurselfError { + token_id: Identifier, + identity_id: Identifier, +} + +impl TokenTransferToOurselfError { + pub fn new(token_id: Identifier, identity_id: Identifier) -> Self { + Self { + token_id, + identity_id, + } + } + + pub fn token_id(&self) -> &Identifier { + &self.token_id + } + + pub fn identity_id(&self) -> &Identifier { + &self.identity_id + } +} + +impl From for ConsensusError { + fn from(err: TokenTransferToOurselfError) -> Self { + Self::BasicError(BasicError::TokenTransferToOurselfError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/codes.rs b/packages/rs-dpp/src/errors/consensus/codes.rs index b238f55c02..56f38cfaa2 100644 --- a/packages/rs-dpp/src/errors/consensus/codes.rs +++ b/packages/rs-dpp/src/errors/consensus/codes.rs @@ -98,8 +98,12 @@ impl ErrorWithCode for BasicError { Self::ContractError(DataContractError::RegexError(_)) => 10247, Self::ContestedUniqueIndexOnMutableDocumentTypeError(_) => 10248, Self::ContestedUniqueIndexWithUniqueIndexError(_) => 10249, + Self::DataContractTokenConfigurationUpdateError { .. } => 10250, + Self::InvalidTokenBaseSupplyError(_) => 10251, + Self::NonContiguousContractGroupPositionsError(_) => 10252, + Self::NonContiguousContractTokenPositionsError(_) => 10253, - // Document Errors: 10400-10499 + // Document Errors: 10400-10449 Self::DataContractNotPresentError { .. } => 10400, Self::DuplicateDocumentTransitionsWithIdsError { .. } => 10401, Self::DuplicateDocumentTransitionsWithIndicesError { .. } => 10402, @@ -120,6 +124,16 @@ impl ErrorWithCode for BasicError { Self::DocumentFieldMaxSizeExceededError(_) => 10417, Self::ContestedDocumentsTemporarilyNotAllowedError(_) => 10418, + // Token Errors: 10450-10499 + Self::InvalidTokenIdError(_) => 10450, + Self::InvalidTokenPositionError(_) => 10451, + Self::InvalidGroupPositionError(_) => 10452, + Self::InvalidActionIdError(_) => 10453, + Self::ContractHasNoTokensError(_) => 10454, + Self::DestinationIdentityForTokenMintingNotSetError(_) => 10455, + Self::ChoosingTokenMintRecipientNotAllowedError(_) => 10456, + Self::TokenTransferToOurselfError(_) => 10457, + // Identity Errors: 10500-10599 Self::DuplicatedIdentityPublicKeyBasicError(_) => 10500, Self::DuplicatedIdentityPublicKeyIdBasicError(_) => 10501, @@ -162,6 +176,7 @@ impl ErrorWithCode for BasicError { // General Errors 10700-10799 Self::OverflowError(_) => 10700, + Self::GroupActionNotAllowedOnTransitionError(_) => 10701, } } } @@ -201,7 +216,7 @@ impl ErrorWithCode for StateError { Self::DataContractIsReadonlyError { .. } => 40001, Self::DataContractConfigUpdateError { .. } => 40002, - // Document Errors: 40100-40199 + // Document Errors: 40100-40149 Self::DocumentAlreadyPresentError { .. } => 40100, Self::DocumentNotFoundError { .. } => 40101, Self::DocumentOwnerIdMismatchError { .. } => 40102, @@ -218,6 +233,12 @@ impl ErrorWithCode for StateError { Self::DocumentContestDocumentWithSameIdAlreadyPresentError(_) => 40113, Self::DocumentContestNotPaidForError(_) => 40114, + // Token errors: 40150-40199 + Self::IdentityDoesNotHaveEnoughTokenBalanceError(_) => 40150, + Self::UnauthorizedTokenActionError(_) => 40151, + Self::IdentityTokenAccountFrozenError(_) => 40152, + Self::IdentityTokenAccountNotFrozenError(_) => 40153, + // Identity Errors: 40200-40299 Self::IdentityAlreadyExistsError(_) => 40200, Self::IdentityPublicKeyIsReadOnlyError { .. } => 40201, @@ -235,6 +256,7 @@ impl ErrorWithCode for StateError { Self::DataContractUpdatePermissionError(_) => 40213, Self::MissingTransferKeyError(_) => 40214, Self::NoTransferKeyForCoreWithdrawalAvailableError(_) => 40215, + Self::RecipientIdentityDoesNotExistError(_) => 40216, // Voting Errors: 40300-40399 Self::MasternodeNotFoundError(_) => 40300, @@ -252,6 +274,12 @@ impl ErrorWithCode for StateError { // Data trigger errors: 40500-40799 #[cfg(feature = "state-transition-validation")] Self::DataTriggerError(ref e) => e.code(), + + // Group errors: 40800-40899 + Self::IdentityNotMemberOfGroupError(_) => 40800, + Self::GroupActionDoesNotExistError(_) => 40801, + Self::GroupActionAlreadyCompletedError(_) => 40802, + Self::GroupActionAlreadySignedByIdentityError(_) => 40803, } } } diff --git a/packages/rs-dpp/src/errors/consensus/state/data_trigger/mod.rs b/packages/rs-dpp/src/errors/consensus/state/data_trigger/mod.rs index a753c9ccd6..e43de44458 100644 --- a/packages/rs-dpp/src/errors/consensus/state/data_trigger/mod.rs +++ b/packages/rs-dpp/src/errors/consensus/state/data_trigger/mod.rs @@ -4,7 +4,7 @@ use crate::consensus::state::data_trigger::data_trigger_invalid_result_error::Da use crate::consensus::state::state_error::StateError; use crate::consensus::ConsensusError; use crate::errors::ProtocolError; -use crate::identity::state_transition::asset_lock_proof::{Decode, Encode}; +use bincode::{Decode, Encode}; use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; use thiserror::Error; diff --git a/packages/rs-dpp/src/errors/consensus/state/group/group_action_already_completed_error.rs b/packages/rs-dpp/src/errors/consensus/state/group/group_action_already_completed_error.rs new file mode 100644 index 0000000000..2d700d72a3 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/group/group_action_already_completed_error.rs @@ -0,0 +1,55 @@ +use crate::consensus::state::state_error::StateError; +use crate::consensus::ConsensusError; +use crate::data_contract::GroupContractPosition; +use crate::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( +"Group action has already been completed for data contract {} at group position {} with action ID {}", + data_contract_id, + group_contract_position, + action_id +)] +#[platform_serialize(unversioned)] +pub struct GroupActionAlreadyCompletedError { + data_contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, +} + +impl GroupActionAlreadyCompletedError { + pub fn new( + data_contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + ) -> Self { + Self { + data_contract_id, + group_contract_position, + action_id, + } + } + + pub fn data_contract_id(&self) -> Identifier { + self.data_contract_id + } + + pub fn group_contract_position(&self) -> &GroupContractPosition { + &self.group_contract_position + } + + pub fn action_id(&self) -> Identifier { + self.action_id + } +} + +impl From for ConsensusError { + fn from(err: GroupActionAlreadyCompletedError) -> Self { + Self::StateError(StateError::GroupActionAlreadyCompletedError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/state/group/group_action_already_signed_by_identity_error.rs b/packages/rs-dpp/src/errors/consensus/state/group/group_action_already_signed_by_identity_error.rs new file mode 100644 index 0000000000..1fcdbf0419 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/group/group_action_already_signed_by_identity_error.rs @@ -0,0 +1,64 @@ +use crate::consensus::state::state_error::StateError; +use crate::consensus::ConsensusError; +use crate::data_contract::GroupContractPosition; +use crate::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( +"Group action with action ID {} has already been signed by identity {} for data contract {} at group position {}", + action_id, + identity_id, + data_contract_id, + group_contract_position +)] +#[platform_serialize(unversioned)] +pub struct GroupActionAlreadySignedByIdentityError { + identity_id: Identifier, + data_contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, +} + +impl GroupActionAlreadySignedByIdentityError { + pub fn new( + identity_id: Identifier, + data_contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + ) -> Self { + Self { + identity_id, + data_contract_id, + group_contract_position, + action_id, + } + } + + pub fn identity_id(&self) -> Identifier { + self.identity_id + } + + pub fn data_contract_id(&self) -> Identifier { + self.data_contract_id + } + + pub fn group_contract_position(&self) -> GroupContractPosition { + self.group_contract_position + } + + pub fn action_id(&self) -> Identifier { + self.action_id + } +} + +impl From for ConsensusError { + fn from(err: GroupActionAlreadySignedByIdentityError) -> Self { + Self::StateError(StateError::GroupActionAlreadySignedByIdentityError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/state/group/group_action_does_not_exist_error.rs b/packages/rs-dpp/src/errors/consensus/state/group/group_action_does_not_exist_error.rs new file mode 100644 index 0000000000..c57af3cc4d --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/group/group_action_does_not_exist_error.rs @@ -0,0 +1,56 @@ +use crate::consensus::state::state_error::StateError; +use crate::consensus::ConsensusError; +use crate::data_contract::GroupContractPosition; +use crate::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( + "Group action does not exist for data contract {} at group position {} with action ID {}", + data_contract_id, + group_contract_position, + action_id +)] +#[platform_serialize(unversioned)] +pub struct GroupActionDoesNotExistError { + data_contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, +} + +impl GroupActionDoesNotExistError { + pub fn new( + data_contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + ) -> Self { + Self { + data_contract_id, + group_contract_position, + action_id, + } + } + + pub fn data_contract_id(&self) -> Identifier { + self.data_contract_id + } + + pub fn group_contract_position(&self) -> &GroupContractPosition { + &self.group_contract_position + } + + pub fn action_id(&self) -> Identifier { + self.action_id + } +} + +impl From for ConsensusError { + fn from(err: GroupActionDoesNotExistError) -> Self { + Self::StateError(StateError::GroupActionDoesNotExistError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/state/group/identity_not_member_of_group_error.rs b/packages/rs-dpp/src/errors/consensus/state/group/identity_not_member_of_group_error.rs new file mode 100644 index 0000000000..afd5bf06ff --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/group/identity_not_member_of_group_error.rs @@ -0,0 +1,56 @@ +use crate::consensus::state::state_error::StateError; +use crate::consensus::ConsensusError; +use crate::data_contract::GroupContractPosition; +use crate::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( + "Identity {} is not a member of the group for data contract {} at position {}", + identity_id, + data_contract_id, + group_contract_position +)] +#[platform_serialize(unversioned)] +pub struct IdentityNotMemberOfGroupError { + identity_id: Identifier, + data_contract_id: Identifier, + group_contract_position: GroupContractPosition, +} + +impl IdentityNotMemberOfGroupError { + pub fn new( + identity_id: Identifier, + data_contract_id: Identifier, + group_contract_position: GroupContractPosition, + ) -> Self { + Self { + identity_id, + data_contract_id, + group_contract_position, + } + } + + pub fn identity_id(&self) -> &Identifier { + &self.identity_id + } + + pub fn data_contract_id(&self) -> &Identifier { + &self.data_contract_id + } + + pub fn group_contract_position(&self) -> GroupContractPosition { + self.group_contract_position + } +} + +impl From for ConsensusError { + fn from(err: IdentityNotMemberOfGroupError) -> Self { + Self::StateError(StateError::IdentityNotMemberOfGroupError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/state/group/mod.rs b/packages/rs-dpp/src/errors/consensus/state/group/mod.rs new file mode 100644 index 0000000000..133ee7e1a5 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/group/mod.rs @@ -0,0 +1,9 @@ +mod group_action_already_completed_error; +mod group_action_already_signed_by_identity_error; +mod group_action_does_not_exist_error; +mod identity_not_member_of_group_error; + +pub use group_action_already_completed_error::*; +pub use group_action_already_signed_by_identity_error::*; +pub use group_action_does_not_exist_error::*; +pub use identity_not_member_of_group_error::*; diff --git a/packages/rs-dpp/src/errors/consensus/state/identity/mod.rs b/packages/rs-dpp/src/errors/consensus/state/identity/mod.rs index 35e6f7f79a..072bbda4ac 100644 --- a/packages/rs-dpp/src/errors/consensus/state/identity/mod.rs +++ b/packages/rs-dpp/src/errors/consensus/state/identity/mod.rs @@ -16,3 +16,6 @@ pub mod max_identity_public_key_limit_reached_error; pub mod missing_identity_public_key_ids_error; pub mod missing_transfer_key_error; pub mod no_transfer_key_for_core_withdrawal_available_error; + +mod recipient_identity_does_not_exist_error; +pub use recipient_identity_does_not_exist_error::*; diff --git a/packages/rs-dpp/src/errors/consensus/state/identity/recipient_identity_does_not_exist_error.rs b/packages/rs-dpp/src/errors/consensus/state/identity/recipient_identity_does_not_exist_error.rs new file mode 100644 index 0000000000..dc6a838f76 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/identity/recipient_identity_does_not_exist_error.rs @@ -0,0 +1,31 @@ +use crate::consensus::state::state_error::StateError; +use crate::consensus::ConsensusError; +use crate::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("Recipient identity {} does not exist", recipient_id)] +#[platform_serialize(unversioned)] +pub struct RecipientIdentityDoesNotExistError { + recipient_id: Identifier, +} + +impl RecipientIdentityDoesNotExistError { + pub fn new(recipient_id: Identifier) -> Self { + Self { recipient_id } + } + pub fn recipient_id(&self) -> Identifier { + self.recipient_id + } +} + +impl From for ConsensusError { + fn from(err: RecipientIdentityDoesNotExistError) -> Self { + Self::StateError(StateError::RecipientIdentityDoesNotExistError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/state/mod.rs b/packages/rs-dpp/src/errors/consensus/state/mod.rs index 118ca4b10c..ee10b800d1 100644 --- a/packages/rs-dpp/src/errors/consensus/state/mod.rs +++ b/packages/rs-dpp/src/errors/consensus/state/mod.rs @@ -2,7 +2,9 @@ pub mod data_contract; #[cfg(feature = "state-transition-validation")] pub mod data_trigger; pub mod document; +pub mod group; pub mod identity; pub mod prefunded_specialized_balances; pub mod state_error; +pub mod token; pub mod voting; 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 8b0ac2b26b..9dc0a2938b 100644 --- a/packages/rs-dpp/src/errors/consensus/state/state_error.rs +++ b/packages/rs-dpp/src/errors/consensus/state/state_error.rs @@ -23,9 +23,7 @@ use crate::consensus::state::identity::invalid_identity_public_key_id_error::Inv use crate::consensus::state::identity::invalid_identity_revision_error::InvalidIdentityRevisionError; use crate::consensus::state::identity::max_identity_public_key_limit_reached_error::MaxIdentityPublicKeyLimitReachedError; use crate::consensus::state::identity::missing_identity_public_key_ids_error::MissingIdentityPublicKeyIdsError; -use crate::consensus::state::identity::{ - IdentityAlreadyExistsError, IdentityInsufficientBalanceError, -}; +use crate::consensus::state::identity::{IdentityAlreadyExistsError, IdentityInsufficientBalanceError, RecipientIdentityDoesNotExistError}; 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; @@ -36,12 +34,14 @@ use crate::consensus::state::document::document_contest_not_joinable_error::Docu use crate::consensus::state::document::document_contest_not_paid_for_error::DocumentContestNotPaidForError; use crate::consensus::state::document::document_incorrect_purchase_price_error::DocumentIncorrectPurchasePriceError; use crate::consensus::state::document::document_not_for_sale_error::DocumentNotForSaleError; +use crate::consensus::state::group::{GroupActionAlreadyCompletedError, GroupActionAlreadySignedByIdentityError, GroupActionDoesNotExistError, IdentityNotMemberOfGroupError}; use crate::consensus::state::identity::identity_public_key_already_exists_for_unique_contract_bounds_error::IdentityPublicKeyAlreadyExistsForUniqueContractBoundsError; use crate::consensus::state::identity::invalid_identity_contract_nonce_error::InvalidIdentityNonceError; use crate::consensus::state::identity::missing_transfer_key_error::MissingTransferKeyError; use crate::consensus::state::identity::no_transfer_key_for_core_withdrawal_available_error::NoTransferKeyForCoreWithdrawalAvailableError; use crate::consensus::state::prefunded_specialized_balances::prefunded_specialized_balance_insufficient_error::PrefundedSpecializedBalanceInsufficientError; use crate::consensus::state::prefunded_specialized_balances::prefunded_specialized_balance_not_found_error::PrefundedSpecializedBalanceNotFoundError; +use crate::consensus::state::token::{IdentityDoesNotHaveEnoughTokenBalanceError, IdentityTokenAccountFrozenError, IdentityTokenAccountNotFrozenError, UnauthorizedTokenActionError}; use crate::consensus::state::voting::masternode_incorrect_voter_identity_id_error::MasternodeIncorrectVoterIdentityIdError; use crate::consensus::state::voting::masternode_incorrect_voting_address_error::MasternodeIncorrectVotingAddressError; use crate::consensus::state::voting::masternode_not_found_error::MasternodeNotFoundError; @@ -199,6 +199,33 @@ pub enum StateError { #[error(transparent)] MasternodeVoteAlreadyPresentError(MasternodeVoteAlreadyPresentError), + + #[error(transparent)] + RecipientIdentityDoesNotExistError(RecipientIdentityDoesNotExistError), + + #[error(transparent)] + IdentityDoesNotHaveEnoughTokenBalanceError(IdentityDoesNotHaveEnoughTokenBalanceError), + + #[error(transparent)] + UnauthorizedTokenActionError(UnauthorizedTokenActionError), + + #[error(transparent)] + IdentityTokenAccountFrozenError(IdentityTokenAccountFrozenError), + + #[error(transparent)] + IdentityTokenAccountNotFrozenError(IdentityTokenAccountNotFrozenError), + + #[error(transparent)] + IdentityNotMemberOfGroupError(IdentityNotMemberOfGroupError), + + #[error(transparent)] + GroupActionDoesNotExistError(GroupActionDoesNotExistError), + + #[error(transparent)] + GroupActionAlreadyCompletedError(GroupActionAlreadyCompletedError), + + #[error(transparent)] + GroupActionAlreadySignedByIdentityError(GroupActionAlreadySignedByIdentityError), } impl From for ConsensusError { diff --git a/packages/rs-dpp/src/errors/consensus/state/token/identity_does_not_have_enough_token_balance_error.rs b/packages/rs-dpp/src/errors/consensus/state/token/identity_does_not_have_enough_token_balance_error.rs new file mode 100644 index 0000000000..ba1c5b7fd6 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/token/identity_does_not_have_enough_token_balance_error.rs @@ -0,0 +1,70 @@ +use crate::consensus::state::state_error::StateError; +use crate::consensus::ConsensusError; +use crate::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( + "Identity {} does not have enough balance for token {}: required {}, actual {}, action: {}", + identity_id, + token_id, + required_balance, + actual_balance, + action +)] +#[platform_serialize(unversioned)] +pub struct IdentityDoesNotHaveEnoughTokenBalanceError { + token_id: Identifier, + identity_id: Identifier, + required_balance: u64, + actual_balance: u64, + action: String, +} + +impl IdentityDoesNotHaveEnoughTokenBalanceError { + pub fn new( + token_id: Identifier, + identity_id: Identifier, + required_balance: u64, + actual_balance: u64, + action: String, + ) -> Self { + Self { + token_id, + identity_id, + required_balance, + actual_balance, + action, + } + } + pub fn token_id(&self) -> &Identifier { + &self.token_id + } + + pub fn identity_id(&self) -> &Identifier { + &self.identity_id + } + + pub fn required_balance(&self) -> u64 { + self.required_balance + } + + pub fn actual_balance(&self) -> u64 { + self.actual_balance + } + + pub fn action(&self) -> &str { + &self.action + } +} + +impl From for ConsensusError { + fn from(err: IdentityDoesNotHaveEnoughTokenBalanceError) -> Self { + Self::StateError(StateError::IdentityDoesNotHaveEnoughTokenBalanceError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/state/token/identity_token_account_frozen_error.rs b/packages/rs-dpp/src/errors/consensus/state/token/identity_token_account_frozen_error.rs new file mode 100644 index 0000000000..6d4a55e609 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/token/identity_token_account_frozen_error.rs @@ -0,0 +1,51 @@ +use crate::consensus::state::state_error::StateError; +use crate::consensus::ConsensusError; +use crate::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( + "Identity {} account is frozen for token {}. Action attempted: {}", + identity_id, + token_id, + action +)] +#[platform_serialize(unversioned)] +pub struct IdentityTokenAccountFrozenError { + token_id: Identifier, + identity_id: Identifier, + action: String, +} + +impl IdentityTokenAccountFrozenError { + pub fn new(token_id: Identifier, identity_id: Identifier, action: String) -> Self { + Self { + token_id, + identity_id, + action, + } + } + + pub fn token_id(&self) -> &Identifier { + &self.token_id + } + + pub fn identity_id(&self) -> &Identifier { + &self.identity_id + } + + pub fn action(&self) -> &str { + &self.action + } +} + +impl From for ConsensusError { + fn from(err: IdentityTokenAccountFrozenError) -> Self { + Self::StateError(StateError::IdentityTokenAccountFrozenError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/state/token/identity_token_account_not_frozen_error.rs b/packages/rs-dpp/src/errors/consensus/state/token/identity_token_account_not_frozen_error.rs new file mode 100644 index 0000000000..479fcc1a50 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/token/identity_token_account_not_frozen_error.rs @@ -0,0 +1,51 @@ +use crate::consensus::state::state_error::StateError; +use crate::consensus::ConsensusError; +use crate::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( + "Identity {} account is not frozen for token {}. Action attempted: {}", + identity_id, + token_id, + action +)] +#[platform_serialize(unversioned)] +pub struct IdentityTokenAccountNotFrozenError { + token_id: Identifier, + identity_id: Identifier, + action: String, +} + +impl IdentityTokenAccountNotFrozenError { + pub fn new(token_id: Identifier, identity_id: Identifier, action: String) -> Self { + Self { + token_id, + identity_id, + action, + } + } + + pub fn token_id(&self) -> &Identifier { + &self.token_id + } + + pub fn identity_id(&self) -> &Identifier { + &self.identity_id + } + + pub fn action(&self) -> &str { + &self.action + } +} + +impl From for ConsensusError { + fn from(err: IdentityTokenAccountNotFrozenError) -> Self { + Self::StateError(StateError::IdentityTokenAccountNotFrozenError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/state/token/mod.rs b/packages/rs-dpp/src/errors/consensus/state/token/mod.rs new file mode 100644 index 0000000000..6838bc261c --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/token/mod.rs @@ -0,0 +1,9 @@ +mod identity_does_not_have_enough_token_balance_error; +mod identity_token_account_frozen_error; +mod identity_token_account_not_frozen_error; +mod unauthorized_token_action_error; + +pub use identity_does_not_have_enough_token_balance_error::*; +pub use identity_token_account_frozen_error::*; +pub use identity_token_account_not_frozen_error::*; +pub use unauthorized_token_action_error::*; diff --git a/packages/rs-dpp/src/errors/consensus/state/token/unauthorized_token_action_error.rs b/packages/rs-dpp/src/errors/consensus/state/token/unauthorized_token_action_error.rs new file mode 100644 index 0000000000..a1275eb7fd --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/token/unauthorized_token_action_error.rs @@ -0,0 +1,64 @@ +use crate::consensus::state::state_error::StateError; +use crate::consensus::ConsensusError; +use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; +use crate::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( + "Identity {} is not authorized to perform action: {} on token: {}. Authorized action takers: {:?}", + identity_id, + token_id, + action, + authorized_action_takers +)] +#[platform_serialize(unversioned)] +pub struct UnauthorizedTokenActionError { + token_id: Identifier, + identity_id: Identifier, + action: String, + authorized_action_takers: AuthorizedActionTakers, +} + +impl UnauthorizedTokenActionError { + pub fn new( + token_id: Identifier, + identity_id: Identifier, + action: String, + authorized_action_takers: AuthorizedActionTakers, + ) -> Self { + Self { + token_id, + identity_id, + action, + authorized_action_takers, + } + } + + pub fn token_id(&self) -> &Identifier { + &self.token_id + } + + pub fn identity_id(&self) -> &Identifier { + &self.identity_id + } + + pub fn action(&self) -> &str { + &self.action + } + + pub fn authorized_action_takers(&self) -> &AuthorizedActionTakers { + &self.authorized_action_takers + } +} + +impl From for ConsensusError { + fn from(err: UnauthorizedTokenActionError) -> Self { + Self::StateError(StateError::UnauthorizedTokenActionError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/protocol_error.rs b/packages/rs-dpp/src/errors/protocol_error.rs index b586bfad63..7c5135a005 100644 --- a/packages/rs-dpp/src/errors/protocol_error.rs +++ b/packages/rs-dpp/src/errors/protocol_error.rs @@ -40,6 +40,7 @@ use crate::{ use dashcore::consensus::encode::Error as DashCoreError; +use crate::tokens::errors::TokenError; use crate::version::FeatureVersion; use platform_value::{Error as ValueError, Value}; use platform_version::error::PlatformVersionError; @@ -134,6 +135,9 @@ pub enum ProtocolError { #[error(transparent)] Document(Box), + #[error(transparent)] + Token(Box), + #[error("Generic Error: {0}")] Generic(String), @@ -232,6 +236,12 @@ pub enum ProtocolError { #[error("Public key generation error {0}")] PublicKeyGenerationError(String), + #[error("group member not found in contract: {0}")] + GroupMemberNotFound(String), + + #[error("group not found in contract: {0}")] + GroupNotFound(String), + #[error("corrupted code execution: {0}")] CorruptedCodeExecution(String), @@ -287,6 +297,12 @@ impl From for ProtocolError { } } +impl From for ProtocolError { + fn from(e: TokenError) -> Self { + ProtocolError::Token(Box::new(e)) + } +} + impl From for ProtocolError { fn from(e: SerdeParsingError) -> Self { ProtocolError::ParsingError(e.to_string()) diff --git a/packages/rs-dpp/src/group/action_event.rs b/packages/rs-dpp/src/group/action_event.rs new file mode 100644 index 0000000000..54cb5a950f --- /dev/null +++ b/packages/rs-dpp/src/group/action_event.rs @@ -0,0 +1,12 @@ +use crate::tokens::token_event::TokenEvent; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; + +#[derive( + Debug, PartialEq, PartialOrd, Clone, Eq, Encode, Decode, PlatformDeserialize, PlatformSerialize, +)] +#[platform_serialize(unversioned)] //versioned directly, no need to use platform_version +pub enum GroupActionEvent { + TokenEvent(TokenEvent), +} diff --git a/packages/rs-dpp/src/group/group_action/mod.rs b/packages/rs-dpp/src/group/group_action/mod.rs new file mode 100644 index 0000000000..7e39ab631c --- /dev/null +++ b/packages/rs-dpp/src/group/group_action/mod.rs @@ -0,0 +1,14 @@ +pub mod v0; + +use crate::group::group_action::v0::GroupActionV0; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; + +#[derive( + Debug, PartialEq, PartialOrd, Clone, Eq, Encode, Decode, PlatformDeserialize, PlatformSerialize, +)] +#[platform_serialize(unversioned)] //versioned directly, no need to use platform_version +pub enum GroupAction { + V0(GroupActionV0), +} diff --git a/packages/rs-dpp/src/group/group_action/v0/mod.rs b/packages/rs-dpp/src/group/group_action/v0/mod.rs new file mode 100644 index 0000000000..5f90ce0788 --- /dev/null +++ b/packages/rs-dpp/src/group/group_action/v0/mod.rs @@ -0,0 +1,12 @@ +use crate::group::action_event::GroupActionEvent; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; + +#[derive( + Debug, PartialEq, PartialOrd, Clone, Eq, Encode, Decode, PlatformDeserialize, PlatformSerialize, +)] +#[platform_serialize(unversioned)] //versioned directly, no need to use platform_version +pub struct GroupActionV0 { + pub event: GroupActionEvent, +} diff --git a/packages/rs-dpp/src/group/mod.rs b/packages/rs-dpp/src/group/mod.rs new file mode 100644 index 0000000000..1915d41c21 --- /dev/null +++ b/packages/rs-dpp/src/group/mod.rs @@ -0,0 +1,66 @@ +use crate::data_contract::group::{Group, GroupMemberPower}; +use crate::data_contract::GroupContractPosition; +use bincode::{Decode, Encode}; +use derive_more::Display; +use platform_value::Identifier; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; + +pub mod action_event; +pub mod group_action; +#[derive(Debug, Clone, Copy, Encode, Decode, PartialEq)] +pub enum GroupStateTransitionInfoStatus { + GroupStateTransitionInfoProposer(GroupContractPosition), + GroupStateTransitionInfoOtherSigner(GroupStateTransitionInfo), +} + +impl From for GroupStateTransitionInfo { + fn from(value: GroupStateTransitionInfoStatus) -> Self { + match value { + GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer( + group_contract_position, + ) => GroupStateTransitionInfo { + group_contract_position, + action_id: Default::default(), + action_is_proposer: true, + }, + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner(info) => info, + } + } +} + +#[derive(Debug, Clone, Copy, Encode, Decode, Default, PartialEq, Display)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(rename_all = "camelCase") +)] +#[display("ID: {}, Action ID: {}", "id", "action_id")] +pub struct GroupStateTransitionInfo { + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "$groupContractPosition") + )] + pub group_contract_position: GroupContractPosition, + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "$groupActionId") + )] + pub action_id: Identifier, + /// This is true if we are the proposer, otherwise we are just voting on a previous action. + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "$groupActionIsProposer") + )] + pub action_is_proposer: bool, +} + +#[derive(Debug, Clone, PartialEq)] +pub struct GroupStateTransitionResolvedInfo { + pub group_contract_position: GroupContractPosition, + pub group: Group, + pub action_id: Identifier, + /// This is true if we are the proposer, otherwise we are just voting on a previous action. + pub action_is_proposer: bool, + pub signer_power: GroupMemberPower, +} diff --git a/packages/rs-dpp/src/identity/state_transition/asset_lock_proof/chain/chain_asset_lock_proof.rs b/packages/rs-dpp/src/identity/state_transition/asset_lock_proof/chain/chain_asset_lock_proof.rs index 0a7b020cc1..6829ea6eaf 100644 --- a/packages/rs-dpp/src/identity/state_transition/asset_lock_proof/chain/chain_asset_lock_proof.rs +++ b/packages/rs-dpp/src/identity/state_transition/asset_lock_proof/chain/chain_asset_lock_proof.rs @@ -4,7 +4,6 @@ use std::convert::TryFrom; use crate::util::hash::hash_double; use crate::{identifier::Identifier, ProtocolError}; -pub use bincode::{Decode, Encode}; use dashcore::OutPoint; /// Instant Asset Lock Proof is a part of Identity Create and Identity Topup diff --git a/packages/rs-dpp/src/identity/state_transition/asset_lock_proof/mod.rs b/packages/rs-dpp/src/identity/state_transition/asset_lock_proof/mod.rs index 2e97ad7480..a25ded9547 100644 --- a/packages/rs-dpp/src/identity/state_transition/asset_lock_proof/mod.rs +++ b/packages/rs-dpp/src/identity/state_transition/asset_lock_proof/mod.rs @@ -4,7 +4,7 @@ use dashcore::{OutPoint, Transaction}; use serde::{Deserialize, Deserializer, Serialize}; -pub use bincode::{Decode, Encode}; +use bincode::{Decode, Encode}; pub use instant::*; use platform_value::Value; diff --git a/packages/rs-dpp/src/lib.rs b/packages/rs-dpp/src/lib.rs index 27932329aa..af7195d65c 100644 --- a/packages/rs-dpp/src/lib.rs +++ b/packages/rs-dpp/src/lib.rs @@ -41,6 +41,7 @@ pub mod block; /// Core subsidy pub mod core_subsidy; pub mod fee; +pub mod multi_identity_events; pub mod nft; pub mod prefunded_specialized_balance; pub mod serialization; @@ -51,10 +52,15 @@ pub mod serialization; pub mod signing; #[cfg(feature = "system_contracts")] pub mod system_data_contracts; + +pub mod tokens; + pub mod voting; #[cfg(feature = "core-types")] pub mod core_types; + +pub mod group; pub mod withdrawal; pub use async_trait; @@ -79,10 +85,21 @@ pub mod prelude { pub type CoreBlockHeight = u32; pub type TimestampMillis = u64; + pub type StartAtIncluded = bool; + pub type TimestampIncluded = bool; pub type Revision = u64; pub type IdentityNonce = u64; + pub type SenderKeyIndex = u32; + pub type RecipientKeyIndex = u32; + + /// The index of the user's key that is used to derive keys that will be used to encrypt the contact's user id in encToUserId and the private data. + pub type RootEncryptionKeyIndex = u32; + + /// The index at which to derive the root encryption key. + pub type DerivationEncryptionKeyIndex = u32; + /// UserFeeIncrease is the additional percentage of the processing fee. /// A 1 here means we pay 1% more in processing fees. A 100 means we pay 100% more. pub type UserFeeIncrease = u16; diff --git a/packages/rs-dpp/src/multi_identity_events/mod.rs b/packages/rs-dpp/src/multi_identity_events/mod.rs new file mode 100644 index 0000000000..6c6558cf9f --- /dev/null +++ b/packages/rs-dpp/src/multi_identity_events/mod.rs @@ -0,0 +1,7 @@ +use platform_value::Identifier; +use std::collections::BTreeSet; + +pub enum ActionTaker { + SingleIdentity(Identifier), + SpecifiedIdentities(BTreeSet), +} diff --git a/packages/rs-dpp/src/nft/mod.rs b/packages/rs-dpp/src/nft/mod.rs index 884906fb1e..bec8e4742a 100644 --- a/packages/rs-dpp/src/nft/mod.rs +++ b/packages/rs-dpp/src/nft/mod.rs @@ -4,7 +4,6 @@ use crate::consensus::ConsensusError; use crate::ProtocolError; use std::fmt; use std::fmt::{Display, Formatter}; - #[derive(Debug, PartialEq, Clone, Copy)] pub enum TradeMode { None = 0, diff --git a/packages/rs-dpp/src/state_transition/mod.rs b/packages/rs-dpp/src/state_transition/mod.rs index cd97cae4ae..da4c004287 100644 --- a/packages/rs-dpp/src/state_transition/mod.rs +++ b/packages/rs-dpp/src/state_transition/mod.rs @@ -1,8 +1,7 @@ use derive_more::From; -use documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; -use documents_batch_transition::document_transition::DocumentTransition; #[cfg(feature = "state-transition-serde-conversion")] use serde::{Deserialize, Serialize}; +use state_transitions::document::batch_transition::batched_transition::document_transition::DocumentTransition; pub use abstract_state_transition::state_transition_helpers; @@ -72,19 +71,16 @@ use crate::identity::Purpose; use crate::identity::{IdentityPublicKey, KeyType}; use crate::identity::{KeyID, SecurityLevel}; use crate::prelude::{AssetLockProof, UserFeeIncrease}; -use crate::state_transition::masternode_vote_transition::MasternodeVoteTransitionSignable; -pub use state_transitions::*; - use crate::serialization::Signable; +use crate::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use crate::state_transition::batch_transition::batched_transition::BatchedTransitionRef; +use crate::state_transition::batch_transition::{BatchTransition, BatchTransitionSignable}; use crate::state_transition::data_contract_create_transition::{ DataContractCreateTransition, DataContractCreateTransitionSignable, }; use crate::state_transition::data_contract_update_transition::{ DataContractUpdateTransition, DataContractUpdateTransitionSignable, }; -use crate::state_transition::documents_batch_transition::{ - DocumentsBatchTransition, DocumentsBatchTransitionSignable, -}; #[cfg(feature = "state-transition-signing")] use crate::state_transition::errors::InvalidSignaturePublicKeyError; #[cfg(feature = "state-transition-signing")] @@ -108,11 +104,14 @@ use crate::state_transition::identity_topup_transition::{ use crate::state_transition::identity_update_transition::{ IdentityUpdateTransition, IdentityUpdateTransitionSignable, }; +use crate::state_transition::masternode_vote_transition::MasternodeVoteTransitionSignable; +use state_transitions::document::batch_transition::batched_transition::token_transition::TokenTransition; +pub use state_transitions::*; use crate::state_transition::masternode_vote_transition::MasternodeVoteTransition; #[cfg(feature = "state-transition-signing")] -use crate::state_transition::state_transitions::document::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; +use crate::state_transition::state_transitions::document::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; pub type GetDataContractSecurityLevelRequirementFn = fn(Identifier, String) -> Result; @@ -122,7 +121,7 @@ macro_rules! call_method { match $state_transition { StateTransition::DataContractCreate(st) => st.$method($args), StateTransition::DataContractUpdate(st) => st.$method($args), - StateTransition::DocumentsBatch(st) => st.$method($args), + StateTransition::Batch(st) => st.$method($args), StateTransition::IdentityCreate(st) => st.$method($args), StateTransition::IdentityTopUp(st) => st.$method($args), StateTransition::IdentityCreditWithdrawal(st) => st.$method($args), @@ -135,7 +134,7 @@ macro_rules! call_method { match $state_transition { StateTransition::DataContractCreate(st) => st.$method(), StateTransition::DataContractUpdate(st) => st.$method(), - StateTransition::DocumentsBatch(st) => st.$method(), + StateTransition::Batch(st) => st.$method(), StateTransition::IdentityCreate(st) => st.$method(), StateTransition::IdentityTopUp(st) => st.$method(), StateTransition::IdentityCreditWithdrawal(st) => st.$method(), @@ -151,7 +150,7 @@ macro_rules! call_getter_method_identity_signed { match $state_transition { StateTransition::DataContractCreate(st) => Some(st.$method($args)), StateTransition::DataContractUpdate(st) => Some(st.$method($args)), - StateTransition::DocumentsBatch(st) => Some(st.$method($args)), + StateTransition::Batch(st) => Some(st.$method($args)), StateTransition::IdentityCreate(_) => None, StateTransition::IdentityTopUp(_) => None, StateTransition::IdentityCreditWithdrawal(st) => Some(st.$method($args)), @@ -164,7 +163,7 @@ macro_rules! call_getter_method_identity_signed { match $state_transition { StateTransition::DataContractCreate(st) => Some(st.$method()), StateTransition::DataContractUpdate(st) => Some(st.$method()), - StateTransition::DocumentsBatch(st) => Some(st.$method()), + StateTransition::Batch(st) => Some(st.$method()), StateTransition::IdentityCreate(_) => None, StateTransition::IdentityTopUp(_) => None, StateTransition::IdentityCreditWithdrawal(st) => Some(st.$method()), @@ -180,7 +179,7 @@ macro_rules! call_method_identity_signed { match $state_transition { StateTransition::DataContractCreate(st) => st.$method($args), StateTransition::DataContractUpdate(st) => st.$method($args), - StateTransition::DocumentsBatch(st) => st.$method($args), + StateTransition::Batch(st) => st.$method($args), StateTransition::IdentityCreate(_st) => {} StateTransition::IdentityTopUp(_st) => {} StateTransition::IdentityCreditWithdrawal(st) => st.$method($args), @@ -193,7 +192,7 @@ macro_rules! call_method_identity_signed { match $state_transition { StateTransition::DataContractCreate(st) => st.$method(), StateTransition::DataContractUpdate(st) => st.$method(), - StateTransition::DocumentsBatch(st) => st.$method(), + StateTransition::Batch(st) => st.$method(), StateTransition::IdentityCreate(st) => {} StateTransition::IdentityTopUp(st) => {} StateTransition::IdentityCreditWithdrawal(st) => st.$method(), @@ -210,7 +209,7 @@ macro_rules! call_errorable_method_identity_signed { match $state_transition { StateTransition::DataContractCreate(st) => st.$method($args), StateTransition::DataContractUpdate(st) => st.$method($args), - StateTransition::DocumentsBatch(st) => st.$method($args), + StateTransition::Batch(st) => st.$method($args), StateTransition::IdentityCreate(_st) => Err(ProtocolError::CorruptedCodeExecution( "identity create can not be called for identity signing".to_string(), )), @@ -227,7 +226,7 @@ macro_rules! call_errorable_method_identity_signed { match $state_transition { StateTransition::DataContractCreate(st) => st.$method(), StateTransition::DataContractUpdate(st) => st.$method(), - StateTransition::DocumentsBatch(st) => st.$method(), + StateTransition::Batch(st) => st.$method(), StateTransition::IdentityCreate(st) => Err(ProtocolError::CorruptedCodeExecution( "identity create can not be called for identity signing".to_string(), )), @@ -284,7 +283,7 @@ macro_rules! call_errorable_method_identity_signed { pub enum StateTransition { DataContractCreate(DataContractCreateTransition), DataContractUpdate(DataContractUpdateTransition), - DocumentsBatch(DocumentsBatchTransition), + Batch(BatchTransition), IdentityCreate(IdentityCreateTransition), IdentityTopUp(IdentityTopUpTransition), IdentityCreditWithdrawal(IdentityCreditWithdrawalTransition), @@ -349,22 +348,39 @@ impl StateTransition { match self { Self::DataContractCreate(_) => "DataContractCreate".to_string(), Self::DataContractUpdate(_) => "DataContractUpdate".to_string(), - Self::DocumentsBatch(documents_batch_transition) => { + Self::Batch(batch_transition) => { let mut document_transition_types = vec![]; - match documents_batch_transition { - DocumentsBatchTransition::V0(documents_batch_transition_v0) => { - for transition in documents_batch_transition_v0.transitions().iter() { - let document_transition_name = match transition { - DocumentTransition::Create(_) => "Create", - DocumentTransition::Replace(_) => "Replace", - DocumentTransition::Delete(_) => "Delete", - DocumentTransition::Transfer(_) => "Transfer", - DocumentTransition::UpdatePrice(_) => "UpdatePrice", - DocumentTransition::Purchase(_) => "Purchase", - }; - document_transition_types.push(document_transition_name); + for transition in batch_transition.transitions_iter() { + let document_transition_name = match transition { + BatchedTransitionRef::Document(DocumentTransition::Create(_)) => "Create", + BatchedTransitionRef::Document(DocumentTransition::Replace(_)) => "Replace", + BatchedTransitionRef::Document(DocumentTransition::Delete(_)) => "Delete", + BatchedTransitionRef::Document(DocumentTransition::Transfer(_)) => { + "Transfer" + } + BatchedTransitionRef::Document(DocumentTransition::UpdatePrice(_)) => { + "UpdatePrice" + } + BatchedTransitionRef::Document(DocumentTransition::Purchase(_)) => { + "Purchase" + } + BatchedTransitionRef::Token(TokenTransition::Transfer(_)) => { + "TokenTransfer" + } + BatchedTransitionRef::Token(TokenTransition::Mint(_)) => "TokenMint", + BatchedTransitionRef::Token(TokenTransition::Burn(_)) => "TokenBurn", + BatchedTransitionRef::Token(TokenTransition::Freeze(_)) => "TokenFreeze", + BatchedTransitionRef::Token(TokenTransition::Unfreeze(_)) => { + "TokenUnfreeze" + } + BatchedTransitionRef::Token(TokenTransition::DestroyFrozenFunds(_)) => { + "TokenDestroyFrozenFunds" + } + BatchedTransitionRef::Token(TokenTransition::EmergencyAction(_)) => { + "TokenEmergencyAction" } - } + }; + document_transition_types.push(document_transition_name); } format!("DocumentsBatch([{}])", document_transition_types.join(", ")) } @@ -452,7 +468,7 @@ impl StateTransition { st.verify_public_key_level_and_purpose(identity_public_key)?; st.verify_public_key_is_enabled(identity_public_key)?; } - StateTransition::DocumentsBatch(st) => { + StateTransition::Batch(st) => { if identity_public_key.purpose() != Purpose::AUTHENTICATION { return Err(ProtocolError::WrongPublicKeyPurposeError( WrongPublicKeyPurposeError::new( diff --git a/packages/rs-dpp/src/state_transition/serialization.rs b/packages/rs-dpp/src/state_transition/serialization.rs index c36ae53db4..ff55d2653a 100644 --- a/packages/rs-dpp/src/state_transition/serialization.rs +++ b/packages/rs-dpp/src/state_transition/serialization.rs @@ -27,9 +27,9 @@ mod tests { use crate::state_transition::data_contract_update_transition::{ DataContractUpdateTransition, DataContractUpdateTransitionV0, }; - use crate::state_transition::documents_batch_transition::document_transition::action_type::DocumentTransitionActionType; - use crate::state_transition::documents_batch_transition::{ - DocumentsBatchTransition, DocumentsBatchTransitionV0, + use crate::state_transition::batch_transition::batched_transition::document_transition_action_type::DocumentTransitionActionType; + use crate::state_transition::batch_transition::{ + BatchTransition, BatchTransitionV1, }; use crate::state_transition::identity_create_transition::v0::IdentityCreateTransitionV0; use crate::state_transition::identity_create_transition::IdentityCreateTransition; @@ -39,7 +39,7 @@ mod tests { use crate::state_transition::public_key_in_creation::accessors::IdentityPublicKeyInCreationV0Setters; use crate::state_transition::StateTransition; use crate::tests::fixtures::{ - get_data_contract_fixture, get_document_transitions_fixture, + get_data_contract_fixture, get_batched_transitions_fixture, get_extended_documents_fixture_with_owner_id_from_contract, raw_instant_asset_lock_proof_fixture, }; @@ -338,11 +338,11 @@ mod tests { ) }) .collect::>(); - let transitions = get_document_transitions_fixture( + let transitions = get_batched_transitions_fixture( [(DocumentTransitionActionType::Create, documents)], &mut nonces, ); - let documents_batch_transition: DocumentsBatchTransition = DocumentsBatchTransitionV0 { + let documents_batch_transition: BatchTransition = BatchTransitionV1 { owner_id: data_contract.owner_id(), transitions, ..Default::default() diff --git a/packages/rs-dpp/src/state_transition/state_transition_types.rs b/packages/rs-dpp/src/state_transition/state_transition_types.rs index 246f462063..574d18521a 100644 --- a/packages/rs-dpp/src/state_transition/state_transition_types.rs +++ b/packages/rs-dpp/src/state_transition/state_transition_types.rs @@ -21,7 +21,7 @@ use serde_repr::{Deserialize_repr, Serialize_repr}; pub enum StateTransitionType { #[default] DataContractCreate = 0, - DocumentsBatch = 1, + Batch = 1, IdentityCreate = 2, IdentityTopUp = 3, DataContractUpdate = 4, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/accessors/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/accessors/mod.rs new file mode 100644 index 0000000000..fe3a6bef7e --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/accessors/mod.rs @@ -0,0 +1,99 @@ +mod v0; + +use std::slice::Iter; +use crate::state_transition::batch_transition::batched_transition::{BatchedTransition, BatchedTransitionMutRef, BatchedTransitionRef}; +use crate::state_transition::batch_transition::BatchTransition; +pub use v0::*; +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::DocumentTransition; + +/// Iterator enum for `BatchTransition` that can handle both V0 and V1. +pub enum DocumentBatchIterator<'a> { + V0(Iter<'a, DocumentTransition>), + V1(DocumentBatchV1Iterator<'a>), +} + +/// Iterator for version 1, yielding `BatchedTransitionRef<'a>` items. +pub struct DocumentBatchV1Iterator<'a> { + pub(crate) inner: Iter<'a, BatchedTransition>, +} + +impl<'a> Iterator for DocumentBatchV1Iterator<'a> { + type Item = BatchedTransitionRef<'a>; + + fn next(&mut self) -> Option { + self.inner + .next() + .map(|batched_transition| match batched_transition { + BatchedTransition::Document(doc) => BatchedTransitionRef::Document(doc), + BatchedTransition::Token(tok) => BatchedTransitionRef::Token(tok), + }) + } +} + +impl<'a> Iterator for DocumentBatchIterator<'a> { + type Item = BatchedTransitionRef<'a>; + + fn next(&mut self) -> Option { + match self { + DocumentBatchIterator::V0(iter) => iter.next().map(BatchedTransitionRef::Document), + DocumentBatchIterator::V1(iter) => iter.next(), + } + } +} + +impl DocumentsBatchTransitionAccessorsV0 for BatchTransition { + type IterType<'a> + = DocumentBatchIterator<'a> + where + Self: 'a; + + /// Iterator for `BatchedTransitionRef` items. + fn transitions_iter<'a>(&'a self) -> Self::IterType<'a> { + match self { + BatchTransition::V0(v0) => DocumentBatchIterator::V0(v0.transitions.iter()), + BatchTransition::V1(v1) => DocumentBatchIterator::V1(DocumentBatchV1Iterator { + inner: v1.transitions.iter(), + }), + } + } + + fn transitions_len(&self) -> usize { + match self { + BatchTransition::V0(v0) => v0.transitions.len(), + BatchTransition::V1(v1) => v1.transitions.len(), + } + } + + fn transitions_are_empty(&self) -> bool { + match self { + BatchTransition::V0(v0) => v0.transitions.is_empty(), + BatchTransition::V1(v1) => v1.transitions.is_empty(), + } + } + + fn first_transition(&self) -> Option { + match self { + BatchTransition::V0(v0) => v0 + .transitions + .first() + .map(|document_transition| BatchedTransitionRef::Document(document_transition)), + BatchTransition::V1(v1) => v1 + .transitions + .first() + .map(|batch_transition| batch_transition.borrow_as_ref()), + } + } + + fn first_transition_mut(&mut self) -> Option { + match self { + BatchTransition::V0(v0) => v0 + .transitions + .first_mut() + .map(|document_transition| BatchedTransitionMutRef::Document(document_transition)), + BatchTransition::V1(v1) => v1 + .transitions + .first_mut() + .map(|batch_transition| batch_transition.borrow_as_mut()), + } + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/accessors/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/accessors/v0/mod.rs new file mode 100644 index 0000000000..767cff2993 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/accessors/v0/mod.rs @@ -0,0 +1,19 @@ +use crate::state_transition::batch_transition::batched_transition::{ + BatchedTransitionMutRef, BatchedTransitionRef, +}; +pub trait DocumentsBatchTransitionAccessorsV0 { + /// Associated type for the iterator. + type IterType<'a>: Iterator> + where + Self: 'a; + + /// Returns an iterator over the `BatchedTransitionRef` items. + fn transitions_iter<'a>(&'a self) -> Self::IterType<'a>; + + fn transitions_len(&self) -> usize; + fn transitions_are_empty(&self) -> bool; + + fn first_transition(&self) -> Option; + + fn first_transition_mut(&mut self) -> Option; +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/document_base_transition_trait.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/document_base_transition_trait.rs new file mode 100644 index 0000000000..d934498534 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/document_base_transition_trait.rs @@ -0,0 +1,16 @@ +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; + +pub trait DocumentBaseTransitionAccessors { + /// Returns a reference to the `base` field of the `DocumentCreateTransitionV0`. + fn base(&self) -> &DocumentBaseTransition; + + /// Returns a mut reference to the `base` field of the `DocumentCreateTransitionV0`. + fn base_mut(&mut self) -> &mut DocumentBaseTransition; + + /// Sets the value of the `base` field in the `DocumentCreateTransitionV0`. + /// + /// # Arguments + /// + /// * `base` - A value of type `DocumentBaseTransition` to set. + fn set_base(&mut self, base: DocumentBaseTransition); +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/fields.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/fields.rs similarity index 75% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/fields.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/fields.rs index b7e0135ed0..df730f10f9 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/fields.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/fields.rs @@ -1,4 +1,4 @@ -pub(in crate::state_transition::state_transitions::document::documents_batch_transition) mod property_names { +pub(in crate::state_transition::state_transitions::document::batch_transition) mod property_names { pub const ID: &str = "$id"; pub const DATA_CONTRACT_ID: &str = "$dataContractId"; pub const DOCUMENT_TYPE: &str = "$type"; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/from_document.rs similarity index 84% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/from_document.rs index e500bbd5bd..88c136d585 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/from_document.rs @@ -1,8 +1,8 @@ use crate::data_contract::document_type::DocumentTypeRef; use crate::document::Document; use crate::prelude::IdentityNonce; -use crate::state_transition::documents_batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; use crate::ProtocolError; use platform_version::version::{FeatureVersion, PlatformVersion}; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/mod.rs similarity index 96% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/mod.rs index 6d80cc2d87..d430a12ba7 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/mod.rs @@ -1,3 +1,4 @@ +pub mod document_base_transition_trait; mod fields; mod from_document; pub mod v0; @@ -8,7 +9,7 @@ mod v0_methods; feature = "state-transition-json-conversion" ))] use crate::data_contract::DataContract; -use crate::state_transition::documents_batch_transition::document_base_transition::v0::{ +use crate::state_transition::batch_transition::document_base_transition::v0::{ DocumentBaseTransitionV0, DocumentTransitionObjectLike, }; #[cfg(any( diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/v0/from_document.rs similarity index 77% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/v0/from_document.rs index 7d3e6ef348..b067edad06 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/v0/from_document.rs @@ -2,10 +2,10 @@ use crate::data_contract::document_type::accessors::DocumentTypeV0Getters; use crate::data_contract::document_type::DocumentTypeRef; use crate::document::{Document, DocumentV0Getters}; use crate::prelude::IdentityNonce; -use crate::state_transition::documents_batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; +use crate::state_transition::batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; impl DocumentBaseTransitionV0 { - pub(in crate::state_transition::state_transitions::document::documents_batch_transition::document_transition::document_base_transition) fn from_document( + pub(in crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_base_transition) fn from_document( document: &Document, document_type: DocumentTypeRef, identity_contract_nonce: IdentityNonce, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/v0/mod.rs similarity index 98% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/v0/mod.rs index f5b245bece..9477075d48 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/v0/mod.rs @@ -21,7 +21,7 @@ use crate::data_contract::accessors::v0::DataContractV0Getters; use crate::identifier::Identifier; use crate::prelude::IdentityNonce; #[cfg(feature = "state-transition-value-conversion")] -use crate::state_transition::documents_batch_transition::document_base_transition::property_names; +use crate::state_transition::batch_transition::document_base_transition::property_names; #[cfg(any( feature = "state-transition-json-conversion", feature = "state-transition-value-conversion" diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/v0/v0_methods.rs similarity index 94% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/v0/v0_methods.rs index c332648a54..f3c6beb7ee 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/v0/v0_methods.rs @@ -1,4 +1,4 @@ -use crate::state_transition::documents_batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; +use crate::state_transition::batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; use crate::prelude::IdentityNonce; use platform_value::Identifier; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/v0_methods.rs similarity index 87% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/v0_methods.rs index c7a543b555..053865b056 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_base_transition/v0_methods.rs @@ -1,6 +1,6 @@ -use crate::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; +use crate::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; use crate::prelude::IdentityNonce; use platform_value::Identifier; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/convertible.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/convertible.rs similarity index 90% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/convertible.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/convertible.rs index bca79958ba..b1d5a81ed0 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/convertible.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/convertible.rs @@ -7,24 +7,24 @@ use crate::data_contract::document_type::accessors::DocumentTypeV0Getters; feature = "state-transition-value-conversion" ))] use crate::prelude::DataContract; -#[cfg(feature = "state-transition-json-conversion")] -use crate::state_transition::data_contract_update_transition::IDENTIFIER_FIELDS; #[cfg(any( feature = "state-transition-json-conversion", feature = "state-transition-value-conversion" ))] -use crate::state_transition::documents_batch_transition::document_base_transition::v0::DocumentTransitionObjectLike; +use crate::state_transition::batch_transition::document_base_transition::v0::DocumentTransitionObjectLike; #[cfg(feature = "state-transition-json-conversion")] -use crate::state_transition::documents_batch_transition::document_create_transition::v0::BINARY_FIELDS; +use crate::state_transition::batch_transition::document_create_transition::v0::BINARY_FIELDS; #[cfg(any( feature = "state-transition-json-conversion", feature = "state-transition-value-conversion" ))] -use crate::state_transition::documents_batch_transition::document_create_transition::DocumentCreateTransition; +use crate::state_transition::batch_transition::document_create_transition::DocumentCreateTransition; #[cfg(feature = "state-transition-value-conversion")] -use crate::state_transition::documents_batch_transition::document_create_transition::DocumentCreateTransitionV0; +use crate::state_transition::batch_transition::document_create_transition::DocumentCreateTransitionV0; #[cfg(feature = "state-transition-value-conversion")] -use crate::state_transition::documents_batch_transition::fields::property_names::STATE_TRANSITION_PROTOCOL_VERSION; +use crate::state_transition::batch_transition::fields::property_names::STATE_TRANSITION_PROTOCOL_VERSION; +#[cfg(feature = "state-transition-json-conversion")] +use crate::state_transition::data_contract_update_transition::IDENTIFIER_FIELDS; #[cfg(any( feature = "state-transition-json-conversion", feature = "state-transition-value-conversion" diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/from_document.rs similarity index 86% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/from_document.rs index e275f72647..7ade005e6c 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/from_document.rs @@ -1,8 +1,8 @@ use crate::data_contract::document_type::DocumentTypeRef; use crate::document::Document; use crate::prelude::IdentityNonce; -use crate::state_transition::documents_batch_transition::document_create_transition::DocumentCreateTransitionV0; -use crate::state_transition::documents_batch_transition::document_transition::DocumentCreateTransition; +use crate::state_transition::batch_transition::batched_transition::DocumentCreateTransition; +use crate::state_transition::batch_transition::document_create_transition::DocumentCreateTransitionV0; use crate::ProtocolError; use platform_version::version::{FeatureVersion, PlatformVersion}; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/mod.rs similarity index 97% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/mod.rs index cde6d5ae29..dfc4682872 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/mod.rs @@ -6,7 +6,7 @@ mod v0_methods; use crate::block::block_info::BlockInfo; use crate::data_contract::document_type::DocumentTypeRef; use crate::document::Document; -use crate::state_transition::documents_batch_transition::document_create_transition::v0::DocumentFromCreateTransitionV0; +use crate::state_transition::batch_transition::document_create_transition::v0::DocumentFromCreateTransitionV0; use crate::ProtocolError; use bincode::{Decode, Encode}; use derive_more::{Display, From}; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/v0/from_document.rs similarity index 84% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/v0/from_document.rs index 3132a4ba07..633c72ffcc 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/v0/from_document.rs @@ -2,8 +2,8 @@ use crate::data_contract::document_type::methods::DocumentTypeV0Methods; use crate::data_contract::document_type::DocumentTypeRef; use crate::document::{Document, DocumentV0Getters}; use crate::prelude::IdentityNonce; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_create_transition::DocumentCreateTransitionV0; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::document_create_transition::DocumentCreateTransitionV0; use crate::ProtocolError; use platform_version::version::{FeatureVersion, PlatformVersion}; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/v0/mod.rs similarity index 97% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/v0/mod.rs index 27c968b20b..7296c50382 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/v0/mod.rs @@ -24,17 +24,17 @@ use crate::data_contract::document_type::methods::DocumentTypeV0Methods; use crate::data_contract::document_type::DocumentTypeRef; use crate::document::{Document, DocumentV0}; use crate::fee::Credits; -use crate::state_transition::documents_batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; +use crate::state_transition::batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; #[cfg(feature = "state-transition-value-conversion")] -use crate::state_transition::documents_batch_transition::document_base_transition::v0::DocumentTransitionObjectLike; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::document_base_transition::v0::DocumentTransitionObjectLike; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; use derive_more::Display; #[cfg(feature = "state-transition-value-conversion")] use platform_value::btreemap_extensions::BTreeValueRemoveTupleFromMapHelper; use platform_version::version::PlatformVersion; #[cfg(feature = "state-transition-value-conversion")] -use crate::state_transition::documents_batch_transition; +use crate::state_transition::batch_transition; mod property_names { pub const ENTROPY: &str = "$entropy"; @@ -86,7 +86,9 @@ impl DocumentCreateTransitionV0 { data_contract: DataContract, ) -> Result { let identity_contract_nonce = map - .remove_integer(documents_batch_transition::document_base_transition::property_names::IDENTITY_CONTRACT_NONCE) + .remove_integer( + batch_transition::document_base_transition::property_names::IDENTITY_CONTRACT_NONCE, + ) .map_err(ProtocolError::ValueError)?; Ok(Self { base: DocumentBaseTransition::V0(DocumentBaseTransitionV0::from_value_map_consume( @@ -386,8 +388,8 @@ impl DocumentFromCreateTransitionV0 for Document { #[cfg(test)] mod test { - use crate::data_contract::data_contract::DataContractV0; - use crate::state_transition::documents_batch_transition::document_create_transition::DocumentCreateTransition; + use crate::data_contract::v0::DataContractV0; + use crate::state_transition::batch_transition::document_create_transition::DocumentCreateTransition; use platform_value::btreemap_extensions::BTreeValueMapHelper; use platform_value::{platform_value, BinaryData, Bytes32, Identifier}; use platform_version::version::LATEST_PLATFORM_VERSION; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/v0/v0_methods.rs similarity index 76% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/v0/v0_methods.rs index e5e2aa8710..e19bcb8ec8 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/v0/v0_methods.rs @@ -1,25 +1,13 @@ -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_create_transition::DocumentCreateTransitionV0; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::document_create_transition::DocumentCreateTransitionV0; use platform_value::Value; use crate::fee::Credits; use std::collections::BTreeMap; +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; -pub trait DocumentCreateTransitionV0Methods { - /// Returns a reference to the `base` field of the `DocumentCreateTransitionV0`. - fn base(&self) -> &DocumentBaseTransition; - - /// Returns a mut reference to the `base` field of the `DocumentCreateTransitionV0`. - fn base_mut(&mut self) -> &mut DocumentBaseTransition; - - /// Sets the value of the `base` field in the `DocumentCreateTransitionV0`. - /// - /// # Arguments - /// - /// * `base` - A value of type `DocumentBaseTransition` to set. - fn set_base(&mut self, base: DocumentBaseTransition); - +pub trait DocumentCreateTransitionV0Methods: DocumentBaseTransitionAccessors { /// Returns a reference to the `entropy` field of the `DocumentCreateTransitionV0`. fn entropy(&self) -> [u8; 32]; @@ -48,7 +36,7 @@ pub trait DocumentCreateTransitionV0Methods { fn clear_prefunded_voting_balance(&mut self); } -impl DocumentCreateTransitionV0Methods for DocumentCreateTransitionV0 { +impl DocumentBaseTransitionAccessors for DocumentCreateTransitionV0 { fn base(&self) -> &DocumentBaseTransition { &self.base } @@ -60,7 +48,9 @@ impl DocumentCreateTransitionV0Methods for DocumentCreateTransitionV0 { fn set_base(&mut self, base: DocumentBaseTransition) { self.base = base; } +} +impl DocumentCreateTransitionV0Methods for DocumentCreateTransitionV0 { fn entropy(&self) -> [u8; 32] { self.entropy } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/v0_methods.rs similarity index 80% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/v0_methods.rs index 11d349f56c..da248d5393 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_create_transition/v0_methods.rs @@ -1,11 +1,12 @@ use std::collections::BTreeMap; use platform_value::{Value}; use crate::fee::Credits; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_create_transition::DocumentCreateTransition; -use crate::state_transition::documents_batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::document_create_transition::DocumentCreateTransition; +use crate::state_transition::batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; -impl DocumentCreateTransitionV0Methods for DocumentCreateTransition { +impl DocumentBaseTransitionAccessors for DocumentCreateTransition { fn base(&self) -> &DocumentBaseTransition { match self { DocumentCreateTransition::V0(v0) => &v0.base, @@ -23,7 +24,9 @@ impl DocumentCreateTransitionV0Methods for DocumentCreateTransition { DocumentCreateTransition::V0(v0) => v0.base = base, } } +} +impl DocumentCreateTransitionV0Methods for DocumentCreateTransition { fn entropy(&self) -> [u8; 32] { match self { DocumentCreateTransition::V0(v0) => v0.entropy, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/from_document.rs similarity index 85% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/from_document.rs index 3c6dfa6b80..a3eafe8c32 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/from_document.rs @@ -4,8 +4,8 @@ use crate::prelude::IdentityNonce; use crate::ProtocolError; use platform_version::version::{FeatureVersion, PlatformVersion}; -use crate::state_transition::documents_batch_transition::document_transition::{DocumentDeleteTransition}; -use crate::state_transition::documents_batch_transition::document_transition::document_delete_transition::DocumentDeleteTransitionV0; +use crate::state_transition::batch_transition::batched_transition::document_delete_transition::DocumentDeleteTransitionV0; +use crate::state_transition::batch_transition::batched_transition::DocumentDeleteTransition; impl DocumentDeleteTransition { pub fn from_document( diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/mod.rs similarity index 100% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/mod.rs diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0/from_document.rs similarity index 69% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0/from_document.rs index 4fac1aff9f..9a93935028 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0/from_document.rs @@ -1,10 +1,10 @@ -use platform_version::version::{FeatureVersion, PlatformVersion}; -use crate::data_contract::document_type::{DocumentTypeRef}; -use crate::document::{Document}; +use crate::data_contract::document_type::DocumentTypeRef; +use crate::document::Document; use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::batched_transition::document_delete_transition::DocumentDeleteTransitionV0; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; use crate::ProtocolError; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_delete_transition::DocumentDeleteTransitionV0; +use platform_version::version::{FeatureVersion, PlatformVersion}; impl DocumentDeleteTransitionV0 { pub(crate) fn from_document( diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0/mod.rs similarity index 85% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0/mod.rs index 34d4ac9855..633c7d8381 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0/mod.rs @@ -1,7 +1,7 @@ mod from_document; pub mod v0_methods; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; use bincode::{Decode, Encode}; use derive_more::Display; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0/v0_methods.rs new file mode 100644 index 0000000000..861334a602 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0/v0_methods.rs @@ -0,0 +1,17 @@ +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::batched_transition::document_delete_transition::DocumentDeleteTransitionV0; + +impl DocumentBaseTransitionAccessors for DocumentDeleteTransitionV0 { + fn base(&self) -> &DocumentBaseTransition { + &self.base + } + + fn base_mut(&mut self) -> &mut DocumentBaseTransition { + &mut self.base + } + + fn set_base(&mut self, base: DocumentBaseTransition) { + self.base = base + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0_methods.rs similarity index 51% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0_methods.rs index 099c95e8f3..8fd1b1f31c 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_delete_transition/v0_methods.rs @@ -1,8 +1,8 @@ -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_delete_transition::v0::v0_methods::DocumentDeleteTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_transition::DocumentDeleteTransition; +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::batched_transition::DocumentDeleteTransition; -impl DocumentDeleteTransitionV0Methods for DocumentDeleteTransition { +impl DocumentBaseTransitionAccessors for DocumentDeleteTransition { fn base(&self) -> &DocumentBaseTransition { match self { DocumentDeleteTransition::V0(v0) => &v0.base, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/from_document.rs similarity index 85% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/from_document.rs index d4b913405f..b7f24dc3d1 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/from_document.rs @@ -5,8 +5,8 @@ use crate::prelude::IdentityNonce; use crate::ProtocolError; use platform_version::version::{FeatureVersion, PlatformVersion}; -use crate::state_transition::documents_batch_transition::document_transition::{DocumentPurchaseTransition}; -use crate::state_transition::documents_batch_transition::document_transition::document_purchase_transition::DocumentPurchaseTransitionV0; +use crate::state_transition::batch_transition::batched_transition::document_purchase_transition::DocumentPurchaseTransitionV0; +use crate::state_transition::batch_transition::batched_transition::DocumentPurchaseTransition; impl DocumentPurchaseTransition { pub fn from_document( diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/mod.rs similarity index 100% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/mod.rs diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/v0/from_document.rs similarity index 79% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/v0/from_document.rs index 80bfc2115c..9c2eb59f76 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/v0/from_document.rs @@ -1,12 +1,12 @@ -use platform_version::version::{FeatureVersion, PlatformVersion}; -use crate::data_contract::document_type::{DocumentTypeRef}; -use crate::document::{Document, DocumentV0Getters}; +use crate::data_contract::document_type::DocumentTypeRef; use crate::document::errors::DocumentError; +use crate::document::{Document, DocumentV0Getters}; use crate::fee::Credits; use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::batched_transition::document_purchase_transition::DocumentPurchaseTransitionV0; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; use crate::ProtocolError; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_purchase_transition::DocumentPurchaseTransitionV0; +use platform_version::version::{FeatureVersion, PlatformVersion}; impl DocumentPurchaseTransitionV0 { pub(crate) fn from_document( diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/v0/mod.rs similarity index 90% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/v0/mod.rs index 5a4ca1e8ba..3b798177be 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/v0/mod.rs @@ -1,7 +1,7 @@ mod from_document; pub mod v0_methods; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; use bincode::{Decode, Encode}; use derive_more::Display; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/v0/v0_methods.rs similarity index 53% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/v0/v0_methods.rs index 95333296e4..41f6b423af 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/v0/v0_methods.rs @@ -1,20 +1,10 @@ use crate::fee::Credits; use crate::prelude::Revision; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_purchase_transition::DocumentPurchaseTransitionV0; - -pub trait DocumentPurchaseTransitionV0Methods { - /// Returns a reference to the `base` field of the `DocumentCreateTransitionV0`. - fn base(&self) -> &DocumentBaseTransition; - fn base_mut(&mut self) -> &mut DocumentBaseTransition; - - /// Sets the value of the `base` field in the `DocumentCreateTransitionV0`. - /// - /// # Arguments - /// - /// * `base` - A value of type `DocumentBaseTransition` to set. - fn set_base(&mut self, base: DocumentBaseTransition); +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::batched_transition::document_purchase_transition::DocumentPurchaseTransitionV0; +pub trait DocumentPurchaseTransitionV0Methods: DocumentBaseTransitionAccessors { /// Returns a reference to the `revision` field of the `DocumentReplaceTransitionV0`. fn revision(&self) -> Revision; @@ -23,7 +13,7 @@ pub trait DocumentPurchaseTransitionV0Methods { fn price(&self) -> Credits; } -impl DocumentPurchaseTransitionV0Methods for DocumentPurchaseTransitionV0 { +impl DocumentBaseTransitionAccessors for DocumentPurchaseTransitionV0 { fn base(&self) -> &DocumentBaseTransition { &self.base } @@ -33,9 +23,11 @@ impl DocumentPurchaseTransitionV0Methods for DocumentPurchaseTransitionV0 { } fn set_base(&mut self, base: DocumentBaseTransition) { - self.base = base + self.base = base; } +} +impl DocumentPurchaseTransitionV0Methods for DocumentPurchaseTransitionV0 { fn revision(&self) -> Revision { self.revision } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/v0_methods.rs similarity index 65% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/v0_methods.rs index 86c2fe8f19..8918323373 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_purchase_transition/v0_methods.rs @@ -1,10 +1,11 @@ use crate::fee::Credits; use crate::prelude::Revision; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_transition::DocumentPurchaseTransition; +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::batched_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods; +use crate::state_transition::batch_transition::batched_transition::DocumentPurchaseTransition; -impl DocumentPurchaseTransitionV0Methods for DocumentPurchaseTransition { +impl DocumentBaseTransitionAccessors for DocumentPurchaseTransition { fn base(&self) -> &DocumentBaseTransition { match self { DocumentPurchaseTransition::V0(v0) => &v0.base, @@ -22,7 +23,9 @@ impl DocumentPurchaseTransitionV0Methods for DocumentPurchaseTransition { DocumentPurchaseTransition::V0(v0) => v0.base = base, } } +} +impl DocumentPurchaseTransitionV0Methods for DocumentPurchaseTransition { fn revision(&self) -> Revision { match self { DocumentPurchaseTransition::V0(v0) => v0.revision, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/from_document.rs similarity index 79% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/from_document.rs index 059da81c22..1d2923a1f3 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/from_document.rs @@ -1,10 +1,10 @@ -use platform_version::version::{FeatureVersion, PlatformVersion}; -use crate::data_contract::document_type::{DocumentTypeRef}; -use crate::document::{Document}; +use crate::data_contract::document_type::DocumentTypeRef; +use crate::document::Document; use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::batched_transition::document_replace_transition::DocumentReplaceTransitionV0; +use crate::state_transition::batch_transition::batched_transition::DocumentReplaceTransition; use crate::ProtocolError; -use crate::state_transition::documents_batch_transition::document_transition::{DocumentReplaceTransition}; -use crate::state_transition::documents_batch_transition::document_transition::document_replace_transition::DocumentReplaceTransitionV0; +use platform_version::version::{FeatureVersion, PlatformVersion}; impl DocumentReplaceTransition { pub fn from_document( diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/mod.rs similarity index 100% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/mod.rs diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/v0/from_document.rs similarity index 79% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/v0/from_document.rs index 5fbd783eb6..4b5903c87a 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/v0/from_document.rs @@ -1,11 +1,11 @@ -use platform_version::version::{FeatureVersion, PlatformVersion}; -use crate::data_contract::document_type::{DocumentTypeRef}; -use crate::document::{Document, DocumentV0Getters}; +use crate::data_contract::document_type::DocumentTypeRef; use crate::document::errors::DocumentError; +use crate::document::{Document, DocumentV0Getters}; use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::batched_transition::document_replace_transition::DocumentReplaceTransitionV0; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; use crate::ProtocolError; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_replace_transition::DocumentReplaceTransitionV0; +use platform_version::version::{FeatureVersion, PlatformVersion}; impl DocumentReplaceTransitionV0 { pub(crate) fn from_document( diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/v0/mod.rs similarity index 98% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/v0/mod.rs index 13833cabaf..1aae0624bf 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/v0/mod.rs @@ -18,8 +18,8 @@ use platform_version::version::PlatformVersion; use std::collections::BTreeMap; pub use super::super::document_base_transition::IDENTIFIER_FIELDS; -use crate::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; mod property_names { pub const REVISION: &str = "$revision"; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/v0/v0_methods.rs similarity index 68% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/v0/v0_methods.rs index 9bee325bb1..61dec36af2 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/v0/v0_methods.rs @@ -3,20 +3,11 @@ use platform_value::Value; use std::collections::BTreeMap; use crate::prelude::Revision; +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::batched_transition::document_replace_transition::DocumentReplaceTransitionV0; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; - -use crate::state_transition::documents_batch_transition::document_transition::document_replace_transition::DocumentReplaceTransitionV0; - -pub trait DocumentReplaceTransitionV0Methods { - /// Returns a reference to the `base` field of the `DocumentReplaceTransitionV0`. - fn base(&self) -> &DocumentBaseTransition; - /// Returns a mut reference to the `base` field of the `DocumentReplaceTransitionV0`. - fn base_mut(&mut self) -> &mut DocumentBaseTransition; - - /// Sets the value of the `base` field in the `DocumentReplaceTransitionV0`. - fn set_base(&mut self, base: DocumentBaseTransition); - +pub trait DocumentReplaceTransitionV0Methods: DocumentBaseTransitionAccessors { /// Returns a reference to the `revision` field of the `DocumentReplaceTransitionV0`. fn revision(&self) -> Revision; @@ -33,7 +24,7 @@ pub trait DocumentReplaceTransitionV0Methods { fn set_data(&mut self, data: BTreeMap); } -impl DocumentReplaceTransitionV0Methods for DocumentReplaceTransitionV0 { +impl DocumentBaseTransitionAccessors for DocumentReplaceTransitionV0 { fn base(&self) -> &DocumentBaseTransition { &self.base } @@ -45,7 +36,9 @@ impl DocumentReplaceTransitionV0Methods for DocumentReplaceTransitionV0 { fn set_base(&mut self, base: DocumentBaseTransition) { self.base = base; } +} +impl DocumentReplaceTransitionV0Methods for DocumentReplaceTransitionV0 { fn revision(&self) -> Revision { self.revision } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/v0_methods.rs similarity index 71% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/v0_methods.rs index 29f79a05e2..ad52fdadd0 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_replace_transition/v0_methods.rs @@ -1,11 +1,12 @@ use std::collections::BTreeMap; use platform_value::Value; use crate::prelude::Revision; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_replace_transition::v0::v0_methods::DocumentReplaceTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_transition::DocumentReplaceTransition; +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::batched_transition::document_replace_transition::v0::v0_methods::DocumentReplaceTransitionV0Methods; +use crate::state_transition::batch_transition::batched_transition::DocumentReplaceTransition; -impl DocumentReplaceTransitionV0Methods for DocumentReplaceTransition { +impl DocumentBaseTransitionAccessors for DocumentReplaceTransition { fn base(&self) -> &DocumentBaseTransition { match self { DocumentReplaceTransition::V0(v0) => &v0.base, @@ -23,7 +24,9 @@ impl DocumentReplaceTransitionV0Methods for DocumentReplaceTransition { DocumentReplaceTransition::V0(v0) => v0.base = base, } } +} +impl DocumentReplaceTransitionV0Methods for DocumentReplaceTransition { fn revision(&self) -> Revision { match self { DocumentReplaceTransition::V0(v0) => v0.revision, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/from_document.rs similarity index 84% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/from_document.rs index abfbf806df..17d0166f09 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/from_document.rs @@ -1,10 +1,12 @@ -use platform_value::Identifier; -use platform_version::version::{FeatureVersion, PlatformVersion}; -use crate::data_contract::document_type::{DocumentTypeRef}; -use crate::document::{Document}; +use crate::data_contract::document_type::DocumentTypeRef; +use crate::document::Document; use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::batched_transition::document_transfer_transition::{ + DocumentTransferTransition, DocumentTransferTransitionV0, +}; use crate::ProtocolError; -use crate::state_transition::documents_batch_transition::document_transition::document_transfer_transition::{DocumentTransferTransition, DocumentTransferTransitionV0}; +use platform_value::Identifier; +use platform_version::version::{FeatureVersion, PlatformVersion}; impl DocumentTransferTransition { pub fn from_document( diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/mod.rs similarity index 100% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/mod.rs diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/v0/from_document.rs similarity index 79% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/v0/from_document.rs index 77a4d59c6d..7f182eb46a 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/v0/from_document.rs @@ -1,12 +1,12 @@ -use platform_value::Identifier; -use platform_version::version::{FeatureVersion, PlatformVersion}; -use crate::data_contract::document_type::{DocumentTypeRef}; -use crate::document::{Document, DocumentV0Getters}; +use crate::data_contract::document_type::DocumentTypeRef; use crate::document::errors::DocumentError; +use crate::document::{Document, DocumentV0Getters}; use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::batched_transition::document_transfer_transition::DocumentTransferTransitionV0; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; use crate::ProtocolError; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_transfer_transition::DocumentTransferTransitionV0; +use platform_value::Identifier; +use platform_version::version::{FeatureVersion, PlatformVersion}; impl DocumentTransferTransitionV0 { pub(crate) fn from_document( diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/v0/mod.rs similarity index 92% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/v0/mod.rs index 3708794cf7..d8a7e7e41f 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/v0/mod.rs @@ -10,7 +10,7 @@ use platform_value::Identifier; use serde::{Deserialize, Serialize}; pub use super::super::document_base_transition::IDENTIFIER_FIELDS; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; mod property_names { pub const REVISION: &str = "$revision"; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/v0/v0_methods.rs similarity index 69% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/v0/v0_methods.rs index 6e4b833115..2dd4b95d4e 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/v0/v0_methods.rs @@ -1,20 +1,11 @@ use platform_value::Identifier; use crate::prelude::Revision; +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::batched_transition::document_transfer_transition::DocumentTransferTransitionV0; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; - -use crate::state_transition::documents_batch_transition::document_transition::document_transfer_transition::DocumentTransferTransitionV0; - -pub trait DocumentTransferTransitionV0Methods { - /// Returns a reference to the `base` field of the `DocumentReplaceTransitionV0`. - fn base(&self) -> &DocumentBaseTransition; - /// Returns a mut reference to the `base` field of the `DocumentReplaceTransitionV0`. - fn base_mut(&mut self) -> &mut DocumentBaseTransition; - - /// Sets the value of the `base` field in the `DocumentReplaceTransitionV0`. - fn set_base(&mut self, base: DocumentBaseTransition); - +pub trait DocumentTransferTransitionV0Methods: DocumentBaseTransitionAccessors { /// Returns a reference to the `revision` field of the `DocumentReplaceTransitionV0`. fn revision(&self) -> Revision; @@ -31,7 +22,7 @@ pub trait DocumentTransferTransitionV0Methods { fn set_recipient_owner_id(&mut self, recipient_owner_id: Identifier); } -impl DocumentTransferTransitionV0Methods for DocumentTransferTransitionV0 { +impl DocumentBaseTransitionAccessors for DocumentTransferTransitionV0 { fn base(&self) -> &DocumentBaseTransition { &self.base } @@ -43,7 +34,9 @@ impl DocumentTransferTransitionV0Methods for DocumentTransferTransitionV0 { fn set_base(&mut self, base: DocumentBaseTransition) { self.base = base; } +} +impl DocumentTransferTransitionV0Methods for DocumentTransferTransitionV0 { fn revision(&self) -> Revision { self.revision } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/v0_methods.rs similarity index 72% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/v0_methods.rs index adeff540c0..e4dc722b78 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transfer_transition/v0_methods.rs @@ -1,10 +1,11 @@ use platform_value::Identifier; use crate::prelude::Revision; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_transfer_transition::v0::v0_methods::DocumentTransferTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_transition::DocumentTransferTransition; +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::batched_transition::document_transfer_transition::v0::v0_methods::DocumentTransferTransitionV0Methods; +use crate::state_transition::batch_transition::batched_transition::DocumentTransferTransition; -impl DocumentTransferTransitionV0Methods for DocumentTransferTransition { +impl DocumentBaseTransitionAccessors for DocumentTransferTransition { fn base(&self) -> &DocumentBaseTransition { match self { DocumentTransferTransition::V0(v0) => &v0.base, @@ -22,7 +23,9 @@ impl DocumentTransferTransitionV0Methods for DocumentTransferTransition { DocumentTransferTransition::V0(v0) => v0.base = base, } } +} +impl DocumentTransferTransitionV0Methods for DocumentTransferTransition { fn revision(&self) -> Revision { match self { DocumentTransferTransition::V0(v0) => v0.revision, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transition.rs similarity index 74% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transition.rs index 448dffcfea..535f79932e 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transition.rs @@ -1,74 +1,21 @@ +use platform_value::{Identifier, Value}; use std::collections::BTreeMap; - -use bincode::{Decode, Encode}; -use derive_more::From; +use derive_more::{Display, From}; #[cfg(feature = "state-transition-serde-conversion")] use serde::{Deserialize, Serialize}; - -use crate::prelude::{Identifier, IdentityNonce}; -use document_base_transition::DocumentBaseTransition; - -pub mod action_type; -pub mod document_base_transition; -pub mod document_create_transition; -pub mod document_delete_transition; -pub mod document_purchase_transition; -pub mod document_replace_transition; -pub mod document_transfer_transition; -pub mod document_update_price_transition; - -use crate::prelude::Revision; -use crate::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use derive_more::Display; -pub use document_create_transition::DocumentCreateTransition; -pub use document_delete_transition::DocumentDeleteTransition; -pub use document_replace_transition::DocumentReplaceTransition; -pub use document_transfer_transition::DocumentTransferTransition; -pub use document_purchase_transition::DocumentPurchaseTransition; -pub use document_update_price_transition::DocumentUpdatePriceTransition; -use platform_value::Value; -use crate::state_transition::documents_batch_transition::document_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods; - -use crate::state_transition::state_transitions::document::documents_batch_transition::document_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; -use crate::state_transition::state_transitions::document::documents_batch_transition::document_transition::document_replace_transition::v0::v0_methods::DocumentReplaceTransitionV0Methods; -use crate::state_transition::state_transitions::document::documents_batch_transition::document_transition::document_delete_transition::v0::v0_methods::DocumentDeleteTransitionV0Methods; -use crate::state_transition::state_transitions::document::documents_batch_transition::document_transition::document_transfer_transition::v0::v0_methods::DocumentTransferTransitionV0Methods; - -pub const PROPERTY_ACTION: &str = "$action"; - -pub trait DocumentTransitionV0Methods { - fn base(&self) -> &DocumentBaseTransition; - /// returns the value of dynamic property. The dynamic property is a property that is not specified in protocol - /// the `path` supports dot-syntax: i.e: property.internal_property - fn get_dynamic_property(&self, path: &str) -> Option<&Value>; - /// get the id - fn get_id(&self) -> Identifier; - /// get the document type - fn document_type_name(&self) -> &String; - /// get the data contract id - fn data_contract_id(&self) -> Identifier; - /// get the data of the transition if exits - fn data(&self) -> Option<&BTreeMap>; - /// get the revision of transition if exits - fn revision(&self) -> Option; - - /// get the identity contract nonce - fn identity_contract_nonce(&self) -> IdentityNonce; - #[cfg(test)] - /// Inserts the dynamic property into the document - fn insert_dynamic_property(&mut self, property_name: String, value: Value); - /// set data contract's ID - fn set_data_contract_id(&mut self, id: Identifier); - fn base_mut(&mut self) -> &mut DocumentBaseTransition; - fn data_mut(&mut self) -> Option<&mut BTreeMap>; - - // sets revision of the transition - fn set_revision(&mut self, revision: Revision); - - // sets identity contract nonce - fn set_identity_contract_nonce(&mut self, nonce: IdentityNonce); -} +use bincode::{Encode, Decode}; +use crate::prelude::{IdentityNonce, Revision}; +use crate::state_transition::batch_transition::{DocumentCreateTransition, DocumentDeleteTransition, DocumentReplaceTransition, TokenBurnTransition, TokenDestroyFrozenFundsTransition, TokenEmergencyActionTransition, TokenFreezeTransition, TokenMintTransition, TokenTransferTransition, TokenUnfreezeTransition}; +use crate::state_transition::batch_transition::batched_transition::{DocumentPurchaseTransition, DocumentTransferTransition, DocumentUpdatePriceTransition}; +use crate::state_transition::batch_transition::batched_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods; +use crate::state_transition::batch_transition::batched_transition::document_transfer_transition::v0::v0_methods::DocumentTransferTransitionV0Methods; +use crate::state_transition::batch_transition::batched_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods; +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; +use crate::state_transition::batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; +use crate::state_transition::batch_transition::document_replace_transition::v0::v0_methods::DocumentReplaceTransitionV0Methods; +use crate::state_transition::batch_transition::resolvers::v0::BatchTransitionResolversV0; #[derive(Debug, Clone, Encode, Decode, From, PartialEq, Display)] #[cfg_attr( @@ -95,15 +42,15 @@ pub enum DocumentTransition { Purchase(DocumentPurchaseTransition), } -impl DocumentTransition { - pub fn as_transition_create(&self) -> Option<&DocumentCreateTransition> { +impl BatchTransitionResolversV0 for DocumentTransition { + fn as_transition_create(&self) -> Option<&DocumentCreateTransition> { if let Self::Create(ref t) = self { Some(t) } else { None } } - pub fn as_transition_replace(&self) -> Option<&DocumentReplaceTransition> { + fn as_transition_replace(&self) -> Option<&DocumentReplaceTransition> { if let Self::Replace(ref t) = self { Some(t) } else { @@ -111,7 +58,7 @@ impl DocumentTransition { } } - pub fn as_transition_delete(&self) -> Option<&DocumentDeleteTransition> { + fn as_transition_delete(&self) -> Option<&DocumentDeleteTransition> { if let Self::Delete(ref t) = self { Some(t) } else { @@ -119,7 +66,7 @@ impl DocumentTransition { } } - pub fn as_transition_transfer(&self) -> Option<&DocumentTransferTransition> { + fn as_transition_transfer(&self) -> Option<&DocumentTransferTransition> { if let Self::Transfer(ref t) = self { Some(t) } else { @@ -127,13 +74,76 @@ impl DocumentTransition { } } - pub fn as_transition_purchase(&self) -> Option<&DocumentPurchaseTransition> { + fn as_transition_purchase(&self) -> Option<&DocumentPurchaseTransition> { if let Self::Purchase(ref t) = self { Some(t) } else { None } } + + fn as_transition_token_burn(&self) -> Option<&TokenBurnTransition> { + None + } + + fn as_transition_token_mint(&self) -> Option<&TokenMintTransition> { + None + } + + fn as_transition_token_transfer(&self) -> Option<&TokenTransferTransition> { + None + } + + fn as_transition_token_freeze(&self) -> Option<&TokenFreezeTransition> { + None + } + + fn as_transition_token_unfreeze(&self) -> Option<&TokenUnfreezeTransition> { + None + } + + fn as_transition_token_destroy_frozen_funds( + &self, + ) -> Option<&TokenDestroyFrozenFundsTransition> { + None + } + + fn as_transition_token_emergency_action(&self) -> Option<&TokenEmergencyActionTransition> { + None + } +} + +pub trait DocumentTransitionV0Methods { + fn base(&self) -> &DocumentBaseTransition; + /// returns the value of dynamic property. The dynamic property is a property that is not specified in protocol + /// the `path` supports dot-syntax: i.e: property.internal_property + fn get_dynamic_property(&self, path: &str) -> Option<&Value>; + /// get the id + fn get_id(&self) -> Identifier; + /// get the document type + fn document_type_name(&self) -> &String; + /// get the data contract id + fn data_contract_id(&self) -> Identifier; + /// get the data of the transition if exits + fn data(&self) -> Option<&BTreeMap>; + /// get the revision of transition if exits + fn revision(&self) -> Option; + + /// get the identity contract nonce + fn identity_contract_nonce(&self) -> IdentityNonce; + #[cfg(test)] + /// Inserts the dynamic property into the document + fn insert_dynamic_property(&mut self, property_name: String, value: Value); + /// set data contract's ID + fn set_data_contract_id(&mut self, id: Identifier); + fn base_mut(&mut self) -> &mut DocumentBaseTransition; + fn data_mut(&mut self) -> Option<&mut BTreeMap>; + + // sets revision of the transition + fn set_revision(&mut self, revision: Revision); + + // sets identity contract nonce + fn set_identity_contract_nonce(&mut self, nonce: IdentityNonce); } impl DocumentTransitionV0Methods for DocumentTransition { diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/action_type.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transition_action_type.rs similarity index 78% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/action_type.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transition_action_type.rs index fd7c376f7b..2fadc90838 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/action_type.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_transition_action_type.rs @@ -1,4 +1,4 @@ -use crate::state_transition::documents_batch_transition::document_transition::DocumentTransition; +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::DocumentTransition; use crate::ProtocolError; // @append-only @@ -13,11 +13,11 @@ pub enum DocumentTransitionActionType { IgnoreWhileBumpingRevision, } -pub trait TransitionActionTypeGetter { +pub trait DocumentTransitionActionTypeGetter { fn action_type(&self) -> DocumentTransitionActionType; } -impl TransitionActionTypeGetter for DocumentTransition { +impl DocumentTransitionActionTypeGetter for DocumentTransition { fn action_type(&self) -> DocumentTransitionActionType { match self { DocumentTransition::Create(_) => DocumentTransitionActionType::Create, @@ -39,6 +39,8 @@ impl TryFrom<&str> for DocumentTransitionActionType { "replace" => Ok(DocumentTransitionActionType::Replace), "delete" => Ok(DocumentTransitionActionType::Delete), "transfer" => Ok(DocumentTransitionActionType::Transfer), + "updatePrice" | "update_price" => Ok(DocumentTransitionActionType::UpdatePrice), + "purchase" => Ok(DocumentTransitionActionType::Purchase), action_type => Err(ProtocolError::Generic(format!( "unknown action type {action_type}" ))), diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/from_document.rs similarity index 85% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/from_document.rs index 4f26ff90bd..39e2877d60 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/from_document.rs @@ -4,8 +4,8 @@ use crate::document::{Document}; use crate::fee::Credits; use crate::prelude::IdentityNonce; use crate::ProtocolError; -use crate::state_transition::documents_batch_transition::document_transition::DocumentUpdatePriceTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_update_price_transition::DocumentUpdatePriceTransitionV0; +use crate::state_transition::batch_transition::batched_transition::DocumentUpdatePriceTransition; +use crate::state_transition::batch_transition::batched_transition::document_update_price_transition::DocumentUpdatePriceTransitionV0; impl DocumentUpdatePriceTransition { pub fn from_document( diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/mod.rs similarity index 100% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/mod.rs diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0/from_document.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/v0/from_document.rs similarity index 82% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0/from_document.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/v0/from_document.rs index 570a3fb561..2a6c778587 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0/from_document.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/v0/from_document.rs @@ -5,8 +5,8 @@ use crate::document::errors::DocumentError; use crate::fee::Credits; use crate::prelude::IdentityNonce; use crate::ProtocolError; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_update_price_transition::DocumentUpdatePriceTransitionV0; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::batched_transition::document_update_price_transition::DocumentUpdatePriceTransitionV0; impl DocumentUpdatePriceTransitionV0 { pub(crate) fn from_document( diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/v0/mod.rs similarity index 99% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/v0/mod.rs index 8e264bba97..fbca7eb677 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/v0/mod.rs @@ -11,7 +11,7 @@ use serde::{Deserialize, Serialize}; use crate::fee::Credits; pub use super::super::document_base_transition::IDENTIFIER_FIELDS; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; mod property_names { pub const REVISION: &str = "$revision"; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/v0/v0_methods.rs similarity index 62% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/v0/v0_methods.rs index 74b27a3589..aa96cdc5cc 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/v0/v0_methods.rs @@ -1,19 +1,10 @@ use crate::fee::Credits; use crate::prelude::Revision; +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::batched_transition::document_update_price_transition::DocumentUpdatePriceTransitionV0; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; - -use crate::state_transition::documents_batch_transition::document_transition::document_update_price_transition::DocumentUpdatePriceTransitionV0; - -pub trait DocumentUpdatePriceTransitionV0Methods { - /// Returns a reference to the `base` field of the `DocumentUpdatePriceTransitionV0`. - fn base(&self) -> &DocumentBaseTransition; - /// Returns a mut reference to the `base` field of the `DocumentUpdatePriceTransitionV0`. - fn base_mut(&mut self) -> &mut DocumentBaseTransition; - - /// Sets the value of the `base` field in the `DocumentUpdatePriceTransitionV0`. - fn set_base(&mut self, base: DocumentBaseTransition); - +pub trait DocumentUpdatePriceTransitionV0Methods: DocumentBaseTransitionAccessors { /// Returns a reference to the `revision` field of the `DocumentUpdatePriceTransitionV0`. fn revision(&self) -> Revision; @@ -27,7 +18,7 @@ pub trait DocumentUpdatePriceTransitionV0Methods { fn set_price(&mut self, price: Credits); } -impl DocumentUpdatePriceTransitionV0Methods for DocumentUpdatePriceTransitionV0 { +impl DocumentBaseTransitionAccessors for DocumentUpdatePriceTransitionV0 { fn base(&self) -> &DocumentBaseTransition { &self.base } @@ -39,7 +30,9 @@ impl DocumentUpdatePriceTransitionV0Methods for DocumentUpdatePriceTransitionV0 fn set_base(&mut self, base: DocumentBaseTransition) { self.base = base; } +} +impl DocumentUpdatePriceTransitionV0Methods for DocumentUpdatePriceTransitionV0 { fn revision(&self) -> Revision { self.revision } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/v0_methods.rs similarity index 68% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/v0_methods.rs index 3b605d7431..bc97724dfc 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/document_update_price_transition/v0_methods.rs @@ -1,10 +1,11 @@ use crate::fee::Credits; use crate::prelude::Revision; -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_transition::DocumentUpdatePriceTransition; +use crate::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use crate::state_transition::batch_transition::batched_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods; +use crate::state_transition::batch_transition::batched_transition::DocumentUpdatePriceTransition; -impl DocumentUpdatePriceTransitionV0Methods for DocumentUpdatePriceTransition { +impl DocumentBaseTransitionAccessors for DocumentUpdatePriceTransition { fn base(&self) -> &DocumentBaseTransition { match self { DocumentUpdatePriceTransition::V0(v0) => &v0.base, @@ -22,7 +23,9 @@ impl DocumentUpdatePriceTransitionV0Methods for DocumentUpdatePriceTransition { DocumentUpdatePriceTransition::V0(v0) => v0.base = base, } } +} +impl DocumentUpdatePriceTransitionV0Methods for DocumentUpdatePriceTransition { fn revision(&self) -> Revision { match self { DocumentUpdatePriceTransition::V0(v0) => v0.revision, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/mod.rs new file mode 100644 index 0000000000..cbd28a7d90 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/mod.rs @@ -0,0 +1,140 @@ +use bincode::{Decode, Encode}; +use derive_more::From; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; + +pub mod document_base_transition; +pub mod document_create_transition; +pub mod document_delete_transition; +pub mod document_purchase_transition; +pub mod document_replace_transition; +pub mod document_transfer_transition; +pub mod document_transition; +pub mod document_transition_action_type; +pub mod document_update_price_transition; +pub mod multi_party_action; +mod resolvers; +pub mod token_base_transition; +pub mod token_burn_transition; +pub mod token_destroy_frozen_funds_transition; +pub mod token_emergency_action_transition; +pub mod token_freeze_transition; +pub mod token_mint_transition; +pub mod token_transfer_transition; +pub mod token_transition; +pub mod token_transition_action_type; +pub mod token_unfreeze_transition; + +use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::batched_transition::document_transition::DocumentTransitionV0Methods; +use crate::state_transition::batch_transition::batched_transition::token_transition::TokenTransitionV0Methods; +use derive_more::Display; +pub use document_create_transition::DocumentCreateTransition; +pub use document_delete_transition::DocumentDeleteTransition; +pub use document_purchase_transition::DocumentPurchaseTransition; +pub use document_replace_transition::DocumentReplaceTransition; +pub use document_transfer_transition::DocumentTransferTransition; +use document_transition::DocumentTransition; +pub use document_update_price_transition::DocumentUpdatePriceTransition; +use platform_value::Identifier; +use token_transition::TokenTransition; + +pub const PROPERTY_ACTION: &str = "$action"; + +#[derive(Debug, Clone, Encode, Decode, From, PartialEq, Display)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize) +)] +pub enum BatchedTransition { + #[display("DocumentTransition({})", "_0")] + Document(DocumentTransition), + #[display("TokenTransition({})", "_0")] + Token(TokenTransition), +} + +#[derive(Debug, From, Clone, Copy, PartialEq, Display)] +pub enum BatchedTransitionRef<'a> { + #[display("DocumentTransition({})", "_0")] + Document(&'a DocumentTransition), + #[display("TokenTransition({})", "_0")] + Token(&'a TokenTransition), +} + +#[derive(Debug, From, PartialEq, Display)] +pub enum BatchedTransitionMutRef<'a> { + #[display("DocumentTransition({})", "_0")] + Document(&'a mut DocumentTransition), + #[display("TokenTransition({})", "_0")] + Token(&'a mut TokenTransition), +} + +impl<'a> BatchedTransitionRef<'a> { + pub fn to_owned_transition(&self) -> BatchedTransition { + match self { + BatchedTransitionRef::Document(doc_ref) => { + BatchedTransition::Document((*doc_ref).clone()) + } + BatchedTransitionRef::Token(tok_ref) => BatchedTransition::Token((*tok_ref).clone()), + } + } + + pub fn identity_contract_nonce(&self) -> IdentityNonce { + match self { + BatchedTransitionRef::Document(document_transition) => { + document_transition.identity_contract_nonce() + } + BatchedTransitionRef::Token(token_transition) => { + token_transition.identity_contract_nonce() + } + } + } + + pub fn data_contract_id(&self) -> Identifier { + match self { + BatchedTransitionRef::Document(document_transition) => { + document_transition.data_contract_id() + } + BatchedTransitionRef::Token(token_transition) => token_transition.data_contract_id(), + } + } +} + +impl BatchedTransition { + pub fn borrow_as_ref(&self) -> BatchedTransitionRef { + match self { + BatchedTransition::Document(doc) => { + // Create a reference to a DocumentTransition + BatchedTransitionRef::Document(doc) + } + BatchedTransition::Token(tok) => { + // Create a reference to a TokenTransition + BatchedTransitionRef::Token(tok) + } + } + } + + pub fn borrow_as_mut(&mut self) -> BatchedTransitionMutRef { + match self { + BatchedTransition::Document(doc) => { + // Create a reference to a DocumentTransition + BatchedTransitionMutRef::Document(doc) + } + BatchedTransition::Token(tok) => { + // Create a reference to a TokenTransition + BatchedTransitionMutRef::Token(tok) + } + } + } + + pub fn set_identity_contract_nonce(&mut self, identity_contract_nonce: IdentityNonce) { + match self { + BatchedTransition::Document(document_transition) => { + document_transition.set_identity_contract_nonce(identity_contract_nonce) + } + BatchedTransition::Token(token_transition) => { + token_transition.set_identity_contract_nonce(identity_contract_nonce) + } + } + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/multi_party_action.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/multi_party_action.rs new file mode 100644 index 0000000000..52f7cf4e7f --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/multi_party_action.rs @@ -0,0 +1,5 @@ +use platform_value::Identifier; + +pub trait AllowedAsMultiPartyAction { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier; +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/resolvers.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/resolvers.rs new file mode 100644 index 0000000000..bf1d555544 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/resolvers.rs @@ -0,0 +1,185 @@ +use crate::state_transition::batch_transition::batched_transition::{ + BatchedTransition, BatchedTransitionRef, DocumentPurchaseTransition, DocumentTransferTransition, +}; +use crate::state_transition::batch_transition::resolvers::v0::BatchTransitionResolversV0; +use crate::state_transition::batch_transition::{ + DocumentCreateTransition, DocumentDeleteTransition, DocumentReplaceTransition, + TokenBurnTransition, TokenDestroyFrozenFundsTransition, TokenEmergencyActionTransition, + TokenFreezeTransition, TokenMintTransition, TokenTransferTransition, TokenUnfreezeTransition, +}; + +impl BatchTransitionResolversV0 for BatchedTransition { + fn as_transition_create(&self) -> Option<&DocumentCreateTransition> { + match self { + BatchedTransition::Document(document) => document.as_transition_create(), + BatchedTransition::Token(_) => None, + } + } + + fn as_transition_replace(&self) -> Option<&DocumentReplaceTransition> { + match self { + BatchedTransition::Document(document) => document.as_transition_replace(), + BatchedTransition::Token(_) => None, + } + } + + fn as_transition_delete(&self) -> Option<&DocumentDeleteTransition> { + match self { + BatchedTransition::Document(document) => document.as_transition_delete(), + BatchedTransition::Token(_) => None, + } + } + + fn as_transition_transfer(&self) -> Option<&DocumentTransferTransition> { + match self { + BatchedTransition::Document(document) => document.as_transition_transfer(), + BatchedTransition::Token(_) => None, + } + } + + fn as_transition_purchase(&self) -> Option<&DocumentPurchaseTransition> { + match self { + BatchedTransition::Document(document) => document.as_transition_purchase(), + BatchedTransition::Token(_) => None, + } + } + + fn as_transition_token_burn(&self) -> Option<&TokenBurnTransition> { + match self { + BatchedTransition::Document(_) => None, + BatchedTransition::Token(token) => token.as_transition_token_burn(), + } + } + + fn as_transition_token_mint(&self) -> Option<&TokenMintTransition> { + match self { + BatchedTransition::Document(_) => None, + BatchedTransition::Token(token) => token.as_transition_token_mint(), + } + } + + fn as_transition_token_transfer(&self) -> Option<&TokenTransferTransition> { + match self { + BatchedTransition::Document(_) => None, + BatchedTransition::Token(token) => token.as_transition_token_transfer(), + } + } + + fn as_transition_token_freeze(&self) -> Option<&TokenFreezeTransition> { + match self { + BatchedTransition::Document(_) => None, + BatchedTransition::Token(token) => token.as_transition_token_freeze(), + } + } + + fn as_transition_token_unfreeze(&self) -> Option<&TokenUnfreezeTransition> { + match self { + BatchedTransition::Document(_) => None, + BatchedTransition::Token(token) => token.as_transition_token_unfreeze(), + } + } + + fn as_transition_token_destroy_frozen_funds( + &self, + ) -> Option<&TokenDestroyFrozenFundsTransition> { + match self { + BatchedTransition::Document(_) => None, + BatchedTransition::Token(token) => token.as_transition_token_destroy_frozen_funds(), + } + } + + fn as_transition_token_emergency_action(&self) -> Option<&TokenEmergencyActionTransition> { + match self { + BatchedTransition::Document(_) => None, + BatchedTransition::Token(token) => token.as_transition_token_emergency_action(), + } + } +} + +impl<'a> BatchTransitionResolversV0 for BatchedTransitionRef<'a> { + fn as_transition_create(&self) -> Option<&DocumentCreateTransition> { + match self { + BatchedTransitionRef::Document(document) => document.as_transition_create(), + BatchedTransitionRef::Token(_) => None, + } + } + + fn as_transition_replace(&self) -> Option<&DocumentReplaceTransition> { + match self { + BatchedTransitionRef::Document(document) => document.as_transition_replace(), + BatchedTransitionRef::Token(_) => None, + } + } + + fn as_transition_delete(&self) -> Option<&DocumentDeleteTransition> { + match self { + BatchedTransitionRef::Document(document) => document.as_transition_delete(), + BatchedTransitionRef::Token(_) => None, + } + } + + fn as_transition_transfer(&self) -> Option<&DocumentTransferTransition> { + match self { + BatchedTransitionRef::Document(document) => document.as_transition_transfer(), + BatchedTransitionRef::Token(_) => None, + } + } + + fn as_transition_purchase(&self) -> Option<&DocumentPurchaseTransition> { + match self { + BatchedTransitionRef::Document(document) => document.as_transition_purchase(), + BatchedTransitionRef::Token(_) => None, + } + } + + fn as_transition_token_burn(&self) -> Option<&TokenBurnTransition> { + match self { + BatchedTransitionRef::Document(_) => None, + BatchedTransitionRef::Token(token) => token.as_transition_token_burn(), + } + } + + fn as_transition_token_mint(&self) -> Option<&TokenMintTransition> { + match self { + BatchedTransitionRef::Document(_) => None, + BatchedTransitionRef::Token(token) => token.as_transition_token_mint(), + } + } + + fn as_transition_token_transfer(&self) -> Option<&TokenTransferTransition> { + match self { + BatchedTransitionRef::Document(_) => None, + BatchedTransitionRef::Token(token) => token.as_transition_token_transfer(), + } + } + + fn as_transition_token_freeze(&self) -> Option<&TokenFreezeTransition> { + match self { + BatchedTransitionRef::Document(_) => None, + BatchedTransitionRef::Token(token) => token.as_transition_token_freeze(), + } + } + + fn as_transition_token_unfreeze(&self) -> Option<&TokenUnfreezeTransition> { + match self { + BatchedTransitionRef::Document(_) => None, + BatchedTransitionRef::Token(token) => token.as_transition_token_unfreeze(), + } + } + + fn as_transition_token_destroy_frozen_funds( + &self, + ) -> Option<&TokenDestroyFrozenFundsTransition> { + match self { + BatchedTransitionRef::Document(_) => None, + BatchedTransitionRef::Token(token) => token.as_transition_token_destroy_frozen_funds(), + } + } + + fn as_transition_token_emergency_action(&self) -> Option<&TokenEmergencyActionTransition> { + match self { + BatchedTransitionRef::Document(_) => None, + BatchedTransitionRef::Token(token) => token.as_transition_token_emergency_action(), + } + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/fields.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/fields.rs new file mode 100644 index 0000000000..02391e0be6 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/fields.rs @@ -0,0 +1,12 @@ +pub(in crate::state_transition::state_transitions::document::batch_transition) mod property_names { + pub const DATA_CONTRACT_ID: &str = "$dataContractId"; + pub const TOKEN_CONTRACT_POSITION: &str = "$tokenContractPosition"; + pub const TOKEN_ID: &str = "$tokenId"; + pub const GROUP_CONTRACT_POSITION: &str = "$groupContractPosition"; + pub const GROUP_ACTION_ID: &str = "$groupActionId"; + pub const GROUP_ACTION_IS_PROPOSER: &str = "$groupActionIsProposer"; + pub const ACTION: &str = "$action"; + pub const IDENTITY_CONTRACT_NONCE: &str = "$identityContractNonce"; +} + +pub const IDENTIFIER_FIELDS: [&str; 1] = [property_names::DATA_CONTRACT_ID]; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/mod.rs new file mode 100644 index 0000000000..4b4602e72d --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/mod.rs @@ -0,0 +1,106 @@ +mod fields; +pub mod token_base_transition_accessors; +pub mod v0; +mod v0_methods; + +#[cfg(any( + feature = "state-transition-value-conversion", + feature = "state-transition-json-conversion" +))] +use crate::data_contract::DataContract; +use crate::state_transition::batch_transition::document_base_transition::v0::DocumentTransitionObjectLike; +use crate::state_transition::batch_transition::token_base_transition::v0::TokenBaseTransitionV0; +#[cfg(any( + feature = "state-transition-value-conversion", + feature = "state-transition-json-conversion" +))] +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use derive_more::{Display, From}; +pub use fields::*; +#[cfg(any( + feature = "state-transition-value-conversion", + feature = "state-transition-json-conversion" +))] +use platform_value::Value; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +#[cfg(feature = "state-transition-json-conversion")] +use serde_json::Value as JsonValue; +#[cfg(feature = "state-transition-value-conversion")] +use std::collections::BTreeMap; + +#[derive(Debug, Clone, Encode, Decode, PartialEq, Display, From)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize) +)] +pub enum TokenBaseTransition { + #[display("V0({})", "_0")] + V0(TokenBaseTransitionV0), +} + +impl Default for TokenBaseTransition { + fn default() -> Self { + TokenBaseTransition::V0(TokenBaseTransitionV0::default()) // since only v0 + } +} + +impl DocumentTransitionObjectLike for TokenBaseTransition { + #[cfg(feature = "state-transition-json-conversion")] + fn from_json_object( + json_str: JsonValue, + data_contract: DataContract, + ) -> Result + where + Self: Sized, + { + let value: Value = json_str.into(); + Self::from_object(value, data_contract) + } + #[cfg(feature = "state-transition-value-conversion")] + fn from_object( + raw_transition: Value, + _data_contract: DataContract, + ) -> Result + where + Self: Sized, + { + platform_value::from_value(raw_transition).map_err(ProtocolError::ValueError) + } + #[cfg(feature = "state-transition-value-conversion")] + fn from_value_map( + map: BTreeMap, + _data_contract: DataContract, + ) -> Result + where + Self: Sized, + { + let value: Value = map.into(); + platform_value::from_value(value).map_err(ProtocolError::ValueError) + } + + #[cfg(feature = "state-transition-value-conversion")] + fn to_object(&self) -> Result { + platform_value::to_value(self).map_err(ProtocolError::ValueError) + } + #[cfg(feature = "state-transition-value-conversion")] + fn to_value_map(&self) -> Result, ProtocolError> { + let value = platform_value::to_value(self)?; + value + .into_btree_string_map() + .map_err(ProtocolError::ValueError) + } + + #[cfg(feature = "state-transition-json-conversion")] + fn to_json(&self) -> Result { + self.to_object()? + .try_into() + .map_err(ProtocolError::ValueError) + } + + #[cfg(feature = "state-transition-value-conversion")] + fn to_cleaned_object(&self) -> Result { + Ok(self.to_value_map()?.into()) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/token_base_transition_accessors.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/token_base_transition_accessors.rs new file mode 100644 index 0000000000..2813dc755d --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/token_base_transition_accessors.rs @@ -0,0 +1,16 @@ +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; + +pub trait TokenBaseTransitionAccessors { + /// Returns a reference to the `base` field of the `DocumentCreateTransitionV0`. + fn base(&self) -> &TokenBaseTransition; + + /// Returns a mut reference to the `base` field of the `DocumentCreateTransitionV0`. + fn base_mut(&mut self) -> &mut TokenBaseTransition; + + /// Sets the value of the `base` field in the `DocumentCreateTransitionV0`. + /// + /// # Arguments + /// + /// * `base` - A value of type `DocumentBaseTransition` to set. + fn set_base(&mut self, base: TokenBaseTransition); +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/v0/mod.rs new file mode 100644 index 0000000000..c3b8595dcc --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/v0/mod.rs @@ -0,0 +1,117 @@ +pub mod v0_methods; + +#[cfg(feature = "state-transition-value-conversion")] +use std::collections::BTreeMap; + +use bincode::{Decode, Encode}; +use derive_more::Display; + +#[cfg(feature = "state-transition-value-conversion")] +use platform_value::btreemap_extensions::BTreeValueRemoveFromMapHelper; +#[cfg(feature = "state-transition-value-conversion")] +use platform_value::Value; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; + +#[cfg(feature = "state-transition-value-conversion")] +use crate::data_contract::accessors::v0::DataContractV0Getters; +#[cfg(feature = "state-transition-value-conversion")] +use crate::data_contract::accessors::v1::DataContractV1Getters; +use crate::group::GroupStateTransitionInfo; +use crate::identifier::Identifier; +use crate::prelude::IdentityNonce; +#[cfg(feature = "state-transition-value-conversion")] +use crate::state_transition::batch_transition::token_base_transition::property_names; +#[cfg(feature = "state-transition-value-conversion")] +use crate::tokens::errors::TokenError; +#[cfg(any( + feature = "state-transition-json-conversion", + feature = "state-transition-value-conversion" +))] +use crate::{data_contract::DataContract, errors::ProtocolError}; + +#[derive(Debug, Clone, Encode, Decode, Default, PartialEq, Display)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(rename_all = "camelCase") +)] +#[display( + "ID: {}, Type: {}, Contract ID: {}", + "id", + "token_id", + "data_contract_id" +)] +pub struct TokenBaseTransitionV0 { + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "$identity-contract-nonce") + )] + pub identity_contract_nonce: IdentityNonce, + /// ID of the token within the contract + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "$tokenContractPosition") + )] + pub token_contract_position: u16, + /// Data contract ID generated from the data contract's `owner_id` and `entropy` + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "$dataContractId") + )] + pub data_contract_id: Identifier, + /// Token ID generated from the data contract ID and the token position + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "$tokenId") + )] + pub token_id: Identifier, + /// Using group multi party rules for authentication + #[cfg_attr(feature = "state-transition-serde-conversion", serde(flatten))] + pub using_group_info: Option, +} + +impl TokenBaseTransitionV0 { + #[cfg(feature = "state-transition-value-conversion")] + pub fn from_value_map_consume( + map: &mut BTreeMap, + data_contract: DataContract, + identity_contract_nonce: IdentityNonce, + ) -> Result { + let token_contract_position = map + .remove_integer(property_names::TOKEN_CONTRACT_POSITION) + .map_err(ProtocolError::ValueError)?; + Ok(TokenBaseTransitionV0 { + identity_contract_nonce, + token_contract_position, + data_contract_id: Identifier::new( + map.remove_optional_hash256_bytes(property_names::DATA_CONTRACT_ID) + .map_err(ProtocolError::ValueError)? + .unwrap_or(data_contract.id().to_buffer()), + ), + token_id: map + .remove_optional_hash256_bytes(property_names::TOKEN_ID) + .map_err(ProtocolError::ValueError)? + .map(Identifier::new) + .unwrap_or(data_contract.token_id(token_contract_position).ok_or( + ProtocolError::Token(TokenError::TokenNotFoundAtPositionError.into()), + )?), + using_group_info: map + .remove_optional_integer(property_names::GROUP_CONTRACT_POSITION) + .map_err(ProtocolError::ValueError)? + .map(|group_contract_position| { + Ok::(GroupStateTransitionInfo { + group_contract_position, + action_id: map + .remove_hash256_bytes(property_names::GROUP_ACTION_ID) + .map_err(ProtocolError::ValueError)? + .into(), + action_is_proposer: map + .remove_bool(property_names::GROUP_ACTION_IS_PROPOSER) + .map_err(ProtocolError::ValueError)?, + }) + }) + .transpose()?, + }) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/v0/v0_methods.rs new file mode 100644 index 0000000000..40369689bd --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/v0/v0_methods.rs @@ -0,0 +1,102 @@ +use crate::data_contract::GroupContractPosition; +use crate::group::GroupStateTransitionInfo; +use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::token_base_transition::v0::TokenBaseTransitionV0; +use crate::tokens::calculate_token_id; +use platform_value::Identifier; + +/// A trait that contains getter and setter methods for `TokenBaseTransitionV0` +pub trait TokenBaseTransitionV0Methods { + /// Returns the document type name. + fn token_contract_position(&self) -> u16; + + /// Sets the token id. + fn set_token_contract_position(&mut self, token_id: u16); + + /// Returns the data contract ID. + fn data_contract_id(&self) -> Identifier; + fn data_contract_id_ref(&self) -> &Identifier; + + /// Calculates the token ID. + fn calculate_token_id(&self) -> Identifier { + calculate_token_id( + self.data_contract_id().as_bytes(), + self.token_contract_position(), + ) + .into() + } + + /// Returns the token ID. + fn token_id(&self) -> Identifier; + fn token_id_ref(&self) -> &Identifier; + + fn set_token_id(&mut self, token_id: Identifier); + + /// Returns the group ID. + fn group_position(&self) -> Option; + + fn using_group_info(&self) -> Option; + + fn set_using_group_info(&mut self, group_info: Option); + + /// Sets the data contract ID. + fn set_data_contract_id(&mut self, data_contract_id: Identifier); + fn identity_contract_nonce(&self) -> IdentityNonce; + fn set_identity_contract_nonce(&mut self, identity_contract_nonce: IdentityNonce); +} + +impl TokenBaseTransitionV0Methods for TokenBaseTransitionV0 { + fn token_contract_position(&self) -> u16 { + self.token_contract_position + } + + fn set_token_contract_position(&mut self, token_contract_position: u16) { + self.token_contract_position = token_contract_position; + } + + fn data_contract_id(&self) -> Identifier { + self.data_contract_id + } + + fn data_contract_id_ref(&self) -> &Identifier { + &self.data_contract_id + } + + fn token_id(&self) -> Identifier { + self.token_id + } + + fn token_id_ref(&self) -> &Identifier { + &self.token_id + } + + fn set_data_contract_id(&mut self, data_contract_id: Identifier) { + self.data_contract_id = data_contract_id; + } + + fn set_token_id(&mut self, token_id: Identifier) { + self.token_id = token_id; + } + + fn identity_contract_nonce(&self) -> IdentityNonce { + self.identity_contract_nonce + } + + fn set_identity_contract_nonce(&mut self, identity_contract_nonce: IdentityNonce) { + self.identity_contract_nonce = identity_contract_nonce; + } + + fn group_position(&self) -> Option { + self.using_group_info + .as_ref() + .map(|info| info.group_contract_position) + } + + fn set_using_group_info(&mut self, group_info: Option) { + self.using_group_info = group_info; + } + + fn using_group_info(&self) -> Option { + self.using_group_info + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/v0_methods.rs new file mode 100644 index 0000000000..5eeffbf6ff --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_base_transition/v0_methods.rs @@ -0,0 +1,86 @@ +use crate::data_contract::GroupContractPosition; +use crate::group::GroupStateTransitionInfo; +use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use platform_value::Identifier; + +impl TokenBaseTransitionV0Methods for TokenBaseTransition { + fn token_contract_position(&self) -> u16 { + match self { + TokenBaseTransition::V0(v0) => v0.token_contract_position(), + } + } + + fn set_token_contract_position(&mut self, token_id: u16) { + match self { + TokenBaseTransition::V0(v0) => v0.set_token_contract_position(token_id), + } + } + + fn data_contract_id(&self) -> Identifier { + match self { + TokenBaseTransition::V0(v0) => v0.data_contract_id(), + } + } + + fn data_contract_id_ref(&self) -> &Identifier { + match self { + TokenBaseTransition::V0(v0) => v0.data_contract_id_ref(), + } + } + + fn token_id(&self) -> Identifier { + match self { + TokenBaseTransition::V0(v0) => v0.token_id(), + } + } + + fn token_id_ref(&self) -> &Identifier { + match self { + TokenBaseTransition::V0(v0) => v0.token_id_ref(), + } + } + + fn set_token_id(&mut self, token_id: Identifier) { + match self { + TokenBaseTransition::V0(v0) => v0.set_token_id(token_id), + } + } + + fn group_position(&self) -> Option { + match self { + TokenBaseTransition::V0(v0) => v0.group_position(), + } + } + + fn using_group_info(&self) -> Option { + match self { + TokenBaseTransition::V0(v0) => v0.using_group_info(), + } + } + + fn set_using_group_info(&mut self, group_info: Option) { + match self { + TokenBaseTransition::V0(v0) => v0.set_using_group_info(group_info), + } + } + + fn set_data_contract_id(&mut self, data_contract_id: Identifier) { + match self { + TokenBaseTransition::V0(v0) => v0.set_data_contract_id(data_contract_id), + } + } + + fn identity_contract_nonce(&self) -> IdentityNonce { + match self { + TokenBaseTransition::V0(v0) => v0.identity_contract_nonce, + } + } + + fn set_identity_contract_nonce(&mut self, identity_contract_nonce: IdentityNonce) { + match self { + TokenBaseTransition::V0(v0) => v0.identity_contract_nonce = identity_contract_nonce, + } + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/mod.rs new file mode 100644 index 0000000000..5c07e9a97d --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/mod.rs @@ -0,0 +1,24 @@ +pub mod v0; +mod v0_methods; + +use bincode::{Decode, Encode}; +use derive_more::{Display, From}; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +pub use v0::TokenBurnTransitionV0; + +#[derive(Debug, Clone, Encode, Decode, PartialEq, Display, From)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize) +)] +pub enum TokenBurnTransition { + #[display("V0({})", "_0")] + V0(TokenBurnTransitionV0), +} + +impl Default for TokenBurnTransition { + fn default() -> Self { + TokenBurnTransition::V0(TokenBurnTransitionV0::default()) // since only v0 + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0/mod.rs new file mode 100644 index 0000000000..dc07a53827 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0/mod.rs @@ -0,0 +1,38 @@ +pub mod v0_methods; + +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use bincode::{Decode, Encode}; +use derive_more::Display; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; + +mod property_names { + pub const AMOUNT: &str = "$amount"; +} +/// The Identifier fields in [`TokenBurnTransition`] +pub use super::super::document_base_transition::IDENTIFIER_FIELDS; + +#[derive(Debug, Clone, Default, Encode, Decode, PartialEq, Display)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(rename_all = "camelCase") +)] +#[display("Base: {base}, Amount: {burn_amount}")] +pub struct TokenBurnTransitionV0 { + /// Document Base Transition + #[cfg_attr(feature = "state-transition-serde-conversion", serde(flatten))] + pub base: TokenBaseTransition, + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "burnAmount") + )] + /// How much should we burn + pub burn_amount: u64, + /// The public note + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "publicNote") + )] + pub public_note: Option, +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0/v0_methods.rs new file mode 100644 index 0000000000..8cdcd6e153 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0/v0_methods.rs @@ -0,0 +1,76 @@ +use platform_value::Identifier; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use crate::state_transition::batch_transition::token_burn_transition::TokenBurnTransitionV0; +use crate::util::hash::hash_double; + +impl TokenBaseTransitionAccessors for TokenBurnTransitionV0 { + fn base(&self) -> &TokenBaseTransition { + &self.base + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + &mut self.base + } + + fn set_base(&mut self, base: TokenBaseTransition) { + self.base = base; + } +} + +pub trait TokenBurnTransitionV0Methods: + TokenBaseTransitionAccessors + AllowedAsMultiPartyAction +{ + fn burn_amount(&self) -> u64; + + fn set_burn_amount(&mut self, amount: u64); + + /// Returns the `public_note` field of the `TokenBurnTransitionV0`. + fn public_note(&self) -> Option<&String>; + + /// Returns the owned `public_note` field of the `TokenBurnTransitionV0`. + fn public_note_owned(self) -> Option; + + /// Sets the `public_note` field in the `TokenBurnTransitionV0`. + fn set_public_note(&mut self, public_note: Option); +} + +impl TokenBurnTransitionV0Methods for TokenBurnTransitionV0 { + fn burn_amount(&self) -> u64 { + self.burn_amount + } + + fn set_burn_amount(&mut self, amount: u64) { + self.burn_amount = amount; + } + + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } +} + +impl AllowedAsMultiPartyAction for TokenBurnTransitionV0 { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + let TokenBurnTransitionV0 { + base, burn_amount, .. + } = self; + + let mut bytes = b"action_token_burn".to_vec(); + bytes.extend_from_slice(base.token_id().as_bytes()); + bytes.extend_from_slice(owner_id.as_bytes()); + bytes.extend_from_slice(&base.identity_contract_nonce().to_be_bytes()); + bytes.extend_from_slice(&burn_amount.to_be_bytes()); + + hash_double(bytes).into() + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0_methods.rs new file mode 100644 index 0000000000..060ac9c70b --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_burn_transition/v0_methods.rs @@ -0,0 +1,66 @@ +use platform_value::Identifier; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_burn_transition::TokenBurnTransition; +use crate::state_transition::batch_transition::token_burn_transition::v0::v0_methods::TokenBurnTransitionV0Methods; + +impl TokenBaseTransitionAccessors for TokenBurnTransition { + fn base(&self) -> &TokenBaseTransition { + match self { + TokenBurnTransition::V0(v0) => &v0.base, + } + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + match self { + TokenBurnTransition::V0(v0) => &mut v0.base, + } + } + + fn set_base(&mut self, base: TokenBaseTransition) { + match self { + TokenBurnTransition::V0(v0) => v0.base = base, + } + } +} + +impl TokenBurnTransitionV0Methods for TokenBurnTransition { + fn burn_amount(&self) -> u64 { + match self { + TokenBurnTransition::V0(v0) => v0.burn_amount(), + } + } + + fn set_burn_amount(&mut self, burn_amount: u64) { + match self { + TokenBurnTransition::V0(v0) => v0.set_burn_amount(burn_amount), + } + } + + fn public_note(&self) -> Option<&String> { + match self { + TokenBurnTransition::V0(v0) => v0.public_note(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenBurnTransition::V0(v0) => v0.public_note_owned(), + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenBurnTransition::V0(v0) => v0.set_public_note(public_note), + } + } +} + +impl AllowedAsMultiPartyAction for TokenBurnTransition { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + match self { + TokenBurnTransition::V0(v0) => v0.calculate_action_id(owner_id), + } + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/mod.rs new file mode 100644 index 0000000000..5d1cd01d77 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/mod.rs @@ -0,0 +1,25 @@ +pub mod v0; +mod v0_methods; + +use bincode::{Decode, Encode}; +use derive_more::{Display, From}; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +pub use v0::TokenDestroyFrozenFundsTransitionV0; + +#[derive(Debug, Clone, Encode, Decode, PartialEq, Display, From)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize) +)] +pub enum TokenDestroyFrozenFundsTransition { + #[display("V0({})", "_0")] + V0(TokenDestroyFrozenFundsTransitionV0), +} + +impl Default for TokenDestroyFrozenFundsTransition { + fn default() -> Self { + TokenDestroyFrozenFundsTransition::V0(TokenDestroyFrozenFundsTransitionV0::default()) + // since only v0 + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0/mod.rs new file mode 100644 index 0000000000..251ff82191 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0/mod.rs @@ -0,0 +1,25 @@ +pub mod v0_methods; + +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use bincode::{Decode, Encode}; +use derive_more::Display; +use platform_value::Identifier; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Default, Encode, Decode, PartialEq, Display)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(rename_all = "camelCase") +)] +#[display("Base: {base}, Destroyed Account Identity ID: {frozen_identity_id}")] +pub struct TokenDestroyFrozenFundsTransitionV0 { + /// Document Base Transition + #[cfg_attr(feature = "state-transition-serde-conversion", serde(flatten))] + pub base: TokenBaseTransition, + /// The identity id of the account whose balance should be destroyed + pub frozen_identity_id: Identifier, + /// The public note + pub public_note: Option, +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0/v0_methods.rs new file mode 100644 index 0000000000..ef6015a341 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0/v0_methods.rs @@ -0,0 +1,78 @@ +use platform_value::Identifier; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use crate::state_transition::batch_transition::token_destroy_frozen_funds_transition::TokenDestroyFrozenFundsTransitionV0; +use crate::state_transition::batch_transition::TokenDestroyFrozenFundsTransition; + +impl TokenBaseTransitionAccessors for TokenDestroyFrozenFundsTransitionV0 { + fn base(&self) -> &TokenBaseTransition { + &self.base + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + &mut self.base + } + + fn set_base(&mut self, base: TokenBaseTransition) { + self.base = base; + } +} + +pub trait TokenDestroyFrozenFundsTransitionV0Methods: + TokenBaseTransitionAccessors + AllowedAsMultiPartyAction +{ + /// Returns the `public_note` field of the `TokenDestroyFrozenFundsTransitionV0`. + fn public_note(&self) -> Option<&String>; + + /// Returns the owned `public_note` field of the `TokenDestroyFrozenFundsTransitionV0`. + fn public_note_owned(self) -> Option; + + /// Sets the `public_note` field in the `TokenDestroyFrozenFundsTransitionV0`. + fn set_public_note(&mut self, public_note: Option); + + /// Returns the `frozen_identity_id` field of the `TokenFreezeTransitionV0`. + fn frozen_identity_id(&self) -> Identifier; + + /// Sets the value of the `frozen_identity_id` field in the `TokenFreezeTransitionV0`. + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier); +} + +impl TokenDestroyFrozenFundsTransitionV0Methods for TokenDestroyFrozenFundsTransitionV0 { + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } + + fn frozen_identity_id(&self) -> Identifier { + self.frozen_identity_id + } + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier) { + self.frozen_identity_id = frozen_identity_id; + } +} + +impl AllowedAsMultiPartyAction for TokenDestroyFrozenFundsTransitionV0 { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + let TokenDestroyFrozenFundsTransitionV0 { + base, + frozen_identity_id, + .. + } = self; + + TokenDestroyFrozenFundsTransition::calculate_action_id_with_fields( + base.token_id().as_bytes(), + owner_id.as_bytes(), + frozen_identity_id.as_bytes(), + base.identity_contract_nonce(), + ) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0_methods.rs new file mode 100644 index 0000000000..73582b9c97 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_destroy_frozen_funds_transition/v0_methods.rs @@ -0,0 +1,87 @@ +use platform_value::Identifier; +use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_destroy_frozen_funds_transition::TokenDestroyFrozenFundsTransition; +use crate::state_transition::batch_transition::token_destroy_frozen_funds_transition::v0::v0_methods::TokenDestroyFrozenFundsTransitionV0Methods; +use crate::util::hash::hash_double; + +impl TokenBaseTransitionAccessors for TokenDestroyFrozenFundsTransition { + fn base(&self) -> &TokenBaseTransition { + match self { + TokenDestroyFrozenFundsTransition::V0(v0) => &v0.base, + } + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + match self { + TokenDestroyFrozenFundsTransition::V0(v0) => &mut v0.base, + } + } + + fn set_base(&mut self, base: TokenBaseTransition) { + match self { + TokenDestroyFrozenFundsTransition::V0(v0) => v0.base = base, + } + } +} + +impl TokenDestroyFrozenFundsTransitionV0Methods for TokenDestroyFrozenFundsTransition { + fn public_note(&self) -> Option<&String> { + match self { + TokenDestroyFrozenFundsTransition::V0(v0) => v0.public_note(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenDestroyFrozenFundsTransition::V0(v0) => v0.public_note_owned(), + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenDestroyFrozenFundsTransition::V0(v0) => v0.set_public_note(public_note), + } + } + + fn frozen_identity_id(&self) -> Identifier { + match self { + TokenDestroyFrozenFundsTransition::V0(v0) => v0.frozen_identity_id(), + } + } + + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier) { + match self { + TokenDestroyFrozenFundsTransition::V0(v0) => { + v0.set_frozen_identity_id(frozen_identity_id) + } + } + } +} + +impl AllowedAsMultiPartyAction for TokenDestroyFrozenFundsTransition { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + match self { + TokenDestroyFrozenFundsTransition::V0(v0) => v0.calculate_action_id(owner_id), + } + } +} + +impl TokenDestroyFrozenFundsTransition { + pub fn calculate_action_id_with_fields( + token_id: &[u8; 32], + owner_id: &[u8; 32], + target_id: &[u8; 32], + identity_contract_nonce: IdentityNonce, + ) -> Identifier { + let mut bytes = b"action_token_destroy".to_vec(); + bytes.extend_from_slice(token_id); + bytes.extend_from_slice(owner_id); + bytes.extend_from_slice(target_id); + bytes.extend_from_slice(&identity_contract_nonce.to_be_bytes()); + + hash_double(bytes).into() + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/mod.rs new file mode 100644 index 0000000000..b338e9e75e --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/mod.rs @@ -0,0 +1,25 @@ +pub mod v0; +mod v0_methods; + +use bincode::{Decode, Encode}; +use derive_more::{Display, From}; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +pub use v0::TokenEmergencyActionTransitionV0; + +#[derive(Debug, Clone, Encode, Decode, PartialEq, Display, From)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize) +)] +pub enum TokenEmergencyActionTransition { + #[display("V0({})", "_0")] + V0(TokenEmergencyActionTransitionV0), +} + +impl Default for TokenEmergencyActionTransition { + fn default() -> Self { + TokenEmergencyActionTransition::V0(TokenEmergencyActionTransitionV0::default()) + // since only v0 + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0/mod.rs new file mode 100644 index 0000000000..18ea3f89b6 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0/mod.rs @@ -0,0 +1,30 @@ +pub mod v0_methods; + +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::tokens::emergency_action::TokenEmergencyAction; +use bincode::{Decode, Encode}; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +use std::fmt; + +#[derive(Debug, Clone, Default, Encode, Decode, PartialEq)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(rename_all = "camelCase") +)] +pub struct TokenEmergencyActionTransitionV0 { + /// Document Base Transition + #[cfg_attr(feature = "state-transition-serde-conversion", serde(flatten))] + pub base: TokenBaseTransition, + /// The emergency action + pub emergency_action: TokenEmergencyAction, + /// The public note + pub public_note: Option, +} + +impl fmt::Display for TokenEmergencyActionTransitionV0 { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "Base: {}", self.base) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0/v0_methods.rs new file mode 100644 index 0000000000..4f0e17f2c4 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0/v0_methods.rs @@ -0,0 +1,80 @@ +use platform_value::Identifier; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::batched_transition::token_emergency_action_transition::TokenEmergencyActionTransitionV0; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use crate::state_transition::batch_transition::TokenEmergencyActionTransition; +use crate::tokens::emergency_action::TokenEmergencyAction; + +impl TokenBaseTransitionAccessors for TokenEmergencyActionTransitionV0 { + fn base(&self) -> &TokenBaseTransition { + &self.base + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + &mut self.base + } + + fn set_base(&mut self, base: TokenBaseTransition) { + self.base = base; + } +} + +pub trait TokenEmergencyActionTransitionV0Methods: + TokenBaseTransitionAccessors + AllowedAsMultiPartyAction +{ + /// Returns the `public_note` field of the `TokenEmergencyActionTransitionV0`. + fn public_note(&self) -> Option<&String>; + + /// Returns the owned `public_note` field of the `TokenEmergencyActionTransitionV0`. + fn public_note_owned(self) -> Option; + + /// Sets the value of the `public_note` field in the `TokenEmergencyActionTransitionV0`. + fn set_public_note(&mut self, public_note: Option); + + /// Returns the `emergency_action` field of the `TokenEmergencyActionTransitionV0`. + fn emergency_action(&self) -> TokenEmergencyAction; + + /// Sets the value of the `emergency_action` field in the `TokenEmergencyActionTransitionV0`. + fn set_emergency_action(&mut self, emergency_action: TokenEmergencyAction); +} + +impl TokenEmergencyActionTransitionV0Methods for TokenEmergencyActionTransitionV0 { + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } + + fn emergency_action(&self) -> TokenEmergencyAction { + self.emergency_action + } + + fn set_emergency_action(&mut self, emergency_action: TokenEmergencyAction) { + self.emergency_action = emergency_action; + } +} + +impl AllowedAsMultiPartyAction for TokenEmergencyActionTransitionV0 { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + let TokenEmergencyActionTransitionV0 { + base, + emergency_action, + .. + } = self; + + TokenEmergencyActionTransition::calculate_action_id_with_fields( + base.token_id().as_bytes(), + owner_id.as_bytes(), + *emergency_action, + base.identity_contract_nonce(), + ) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0_methods.rs new file mode 100644 index 0000000000..e089d2f8de --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_emergency_action_transition/v0_methods.rs @@ -0,0 +1,86 @@ +use platform_value::Identifier; +use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::batched_transition::token_emergency_action_transition::v0::v0_methods::TokenEmergencyActionTransitionV0Methods; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::TokenEmergencyActionTransition; +use crate::tokens::emergency_action::TokenEmergencyAction; +use crate::util::hash::hash_double; + +impl TokenBaseTransitionAccessors for TokenEmergencyActionTransition { + fn base(&self) -> &TokenBaseTransition { + match self { + TokenEmergencyActionTransition::V0(v0) => &v0.base, + } + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + match self { + TokenEmergencyActionTransition::V0(v0) => &mut v0.base, + } + } + + fn set_base(&mut self, base: TokenBaseTransition) { + match self { + TokenEmergencyActionTransition::V0(v0) => v0.base = base, + } + } +} + +impl TokenEmergencyActionTransitionV0Methods for TokenEmergencyActionTransition { + fn public_note(&self) -> Option<&String> { + match self { + TokenEmergencyActionTransition::V0(v0) => v0.public_note(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenEmergencyActionTransition::V0(v0) => v0.public_note_owned(), + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenEmergencyActionTransition::V0(v0) => v0.set_public_note(public_note), + } + } + + fn emergency_action(&self) -> TokenEmergencyAction { + match self { + TokenEmergencyActionTransition::V0(v0) => v0.emergency_action(), + } + } + + fn set_emergency_action(&mut self, emergency_action: TokenEmergencyAction) { + match self { + TokenEmergencyActionTransition::V0(v0) => v0.set_emergency_action(emergency_action), + } + } +} + +impl AllowedAsMultiPartyAction for TokenEmergencyActionTransition { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + match self { + TokenEmergencyActionTransition::V0(v0) => v0.calculate_action_id(owner_id), + } + } +} + +impl TokenEmergencyActionTransition { + pub fn calculate_action_id_with_fields( + token_id: &[u8; 32], + owner_id: &[u8; 32], + emergency_action: TokenEmergencyAction, + identity_contract_nonce: IdentityNonce, + ) -> Identifier { + let mut bytes = b"action_token_emergency_action".to_vec(); + bytes.extend_from_slice(token_id); + bytes.extend_from_slice(owner_id); + bytes.extend_from_slice(&[emergency_action as u8]); + bytes.extend_from_slice(&identity_contract_nonce.to_be_bytes()); + + hash_double(bytes).into() + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/mod.rs new file mode 100644 index 0000000000..844454a661 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/mod.rs @@ -0,0 +1,24 @@ +pub mod v0; +mod v0_methods; + +use bincode::{Decode, Encode}; +use derive_more::{Display, From}; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +pub use v0::TokenFreezeTransitionV0; + +#[derive(Debug, Clone, Encode, Decode, PartialEq, Display, From)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize) +)] +pub enum TokenFreezeTransition { + #[display("V0({})", "_0")] + V0(TokenFreezeTransitionV0), +} + +impl Default for TokenFreezeTransition { + fn default() -> Self { + TokenFreezeTransition::V0(TokenFreezeTransitionV0::default()) // since only v0 + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/mod.rs new file mode 100644 index 0000000000..c27da67974 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/mod.rs @@ -0,0 +1,45 @@ +pub mod v0_methods; + +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use bincode::{Decode, Encode}; +use platform_value::Identifier; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +use std::fmt; + +mod property_names { + pub const AMOUNT: &str = "$amount"; +} +/// The Identifier fields in [`TokenFreezeTransition`] +pub use super::super::document_base_transition::IDENTIFIER_FIELDS; + +#[derive(Debug, Clone, Default, Encode, Decode, PartialEq)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(rename_all = "camelCase") +)] +pub struct TokenFreezeTransitionV0 { + /// Document Base Transition + #[cfg_attr(feature = "state-transition-serde-conversion", serde(flatten))] + pub base: TokenBaseTransition, + /// The identity that we are freezing + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "frozenIdentityId") + )] + pub frozen_identity_id: Identifier, + /// The public note + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "publicNote") + )] + pub public_note: Option, +} + +impl fmt::Display for TokenFreezeTransitionV0 { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + // Format the base transition (assuming `TokenBaseTransition` implements Display) + write!(f, "Base: {}, Froze: {}", self.base, self.frozen_identity_id) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/v0_methods.rs new file mode 100644 index 0000000000..bec3466b7b --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0/v0_methods.rs @@ -0,0 +1,78 @@ +use platform_value::Identifier; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use crate::state_transition::batch_transition::token_freeze_transition::TokenFreezeTransitionV0; +use crate::state_transition::batch_transition::TokenFreezeTransition; + +impl TokenBaseTransitionAccessors for TokenFreezeTransitionV0 { + fn base(&self) -> &TokenBaseTransition { + &self.base + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + &mut self.base + } + + fn set_base(&mut self, base: TokenBaseTransition) { + self.base = base; + } +} + +pub trait TokenFreezeTransitionV0Methods: + TokenBaseTransitionAccessors + AllowedAsMultiPartyAction +{ + /// Returns the `public_note` field of the `TokenFreezeTransitionV0`. + fn public_note(&self) -> Option<&String>; + + /// Returns the owned `public_note` field of the `TokenFreezeTransitionV0`. + fn public_note_owned(self) -> Option; + + /// Sets the value of the `public_note` field in the `TokenFreezeTransitionV0`. + fn set_public_note(&mut self, public_note: Option); + + /// Returns the `frozen_identity_id` field of the `TokenFreezeTransitionV0`. + fn frozen_identity_id(&self) -> Identifier; + + /// Sets the value of the `frozen_identity_id` field in the `TokenFreezeTransitionV0`. + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier); +} + +impl TokenFreezeTransitionV0Methods for TokenFreezeTransitionV0 { + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } + + fn frozen_identity_id(&self) -> Identifier { + self.frozen_identity_id + } + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier) { + self.frozen_identity_id = frozen_identity_id; + } +} + +impl AllowedAsMultiPartyAction for TokenFreezeTransitionV0 { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + let TokenFreezeTransitionV0 { + base, + frozen_identity_id, + .. + } = self; + + TokenFreezeTransition::calculate_action_id_with_fields( + base.token_id().as_bytes(), + owner_id.as_bytes(), + frozen_identity_id.as_bytes(), + base.identity_contract_nonce(), + ) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0_methods.rs new file mode 100644 index 0000000000..13c06dcd45 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_freeze_transition/v0_methods.rs @@ -0,0 +1,85 @@ +use platform_value::Identifier; +use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_freeze_transition::v0::v0_methods::TokenFreezeTransitionV0Methods; +use crate::state_transition::batch_transition::TokenFreezeTransition; +use crate::util::hash::hash_double; + +impl TokenBaseTransitionAccessors for TokenFreezeTransition { + fn base(&self) -> &TokenBaseTransition { + match self { + TokenFreezeTransition::V0(v0) => &v0.base, + } + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + match self { + TokenFreezeTransition::V0(v0) => &mut v0.base, + } + } + + fn set_base(&mut self, base: TokenBaseTransition) { + match self { + TokenFreezeTransition::V0(v0) => v0.base = base, + } + } +} + +impl TokenFreezeTransitionV0Methods for TokenFreezeTransition { + fn public_note(&self) -> Option<&String> { + match self { + TokenFreezeTransition::V0(v0) => v0.public_note(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenFreezeTransition::V0(v0) => v0.public_note_owned(), + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenFreezeTransition::V0(v0) => v0.set_public_note(public_note), + } + } + + fn frozen_identity_id(&self) -> Identifier { + match self { + TokenFreezeTransition::V0(v0) => v0.frozen_identity_id(), + } + } + + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier) { + match self { + TokenFreezeTransition::V0(v0) => v0.set_frozen_identity_id(frozen_identity_id), + } + } +} + +impl AllowedAsMultiPartyAction for TokenFreezeTransition { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + match self { + TokenFreezeTransition::V0(v0) => v0.calculate_action_id(owner_id), + } + } +} + +impl TokenFreezeTransition { + pub fn calculate_action_id_with_fields( + token_id: &[u8; 32], + owner_id: &[u8; 32], + target_id: &[u8; 32], + identity_contract_nonce: IdentityNonce, + ) -> Identifier { + let mut bytes = b"action_token_freeze".to_vec(); + bytes.extend_from_slice(token_id); + bytes.extend_from_slice(owner_id); + bytes.extend_from_slice(target_id); + bytes.extend_from_slice(&identity_contract_nonce.to_be_bytes()); + + hash_double(bytes).into() + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/mod.rs new file mode 100644 index 0000000000..a37fe199c3 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/mod.rs @@ -0,0 +1,24 @@ +pub mod v0; +mod v0_methods; + +use bincode::{Decode, Encode}; +use derive_more::{Display, From}; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +pub use v0::TokenMintTransitionV0; + +#[derive(Debug, Clone, Encode, Decode, PartialEq, Display, From)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize) +)] +pub enum TokenMintTransition { + #[display("V0({})", "_0")] + V0(TokenMintTransitionV0), +} + +impl Default for TokenMintTransition { + fn default() -> Self { + TokenMintTransition::V0(TokenMintTransitionV0::default()) // since only v0 + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0/mod.rs new file mode 100644 index 0000000000..da8079655a --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0/mod.rs @@ -0,0 +1,59 @@ +pub mod v0_methods; + +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use bincode::{Decode, Encode}; +use platform_value::string_encoding::Encoding; +use platform_value::Identifier; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +use std::fmt; + +mod property_names { + pub const AMOUNT: &str = "$amount"; +} +/// The Identifier fields in [`TokenMintTransition`] +pub use super::super::document_base_transition::IDENTIFIER_FIELDS; + +#[derive(Debug, Clone, Default, Encode, Decode, PartialEq)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(rename_all = "camelCase") +)] +pub struct TokenMintTransitionV0 { + /// Document Base Transition + #[cfg_attr(feature = "state-transition-serde-conversion", serde(flatten))] + pub base: TokenBaseTransition, + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "issuedToIdentityId") + )] + /// Who should we issue the token to? If this is not set then we issue to the identity set in + /// contract settings. If such an operation is allowed. + pub issued_to_identity_id: Option, + + /// How much should we issue + pub amount: u64, + /// The public note + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "publicNote") + )] + pub public_note: Option, +} + +impl fmt::Display for TokenMintTransitionV0 { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + // Format the base transition (assuming `TokenBaseTransition` implements Display) + write!( + f, + "Base: {}, Amount: {}, To: {}", + self.base, // Assuming `TokenBaseTransition` implements `Display` + self.amount, + self.issued_to_identity_id + .as_ref() + .map_or("(Identity Set By Contract)".to_string(), |id| id + .to_string(Encoding::Base58)) + ) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0/v0_methods.rs new file mode 100644 index 0000000000..9bb315fd6e --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0/v0_methods.rs @@ -0,0 +1,86 @@ +use platform_value::Identifier; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use crate::state_transition::batch_transition::token_mint_transition::TokenMintTransitionV0; +use crate::state_transition::batch_transition::TokenMintTransition; + +impl TokenBaseTransitionAccessors for TokenMintTransitionV0 { + fn base(&self) -> &TokenBaseTransition { + &self.base + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + &mut self.base + } + + fn set_base(&mut self, base: TokenBaseTransition) { + self.base = base; + } +} + +pub trait TokenMintTransitionV0Methods: + TokenBaseTransitionAccessors + AllowedAsMultiPartyAction +{ + fn amount(&self) -> u64; + + fn set_amount(&mut self, amount: u64); + + /// Returns the `public_note` field of the `TokenMintTransitionV0`. + fn public_note(&self) -> Option<&String>; + + /// Returns the owned `public_note` field of the `TokenMintTransitionV0`. + fn public_note_owned(self) -> Option; + + /// Sets the value of the `public_note` field in the `TokenMintTransitionV0`. + fn set_public_note(&mut self, public_note: Option); + + /// Returns the `issued_to_identity_id` field of the `TokenMintTransitionV0`. + fn issued_to_identity_id(&self) -> Option; + + /// Sets the value of the `issued_to_identity_id` field in the `TokenMintTransitionV0`. + fn set_issued_to_identity_id(&mut self, issued_to_identity_id: Option); +} + +impl TokenMintTransitionV0Methods for TokenMintTransitionV0 { + fn amount(&self) -> u64 { + self.amount + } + + fn set_amount(&mut self, amount: u64) { + self.amount = amount; + } + + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } + + fn issued_to_identity_id(&self) -> Option { + self.issued_to_identity_id + } + fn set_issued_to_identity_id(&mut self, issued_to_identity_id: Option) { + self.issued_to_identity_id = issued_to_identity_id; + } +} + +impl AllowedAsMultiPartyAction for TokenMintTransitionV0 { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + let TokenMintTransitionV0 { base, amount, .. } = self; + + TokenMintTransition::calculate_action_id_with_fields( + base.token_id().as_bytes(), + owner_id.as_bytes(), + base.identity_contract_nonce(), + *amount, + ) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0_methods.rs new file mode 100644 index 0000000000..245242e452 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0_methods.rs @@ -0,0 +1,98 @@ +use platform_value::Identifier; +use crate::balances::credits::TokenAmount; +use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_mint_transition::TokenMintTransition; +use crate::state_transition::batch_transition::token_mint_transition::v0::v0_methods::TokenMintTransitionV0Methods; +use crate::util::hash::hash_double; + +impl TokenBaseTransitionAccessors for TokenMintTransition { + fn base(&self) -> &TokenBaseTransition { + match self { + TokenMintTransition::V0(v0) => &v0.base, + } + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + match self { + TokenMintTransition::V0(v0) => &mut v0.base, + } + } + + fn set_base(&mut self, base: TokenBaseTransition) { + match self { + TokenMintTransition::V0(v0) => v0.base = base, + } + } +} + +impl TokenMintTransitionV0Methods for TokenMintTransition { + fn amount(&self) -> u64 { + match self { + TokenMintTransition::V0(v0) => v0.amount(), + } + } + + fn set_amount(&mut self, amount: u64) { + match self { + TokenMintTransition::V0(v0) => v0.set_amount(amount), + } + } + + fn public_note(&self) -> Option<&String> { + match self { + TokenMintTransition::V0(v0) => v0.public_note(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenMintTransition::V0(v0) => v0.public_note_owned(), + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenMintTransition::V0(v0) => v0.set_public_note(public_note), + } + } + + fn issued_to_identity_id(&self) -> Option { + match self { + TokenMintTransition::V0(v0) => v0.issued_to_identity_id(), + } + } + + fn set_issued_to_identity_id(&mut self, issued_to_identity_id: Option) { + match self { + TokenMintTransition::V0(v0) => v0.set_issued_to_identity_id(issued_to_identity_id), + } + } +} + +impl AllowedAsMultiPartyAction for TokenMintTransition { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + match self { + TokenMintTransition::V0(v0) => v0.calculate_action_id(owner_id), + } + } +} + +impl TokenMintTransition { + pub fn calculate_action_id_with_fields( + token_id: &[u8; 32], + owner_id: &[u8; 32], + identity_contract_nonce: IdentityNonce, + mint_amount: TokenAmount, + ) -> Identifier { + let mut bytes = b"action_token_mint".to_vec(); + bytes.extend_from_slice(token_id); + bytes.extend_from_slice(owner_id); + bytes.extend_from_slice(&identity_contract_nonce.to_be_bytes()); + bytes.extend_from_slice(&mint_amount.to_be_bytes()); + + hash_double(bytes).into() + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/mod.rs new file mode 100644 index 0000000000..39c8a54695 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/mod.rs @@ -0,0 +1,18 @@ +pub mod v0; +pub mod v0_methods; + +use bincode::{Decode, Encode}; +use derive_more::{Display, From}; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +pub use v0::*; + +#[derive(Debug, Clone, Encode, Decode, PartialEq, Display, From)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize) +)] +pub enum TokenTransferTransition { + #[display("V0({})", "_0")] + V0(TokenTransferTransitionV0), +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/mod.rs new file mode 100644 index 0000000000..0f3da97343 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/mod.rs @@ -0,0 +1,67 @@ +pub mod v0_methods; + +use bincode::{Decode, Encode}; +use derive_more::Display; + +pub use super::super::token_base_transition::IDENTIFIER_FIELDS; +use crate::prelude::{ + DerivationEncryptionKeyIndex, RecipientKeyIndex, RootEncryptionKeyIndex, SenderKeyIndex, +}; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use platform_value::Identifier; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; + +mod property_names { + pub const AMOUNT: &str = "$amount"; + pub const RECIPIENT_OWNER_ID: &str = "recipientOwnerId"; +} + +#[derive(Debug, Clone, Default, Encode, Decode, PartialEq, Display)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(rename_all = "camelCase") +)] +#[display( + "Base: {}, Amount: {}, Recipient: {:?}", + "base", + "amount", + "recipient_owner_id" +)] +pub struct TokenTransferTransitionV0 { + #[cfg_attr(feature = "state-transition-serde-conversion", serde(flatten))] + pub base: TokenBaseTransition, + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "$amount") + )] + pub amount: u64, + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "recipientId") + )] + pub recipient_id: Identifier, + /// The public note + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "publicNote") + )] + pub public_note: Option, + /// An optional shared encrypted note + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "sharedEncryptedNote") + )] + pub shared_encrypted_note: Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + /// An optional private encrypted note + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "privateEncryptedNote") + )] + pub private_encrypted_note: Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/v0_methods.rs new file mode 100644 index 0000000000..ec31b70b1c --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/v0_methods.rs @@ -0,0 +1,195 @@ +use platform_value::Identifier; +use crate::prelude::{DerivationEncryptionKeyIndex, RecipientKeyIndex, RootEncryptionKeyIndex, SenderKeyIndex}; +use crate::state_transition::batch_transition::batched_transition::token_transfer_transition::TokenTransferTransitionV0; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; + +impl TokenBaseTransitionAccessors for TokenTransferTransitionV0 { + fn base(&self) -> &TokenBaseTransition { + &self.base + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + &mut self.base + } + + fn set_base(&mut self, base: TokenBaseTransition) { + self.base = base; + } +} + +pub trait TokenTransferTransitionV0Methods: TokenBaseTransitionAccessors { + /// Returns the `amount` field of the `TokenTransferTransitionV0`. + fn amount(&self) -> u64; + + /// Sets the value of the `amount` field in the `TokenTransferTransitionV0`. + fn set_amount(&mut self, amount: u64); + + /// Returns the `recipient_owner_id` field of the `TokenTransferTransitionV0`. + fn recipient_id(&self) -> Identifier; + + /// Returns a reference to the `recipient_owner_id` field of the `TokenTransferTransitionV0`. + fn recipient_id_ref(&self) -> &Identifier; + + /// Sets the value of the `recipient_owner_id` field in the `TokenTransferTransitionV0`. + fn set_recipient_id(&mut self, recipient_owner_id: Identifier); + + /// Returns the `public_note` field of the `TokenTransferTransitionV0`. + fn public_note(&self) -> Option<&String>; + + /// Returns the owned `public_note` field of the `TokenTransferTransitionV0`. + fn public_note_owned(self) -> Option; + + /// Sets the value of the `public_note` field in the `TokenTransferTransitionV0`. + fn set_public_note(&mut self, public_note: Option); + + /// Returns the `shared_encrypted_note` field of the `TokenTransferTransitionV0`. + fn shared_encrypted_note(&self) -> Option<&(SenderKeyIndex, RecipientKeyIndex, Vec)>; + + /// Returns the owned `shared_encrypted_note` field of the `TokenTransferTransitionV0`. + fn shared_encrypted_note_owned(self) -> Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>; + + /// Sets the value of the `shared_encrypted_note` field in the `TokenTransferTransitionV0`. + fn set_shared_encrypted_note( + &mut self, + shared_encrypted_note: Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + ); + + /// Returns the `private_encrypted_note` field of the `TokenTransferTransitionV0`. + fn private_encrypted_note( + &self, + ) -> Option<&( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>; + + /// Returns the owned `private_encrypted_note` field of the `TokenTransferTransitionV0`. + fn private_encrypted_note_owned( + self, + ) -> Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>; + + /// Sets the value of the `private_encrypted_note` field in the `TokenTransferTransitionV0`. + fn set_private_encrypted_note( + &mut self, + private_encrypted_note: Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ); + + /// Returns all notes (public, shared, and private) as owned values in a tuple. + fn notes_owned( + self, + ) -> ( + Option, + Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ); +} + +impl TokenTransferTransitionV0Methods for TokenTransferTransitionV0 { + fn amount(&self) -> u64 { + self.amount + } + + fn set_amount(&mut self, amount: u64) { + self.amount = amount; + } + + fn recipient_id(&self) -> Identifier { + self.recipient_id + } + + fn recipient_id_ref(&self) -> &Identifier { + &self.recipient_id + } + + fn set_recipient_id(&mut self, recipient_owner_id: Identifier) { + self.recipient_id = recipient_owner_id; + } + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } + + fn shared_encrypted_note(&self) -> Option<&(SenderKeyIndex, RecipientKeyIndex, Vec)> { + self.shared_encrypted_note.as_ref() + } + + fn shared_encrypted_note_owned(self) -> Option<(SenderKeyIndex, RecipientKeyIndex, Vec)> { + self.shared_encrypted_note + } + + fn set_shared_encrypted_note( + &mut self, + shared_encrypted_note: Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + ) { + self.shared_encrypted_note = shared_encrypted_note; + } + + fn private_encrypted_note( + &self, + ) -> Option<&( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )> { + self.private_encrypted_note.as_ref() + } + + fn private_encrypted_note_owned( + self, + ) -> Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )> { + self.private_encrypted_note + } + + fn set_private_encrypted_note( + &mut self, + private_encrypted_note: Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ) { + self.private_encrypted_note = private_encrypted_note; + } + + fn notes_owned( + self, + ) -> ( + Option, + Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ) { + ( + self.public_note, + self.shared_encrypted_note, + self.private_encrypted_note, + ) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0_methods.rs new file mode 100644 index 0000000000..414e53f5d4 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0_methods.rs @@ -0,0 +1,156 @@ +use platform_value::Identifier; +use crate::prelude::{DerivationEncryptionKeyIndex, RecipientKeyIndex, RootEncryptionKeyIndex, SenderKeyIndex}; +use crate::state_transition::batch_transition::batched_transition::token_transfer_transition::v0::v0_methods::TokenTransferTransitionV0Methods; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::TokenTransferTransition; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; + +impl TokenBaseTransitionAccessors for TokenTransferTransition { + fn base(&self) -> &TokenBaseTransition { + match self { + TokenTransferTransition::V0(v0) => &v0.base, + } + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + match self { + TokenTransferTransition::V0(v0) => &mut v0.base, + } + } + + fn set_base(&mut self, base: TokenBaseTransition) { + match self { + TokenTransferTransition::V0(v0) => v0.base = base, + } + } +} + +impl TokenTransferTransitionV0Methods for TokenTransferTransition { + fn amount(&self) -> u64 { + match self { + TokenTransferTransition::V0(v0) => v0.amount, + } + } + + fn set_amount(&mut self, amount: u64) { + match self { + TokenTransferTransition::V0(v0) => v0.amount = amount, + } + } + + fn recipient_id(&self) -> Identifier { + match self { + TokenTransferTransition::V0(v0) => v0.recipient_id, + } + } + + fn recipient_id_ref(&self) -> &Identifier { + match self { + TokenTransferTransition::V0(v0) => &v0.recipient_id, + } + } + + fn set_recipient_id(&mut self, recipient_id: Identifier) { + match self { + TokenTransferTransition::V0(v0) => v0.recipient_id = recipient_id, + } + } + + // Methods for `public_note` + fn public_note(&self) -> Option<&String> { + match self { + TokenTransferTransition::V0(v0) => v0.public_note.as_ref(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenTransferTransition::V0(v0) => v0.public_note, + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenTransferTransition::V0(v0) => v0.public_note = public_note, + } + } + + fn shared_encrypted_note(&self) -> Option<&(SenderKeyIndex, RecipientKeyIndex, Vec)> { + match self { + TokenTransferTransition::V0(v0) => v0.shared_encrypted_note.as_ref(), + } + } + + fn shared_encrypted_note_owned(self) -> Option<(SenderKeyIndex, RecipientKeyIndex, Vec)> { + match self { + TokenTransferTransition::V0(v0) => v0.shared_encrypted_note, + } + } + + fn set_shared_encrypted_note( + &mut self, + shared_encrypted_note: Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + ) { + match self { + TokenTransferTransition::V0(v0) => v0.shared_encrypted_note = shared_encrypted_note, + } + } + + fn private_encrypted_note( + &self, + ) -> Option<&( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )> { + match self { + TokenTransferTransition::V0(v0) => v0.private_encrypted_note.as_ref(), + } + } + + fn private_encrypted_note_owned( + self, + ) -> Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )> { + match self { + TokenTransferTransition::V0(v0) => v0.private_encrypted_note, + } + } + + fn set_private_encrypted_note( + &mut self, + private_encrypted_note: Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ) { + match self { + TokenTransferTransition::V0(v0) => v0.private_encrypted_note = private_encrypted_note, + } + } + + // Method to return all notes as owned values + fn notes_owned( + self, + ) -> ( + Option, + Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ) { + match self { + TokenTransferTransition::V0(v0) => ( + v0.public_note, + v0.shared_encrypted_note, + v0.private_encrypted_note, + ), + } + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs new file mode 100644 index 0000000000..0ca461a184 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs @@ -0,0 +1,218 @@ +use derive_more::{Display, From}; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +use platform_value::Identifier; +use bincode::{Encode, Decode}; +use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::{DocumentCreateTransition, DocumentDeleteTransition, DocumentReplaceTransition, TokenBurnTransition, TokenDestroyFrozenFundsTransition, TokenEmergencyActionTransition, TokenFreezeTransition, TokenMintTransition, TokenTransferTransition}; +use crate::state_transition::batch_transition::batched_transition::{DocumentPurchaseTransition, DocumentTransferTransition}; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::batched_transition::token_unfreeze_transition::TokenUnfreezeTransition; +use crate::state_transition::batch_transition::resolvers::v0::BatchTransitionResolversV0; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; + +#[derive(Debug, Clone, Encode, Decode, From, PartialEq, Display)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize) +)] +pub enum TokenTransition { + #[display("TokenBurnTransition({})", "_0")] + Burn(TokenBurnTransition), + + #[display("TokenIssuanceTransition({})", "_0")] + Mint(TokenMintTransition), + + #[display("TokenTransferTransition({})", "_0")] + Transfer(TokenTransferTransition), + + #[display("TokenFreezeTransition({})", "_0")] + Freeze(TokenFreezeTransition), + + #[display("TokenUnfreezeTransition({})", "_0")] + Unfreeze(TokenUnfreezeTransition), + + #[display("TokenDestroyFrozenFundsTransition({})", "_0")] + DestroyFrozenFunds(TokenDestroyFrozenFundsTransition), + + #[display("TokenEmergencyActionTransition({})", "_0")] + EmergencyAction(TokenEmergencyActionTransition), +} + +impl BatchTransitionResolversV0 for TokenTransition { + fn as_transition_create(&self) -> Option<&DocumentCreateTransition> { + None + } + fn as_transition_replace(&self) -> Option<&DocumentReplaceTransition> { + None + } + + fn as_transition_delete(&self) -> Option<&DocumentDeleteTransition> { + None + } + + fn as_transition_transfer(&self) -> Option<&DocumentTransferTransition> { + None + } + + fn as_transition_purchase(&self) -> Option<&DocumentPurchaseTransition> { + None + } + + fn as_transition_token_burn(&self) -> Option<&TokenBurnTransition> { + if let Self::Burn(ref t) = self { + Some(t) + } else { + None + } + } + fn as_transition_token_mint(&self) -> Option<&TokenMintTransition> { + if let Self::Mint(ref t) = self { + Some(t) + } else { + None + } + } + + fn as_transition_token_transfer(&self) -> Option<&TokenTransferTransition> { + if let Self::Transfer(ref t) = self { + Some(t) + } else { + None + } + } + + fn as_transition_token_freeze(&self) -> Option<&TokenFreezeTransition> { + if let Self::Freeze(ref t) = self { + Some(t) + } else { + None + } + } + + fn as_transition_token_unfreeze(&self) -> Option<&TokenUnfreezeTransition> { + if let Self::Unfreeze(ref t) = self { + Some(t) + } else { + None + } + } + + fn as_transition_token_destroy_frozen_funds( + &self, + ) -> Option<&TokenDestroyFrozenFundsTransition> { + if let Self::DestroyFrozenFunds(ref t) = self { + Some(t) + } else { + None + } + } + + fn as_transition_token_emergency_action(&self) -> Option<&TokenEmergencyActionTransition> { + if let Self::EmergencyAction(ref t) = self { + Some(t) + } else { + None + } + } +} + +pub trait TokenTransitionV0Methods { + fn base(&self) -> &TokenBaseTransition; + fn base_mut(&mut self) -> &mut TokenBaseTransition; + /// get the data contract ID + fn data_contract_id(&self) -> Identifier; + /// set data contract's ID + fn set_data_contract_id(&mut self, id: Identifier); + + /// get the token ID + fn token_id(&self) -> Identifier; + + /// set the token ID + fn set_token_id(&mut self, id: Identifier); + + /// get the identity contract nonce + fn identity_contract_nonce(&self) -> IdentityNonce; + /// sets identity contract nonce + fn set_identity_contract_nonce(&mut self, nonce: IdentityNonce); + + fn calculate_action_id(&self, owner_id: Identifier) -> Option; + + fn can_calculate_action_id(&self) -> bool; +} + +impl TokenTransitionV0Methods for TokenTransition { + fn base(&self) -> &TokenBaseTransition { + match self { + TokenTransition::Burn(t) => t.base(), + TokenTransition::Mint(t) => t.base(), + TokenTransition::Transfer(t) => t.base(), + TokenTransition::Freeze(t) => t.base(), + TokenTransition::Unfreeze(t) => t.base(), + TokenTransition::DestroyFrozenFunds(t) => t.base(), + TokenTransition::EmergencyAction(t) => t.base(), + } + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + match self { + TokenTransition::Burn(t) => t.base_mut(), + TokenTransition::Mint(t) => t.base_mut(), + TokenTransition::Transfer(t) => t.base_mut(), + TokenTransition::Freeze(t) => t.base_mut(), + TokenTransition::Unfreeze(t) => t.base_mut(), + TokenTransition::DestroyFrozenFunds(t) => t.base_mut(), + TokenTransition::EmergencyAction(t) => t.base_mut(), + } + } + + fn data_contract_id(&self) -> Identifier { + self.base().data_contract_id() + } + + fn calculate_action_id(&self, owner_id: Identifier) -> Option { + match self { + TokenTransition::Burn(t) => Some(t.calculate_action_id(owner_id)), + TokenTransition::Mint(t) => Some(t.calculate_action_id(owner_id)), + TokenTransition::Freeze(t) => Some(t.calculate_action_id(owner_id)), + TokenTransition::Unfreeze(t) => Some(t.calculate_action_id(owner_id)), + TokenTransition::Transfer(_) => None, + TokenTransition::DestroyFrozenFunds(t) => Some(t.calculate_action_id(owner_id)), + TokenTransition::EmergencyAction(t) => Some(t.calculate_action_id(owner_id)), + } + } + + fn can_calculate_action_id(&self) -> bool { + match self { + TokenTransition::Burn(_) + | TokenTransition::Mint(_) + | TokenTransition::Freeze(_) + | TokenTransition::Unfreeze(_) + | TokenTransition::DestroyFrozenFunds(_) + | TokenTransition::EmergencyAction(_) => true, + TokenTransition::Transfer(_) => false, + } + } + + fn set_data_contract_id(&mut self, id: Identifier) { + self.base_mut().set_data_contract_id(id); + } + + fn token_id(&self) -> Identifier { + self.base().token_id() + } + + fn set_token_id(&mut self, token_id: Identifier) { + self.base_mut().set_token_id(token_id) + } + + fn identity_contract_nonce(&self) -> IdentityNonce { + self.base().identity_contract_nonce() + } + + fn set_identity_contract_nonce(&mut self, nonce: IdentityNonce) { + self.base_mut().set_identity_contract_nonce(nonce); + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition_action_type.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition_action_type.rs new file mode 100644 index 0000000000..d196637391 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition_action_type.rs @@ -0,0 +1,71 @@ +use std::fmt; +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::token_transition::TokenTransition; +use crate::ProtocolError; + +// @append-only +#[derive(Eq, PartialEq, Debug, Copy, Clone, Hash)] +pub enum TokenTransitionActionType { + Burn, + Mint, + Transfer, + Freeze, + Unfreeze, + DestroyFrozenFunds, + EmergencyAction, +} + +impl fmt::Display for TokenTransitionActionType { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let action_str = match self { + TokenTransitionActionType::Burn => "Burn", + TokenTransitionActionType::Mint => "Mint", + TokenTransitionActionType::Transfer => "Transfer", + TokenTransitionActionType::Freeze => "Freeze", + TokenTransitionActionType::Unfreeze => "Unfreeze", + TokenTransitionActionType::DestroyFrozenFunds => "DestroyFrozenFunds", + TokenTransitionActionType::EmergencyAction => "EmergencyAction", + }; + write!(f, "{}", action_str) + } +} + +pub trait TokenTransitionActionTypeGetter { + fn action_type(&self) -> TokenTransitionActionType; +} + +impl TokenTransitionActionTypeGetter for TokenTransition { + fn action_type(&self) -> TokenTransitionActionType { + match self { + TokenTransition::Burn(_) => TokenTransitionActionType::Burn, + TokenTransition::Mint(_) => TokenTransitionActionType::Mint, + TokenTransition::Transfer(_) => TokenTransitionActionType::Transfer, + TokenTransition::Freeze(_) => TokenTransitionActionType::Freeze, + TokenTransition::Unfreeze(_) => TokenTransitionActionType::Unfreeze, + TokenTransition::DestroyFrozenFunds(_) => TokenTransitionActionType::DestroyFrozenFunds, + TokenTransition::EmergencyAction(_) => TokenTransitionActionType::EmergencyAction, + } + } +} + +impl TryFrom<&str> for TokenTransitionActionType { + type Error = ProtocolError; + + fn try_from(value: &str) -> Result { + match value { + "burn" => Ok(TokenTransitionActionType::Burn), + "issuance" => Ok(TokenTransitionActionType::Mint), + "transfer" => Ok(TokenTransitionActionType::Transfer), + "freeze" => Ok(TokenTransitionActionType::Freeze), + "unfreeze" => Ok(TokenTransitionActionType::Unfreeze), + "destroy_frozen_funds" | "destroyFrozenFunds" => { + Ok(TokenTransitionActionType::DestroyFrozenFunds) + } + "emergency_action" | "emergencyAction" => { + Ok(TokenTransitionActionType::EmergencyAction) + } + action_type => Err(ProtocolError::Generic(format!( + "unknown token transition action type {action_type}" + ))), + } + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/mod.rs new file mode 100644 index 0000000000..4cefde0eff --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/mod.rs @@ -0,0 +1,24 @@ +pub mod v0; +mod v0_methods; + +use bincode::{Decode, Encode}; +use derive_more::{Display, From}; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +pub use v0::TokenUnfreezeTransitionV0; + +#[derive(Debug, Clone, Encode, Decode, PartialEq, Display, From)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize) +)] +pub enum TokenUnfreezeTransition { + #[display("V0({})", "_0")] + V0(TokenUnfreezeTransitionV0), +} + +impl Default for TokenUnfreezeTransition { + fn default() -> Self { + TokenUnfreezeTransition::V0(TokenUnfreezeTransitionV0::default()) // since only v0 + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/mod.rs new file mode 100644 index 0000000000..abdf7892c5 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/mod.rs @@ -0,0 +1,45 @@ +pub mod v0_methods; + +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use bincode::{Decode, Encode}; +use platform_value::Identifier; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +use std::fmt; + +mod property_names { + pub const AMOUNT: &str = "$amount"; +} +/// The Identifier fields in [`TokenUnfreezeTransition`] +pub use super::super::document_base_transition::IDENTIFIER_FIELDS; + +#[derive(Debug, Clone, Default, Encode, Decode, PartialEq)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(rename_all = "camelCase") +)] +pub struct TokenUnfreezeTransitionV0 { + /// Document Base Transition + #[cfg_attr(feature = "state-transition-serde-conversion", serde(flatten))] + pub base: TokenBaseTransition, + /// The identity that we are freezing + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "frozenIdentityId") + )] + pub frozen_identity_id: Identifier, + /// The public note + #[cfg_attr( + feature = "state-transition-serde-conversion", + serde(rename = "publicNote") + )] + pub public_note: Option, +} + +impl fmt::Display for TokenUnfreezeTransitionV0 { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + // Format the base transition (assuming `TokenBaseTransition` implements Display) + write!(f, "Base: {}, Froze: {}", self.base, self.frozen_identity_id) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/v0_methods.rs new file mode 100644 index 0000000000..d386f30bd6 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0/v0_methods.rs @@ -0,0 +1,78 @@ +use platform_value::Identifier; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::batched_transition::token_unfreeze_transition::TokenUnfreezeTransitionV0; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use crate::state_transition::batch_transition::TokenUnfreezeTransition; + +impl TokenBaseTransitionAccessors for TokenUnfreezeTransitionV0 { + fn base(&self) -> &TokenBaseTransition { + &self.base + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + &mut self.base + } + + fn set_base(&mut self, base: TokenBaseTransition) { + self.base = base; + } +} + +pub trait TokenUnfreezeTransitionV0Methods: + TokenBaseTransitionAccessors + AllowedAsMultiPartyAction +{ + /// Returns the `public_note` field of the `TokenUnfreezeTransitionV0`. + fn public_note(&self) -> Option<&String>; + + /// Returns the owned `public_note` field of the `TokenUnfreezeTransitionV0`. + fn public_note_owned(self) -> Option; + + /// Sets the value of the `public_note` field in the `TokenUnfreezeTransitionV0`. + fn set_public_note(&mut self, public_note: Option); + + /// Returns the `frozen_identity_id` field of the `TokenUnfreezeTransitionV0`. + fn frozen_identity_id(&self) -> Identifier; + + /// Sets the value of the `frozen_identity_id` field in the `TokenUnfreezeTransitionV0`. + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier); +} + +impl TokenUnfreezeTransitionV0Methods for TokenUnfreezeTransitionV0 { + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } + + fn frozen_identity_id(&self) -> Identifier { + self.frozen_identity_id + } + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier) { + self.frozen_identity_id = frozen_identity_id; + } +} + +impl AllowedAsMultiPartyAction for TokenUnfreezeTransitionV0 { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + let TokenUnfreezeTransitionV0 { + base, + frozen_identity_id, + .. + } = self; + + TokenUnfreezeTransition::calculate_action_id_with_fields( + base.token_id().as_bytes(), + owner_id.as_bytes(), + frozen_identity_id.as_bytes(), + base.identity_contract_nonce(), + ) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0_methods.rs new file mode 100644 index 0000000000..2f660df716 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_unfreeze_transition/v0_methods.rs @@ -0,0 +1,85 @@ +use platform_value::Identifier; +use crate::prelude::IdentityNonce; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_unfreeze_transition::v0::v0_methods::TokenUnfreezeTransitionV0Methods; +use crate::state_transition::batch_transition::TokenUnfreezeTransition; +use crate::util::hash::hash_double; + +impl TokenBaseTransitionAccessors for TokenUnfreezeTransition { + fn base(&self) -> &TokenBaseTransition { + match self { + TokenUnfreezeTransition::V0(v0) => &v0.base, + } + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + match self { + TokenUnfreezeTransition::V0(v0) => &mut v0.base, + } + } + + fn set_base(&mut self, base: TokenBaseTransition) { + match self { + TokenUnfreezeTransition::V0(v0) => v0.base = base, + } + } +} + +impl TokenUnfreezeTransitionV0Methods for TokenUnfreezeTransition { + fn public_note(&self) -> Option<&String> { + match self { + TokenUnfreezeTransition::V0(v0) => v0.public_note(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenUnfreezeTransition::V0(v0) => v0.public_note_owned(), + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenUnfreezeTransition::V0(v0) => v0.set_public_note(public_note), + } + } + + fn frozen_identity_id(&self) -> Identifier { + match self { + TokenUnfreezeTransition::V0(v0) => v0.frozen_identity_id(), + } + } + + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier) { + match self { + TokenUnfreezeTransition::V0(v0) => v0.set_frozen_identity_id(frozen_identity_id), + } + } +} + +impl AllowedAsMultiPartyAction for TokenUnfreezeTransition { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + match self { + TokenUnfreezeTransition::V0(v0) => v0.calculate_action_id(owner_id), + } + } +} + +impl TokenUnfreezeTransition { + pub fn calculate_action_id_with_fields( + token_id: &[u8; 32], + owner_id: &[u8; 32], + target_id: &[u8; 32], + identity_contract_nonce: IdentityNonce, + ) -> Identifier { + let mut bytes = b"action_token_unfreeze".to_vec(); + bytes.extend_from_slice(token_id); + bytes.extend_from_slice(owner_id); + bytes.extend_from_slice(target_id); + bytes.extend_from_slice(&identity_contract_nonce.to_be_bytes()); + + hash_double(bytes).into() + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/fields.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/fields.rs similarity index 93% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/fields.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/fields.rs index 06f39e42fc..8a72a2d50c 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/fields.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/fields.rs @@ -1,7 +1,7 @@ use crate::state_transition::state_transitions; use crate::identity::SecurityLevel; -use crate::state_transition::documents_batch_transition::fields::property_names::{ +use crate::state_transition::batch_transition::fields::property_names::{ OWNER_ID, TRANSITIONS_DATA_CONTRACT_ID, TRANSITIONS_ID, }; pub use state_transitions::common_fields::property_names::{ diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/identity_signed.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/identity_signed.rs new file mode 100644 index 0000000000..a3aba2340b --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/identity_signed.rs @@ -0,0 +1,26 @@ +use crate::identity::{KeyID, Purpose, SecurityLevel}; +use crate::state_transition::batch_transition::BatchTransition; +use crate::state_transition::StateTransitionIdentitySigned; + +impl StateTransitionIdentitySigned for BatchTransition { + fn signature_public_key_id(&self) -> KeyID { + match self { + BatchTransition::V0(transition) => transition.signature_public_key_id(), + BatchTransition::V1(transition) => transition.signature_public_key_id(), + } + } + + fn set_signature_public_key_id(&mut self, key_id: KeyID) { + match self { + BatchTransition::V0(transition) => transition.set_signature_public_key_id(key_id), + BatchTransition::V1(transition) => transition.set_signature_public_key_id(key_id), + } + } + + fn security_level_requirement(&self, purpose: Purpose) -> Vec { + match self { + BatchTransition::V0(transition) => transition.security_level_requirement(purpose), + BatchTransition::V1(transition) => transition.security_level_requirement(purpose), + } + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/json_conversion.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/json_conversion.rs similarity index 52% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/json_conversion.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/json_conversion.rs index 1fb61df8b2..80d5c5c791 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/json_conversion.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/json_conversion.rs @@ -1,5 +1,5 @@ -use crate::state_transition::documents_batch_transition::DocumentsBatchTransition; -use crate::state_transition::state_transitions::documents_batch_transition::fields::*; +use crate::state_transition::batch_transition::BatchTransition; +use crate::state_transition::state_transitions::batch_transition::fields::*; use crate::state_transition::{ JsonStateTransitionSerializationOptions, StateTransitionJsonConvert, }; @@ -7,13 +7,13 @@ use crate::ProtocolError; use serde_json::Number; use serde_json::Value as JsonValue; -impl<'a> StateTransitionJsonConvert<'a> for DocumentsBatchTransition { +impl<'a> StateTransitionJsonConvert<'a> for BatchTransition { fn to_json( &self, options: JsonStateTransitionSerializationOptions, ) -> Result { match self { - DocumentsBatchTransition::V0(transition) => { + BatchTransition::V0(transition) => { let mut value = transition.to_json(options)?; let map_value = value.as_object_mut().expect("expected an object"); map_value.insert( @@ -22,6 +22,15 @@ impl<'a> StateTransitionJsonConvert<'a> for DocumentsBatchTransition { ); Ok(value) } + BatchTransition::V1(transition) => { + let mut value = transition.to_json(options)?; + let map_value = value.as_object_mut().expect("expected an object"); + map_value.insert( + STATE_TRANSITION_PROTOCOL_VERSION.to_string(), + JsonValue::Number(Number::from(1)), + ); + Ok(value) + } } } } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs new file mode 100644 index 0000000000..f690b7edc2 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs @@ -0,0 +1,862 @@ +#[cfg(feature = "state-transition-signing")] +use crate::balances::credits::TokenAmount; +#[cfg(feature = "state-transition-signing")] +use crate::data_contract::document_type::DocumentTypeRef; +#[cfg(feature = "state-transition-signing")] +use crate::data_contract::TokenContractPosition; +#[cfg(feature = "state-transition-signing")] +use crate::document::Document; +use crate::fee::Credits; +#[cfg(feature = "state-transition-signing")] +use crate::group::GroupStateTransitionInfoStatus; +#[cfg(feature = "state-transition-signing")] +use crate::identity::signer::Signer; +#[cfg(feature = "state-transition-signing")] +use crate::identity::IdentityPublicKey; +use crate::prelude::IdentityNonce; +#[cfg(feature = "state-transition-signing")] +use crate::prelude::UserFeeIncrease; +#[cfg(feature = "state-transition-signing")] +use crate::prelude::{ + DerivationEncryptionKeyIndex, RecipientKeyIndex, RootEncryptionKeyIndex, SenderKeyIndex, +}; +use crate::state_transition::batch_transition::batched_transition::BatchedTransition; +use crate::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; +use crate::state_transition::batch_transition::methods::v1::DocumentsBatchTransitionMethodsV1; +use crate::state_transition::batch_transition::BatchTransition; +#[cfg(feature = "state-transition-signing")] +use crate::state_transition::batch_transition::{BatchTransitionV0, BatchTransitionV1}; +#[cfg(feature = "state-transition-signing")] +use crate::state_transition::StateTransition; +use crate::tokens::emergency_action::TokenEmergencyAction; +use crate::ProtocolError; +#[cfg(feature = "state-transition-signing")] +use platform_value::Identifier; +#[cfg(feature = "state-transition-signing")] +use platform_version::version::{FeatureVersion, PlatformVersion}; + +pub mod v0; +pub mod v1; + +impl DocumentsBatchTransitionMethodsV0 for BatchTransition { + fn all_document_purchases_amount(&self) -> Result, ProtocolError> { + match self { + BatchTransition::V0(v0) => v0.all_document_purchases_amount(), + BatchTransition::V1(v1) => v1.all_document_purchases_amount(), + } + } + + fn all_conflicting_index_collateral_voting_funds( + &self, + ) -> Result, ProtocolError> { + match self { + BatchTransition::V0(v0) => v0.all_conflicting_index_collateral_voting_funds(), + BatchTransition::V1(v1) => v1.all_conflicting_index_collateral_voting_funds(), + } + } + + fn set_transitions(&mut self, transitions: Vec) { + match self { + BatchTransition::V0(v0) => v0.set_transitions(transitions), + BatchTransition::V1(v1) => v1.set_transitions(transitions), + } + } + + fn set_identity_contract_nonce(&mut self, identity_contract_nonce: IdentityNonce) { + match self { + BatchTransition::V0(v0) => v0.set_identity_contract_nonce(identity_contract_nonce), + BatchTransition::V1(v1) => v1.set_identity_contract_nonce(identity_contract_nonce), + } + } + + #[cfg(feature = "state-transition-signing")] + fn new_document_creation_transition_from_document( + document: Document, + document_type: DocumentTypeRef, + entropy: [u8; 32], + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + create_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 0 => Ok( + BatchTransitionV0::new_document_creation_transition_from_document( + document, + document_type, + entropy, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + create_feature_version, + base_feature_version, + )?, + ), + 1 => Ok( + BatchTransitionV1::new_document_creation_transition_from_document( + document, + document_type, + entropy, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + create_feature_version, + base_feature_version, + )?, + ), + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DocumentsBatchTransition::new_created_from_document".to_string(), + known_versions: vec![0, 1], + received: version, + }), + } + } + + #[cfg(feature = "state-transition-signing")] + fn new_document_replacement_transition_from_document( + document: Document, + document_type: DocumentTypeRef, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + replace_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 0 => Ok( + BatchTransitionV0::new_document_replacement_transition_from_document( + document, + document_type, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + replace_feature_version, + base_feature_version, + )?, + ), + 1 => Ok( + BatchTransitionV1::new_document_replacement_transition_from_document( + document, + document_type, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + replace_feature_version, + base_feature_version, + )?, + ), + version => Err(ProtocolError::UnknownVersionMismatch { + method: + "DocumentsBatchTransition::new_document_replacement_transition_from_document" + .to_string(), + known_versions: vec![0, 1], + received: version, + }), + } + } + + #[cfg(feature = "state-transition-signing")] + fn new_document_transfer_transition_from_document( + document: Document, + document_type: DocumentTypeRef, + recipient_owner_id: Identifier, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + transfer_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 0 => Ok( + BatchTransitionV0::new_document_transfer_transition_from_document( + document, + document_type, + recipient_owner_id, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + transfer_feature_version, + base_feature_version, + )?, + ), + 1 => Ok( + BatchTransitionV1::new_document_transfer_transition_from_document( + document, + document_type, + recipient_owner_id, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + transfer_feature_version, + base_feature_version, + )?, + ), + version => Err(ProtocolError::UnknownVersionMismatch { + method: + "DocumentsBatchTransition::new_document_replacement_transition_from_document" + .to_string(), + known_versions: vec![0, 1], + received: version, + }), + } + } + + #[cfg(feature = "state-transition-signing")] + fn new_document_deletion_transition_from_document( + document: Document, + document_type: DocumentTypeRef, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 0 => Ok( + BatchTransitionV0::new_document_deletion_transition_from_document( + document, + document_type, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + delete_feature_version, + base_feature_version, + )?, + ), + 1 => Ok( + BatchTransitionV1::new_document_deletion_transition_from_document( + document, + document_type, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + delete_feature_version, + base_feature_version, + )?, + ), + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DocumentsBatchTransition::new_document_deletion_transition_from_document" + .to_string(), + known_versions: vec![0, 1], + received: version, + }), + } + } + + #[cfg(feature = "state-transition-signing")] + fn new_document_update_price_transition_from_document( + document: Document, + document_type: DocumentTypeRef, + price: Credits, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + update_price_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 0 => Ok( + BatchTransitionV0::new_document_update_price_transition_from_document( + document, + document_type, + price, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + update_price_feature_version, + base_feature_version, + )?, + ), + 1 => Ok( + BatchTransitionV1::new_document_update_price_transition_from_document( + document, + document_type, + price, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + update_price_feature_version, + base_feature_version, + )?, + ), + version => Err(ProtocolError::UnknownVersionMismatch { + method: + "DocumentsBatchTransition::new_document_update_price_transition_from_document" + .to_string(), + known_versions: vec![0, 1], + received: version, + }), + } + } + + #[cfg(feature = "state-transition-signing")] + fn new_document_purchase_transition_from_document( + document: Document, + document_type: DocumentTypeRef, + new_owner_id: Identifier, + price: Credits, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + purchase_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 0 => Ok( + BatchTransitionV0::new_document_purchase_transition_from_document( + document, + document_type, + new_owner_id, + price, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + purchase_feature_version, + base_feature_version, + )?, + ), + 1 => Ok( + BatchTransitionV1::new_document_purchase_transition_from_document( + document, + document_type, + new_owner_id, + price, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + purchase_feature_version, + base_feature_version, + )?, + ), + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DocumentsBatchTransition::new_document_purchase_transition_from_document" + .to_string(), + known_versions: vec![0, 1], + received: version, + }), + } + } +} + +impl DocumentsBatchTransitionMethodsV1 for BatchTransition { + #[cfg(feature = "state-transition-signing")] + fn new_token_mint_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: TokenContractPosition, + amount: TokenAmount, + issued_to_identity_id: Option, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 1 | 0 + if platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .max_version + >= 1 => + { + BatchTransitionV1::new_token_mint_transition( + token_id, + owner_id, + data_contract_id, + token_contract_position, + amount, + issued_to_identity_id, + public_note, + using_group_info, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + delete_feature_version, + base_feature_version, + ) + } + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DocumentsBatchTransition::new_token_mint_transition".to_string(), + known_versions: vec![1], + received: version, + }), + } + } + + #[cfg(feature = "state-transition-signing")] + fn new_token_burn_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + amount: TokenAmount, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 1 | 0 + if platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .max_version + >= 1 => + { + BatchTransitionV1::new_token_burn_transition( + token_id, + owner_id, + data_contract_id, + token_contract_position, + amount, + public_note, + using_group_info, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + delete_feature_version, + base_feature_version, + ) + } + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DocumentsBatchTransition::new_token_burn_transition".to_string(), + known_versions: vec![1], + received: version, + }), + } + } + + #[cfg(feature = "state-transition-signing")] + fn new_token_transfer_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + amount: TokenAmount, + recipient_id: Identifier, + public_note: Option, + shared_encrypted_note: Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + private_encrypted_note: Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 1 | 0 + if platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .max_version + >= 1 => + { + // Create the transfer transition for batch version 1 + BatchTransitionV1::new_token_transfer_transition( + token_id, + owner_id, + data_contract_id, + token_contract_position, + amount, + recipient_id, + public_note, + shared_encrypted_note, + private_encrypted_note, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + delete_feature_version, + base_feature_version, + ) + } + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DocumentsBatchTransition::new_token_transfer_transition".to_string(), + known_versions: vec![1], + received: version, + }), + } + } + + #[cfg(feature = "state-transition-signing")] + fn new_token_freeze_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + freeze_identity_id: Identifier, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 1 | 0 + if platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .max_version + >= 1 => + { + // Create the freeze transition for batch version 1 + BatchTransitionV1::new_token_freeze_transition( + token_id, + owner_id, + data_contract_id, + token_contract_position, + freeze_identity_id, + public_note, + using_group_info, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + delete_feature_version, + base_feature_version, + ) + } + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DocumentsBatchTransition::new_token_freeze_transition".to_string(), + known_versions: vec![1], + received: version, + }), + } + } + + #[cfg(feature = "state-transition-signing")] + fn new_token_unfreeze_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + unfreeze_identity_id: Identifier, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 1 | 0 + if platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .max_version + >= 1 => + { + // Create the freeze transition for batch version 1 + BatchTransitionV1::new_token_unfreeze_transition( + token_id, + owner_id, + data_contract_id, + token_contract_position, + unfreeze_identity_id, + public_note, + using_group_info, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + delete_feature_version, + base_feature_version, + ) + } + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DocumentsBatchTransition::new_token_unfreeze_transition".to_string(), + known_versions: vec![1], + received: version, + }), + } + } + + #[cfg(feature = "state-transition-signing")] + fn new_token_destroy_frozen_funds_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + frozen_identity_id: Identifier, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 1 | 0 + if platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .max_version + >= 1 => + { + // Create the destroy frozen funds transition for batch version 1 + BatchTransitionV1::new_token_destroy_frozen_funds_transition( + token_id, + owner_id, + data_contract_id, + token_contract_position, + frozen_identity_id, + public_note, + using_group_info, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + delete_feature_version, + base_feature_version, + ) + } + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DocumentsBatchTransition::new_token_destroy_frozen_funds_transition" + .to_string(), + known_versions: vec![1], + received: version, + }), + } + } + + #[cfg(feature = "state-transition-signing")] + fn new_token_emergency_action_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + emergency_action: TokenEmergencyAction, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result { + match batch_feature_version.unwrap_or( + platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .default_current_version, + ) { + 1 | 0 + if platform_version + .dpp + .state_transition_serialization_versions + .batch_state_transition + .max_version + >= 1 => + { + // Create the emergency action transition for batch version 1 + BatchTransitionV1::new_token_emergency_action_transition( + token_id, + owner_id, + data_contract_id, + token_contract_position, + emergency_action, + public_note, + using_group_info, + identity_public_key, + identity_contract_nonce, + user_fee_increase, + signer, + platform_version, + batch_feature_version, + delete_feature_version, + base_feature_version, + ) + } + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DocumentsBatchTransition::new_token_emergency_action_transition" + .to_string(), + known_versions: vec![1], + received: version, + }), + } + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/methods/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v0/mod.rs similarity index 81% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/methods/v0/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v0/mod.rs index ceffcaa7ae..eaadd2777a 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/methods/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v0/mod.rs @@ -11,11 +11,8 @@ use crate::identity::SecurityLevel; use crate::prelude::IdentityNonce; #[cfg(feature = "state-transition-signing")] use crate::prelude::UserFeeIncrease; -use crate::state_transition::documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; -use crate::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_transition::{ - DocumentTransition, DocumentTransitionV0Methods, -}; +use crate::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use crate::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; #[cfg(feature = "state-transition-signing")] use crate::state_transition::StateTransition; use crate::ProtocolError; @@ -23,6 +20,8 @@ use platform_value::Identifier; #[cfg(feature = "state-transition-signing")] use platform_version::version::{FeatureVersion, PlatformVersion}; use std::convert::TryFrom; +use crate::state_transition::batch_transition::batched_transition::{BatchedTransition, BatchedTransitionRef}; +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::DocumentTransitionV0Methods; pub trait DocumentsBatchTransitionMethodsV0: DocumentsBatchTransitionAccessorsV0 { #[cfg(feature = "state-transition-signing")] @@ -129,17 +128,19 @@ pub trait DocumentsBatchTransitionMethodsV0: DocumentsBatchTransitionAccessorsV0 // requirement is the highest level across all documents affected by the ST./ let mut highest_security_level = SecurityLevel::lowest_level(); - for transition in self.transitions().iter() { - let document_type_name = transition.base().document_type_name(); - let data_contract_id = transition.base().data_contract_id(); - let document_security_level = get_data_contract_security_level_requirement( - data_contract_id, - document_type_name.to_owned(), - )?; + for transition in self.transitions_iter() { + if let BatchedTransitionRef::Document(document_transition) = transition { + let document_type_name = document_transition.base().document_type_name(); + let data_contract_id = document_transition.base().data_contract_id(); + let document_security_level = get_data_contract_security_level_requirement( + data_contract_id, + document_type_name.to_owned(), + )?; - // lower enum enum representation means higher in security - if document_security_level < highest_security_level { - highest_security_level = document_security_level + // lower enum representation means higher in security + if document_security_level < highest_security_level { + highest_security_level = document_security_level + } } } Ok(if highest_security_level == SecurityLevel::MASTER { @@ -152,7 +153,7 @@ pub trait DocumentsBatchTransitionMethodsV0: DocumentsBatchTransitionAccessorsV0 }) } - fn set_transitions(&mut self, transitions: Vec); + fn set_transitions(&mut self, transitions: Vec); fn set_identity_contract_nonce(&mut self, identity_contract_nonce: IdentityNonce); @@ -160,5 +161,5 @@ pub trait DocumentsBatchTransitionMethodsV0: DocumentsBatchTransitionAccessorsV0 &self, ) -> Result, ProtocolError>; - fn all_purchases_amount(&self) -> Result, ProtocolError>; + fn all_document_purchases_amount(&self) -> Result, ProtocolError>; } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs new file mode 100644 index 0000000000..db4e2efab7 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs @@ -0,0 +1,157 @@ +use crate::balances::credits::TokenAmount; +use crate::group::GroupStateTransitionInfoStatus; +use crate::identity::signer::Signer; +use crate::identity::IdentityPublicKey; +use crate::prelude::{ + DerivationEncryptionKeyIndex, IdentityNonce, RecipientKeyIndex, RootEncryptionKeyIndex, + SenderKeyIndex, UserFeeIncrease, +}; +use crate::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use crate::state_transition::StateTransition; +use crate::tokens::emergency_action::TokenEmergencyAction; +use crate::version::FeatureVersion; +use crate::ProtocolError; +use platform_value::Identifier; +use platform_version::version::PlatformVersion; + +pub trait DocumentsBatchTransitionMethodsV1: DocumentsBatchTransitionAccessorsV0 { + #[cfg(feature = "state-transition-signing")] + fn new_token_mint_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + amount: TokenAmount, + issued_to_identity_id: Option, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result; + + #[cfg(feature = "state-transition-signing")] + fn new_token_burn_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + amount: TokenAmount, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result; + + #[cfg(feature = "state-transition-signing")] + fn new_token_transfer_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + amount: TokenAmount, + recipient_id: Identifier, + public_note: Option, + shared_encrypted_note: Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + private_encrypted_note: Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result; + + #[cfg(feature = "state-transition-signing")] + fn new_token_freeze_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + frozen_identity_id: Identifier, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result; + + #[cfg(feature = "state-transition-signing")] + fn new_token_unfreeze_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + frozen_identity_id: Identifier, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result; + + #[cfg(feature = "state-transition-signing")] + fn new_token_destroy_frozen_funds_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + frozen_identity_id: Identifier, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result; + + #[cfg(feature = "state-transition-signing")] + fn new_token_emergency_action_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + emergency_action: TokenEmergencyAction, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result; +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/mod.rs new file mode 100644 index 0000000000..a3600a133c --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/mod.rs @@ -0,0 +1,115 @@ +use bincode::{Decode, Encode}; + +use std::convert::TryInto; + +use derive_more::From; + +use platform_value::Value; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; + +use crate::ProtocolError; +use crate::{identity::SecurityLevel, state_transition::StateTransitionFieldTypes}; + +pub use self::batched_transition::{ + document_base_transition, document_create_transition, + document_create_transition::DocumentCreateTransition, document_delete_transition, + document_delete_transition::DocumentDeleteTransition, document_replace_transition, + document_replace_transition::DocumentReplaceTransition, token_base_transition, + token_burn_transition, token_burn_transition::TokenBurnTransition, + token_destroy_frozen_funds_transition, + token_destroy_frozen_funds_transition::TokenDestroyFrozenFundsTransition, + token_emergency_action_transition, + token_emergency_action_transition::TokenEmergencyActionTransition, token_freeze_transition, + token_freeze_transition::TokenFreezeTransition, token_mint_transition, + token_mint_transition::TokenMintTransition, token_transfer_transition, + token_transfer_transition::TokenTransferTransition, token_unfreeze_transition, + token_unfreeze_transition::TokenUnfreezeTransition, +}; + +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize, PlatformSignable}; +use platform_versioning::PlatformVersioned; + +pub mod accessors; +pub mod batched_transition; +pub mod fields; +mod identity_signed; +#[cfg(feature = "state-transition-json-conversion")] +mod json_conversion; +pub mod methods; +pub mod resolvers; +mod state_transition_like; +mod v0; +mod v1; +#[cfg(feature = "validation")] +mod validation; +#[cfg(feature = "state-transition-value-conversion")] +mod value_conversion; +mod version; + +use crate::state_transition::data_contract_update_transition::{ + SIGNATURE, SIGNATURE_PUBLIC_KEY_ID, +}; + +use crate::state_transition::batch_transition::fields::property_names; + +use crate::identity::state_transition::OptionallyAssetLockProved; +pub use v0::*; +pub use v1::*; + +#[derive( + Debug, + Clone, + PartialEq, + Encode, + Decode, + PlatformDeserialize, + PlatformSerialize, + PlatformSignable, + PlatformVersioned, + From, +)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(tag = "$version") +)] +#[platform_serialize(unversioned)] //versioned directly, no need to use platform_version +#[platform_version_path_bounds( + "dpp.state_transition_serialization_versions.batch_state_transition" +)] +pub enum BatchTransition { + #[cfg_attr(feature = "state-transition-serde-conversion", serde(rename = "0"))] + V0(BatchTransitionV0), + #[cfg_attr(feature = "state-transition-serde-conversion", serde(rename = "1"))] + V1(BatchTransitionV1), +} + +impl StateTransitionFieldTypes for BatchTransition { + fn binary_property_paths() -> Vec<&'static str> { + vec![SIGNATURE] + } + + fn identifiers_property_paths() -> Vec<&'static str> { + vec![property_names::OWNER_ID] + } + + fn signature_property_paths() -> Vec<&'static str> { + vec![SIGNATURE, SIGNATURE_PUBLIC_KEY_ID] + } +} + +// TODO: Make a DocumentType method +pub fn get_security_level_requirement(v: &Value, default: SecurityLevel) -> SecurityLevel { + let maybe_security_level: Option = v + .get_optional_integer(property_names::SECURITY_LEVEL_REQUIREMENT) + // TODO: Data Contract must already valid so there is no chance that this will fail + .expect("document schema must be a map"); + + match maybe_security_level { + Some(some_level) => (some_level as u8).try_into().unwrap_or(default), + None => default, + } +} + +impl OptionallyAssetLockProved for BatchTransition {} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/resolvers/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/resolvers/mod.rs new file mode 100644 index 0000000000..2d24cd45f5 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/resolvers/mod.rs @@ -0,0 +1 @@ +pub mod v0; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/resolvers/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/resolvers/v0/mod.rs new file mode 100644 index 0000000000..8dd6fd6ec1 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/resolvers/v0/mod.rs @@ -0,0 +1,26 @@ +use crate::state_transition::batch_transition::batched_transition::token_unfreeze_transition::TokenUnfreezeTransition; +use crate::state_transition::batch_transition::batched_transition::{ + DocumentPurchaseTransition, DocumentTransferTransition, +}; +use crate::state_transition::batch_transition::{ + DocumentCreateTransition, DocumentDeleteTransition, DocumentReplaceTransition, + TokenBurnTransition, TokenDestroyFrozenFundsTransition, TokenEmergencyActionTransition, + TokenFreezeTransition, TokenMintTransition, TokenTransferTransition, +}; + +pub trait BatchTransitionResolversV0 { + fn as_transition_create(&self) -> Option<&DocumentCreateTransition>; + fn as_transition_replace(&self) -> Option<&DocumentReplaceTransition>; + fn as_transition_delete(&self) -> Option<&DocumentDeleteTransition>; + fn as_transition_transfer(&self) -> Option<&DocumentTransferTransition>; + fn as_transition_purchase(&self) -> Option<&DocumentPurchaseTransition>; + fn as_transition_token_burn(&self) -> Option<&TokenBurnTransition>; + fn as_transition_token_mint(&self) -> Option<&TokenMintTransition>; + fn as_transition_token_transfer(&self) -> Option<&TokenTransferTransition>; + fn as_transition_token_freeze(&self) -> Option<&TokenFreezeTransition>; + fn as_transition_token_unfreeze(&self) -> Option<&TokenUnfreezeTransition>; + fn as_transition_token_destroy_frozen_funds( + &self, + ) -> Option<&TokenDestroyFrozenFundsTransition>; + fn as_transition_token_emergency_action(&self) -> Option<&TokenEmergencyActionTransition>; +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/state_transition_like.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/state_transition_like.rs new file mode 100644 index 0000000000..0221ced261 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/state_transition_like.rs @@ -0,0 +1,79 @@ +use crate::prelude::UserFeeIncrease; +use crate::state_transition::batch_transition::BatchTransition; +use crate::state_transition::{StateTransitionLike, StateTransitionType}; +use crate::version::FeatureVersion; +use platform_value::{BinaryData, Identifier}; + +impl StateTransitionLike for BatchTransition { + /// Returns ID of the created contract + fn modified_data_ids(&self) -> Vec { + match self { + BatchTransition::V0(transition) => transition.modified_data_ids(), + BatchTransition::V1(transition) => transition.modified_data_ids(), + } + } + + fn state_transition_protocol_version(&self) -> FeatureVersion { + match self { + BatchTransition::V0(_) => 0, + BatchTransition::V1(_) => 1, + } + } + /// returns the type of State Transition + fn state_transition_type(&self) -> StateTransitionType { + match self { + BatchTransition::V0(transition) => transition.state_transition_type(), + BatchTransition::V1(transition) => transition.state_transition_type(), + } + } + /// returns the signature as a byte-array + fn signature(&self) -> &BinaryData { + match self { + BatchTransition::V0(transition) => transition.signature(), + BatchTransition::V1(transition) => transition.signature(), + } + } + /// set a new signature + fn set_signature(&mut self, signature: BinaryData) { + match self { + BatchTransition::V0(transition) => transition.set_signature(signature), + BatchTransition::V1(transition) => transition.set_signature(signature), + } + } + + fn set_signature_bytes(&mut self, signature: Vec) { + match self { + BatchTransition::V0(transition) => transition.set_signature_bytes(signature), + BatchTransition::V1(transition) => transition.set_signature_bytes(signature), + } + } + + /// returns the fee multiplier + fn user_fee_increase(&self) -> UserFeeIncrease { + match self { + BatchTransition::V0(transition) => transition.user_fee_increase(), + BatchTransition::V1(transition) => transition.user_fee_increase(), + } + } + /// set a fee multiplier + fn set_user_fee_increase(&mut self, user_fee_increase: UserFeeIncrease) { + match self { + BatchTransition::V0(transition) => transition.set_user_fee_increase(user_fee_increase), + BatchTransition::V1(transition) => transition.set_user_fee_increase(user_fee_increase), + } + } + + fn owner_id(&self) -> Identifier { + match self { + BatchTransition::V0(transition) => transition.owner_id(), + BatchTransition::V1(transition) => transition.owner_id(), + } + } + + fn unique_identifiers(&self) -> Vec { + match self { + BatchTransition::V0(transition) => transition.unique_identifiers(), + BatchTransition::V1(transition) => transition.unique_identifiers(), + } + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/cbor_conversion.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/cbor_conversion.rs similarity index 100% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/cbor_conversion.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/cbor_conversion.rs diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/identity_signed.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/identity_signed.rs similarity index 83% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/identity_signed.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/identity_signed.rs index bdc0fe583a..d0f7084b33 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/identity_signed.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/identity_signed.rs @@ -1,10 +1,10 @@ use crate::identity::SecurityLevel::{CRITICAL, HIGH, MEDIUM}; use crate::identity::{KeyID, Purpose, SecurityLevel}; -use crate::state_transition::documents_batch_transition::DocumentsBatchTransitionV0; +use crate::state_transition::batch_transition::BatchTransitionV0; use crate::state_transition::StateTransitionIdentitySigned; -impl StateTransitionIdentitySigned for DocumentsBatchTransitionV0 { +impl StateTransitionIdentitySigned for BatchTransitionV0 { fn signature_public_key_id(&self) -> KeyID { self.signature_public_key_id } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/json_conversion.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/json_conversion.rs new file mode 100644 index 0000000000..59ec75a2e6 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/json_conversion.rs @@ -0,0 +1,4 @@ +use crate::state_transition::batch_transition::BatchTransitionV0; +use crate::state_transition::StateTransitionJsonConvert; + +impl<'a> StateTransitionJsonConvert<'a> for BatchTransitionV0 {} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/mod.rs similarity index 86% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/mod.rs index 4f301bb452..3bd2cb1d1a 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/mod.rs @@ -10,7 +10,7 @@ mod version; use crate::identity::KeyID; -use crate::state_transition::documents_batch_transition::document_transition::DocumentTransition; +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::DocumentTransition; use crate::ProtocolError; use bincode::{Decode, Encode}; use platform_serialization_derive::PlatformSignable; @@ -26,7 +26,7 @@ use serde::{Deserialize, Serialize}; derive(Serialize, Deserialize) )] #[derive(Default)] -pub struct DocumentsBatchTransitionV0 { +pub struct BatchTransitionV0 { pub owner_id: Identifier, pub transitions: Vec, pub user_fee_increase: UserFeeIncrease, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/state_transition_like.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/state_transition_like.rs similarity index 72% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/state_transition_like.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/state_transition_like.rs index ce3faf2c4b..83eb9f4244 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/state_transition_like.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/state_transition_like.rs @@ -1,24 +1,24 @@ use crate::prelude::UserFeeIncrease; -use crate::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_transition::DocumentTransitionV0Methods; -use crate::state_transition::documents_batch_transition::{ - DocumentsBatchTransition, DocumentsBatchTransitionV0, +use crate::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::DocumentTransitionV0Methods; +use crate::state_transition::batch_transition::{ + BatchTransition, BatchTransitionV0, }; -use crate::state_transition::StateTransitionType::DocumentsBatch; +use crate::state_transition::StateTransitionType::Batch; use crate::state_transition::{StateTransition, StateTransitionLike, StateTransitionType}; use crate::version::FeatureVersion; use base64::prelude::BASE64_STANDARD; use base64::Engine; use platform_value::{BinaryData, Identifier}; -impl From for StateTransition { - fn from(value: DocumentsBatchTransitionV0) -> Self { - let document_batch_transition: DocumentsBatchTransition = value.into(); +impl From for StateTransition { + fn from(value: BatchTransitionV0) -> Self { + let document_batch_transition: BatchTransition = value.into(); document_batch_transition.into() } } -impl StateTransitionLike for DocumentsBatchTransitionV0 { +impl StateTransitionLike for BatchTransitionV0 { /// Returns ID of the created contract fn modified_data_ids(&self) -> Vec { self.transitions.iter().map(|t| t.base().id()).collect() @@ -29,7 +29,7 @@ impl StateTransitionLike for DocumentsBatchTransitionV0 { } /// returns the type of State Transition fn state_transition_type(&self) -> StateTransitionType { - DocumentsBatch + Batch } /// returns the signature as a byte-array fn signature(&self) -> &BinaryData { diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/types.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/types.rs similarity index 53% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/types.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/types.rs index 39d85d6437..abe0ef311e 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/types.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/types.rs @@ -1,9 +1,9 @@ -use crate::state_transition::documents_batch_transition::fields::property_names::*; -use crate::state_transition::documents_batch_transition::fields::*; -use crate::state_transition::documents_batch_transition::DocumentsBatchTransitionV0; +use crate::state_transition::batch_transition::fields::property_names::*; +use crate::state_transition::batch_transition::fields::*; +use crate::state_transition::batch_transition::BatchTransitionV0; use crate::state_transition::StateTransitionFieldTypes; -impl StateTransitionFieldTypes for DocumentsBatchTransitionV0 { +impl StateTransitionFieldTypes for BatchTransitionV0 { fn binary_property_paths() -> Vec<&'static str> { vec![SIGNATURE] } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/v0_methods.rs similarity index 77% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/v0_methods.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/v0_methods.rs index 0bafe6b8ae..17b7c8df12 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/v0_methods.rs @@ -1,3 +1,4 @@ +use std::slice::Iter; #[cfg(feature = "state-transition-signing")] use crate::data_contract::document_type::DocumentTypeRef; #[cfg(feature = "state-transition-signing")] @@ -12,21 +13,19 @@ use crate::prelude::IdentityNonce; use crate::prelude::IdentityPublicKey; #[cfg(feature = "state-transition-signing")] use crate::prelude::UserFeeIncrease; -use crate::state_transition::documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use crate::state_transition::batch_transition::accessors::{DocumentsBatchTransitionAccessorsV0}; #[cfg(feature = "state-transition-signing")] -use crate::state_transition::documents_batch_transition::document_create_transition::DocumentCreateTransition; -use crate::state_transition::documents_batch_transition::document_transition::{ - DocumentTransition, DocumentTransitionV0Methods, -}; +use crate::state_transition::batch_transition::document_create_transition::DocumentCreateTransition; +use crate::state_transition::batch_transition::batched_transition::{BatchedTransition, BatchedTransitionMutRef, BatchedTransitionRef}; #[cfg(feature = "state-transition-signing")] -use crate::state_transition::documents_batch_transition::document_transition::{ - DocumentReplaceTransition, DocumentTransferTransition, DocumentPurchaseTransition, DocumentUpdatePriceTransition, +use crate::state_transition::batch_transition::batched_transition::{ + DocumentPurchaseTransition, DocumentReplaceTransition, DocumentTransferTransition, DocumentUpdatePriceTransition, }; -use crate::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; -use crate::state_transition::documents_batch_transition::DocumentsBatchTransitionV0; +use crate::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; +use crate::state_transition::batch_transition::BatchTransitionV0; #[cfg(feature = "state-transition-signing")] -use crate::state_transition::documents_batch_transition::{ - DocumentDeleteTransition, DocumentsBatchTransition, +use crate::state_transition::batch_transition::{ + BatchTransition, DocumentDeleteTransition, }; #[cfg(feature = "state-transition-signing")] use crate::state_transition::StateTransition; @@ -35,20 +34,49 @@ use crate::ProtocolError; use platform_value::Identifier; #[cfg(feature = "state-transition-signing")] use platform_version::version::{FeatureVersion, PlatformVersion}; -use crate::state_transition::documents_batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods; +use crate::state_transition::batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; +use crate::state_transition::batch_transition::batched_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods; +use crate::state_transition::batch_transition::batched_transition::document_transition::DocumentTransition; +use crate::state_transition::batch_transition::resolvers::v0::BatchTransitionResolversV0; +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::DocumentTransitionV0Methods; + +impl DocumentsBatchTransitionAccessorsV0 for BatchTransitionV0 { + type IterType<'a> + = std::iter::Map< + Iter<'a, DocumentTransition>, + fn(&'a DocumentTransition) -> BatchedTransitionRef<'a>, + > + where + Self: 'a; + + /// Iterator for `BatchedTransitionRef` items in version 0. + fn transitions_iter<'a>(&'a self) -> Self::IterType<'a> { + self.transitions.iter().map(BatchedTransitionRef::Document) + } + + /// Returns the total number of transitions (document and token) in version 0. + fn transitions_len(&self) -> usize { + self.transitions.len() + } -impl DocumentsBatchTransitionAccessorsV0 for DocumentsBatchTransitionV0 { - fn transitions(&self) -> &Vec { - &self.transitions + /// Checks if there are no transitions in version 0. + fn transitions_are_empty(&self) -> bool { + self.transitions.is_empty() } - fn transitions_slice(&self) -> &[DocumentTransition] { - self.transitions.as_slice() + /// Returns the first transition, if it exists, as a `BatchedTransitionRef`. + fn first_transition(&self) -> Option { + self.transitions.first().map(BatchedTransitionRef::Document) + } + + fn first_transition_mut(&mut self) -> Option { + self.transitions + .first_mut() + .map(BatchedTransitionMutRef::Document) } } -impl DocumentsBatchTransitionMethodsV0 for DocumentsBatchTransitionV0 { +impl DocumentsBatchTransitionMethodsV0 for BatchTransitionV0 { #[cfg(feature = "state-transition-signing")] fn new_document_creation_transition_from_document( document: Document, @@ -73,7 +101,7 @@ impl DocumentsBatchTransitionMethodsV0 for DocumentsBatchTransitionV0 { create_feature_version, base_feature_version, )?; - let documents_batch_transition: DocumentsBatchTransition = DocumentsBatchTransitionV0 { + let documents_batch_transition: BatchTransition = BatchTransitionV0 { owner_id, transitions: vec![create_transition.into()], user_fee_increase, @@ -112,7 +140,7 @@ impl DocumentsBatchTransitionMethodsV0 for DocumentsBatchTransitionV0 { replace_feature_version, base_feature_version, )?; - let documents_batch_transition: DocumentsBatchTransition = DocumentsBatchTransitionV0 { + let documents_batch_transition: BatchTransition = BatchTransitionV0 { owner_id, transitions: vec![replace_transition.into()], user_fee_increase, @@ -153,7 +181,7 @@ impl DocumentsBatchTransitionMethodsV0 for DocumentsBatchTransitionV0 { transfer_feature_version, base_feature_version, )?; - let documents_batch_transition: DocumentsBatchTransition = DocumentsBatchTransitionV0 { + let documents_batch_transition: BatchTransition = BatchTransitionV0 { owner_id, transitions: vec![transfer_transition.into()], user_fee_increase, @@ -192,7 +220,7 @@ impl DocumentsBatchTransitionMethodsV0 for DocumentsBatchTransitionV0 { delete_feature_version, base_feature_version, )?; - let documents_batch_transition: DocumentsBatchTransition = DocumentsBatchTransitionV0 { + let documents_batch_transition: BatchTransition = BatchTransitionV0 { owner_id, transitions: vec![delete_transition.into()], user_fee_increase, @@ -233,7 +261,7 @@ impl DocumentsBatchTransitionMethodsV0 for DocumentsBatchTransitionV0 { update_price_feature_version, base_feature_version, )?; - let documents_batch_transition: DocumentsBatchTransition = DocumentsBatchTransitionV0 { + let documents_batch_transition: BatchTransition = BatchTransitionV0 { owner_id, transitions: vec![transfer_transition.into()], user_fee_increase, @@ -274,7 +302,7 @@ impl DocumentsBatchTransitionMethodsV0 for DocumentsBatchTransitionV0 { purchase_feature_version, base_feature_version, )?; - let documents_batch_transition: DocumentsBatchTransition = DocumentsBatchTransitionV0 { + let documents_batch_transition: BatchTransition = BatchTransitionV0 { owner_id: new_owner_id, transitions: vec![purchase_transition.into()], user_fee_increase, @@ -291,8 +319,14 @@ impl DocumentsBatchTransitionMethodsV0 for DocumentsBatchTransitionV0 { Ok(state_transition) } - fn set_transitions(&mut self, transitions: Vec) { - self.transitions = transitions; + fn set_transitions(&mut self, transitions: Vec) { + self.transitions = transitions + .into_iter() + .filter_map(|batched_transition| match batched_transition { + BatchedTransition::Document(document) => Some(document), + BatchedTransition::Token(_) => None, + }) + .collect(); } fn set_identity_contract_nonce(&mut self, identity_contract_nonce: IdentityNonce) { @@ -301,7 +335,7 @@ impl DocumentsBatchTransitionMethodsV0 for DocumentsBatchTransitionV0 { .for_each(|transition| transition.set_identity_contract_nonce(identity_contract_nonce)); } - fn all_purchases_amount(&self) -> Result, ProtocolError> { + fn all_document_purchases_amount(&self) -> Result, ProtocolError> { let (total, any_purchases): (Option, bool) = self .transitions .iter() diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/value_conversion.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/value_conversion.rs new file mode 100644 index 0000000000..5438c1e2d0 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/value_conversion.rs @@ -0,0 +1,4 @@ +use crate::state_transition::batch_transition::BatchTransitionV0; +use crate::state_transition::StateTransitionValueConvert; + +impl<'a> StateTransitionValueConvert<'a> for BatchTransitionV0 {} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/version.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/version.rs similarity index 52% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/version.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/version.rs index e087f12cb9..c8a27eafe8 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/version.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v0/version.rs @@ -1,8 +1,8 @@ -use crate::state_transition::documents_batch_transition::DocumentsBatchTransitionV0; +use crate::state_transition::batch_transition::BatchTransitionV0; use crate::state_transition::FeatureVersioned; use crate::version::FeatureVersion; -impl FeatureVersioned for DocumentsBatchTransitionV0 { +impl FeatureVersioned for BatchTransitionV0 { fn feature_version(&self) -> FeatureVersion { 0 } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/identity_signed.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/identity_signed.rs new file mode 100644 index 0000000000..cb735d5d76 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/identity_signed.rs @@ -0,0 +1,23 @@ +use crate::identity::SecurityLevel::{CRITICAL, HIGH, MEDIUM}; +use crate::identity::{KeyID, Purpose, SecurityLevel}; + +use crate::state_transition::batch_transition::BatchTransitionV1; +use crate::state_transition::StateTransitionIdentitySigned; + +impl StateTransitionIdentitySigned for BatchTransitionV1 { + fn signature_public_key_id(&self) -> KeyID { + self.signature_public_key_id + } + + fn set_signature_public_key_id(&mut self, key_id: KeyID) { + self.signature_public_key_id = key_id + } + + fn security_level_requirement(&self, _purpose: Purpose) -> Vec { + // These are the available key levels that must sign the state transition + // However the fact that it is signed by one of these does not guarantee that it + // meets the security level requirement, as that is dictated from within the data + // contract + vec![CRITICAL, HIGH, MEDIUM] + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/json_conversion.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/json_conversion.rs new file mode 100644 index 0000000000..b277e90e87 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/json_conversion.rs @@ -0,0 +1,4 @@ +use crate::state_transition::batch_transition::BatchTransitionV1; +use crate::state_transition::StateTransitionJsonConvert; + +impl<'a> StateTransitionJsonConvert<'a> for BatchTransitionV1 {} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/mod.rs new file mode 100644 index 0000000000..763f93b49a --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/mod.rs @@ -0,0 +1,37 @@ +mod identity_signed; +#[cfg(feature = "state-transition-json-conversion")] +mod json_conversion; +mod state_transition_like; +mod types; +mod v0_methods; +#[cfg(feature = "state-transition-value-conversion")] +mod value_conversion; +mod version; + +use crate::identity::KeyID; + +use crate::state_transition::batch_transition::batched_transition::BatchedTransition; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::PlatformSignable; + +use crate::prelude::UserFeeIncrease; +use platform_value::{BinaryData, Identifier}; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, PartialEq, Encode, Decode, PlatformSignable)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize) +)] +#[derive(Default)] +pub struct BatchTransitionV1 { + pub owner_id: Identifier, + pub transitions: Vec, + pub user_fee_increase: UserFeeIncrease, + #[platform_signable(exclude_from_sig_hash)] + pub signature_public_key_id: KeyID, + #[platform_signable(exclude_from_sig_hash)] + pub signature: BinaryData, +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/state_transition_like.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/state_transition_like.rs new file mode 100644 index 0000000000..f215e8156b --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/state_transition_like.rs @@ -0,0 +1,92 @@ +use crate::prelude::UserFeeIncrease; +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::DocumentTransitionV0Methods; +use crate::state_transition::batch_transition::{BatchTransition, BatchTransitionV1}; +use crate::state_transition::StateTransitionType::Batch; +use crate::state_transition::{StateTransition, StateTransitionLike, StateTransitionType}; +use crate::version::FeatureVersion; +use base64::prelude::BASE64_STANDARD; +use base64::Engine; +use platform_value::{BinaryData, Identifier}; +use crate::state_transition::batch_transition::batched_transition::BatchedTransition; +use crate::state_transition::batch_transition::batched_transition::token_transition::TokenTransitionV0Methods; +use crate::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; + +impl From for StateTransition { + fn from(value: BatchTransitionV1) -> Self { + let document_batch_transition: BatchTransition = value.into(); + document_batch_transition.into() + } +} + +impl StateTransitionLike for BatchTransitionV1 { + /// Returns ID of the created contract + fn modified_data_ids(&self) -> Vec { + self.transitions + .iter() + .filter_map(|t| match t { + BatchedTransition::Document(document_transition) => { + Some(document_transition.base().id()) + } + BatchedTransition::Token(_) => None, + }) + .collect() + } + + fn state_transition_protocol_version(&self) -> FeatureVersion { + 1 + } + /// returns the type of State Transition + fn state_transition_type(&self) -> StateTransitionType { + Batch + } + /// returns the signature as a byte-array + fn signature(&self) -> &BinaryData { + &self.signature + } + /// set a new signature + fn set_signature(&mut self, signature: BinaryData) { + self.signature = signature + } + + fn set_signature_bytes(&mut self, signature: Vec) { + self.signature = BinaryData::new(signature) + } + + /// Get owner ID + fn owner_id(&self) -> Identifier { + self.owner_id + } + + /// We create a list of unique identifiers for the batch + fn unique_identifiers(&self) -> Vec { + self.transitions + .iter() + .map(|transition| match transition { + BatchedTransition::Document(document_transition) => { + format!( + "{}-{}-{:x}", + BASE64_STANDARD.encode(self.owner_id), + BASE64_STANDARD.encode(document_transition.data_contract_id()), + document_transition.identity_contract_nonce() + ) + } + BatchedTransition::Token(token_transition) => { + format!( + "{}-{}-{:x}", + BASE64_STANDARD.encode(self.owner_id), + BASE64_STANDARD.encode(token_transition.data_contract_id()), + token_transition.identity_contract_nonce() + ) + } + }) + .collect() + } + + fn user_fee_increase(&self) -> UserFeeIncrease { + self.user_fee_increase + } + + fn set_user_fee_increase(&mut self, user_fee_increase: UserFeeIncrease) { + self.user_fee_increase = user_fee_increase + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/types.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/types.rs new file mode 100644 index 0000000000..2a3095b8f9 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/types.rs @@ -0,0 +1,18 @@ +use crate::state_transition::batch_transition::fields::property_names::*; +use crate::state_transition::batch_transition::fields::*; +use crate::state_transition::batch_transition::BatchTransitionV1; +use crate::state_transition::StateTransitionFieldTypes; + +impl StateTransitionFieldTypes for BatchTransitionV1 { + fn binary_property_paths() -> Vec<&'static str> { + vec![SIGNATURE] + } + + fn identifiers_property_paths() -> Vec<&'static str> { + vec![OWNER_ID] + } + + fn signature_property_paths() -> Vec<&'static str> { + vec![SIGNATURE, SIGNATURE_PUBLIC_KEY_ID] + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs new file mode 100644 index 0000000000..91d9120c44 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs @@ -0,0 +1,894 @@ +#[cfg(feature = "state-transition-signing")] +use crate::data_contract::document_type::DocumentTypeRef; +#[cfg(feature = "state-transition-signing")] +use crate::document::{Document, DocumentV0Getters}; +use crate::fee::Credits; +#[cfg(feature = "state-transition-signing")] +use crate::identity::signer::Signer; +#[cfg(feature = "state-transition-signing")] +use crate::identity::SecurityLevel; +#[cfg(feature = "state-transition-signing")] +use crate::prelude::IdentityPublicKey; +#[cfg(feature = "state-transition-signing")] +use crate::prelude::UserFeeIncrease; +use crate::prelude::{ + DerivationEncryptionKeyIndex, IdentityNonce, RecipientKeyIndex, RootEncryptionKeyIndex, + SenderKeyIndex, +}; +use crate::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use crate::state_transition::batch_transition::batched_transition::{ + BatchedTransition, BatchedTransitionMutRef, BatchedTransitionRef, +}; +#[cfg(feature = "state-transition-signing")] +use crate::state_transition::batch_transition::batched_transition::{ + DocumentPurchaseTransition, DocumentReplaceTransition, DocumentTransferTransition, + DocumentUpdatePriceTransition, +}; +#[cfg(feature = "state-transition-signing")] +use crate::state_transition::batch_transition::document_create_transition::DocumentCreateTransition; +use crate::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; +use std::iter::Map; +use std::slice::Iter; + +use crate::state_transition::batch_transition::{BatchTransitionV1, TokenBurnTransition, TokenDestroyFrozenFundsTransition, TokenEmergencyActionTransition, TokenFreezeTransition, TokenMintTransition, TokenTransferTransition, TokenUnfreezeTransition}; +#[cfg(feature = "state-transition-signing")] +use crate::state_transition::batch_transition::{ + BatchTransition, DocumentDeleteTransition, +}; +#[cfg(feature = "state-transition-signing")] +use crate::state_transition::StateTransition; +use crate::ProtocolError; +#[cfg(feature = "state-transition-signing")] +use platform_value::Identifier; +#[cfg(feature = "state-transition-signing")] +use platform_version::version::{FeatureVersion, PlatformVersion}; +use crate::balances::credits::TokenAmount; +use crate::group::{GroupStateTransitionInfo, GroupStateTransitionInfoStatus}; +use crate::state_transition::batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; +use crate::state_transition::batch_transition::batched_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::methods::v1::DocumentsBatchTransitionMethodsV1; +use crate::state_transition::batch_transition::resolvers::v0::BatchTransitionResolversV0; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_base_transition::v0::TokenBaseTransitionV0; +use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use crate::state_transition::batch_transition::token_burn_transition::TokenBurnTransitionV0; +use crate::state_transition::batch_transition::token_destroy_frozen_funds_transition::TokenDestroyFrozenFundsTransitionV0; +use crate::state_transition::batch_transition::token_emergency_action_transition::TokenEmergencyActionTransitionV0; +use crate::state_transition::batch_transition::token_freeze_transition::TokenFreezeTransitionV0; +use crate::state_transition::batch_transition::token_mint_transition::TokenMintTransitionV0; +use crate::state_transition::batch_transition::token_transfer_transition::TokenTransferTransitionV0; +use crate::state_transition::batch_transition::token_unfreeze_transition::TokenUnfreezeTransitionV0; +#[cfg(feature = "state-transition-signing")] +use crate::tokens::emergency_action::TokenEmergencyAction; + +impl DocumentsBatchTransitionAccessorsV0 for BatchTransitionV1 { + type IterType<'a> + = Map, fn(&'a BatchedTransition) -> BatchedTransitionRef<'a>> + where + Self: 'a; + + /// Iterator for `BatchedTransitionRef` items in version 1. + fn transitions_iter<'a>(&'a self) -> Self::IterType<'a> { + self.transitions + .iter() + .map(|transition| transition.borrow_as_ref()) + } + + /// Returns the total number of transitions (document and token) in version 1. + fn transitions_len(&self) -> usize { + self.transitions.len() + } + + /// Checks if there are no transitions in version 1. + fn transitions_are_empty(&self) -> bool { + self.transitions.is_empty() + } + + /// Returns the first transition, if it exists, as a `BatchedTransitionRef`. + fn first_transition(&self) -> Option { + self.transitions + .first() + .map(|transition| transition.borrow_as_ref()) + } + + /// Returns the first transition, if it exists, as a `BatchedTransitionMutRef`. + fn first_transition_mut(&mut self) -> Option { + self.transitions + .first_mut() + .map(|transition| transition.borrow_as_mut()) + } +} + +impl DocumentsBatchTransitionMethodsV0 for BatchTransitionV1 { + #[cfg(feature = "state-transition-signing")] + fn new_document_creation_transition_from_document( + document: Document, + document_type: DocumentTypeRef, + entropy: [u8; 32], + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + _batch_feature_version: Option, + create_feature_version: Option, + base_feature_version: Option, + ) -> Result { + let owner_id = document.owner_id(); + let create_transition = DocumentCreateTransition::from_document( + document, + document_type, + entropy, + identity_contract_nonce, + platform_version, + create_feature_version, + base_feature_version, + )?; + let documents_batch_transition: BatchTransition = BatchTransitionV1 { + owner_id, + transitions: vec![BatchedTransition::Document(create_transition.into())], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + let mut state_transition: StateTransition = documents_batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + Ok(state_transition) + } + + #[cfg(feature = "state-transition-signing")] + fn new_document_replacement_transition_from_document( + document: Document, + document_type: DocumentTypeRef, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + _batch_feature_version: Option, + replace_feature_version: Option, + base_feature_version: Option, + ) -> Result { + let owner_id = document.owner_id(); + let replace_transition = DocumentReplaceTransition::from_document( + document, + document_type, + identity_contract_nonce, + platform_version, + replace_feature_version, + base_feature_version, + )?; + let documents_batch_transition: BatchTransition = BatchTransitionV1 { + owner_id, + transitions: vec![BatchedTransition::Document(replace_transition.into())], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + let mut state_transition: StateTransition = documents_batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + Ok(state_transition) + } + + #[cfg(feature = "state-transition-signing")] + fn new_document_transfer_transition_from_document( + document: Document, + document_type: DocumentTypeRef, + recipient_owner_id: Identifier, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + _batch_feature_version: Option, + transfer_feature_version: Option, + base_feature_version: Option, + ) -> Result { + let owner_id = document.owner_id(); + let transfer_transition = DocumentTransferTransition::from_document( + document, + document_type, + identity_contract_nonce, + recipient_owner_id, + platform_version, + transfer_feature_version, + base_feature_version, + )?; + let documents_batch_transition: BatchTransition = BatchTransitionV1 { + owner_id, + transitions: vec![BatchedTransition::Document(transfer_transition.into())], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + let mut state_transition: StateTransition = documents_batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + Ok(state_transition) + } + + #[cfg(feature = "state-transition-signing")] + fn new_document_deletion_transition_from_document( + document: Document, + document_type: DocumentTypeRef, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + _batch_feature_version: Option, + delete_feature_version: Option, + base_feature_version: Option, + ) -> Result { + let owner_id = document.owner_id(); + let delete_transition = DocumentDeleteTransition::from_document( + document, + document_type, + identity_contract_nonce, + platform_version, + delete_feature_version, + base_feature_version, + )?; + let documents_batch_transition: BatchTransition = BatchTransitionV1 { + owner_id, + transitions: vec![BatchedTransition::Document(delete_transition.into())], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + let mut state_transition: StateTransition = documents_batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + Ok(state_transition) + } + + #[cfg(feature = "state-transition-signing")] + fn new_document_update_price_transition_from_document( + document: Document, + document_type: DocumentTypeRef, + price: Credits, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + _batch_feature_version: Option, + update_price_feature_version: Option, + base_feature_version: Option, + ) -> Result { + let owner_id = document.owner_id(); + let transfer_transition = DocumentUpdatePriceTransition::from_document( + document, + document_type, + price, + identity_contract_nonce, + platform_version, + update_price_feature_version, + base_feature_version, + )?; + let documents_batch_transition: BatchTransition = BatchTransitionV1 { + owner_id, + transitions: vec![BatchedTransition::Document(transfer_transition.into())], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + let mut state_transition: StateTransition = documents_batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + Ok(state_transition) + } + + #[cfg(feature = "state-transition-signing")] + fn new_document_purchase_transition_from_document( + document: Document, + document_type: DocumentTypeRef, + new_owner_id: Identifier, + price: Credits, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + platform_version: &PlatformVersion, + _batch_feature_version: Option, + purchase_feature_version: Option, + base_feature_version: Option, + ) -> Result { + let purchase_transition = DocumentPurchaseTransition::from_document( + document, + document_type, + price, + identity_contract_nonce, + platform_version, + purchase_feature_version, + base_feature_version, + )?; + let documents_batch_transition: BatchTransition = BatchTransitionV1 { + owner_id: new_owner_id, + transitions: vec![BatchedTransition::Document(purchase_transition.into())], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + let mut state_transition: StateTransition = documents_batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + Ok(state_transition) + } + + fn set_transitions(&mut self, transitions: Vec) { + self.transitions = transitions; + } + + fn set_identity_contract_nonce(&mut self, identity_contract_nonce: IdentityNonce) { + self.transitions + .iter_mut() + .for_each(|transition| transition.set_identity_contract_nonce(identity_contract_nonce)); + } + + fn all_document_purchases_amount(&self) -> Result, ProtocolError> { + let (total, any_purchases): (Option, bool) = self + .transitions + .iter() + .filter_map(|transition| { + transition + .as_transition_purchase() + .map(|purchase| purchase.price()) + }) + .fold((None, false), |(acc, _), price| match acc { + Some(acc_val) => acc_val + .checked_add(price) + .map_or((None, true), |sum| (Some(sum), true)), + None => (Some(price), true), + }); + + match (total, any_purchases) { + (Some(total), _) => Ok(Some(total)), + (None, true) => Err(ProtocolError::Overflow("overflow in all purchases amount")), // Overflow occurred + _ => Ok(None), // No purchases were found + } + } + + fn all_conflicting_index_collateral_voting_funds( + &self, + ) -> Result, ProtocolError> { + let (total, any_voting_funds): (Option, bool) = self + .transitions + .iter() + .filter_map(|transition| { + transition + .as_transition_create() + .and_then(|document_create_transition| { + // Safely sum up values to avoid overflow. + document_create_transition + .prefunded_voting_balance() + .as_ref() + .map(|(_, credits)| *credits) + }) + }) + .fold((None, false), |(acc, _), price| match acc { + Some(acc_val) => acc_val + .checked_add(price) + .map_or((None, true), |sum| (Some(sum), true)), + None => (Some(price), true), + }); + + match (total, any_voting_funds) { + (Some(total), _) => Ok(Some(total)), + (None, true) => Err(ProtocolError::Overflow( + "overflow in all voting funds amount", + )), // Overflow occurred + _ => Ok(None), + } + } +} + +impl DocumentsBatchTransitionMethodsV1 for BatchTransitionV1 { + #[cfg(feature = "state-transition-signing")] + fn new_token_mint_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + amount: TokenAmount, + issued_to_identity_id: Option, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + _platform_version: &PlatformVersion, + _batch_feature_version: Option, + _delete_feature_version: Option, + _base_feature_version: Option, + ) -> Result { + let mut mint_transition = TokenMintTransition::V0(TokenMintTransitionV0 { + base: TokenBaseTransition::V0(TokenBaseTransitionV0 { + identity_contract_nonce, + token_contract_position, + data_contract_id, + token_id, + using_group_info: None, + }), + issued_to_identity_id, + amount, + public_note, + }); + + if let Some(using_group_info_status) = using_group_info { + match using_group_info_status { + GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer( + group_contract_position, + ) => { + let action_id = mint_transition.calculate_action_id(owner_id); + mint_transition.base_mut().set_using_group_info(Some( + GroupStateTransitionInfo { + group_contract_position, + action_id, + action_is_proposer: true, + }, + )) + } + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner(info) => { + mint_transition.base_mut().set_using_group_info(Some(info)) + } + } + } + + let documents_batch_transition: BatchTransition = BatchTransitionV1 { + owner_id, + transitions: vec![BatchedTransition::Token(mint_transition.into())], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + let mut state_transition: StateTransition = documents_batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + Ok(state_transition) + } + + #[cfg(feature = "state-transition-signing")] + fn new_token_burn_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + amount: TokenAmount, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + _platform_version: &PlatformVersion, + _batch_feature_version: Option, + _delete_feature_version: Option, + _base_feature_version: Option, + ) -> Result { + let mut burn_transition = TokenBurnTransition::V0(TokenBurnTransitionV0 { + base: TokenBaseTransition::V0(TokenBaseTransitionV0 { + identity_contract_nonce, + token_contract_position, + data_contract_id, + token_id, + using_group_info: None, + }), + burn_amount: amount, + public_note, + }); + + if let Some(using_group_info_status) = using_group_info { + match using_group_info_status { + GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer( + group_contract_position, + ) => { + let action_id = burn_transition.calculate_action_id(owner_id); + burn_transition.base_mut().set_using_group_info(Some( + GroupStateTransitionInfo { + group_contract_position, + action_id, + action_is_proposer: true, + }, + )) + } + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner(info) => { + burn_transition.base_mut().set_using_group_info(Some(info)) + } + } + } + + // Wrap in a batch transition + let documents_batch_transition: BatchTransition = BatchTransitionV1 { + owner_id, + transitions: vec![BatchedTransition::Token(burn_transition.into())], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + + // Create the state transition + let mut state_transition: StateTransition = documents_batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + + Ok(state_transition) + } + #[cfg(feature = "state-transition-signing")] + fn new_token_transfer_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + amount: TokenAmount, + recipient_id: Identifier, + public_note: Option, + shared_encrypted_note: Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + private_encrypted_note: Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + _platform_version: &PlatformVersion, + _batch_feature_version: Option, + _delete_feature_version: Option, + _base_feature_version: Option, + ) -> Result { + // Create the transfer transition for batch version 1 + let transfer_transition = TokenTransferTransition::V0(TokenTransferTransitionV0 { + base: TokenBaseTransition::V0(TokenBaseTransitionV0 { + identity_contract_nonce, + token_contract_position, + data_contract_id, + token_id, + using_group_info: None, + }), + recipient_id, + amount, + public_note, + shared_encrypted_note, + private_encrypted_note, + }); + + // Wrap in a batch transition + let documents_batch_transition: BatchTransition = BatchTransitionV1 { + owner_id, + transitions: vec![BatchedTransition::Token(transfer_transition.into())], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + + // Create the state transition + let mut state_transition: StateTransition = documents_batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + + Ok(state_transition) + } + + #[cfg(feature = "state-transition-signing")] + fn new_token_freeze_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + frozen_identity_id: Identifier, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + _platform_version: &PlatformVersion, + _batch_feature_version: Option, + _delete_feature_version: Option, + _base_feature_version: Option, + ) -> Result { + let mut freeze_transition = TokenFreezeTransition::V0(TokenFreezeTransitionV0 { + base: TokenBaseTransition::V0(TokenBaseTransitionV0 { + identity_contract_nonce, + token_contract_position, + data_contract_id, + token_id, + using_group_info: None, + }), + frozen_identity_id, + public_note, + }); + + if let Some(using_group_info_status) = using_group_info { + match using_group_info_status { + GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer( + group_contract_position, + ) => { + let action_id = freeze_transition.calculate_action_id(owner_id); + freeze_transition.base_mut().set_using_group_info(Some( + GroupStateTransitionInfo { + group_contract_position, + action_id, + action_is_proposer: true, + }, + )) + } + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner(info) => { + freeze_transition + .base_mut() + .set_using_group_info(Some(info)) + } + } + } + + let documents_batch_transition: BatchTransition = BatchTransitionV1 { + owner_id, + transitions: vec![BatchedTransition::Token(freeze_transition.into())], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + let mut state_transition: StateTransition = documents_batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + Ok(state_transition) + } + + #[cfg(feature = "state-transition-signing")] + fn new_token_unfreeze_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + frozen_identity_id: Identifier, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + _platform_version: &PlatformVersion, + _batch_feature_version: Option, + _delete_feature_version: Option, + _base_feature_version: Option, + ) -> Result { + let mut unfreeze_transition = TokenUnfreezeTransition::V0(TokenUnfreezeTransitionV0 { + base: TokenBaseTransition::V0(TokenBaseTransitionV0 { + identity_contract_nonce, + token_contract_position, + data_contract_id, + token_id, + using_group_info: None, + }), + frozen_identity_id, + public_note, + }); + + if let Some(using_group_info_status) = using_group_info { + match using_group_info_status { + GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer( + group_contract_position, + ) => { + let action_id = unfreeze_transition.calculate_action_id(owner_id); + unfreeze_transition.base_mut().set_using_group_info(Some( + GroupStateTransitionInfo { + group_contract_position, + action_id, + action_is_proposer: true, + }, + )) + } + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner(info) => { + unfreeze_transition + .base_mut() + .set_using_group_info(Some(info)) + } + } + } + + let documents_batch_transition: BatchTransition = BatchTransitionV1 { + owner_id, + transitions: vec![BatchedTransition::Token(unfreeze_transition.into())], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + let mut state_transition: StateTransition = documents_batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + Ok(state_transition) + } + + #[cfg(feature = "state-transition-signing")] + fn new_token_destroy_frozen_funds_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + frozen_identity_id: Identifier, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + _platform_version: &PlatformVersion, + _batch_feature_version: Option, + _delete_feature_version: Option, + _base_feature_version: Option, + ) -> Result { + let mut destroy_frozen_funds_transition = + TokenDestroyFrozenFundsTransition::V0(TokenDestroyFrozenFundsTransitionV0 { + base: TokenBaseTransition::V0(TokenBaseTransitionV0 { + identity_contract_nonce, + token_contract_position, + data_contract_id, + token_id, + using_group_info: None, + }), + frozen_identity_id, + public_note, + }); + + if let Some(using_group_info_status) = using_group_info { + match using_group_info_status { + GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer( + group_contract_position, + ) => { + let action_id = destroy_frozen_funds_transition.calculate_action_id(owner_id); + destroy_frozen_funds_transition + .base_mut() + .set_using_group_info(Some(GroupStateTransitionInfo { + group_contract_position, + action_id, + action_is_proposer: true, + })) + } + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner(info) => { + destroy_frozen_funds_transition + .base_mut() + .set_using_group_info(Some(info)) + } + } + } + + let batch_transition: BatchTransition = BatchTransitionV1 { + owner_id, + transitions: vec![BatchedTransition::Token( + destroy_frozen_funds_transition.into(), + )], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + let mut state_transition: StateTransition = batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + Ok(state_transition) + } + + #[cfg(feature = "state-transition-signing")] + fn new_token_emergency_action_transition( + token_id: Identifier, + owner_id: Identifier, + data_contract_id: Identifier, + token_contract_position: u16, + emergency_action: TokenEmergencyAction, + public_note: Option, + using_group_info: Option, + identity_public_key: &IdentityPublicKey, + identity_contract_nonce: IdentityNonce, + user_fee_increase: UserFeeIncrease, + signer: &S, + _platform_version: &PlatformVersion, + _batch_feature_version: Option, + _delete_feature_version: Option, + _base_feature_version: Option, + ) -> Result { + let mut emergency_action_transition = + TokenEmergencyActionTransition::V0(TokenEmergencyActionTransitionV0 { + base: TokenBaseTransition::V0(TokenBaseTransitionV0 { + identity_contract_nonce, + token_contract_position, + data_contract_id, + token_id, + using_group_info: None, + }), + emergency_action, + public_note, + }); + + if let Some(using_group_info_status) = using_group_info { + match using_group_info_status { + GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer( + group_contract_position, + ) => { + let action_id = emergency_action_transition.calculate_action_id(owner_id); + emergency_action_transition + .base_mut() + .set_using_group_info(Some(GroupStateTransitionInfo { + group_contract_position, + action_id, + action_is_proposer: true, + })) + } + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner(info) => { + emergency_action_transition + .base_mut() + .set_using_group_info(Some(info)) + } + } + } + + let batch_transition: BatchTransition = BatchTransitionV1 { + owner_id, + transitions: vec![BatchedTransition::Token(emergency_action_transition.into())], + user_fee_increase, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + let mut state_transition: StateTransition = batch_transition.into(); + state_transition.sign_external( + identity_public_key, + signer, + Some(|_, _| Ok(SecurityLevel::HIGH)), + )?; + Ok(state_transition) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/value_conversion.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/value_conversion.rs new file mode 100644 index 0000000000..53a75f0a89 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/value_conversion.rs @@ -0,0 +1,4 @@ +use crate::state_transition::batch_transition::BatchTransitionV1; +use crate::state_transition::StateTransitionValueConvert; + +impl<'a> StateTransitionValueConvert<'a> for BatchTransitionV1 {} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/version.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/version.rs new file mode 100644 index 0000000000..dcedbd2896 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/version.rs @@ -0,0 +1,9 @@ +use crate::state_transition::batch_transition::BatchTransitionV1; +use crate::state_transition::FeatureVersioned; +use crate::version::FeatureVersion; + +impl FeatureVersioned for BatchTransitionV1 { + fn feature_version(&self) -> FeatureVersion { + 1 + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/find_duplicates_by_id/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/find_duplicates_by_id/mod.rs similarity index 84% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/find_duplicates_by_id/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/find_duplicates_by_id/mod.rs index 00206feeb5..ccb6ab1530 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/find_duplicates_by_id/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/find_duplicates_by_id/mod.rs @@ -1,4 +1,4 @@ -use crate::state_transition::documents_batch_transition::document_transition::DocumentTransition; +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::DocumentTransition; use crate::ProtocolError; use platform_version::version::PlatformVersion; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/find_duplicates_by_id/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/find_duplicates_by_id/v0/mod.rs similarity index 73% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/find_duplicates_by_id/v0/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/find_duplicates_by_id/v0/mod.rs index 71e1b19b29..27f1f46368 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/find_duplicates_by_id/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/find_duplicates_by_id/v0/mod.rs @@ -1,11 +1,8 @@ -use crate::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_transition::{ - DocumentTransition, DocumentTransitionV0Methods, -}; - +use crate::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; use platform_value::Identifier; use std::collections::btree_map::Entry; use std::collections::BTreeMap; +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::{DocumentTransition, DocumentTransitionV0Methods}; #[derive(Hash, Eq, PartialEq, Ord, PartialOrd)] struct TransitionFingerprint<'a> { @@ -51,14 +48,14 @@ pub(super) fn find_duplicates_by_id<'a>( #[cfg(test)] mod test { use super::*; - use crate::state_transition::documents_batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; - use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; - use crate::state_transition::documents_batch_transition::document_create_transition::DocumentCreateTransitionV0; - use crate::state_transition::documents_batch_transition::document_transition::document_delete_transition::DocumentDeleteTransitionV0; - use crate::state_transition::documents_batch_transition::document_transition::DocumentCreateTransition; - use crate::state_transition::documents_batch_transition::document_transition::DocumentReplaceTransition; - use crate::state_transition::documents_batch_transition::document_transition::DocumentDeleteTransition; - use crate::state_transition::documents_batch_transition::document_transition::document_replace_transition::DocumentReplaceTransitionV0; + use crate::state_transition::batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; + use crate::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; + use crate::state_transition::batch_transition::document_create_transition::DocumentCreateTransitionV0; + use crate::state_transition::batch_transition::batched_transition::document_delete_transition::DocumentDeleteTransitionV0; + use crate::state_transition::batch_transition::batched_transition::DocumentCreateTransition; + use crate::state_transition::batch_transition::batched_transition::DocumentReplaceTransition; + use crate::state_transition::batch_transition::batched_transition::DocumentDeleteTransition; + use crate::state_transition::batch_transition::batched_transition::document_replace_transition::DocumentReplaceTransitionV0; #[test] fn test_duplicates() { diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/mod.rs similarity index 100% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/mod.rs diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/validate_basic_structure/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/validate_basic_structure/mod.rs similarity index 88% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/validate_basic_structure/mod.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/validate_basic_structure/mod.rs index 6989178211..b2f89c158d 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/validate_basic_structure/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/validate_basic_structure/mod.rs @@ -1,11 +1,11 @@ -use crate::state_transition::documents_batch_transition::DocumentsBatchTransition; +use crate::state_transition::batch_transition::BatchTransition; use crate::validation::SimpleConsensusValidationResult; use crate::ProtocolError; use platform_version::version::PlatformVersion; mod v0; -impl DocumentsBatchTransition { +impl BatchTransition { pub fn validate_base_structure( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/validate_basic_structure/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/validate_basic_structure/v0/mod.rs new file mode 100644 index 0000000000..c90794beb7 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/validate_basic_structure/v0/mod.rs @@ -0,0 +1,191 @@ +use crate::consensus::basic::document::{ + DocumentTransitionsAreAbsentError, DuplicateDocumentTransitionsWithIdsError, + MaxDocumentsTransitionsExceededError, NonceOutOfBoundsError, +}; +use crate::consensus::basic::BasicError; + +use crate::identity::identity_nonce::MISSING_IDENTITY_REVISIONS_FILTER; +use crate::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use crate::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; +use crate::state_transition::batch_transition::validation::find_duplicates_by_id::find_duplicates_by_id; +use crate::state_transition::batch_transition::BatchTransition; +use crate::validation::SimpleConsensusValidationResult; +use crate::ProtocolError; +use platform_value::Identifier; +use platform_version::version::PlatformVersion; +use std::collections::btree_map::Entry; +use std::collections::BTreeMap; +use crate::consensus::basic::group::GroupActionNotAllowedOnTransitionError; +use crate::consensus::basic::token::{InvalidActionIdError, InvalidTokenIdError, TokenTransferToOurselfError}; +use crate::state_transition::batch_transition::batched_transition::BatchedTransitionRef; +use crate::state_transition::batch_transition::batched_transition::token_transition::{TokenTransition, TokenTransitionV0Methods}; +use crate::state_transition::batch_transition::batched_transition::token_transition_action_type::TokenTransitionActionTypeGetter; +use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use crate::state_transition::batch_transition::token_transfer_transition::v0::v0_methods::TokenTransferTransitionV0Methods; +use crate::state_transition::state_transitions::document::batch_transition::batched_transition::document_transition::{DocumentTransition, DocumentTransitionV0Methods}; +use crate::state_transition::StateTransitionLike; + +impl BatchTransition { + #[inline(always)] + pub(super) fn validate_base_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result { + if self.transitions_are_empty() { + return Ok(SimpleConsensusValidationResult::new_with_error( + DocumentTransitionsAreAbsentError::new().into(), + )); + } + + let transitions_len = self.transitions_len(); + + if transitions_len > u16::MAX as usize + || transitions_len as u16 + > platform_version + .system_limits + .max_transitions_in_documents_batch + { + return Ok(SimpleConsensusValidationResult::new_with_error( + MaxDocumentsTransitionsExceededError::new( + platform_version + .system_limits + .max_transitions_in_documents_batch, + ) + .into(), + )); + } + + // Group transitions by contract ID + let mut document_transitions_by_contracts: BTreeMap> = + BTreeMap::new(); + + // Group transitions by contract ID + let mut token_transitions: Vec<&TokenTransition> = vec![]; + + self.transitions_iter() + .for_each(|batch_transition| match batch_transition { + BatchedTransitionRef::Document(document_transition) => { + let contract_identifier = document_transition.data_contract_id(); + + match document_transitions_by_contracts.entry(contract_identifier) { + Entry::Vacant(vacant) => { + vacant.insert(vec![document_transition]); + } + Entry::Occupied(mut identifiers) => { + identifiers.get_mut().push(document_transition); + } + }; + } + BatchedTransitionRef::Token(token_transition) => { + token_transitions.push(token_transition) + } + }); + + let mut result = SimpleConsensusValidationResult::default(); + + for transitions in document_transitions_by_contracts.values() { + for transition in transitions { + // We need to make sure that the identity contract nonce is within the allowed bounds + // This means that it is stored on 40 bits + if transition.identity_contract_nonce() & MISSING_IDENTITY_REVISIONS_FILTER > 0 { + result.add_error(BasicError::NonceOutOfBoundsError( + NonceOutOfBoundsError::new(transition.identity_contract_nonce()), + )); + } + } + + // Make sure we don't have duplicate transitions + let duplicate_transitions = find_duplicates_by_id(transitions, platform_version)?; + + if !duplicate_transitions.is_empty() { + let references: Vec<(String, [u8; 32])> = duplicate_transitions + .into_iter() + .map(|transition| { + Ok(( + transition.base().document_type_name().clone(), + transition.base().id().to_buffer(), + )) + }) + .collect::, anyhow::Error>>()?; + + result.add_error(BasicError::DuplicateDocumentTransitionsWithIdsError( + DuplicateDocumentTransitionsWithIdsError::new(references), + )); + } + } + + for transition in token_transitions { + // We need to make sure that the identity contract nonce is within the allowed bounds + // This means that it is stored on 40 bits + if transition.identity_contract_nonce() & MISSING_IDENTITY_REVISIONS_FILTER > 0 { + result.add_error(BasicError::NonceOutOfBoundsError( + NonceOutOfBoundsError::new(transition.identity_contract_nonce()), + )); + } + + let transition_token_id = transition.base().token_id(); + let calculated_token_id = transition.base().calculate_token_id(); + + // We need to verify that the token id is correct + if transition_token_id != calculated_token_id { + result.add_error(BasicError::InvalidTokenIdError(InvalidTokenIdError::new( + calculated_token_id, + transition_token_id, + ))); + } + + match transition { + TokenTransition::Burn(_) => {} + TokenTransition::Mint(_) => {} + TokenTransition::Transfer(transfer) => { + if transfer.recipient_id() == self.owner_id() { + // We can not transfer to ourselves + result.add_error(BasicError::TokenTransferToOurselfError( + TokenTransferToOurselfError::new( + transition.token_id(), + self.owner_id(), + ), + )); + } + } + TokenTransition::Freeze(_) => {} + TokenTransition::Unfreeze(_) => {} + TokenTransition::DestroyFrozenFunds(_) => {} + TokenTransition::EmergencyAction(_) => {} + } + + // We need to verify that the action id given matches the expected action id + // But only if we are the proposer + if let Some(group_state_transition_info) = transition.base().using_group_info() { + if group_state_transition_info.action_is_proposer { + if let Some(calculated_action_id) = + transition.calculate_action_id(self.owner_id()) + { + if group_state_transition_info.action_id != calculated_action_id { + result.add_error(BasicError::InvalidActionIdError( + InvalidActionIdError::new( + calculated_action_id, + group_state_transition_info.action_id, + ), + )); + } + } else { + result.add_error(BasicError::GroupActionNotAllowedOnTransitionError( + GroupActionNotAllowedOnTransitionError::new( + transition.action_type().to_string(), + ), + )); + } + } else if !transition.can_calculate_action_id() { + result.add_error(BasicError::GroupActionNotAllowedOnTransitionError( + GroupActionNotAllowedOnTransitionError::new( + transition.action_type().to_string(), + ), + )); + } + } + } + + Ok(result) + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/value_conversion.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/value_conversion.rs similarity index 61% rename from packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/value_conversion.rs rename to packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/value_conversion.rs index 5d02772e07..e9d975ea47 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/value_conversion.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/value_conversion.rs @@ -4,53 +4,73 @@ use platform_value::Value; use crate::ProtocolError; -use crate::state_transition::documents_batch_transition::{ - DocumentsBatchTransition, DocumentsBatchTransitionV0, +use crate::state_transition::batch_transition::{ + BatchTransition, BatchTransitionV0, BatchTransitionV1, }; -use crate::state_transition::state_transitions::documents_batch_transition::fields::*; +use crate::state_transition::state_transitions::batch_transition::fields::*; use crate::state_transition::StateTransitionValueConvert; use platform_value::btreemap_extensions::BTreeValueRemoveFromMapHelper; use platform_version::version::{FeatureVersion, PlatformVersion}; -impl<'a> StateTransitionValueConvert<'a> for DocumentsBatchTransition { +impl<'a> StateTransitionValueConvert<'a> for BatchTransition { fn to_object(&self, skip_signature: bool) -> Result { match self { - DocumentsBatchTransition::V0(transition) => { + BatchTransition::V0(transition) => { let mut value = transition.to_object(skip_signature)?; value.insert(STATE_TRANSITION_PROTOCOL_VERSION.to_string(), Value::U16(0))?; Ok(value) } + BatchTransition::V1(transition) => { + let mut value = transition.to_object(skip_signature)?; + value.insert(STATE_TRANSITION_PROTOCOL_VERSION.to_string(), Value::U16(1))?; + Ok(value) + } } } fn to_canonical_object(&self, skip_signature: bool) -> Result { match self { - DocumentsBatchTransition::V0(transition) => { + BatchTransition::V0(transition) => { let mut value = transition.to_canonical_object(skip_signature)?; value.insert(STATE_TRANSITION_PROTOCOL_VERSION.to_string(), Value::U16(0))?; Ok(value) } + BatchTransition::V1(transition) => { + let mut value = transition.to_canonical_object(skip_signature)?; + value.insert(STATE_TRANSITION_PROTOCOL_VERSION.to_string(), Value::U16(1))?; + Ok(value) + } } } fn to_canonical_cleaned_object(&self, skip_signature: bool) -> Result { match self { - DocumentsBatchTransition::V0(transition) => { + BatchTransition::V0(transition) => { let mut value = transition.to_canonical_cleaned_object(skip_signature)?; value.insert(STATE_TRANSITION_PROTOCOL_VERSION.to_string(), Value::U16(0))?; Ok(value) } + BatchTransition::V1(transition) => { + let mut value = transition.to_canonical_cleaned_object(skip_signature)?; + value.insert(STATE_TRANSITION_PROTOCOL_VERSION.to_string(), Value::U16(1))?; + Ok(value) + } } } fn to_cleaned_object(&self, skip_signature: bool) -> Result { match self { - DocumentsBatchTransition::V0(transition) => { + BatchTransition::V0(transition) => { let mut value = transition.to_cleaned_object(skip_signature)?; value.insert(STATE_TRANSITION_PROTOCOL_VERSION.to_string(), Value::U16(0))?; Ok(value) } + BatchTransition::V1(transition) => { + let mut value = transition.to_cleaned_object(skip_signature)?; + value.insert(STATE_TRANSITION_PROTOCOL_VERSION.to_string(), Value::U16(1))?; + Ok(value) + } } } @@ -70,9 +90,10 @@ impl<'a> StateTransitionValueConvert<'a> for DocumentsBatchTransition { }); match version { - 0 => Ok(DocumentsBatchTransitionV0::from_object(raw_object, platform_version)?.into()), + 0 => Ok(BatchTransitionV0::from_object(raw_object, platform_version)?.into()), + 1 => Ok(BatchTransitionV1::from_object(raw_object, platform_version)?.into()), n => Err(ProtocolError::UnknownVersionError(format!( - "Unknown DataContractCreateTransition version {n}" + "Unknown contract_create_state_transition default_current_version {n}" ))), } } @@ -93,11 +114,10 @@ impl<'a> StateTransitionValueConvert<'a> for DocumentsBatchTransition { }); match version { - 0 => Ok( - DocumentsBatchTransitionV0::from_value_map(raw_value_map, platform_version)?.into(), - ), + 0 => Ok(BatchTransitionV0::from_value_map(raw_value_map, platform_version)?.into()), + 1 => Ok(BatchTransitionV1::from_value_map(raw_value_map, platform_version)?.into()), n => Err(ProtocolError::UnknownVersionError(format!( - "Unknown DataContractCreateTransition version {n}" + "Unknown contract_create_state_transition default_current_version {n}" ))), } } @@ -108,7 +128,8 @@ impl<'a> StateTransitionValueConvert<'a> for DocumentsBatchTransition { .map_err(ProtocolError::ValueError)?; match version { - 0 => DocumentsBatchTransitionV0::clean_value(value), + 0 => BatchTransitionV0::clean_value(value), + 1 => BatchTransitionV1::clean_value(value), n => Err(ProtocolError::UnknownVersionError(format!( "Unknown DataContractCreateTransition version {n}" ))), diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/version.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/version.rs new file mode 100644 index 0000000000..be7d07021e --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/version.rs @@ -0,0 +1,12 @@ +use crate::state_transition::batch_transition::BatchTransition; +use crate::state_transition::FeatureVersioned; +use crate::version::FeatureVersion; + +impl FeatureVersioned for BatchTransition { + fn feature_version(&self) -> FeatureVersion { + match self { + BatchTransition::V0(v0) => v0.feature_version(), + BatchTransition::V1(v1) => v1.feature_version(), + } + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/accessors/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/accessors/mod.rs deleted file mode 100644 index 34ae8b57ab..0000000000 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/accessors/mod.rs +++ /dev/null @@ -1,19 +0,0 @@ -mod v0; - -use crate::state_transition::documents_batch_transition::document_transition::DocumentTransition; -use crate::state_transition::documents_batch_transition::DocumentsBatchTransition; -pub use v0::*; - -impl DocumentsBatchTransitionAccessorsV0 for DocumentsBatchTransition { - fn transitions(&self) -> &Vec { - match self { - DocumentsBatchTransition::V0(v0) => &v0.transitions, - } - } - - fn transitions_slice(&self) -> &[DocumentTransition] { - match self { - DocumentsBatchTransition::V0(v0) => v0.transitions.as_slice(), - } - } -} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/accessors/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/accessors/v0/mod.rs deleted file mode 100644 index 1e458fad49..0000000000 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/accessors/v0/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -use crate::state_transition::documents_batch_transition::document_transition::DocumentTransition; - -pub trait DocumentsBatchTransitionAccessorsV0 { - fn transitions(&self) -> &Vec; - fn transitions_slice(&self) -> &[DocumentTransition]; -} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/v0_methods.rs deleted file mode 100644 index d37685df0d..0000000000 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/v0_methods.rs +++ /dev/null @@ -1,29 +0,0 @@ -use crate::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; -use crate::state_transition::documents_batch_transition::document_transition::document_delete_transition::DocumentDeleteTransitionV0; - -pub trait DocumentDeleteTransitionV0Methods { - /// Returns a reference to the `base` field of the `DocumentCreateTransitionV0`. - fn base(&self) -> &DocumentBaseTransition; - fn base_mut(&mut self) -> &mut DocumentBaseTransition; - - /// Sets the value of the `base` field in the `DocumentCreateTransitionV0`. - /// - /// # Arguments - /// - /// * `base` - A value of type `DocumentBaseTransition` to set. - fn set_base(&mut self, base: DocumentBaseTransition); -} - -impl DocumentDeleteTransitionV0Methods for DocumentDeleteTransitionV0 { - fn base(&self) -> &DocumentBaseTransition { - &self.base - } - - fn base_mut(&mut self) -> &mut DocumentBaseTransition { - &mut self.base - } - - fn set_base(&mut self, base: DocumentBaseTransition) { - self.base = base - } -} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/identity_signed.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/identity_signed.rs deleted file mode 100644 index 3d8a2d1486..0000000000 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/identity_signed.rs +++ /dev/null @@ -1,27 +0,0 @@ -use crate::identity::{KeyID, Purpose, SecurityLevel}; -use crate::state_transition::documents_batch_transition::DocumentsBatchTransition; -use crate::state_transition::StateTransitionIdentitySigned; - -impl StateTransitionIdentitySigned for DocumentsBatchTransition { - fn signature_public_key_id(&self) -> KeyID { - match self { - DocumentsBatchTransition::V0(transition) => transition.signature_public_key_id(), - } - } - - fn set_signature_public_key_id(&mut self, key_id: KeyID) { - match self { - DocumentsBatchTransition::V0(transition) => { - transition.set_signature_public_key_id(key_id) - } - } - } - - fn security_level_requirement(&self, purpose: Purpose) -> Vec { - match self { - DocumentsBatchTransition::V0(transition) => { - transition.security_level_requirement(purpose) - } - } - } -} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/methods/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/methods/mod.rs deleted file mode 100644 index 071ed54f90..0000000000 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/methods/mod.rs +++ /dev/null @@ -1,326 +0,0 @@ -#[cfg(feature = "state-transition-signing")] -use crate::data_contract::document_type::DocumentTypeRef; -#[cfg(feature = "state-transition-signing")] -use crate::document::Document; -use crate::fee::Credits; -#[cfg(feature = "state-transition-signing")] -use crate::identity::signer::Signer; -#[cfg(feature = "state-transition-signing")] -use crate::identity::IdentityPublicKey; -use crate::prelude::IdentityNonce; -#[cfg(feature = "state-transition-signing")] -use crate::prelude::UserFeeIncrease; -use crate::state_transition::documents_batch_transition::document_transition::DocumentTransition; -use crate::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; -use crate::state_transition::documents_batch_transition::DocumentsBatchTransition; -#[cfg(feature = "state-transition-signing")] -use crate::state_transition::documents_batch_transition::DocumentsBatchTransitionV0; -#[cfg(feature = "state-transition-signing")] -use crate::state_transition::StateTransition; -use crate::ProtocolError; -#[cfg(feature = "state-transition-signing")] -use platform_value::Identifier; -#[cfg(feature = "state-transition-signing")] -use platform_version::version::{FeatureVersion, PlatformVersion}; - -pub mod v0; - -impl DocumentsBatchTransitionMethodsV0 for DocumentsBatchTransition { - fn all_purchases_amount(&self) -> Result, ProtocolError> { - match self { - DocumentsBatchTransition::V0(v0) => v0.all_purchases_amount(), - } - } - - fn all_conflicting_index_collateral_voting_funds( - &self, - ) -> Result, ProtocolError> { - match self { - DocumentsBatchTransition::V0(v0) => v0.all_conflicting_index_collateral_voting_funds(), - } - } - - fn set_transitions(&mut self, transitions: Vec) { - match self { - DocumentsBatchTransition::V0(v0) => v0.set_transitions(transitions), - } - } - - fn set_identity_contract_nonce(&mut self, identity_contract_nonce: IdentityNonce) { - match self { - DocumentsBatchTransition::V0(v0) => { - v0.set_identity_contract_nonce(identity_contract_nonce) - } - } - } - - #[cfg(feature = "state-transition-signing")] - fn new_document_creation_transition_from_document( - document: Document, - document_type: DocumentTypeRef, - entropy: [u8; 32], - identity_public_key: &IdentityPublicKey, - identity_contract_nonce: IdentityNonce, - user_fee_increase: UserFeeIncrease, - signer: &S, - platform_version: &PlatformVersion, - batch_feature_version: Option, - create_feature_version: Option, - base_feature_version: Option, - ) -> Result { - match batch_feature_version.unwrap_or( - platform_version - .dpp - .state_transition_serialization_versions - .documents_batch_state_transition - .default_current_version, - ) { - 0 => Ok( - DocumentsBatchTransitionV0::new_document_creation_transition_from_document( - document, - document_type, - entropy, - identity_public_key, - identity_contract_nonce, - user_fee_increase, - signer, - platform_version, - batch_feature_version, - create_feature_version, - base_feature_version, - )?, - ), - version => Err(ProtocolError::UnknownVersionMismatch { - method: "DocumentsBatchTransition::new_created_from_document".to_string(), - known_versions: vec![0], - received: version, - }), - } - } - - #[cfg(feature = "state-transition-signing")] - fn new_document_replacement_transition_from_document( - document: Document, - document_type: DocumentTypeRef, - identity_public_key: &IdentityPublicKey, - identity_contract_nonce: IdentityNonce, - user_fee_increase: UserFeeIncrease, - signer: &S, - platform_version: &PlatformVersion, - batch_feature_version: Option, - replace_feature_version: Option, - base_feature_version: Option, - ) -> Result { - match batch_feature_version.unwrap_or( - platform_version - .dpp - .state_transition_serialization_versions - .documents_batch_state_transition - .default_current_version, - ) { - 0 => Ok( - DocumentsBatchTransitionV0::new_document_replacement_transition_from_document( - document, - document_type, - identity_public_key, - identity_contract_nonce, - user_fee_increase, - signer, - platform_version, - batch_feature_version, - replace_feature_version, - base_feature_version, - )?, - ), - version => Err(ProtocolError::UnknownVersionMismatch { - method: - "DocumentsBatchTransition::new_document_replacement_transition_from_document" - .to_string(), - known_versions: vec![0], - received: version, - }), - } - } - - #[cfg(feature = "state-transition-signing")] - fn new_document_transfer_transition_from_document( - document: Document, - document_type: DocumentTypeRef, - recipient_owner_id: Identifier, - identity_public_key: &IdentityPublicKey, - identity_contract_nonce: IdentityNonce, - user_fee_increase: UserFeeIncrease, - signer: &S, - platform_version: &PlatformVersion, - batch_feature_version: Option, - transfer_feature_version: Option, - base_feature_version: Option, - ) -> Result { - match batch_feature_version.unwrap_or( - platform_version - .dpp - .state_transition_serialization_versions - .documents_batch_state_transition - .default_current_version, - ) { - 0 => Ok( - DocumentsBatchTransitionV0::new_document_transfer_transition_from_document( - document, - document_type, - recipient_owner_id, - identity_public_key, - identity_contract_nonce, - user_fee_increase, - signer, - platform_version, - batch_feature_version, - transfer_feature_version, - base_feature_version, - )?, - ), - version => Err(ProtocolError::UnknownVersionMismatch { - method: - "DocumentsBatchTransition::new_document_replacement_transition_from_document" - .to_string(), - known_versions: vec![0], - received: version, - }), - } - } - - #[cfg(feature = "state-transition-signing")] - fn new_document_deletion_transition_from_document( - document: Document, - document_type: DocumentTypeRef, - identity_public_key: &IdentityPublicKey, - identity_contract_nonce: IdentityNonce, - user_fee_increase: UserFeeIncrease, - signer: &S, - platform_version: &PlatformVersion, - batch_feature_version: Option, - delete_feature_version: Option, - base_feature_version: Option, - ) -> Result { - match batch_feature_version.unwrap_or( - platform_version - .dpp - .state_transition_serialization_versions - .documents_batch_state_transition - .default_current_version, - ) { - 0 => Ok( - DocumentsBatchTransitionV0::new_document_deletion_transition_from_document( - document, - document_type, - identity_public_key, - identity_contract_nonce, - user_fee_increase, - signer, - platform_version, - batch_feature_version, - delete_feature_version, - base_feature_version, - )?, - ), - version => Err(ProtocolError::UnknownVersionMismatch { - method: "DocumentsBatchTransition::new_document_deletion_transition_from_document" - .to_string(), - known_versions: vec![0], - received: version, - }), - } - } - - #[cfg(feature = "state-transition-signing")] - fn new_document_update_price_transition_from_document( - document: Document, - document_type: DocumentTypeRef, - price: Credits, - identity_public_key: &IdentityPublicKey, - identity_contract_nonce: IdentityNonce, - user_fee_increase: UserFeeIncrease, - signer: &S, - platform_version: &PlatformVersion, - batch_feature_version: Option, - update_price_feature_version: Option, - base_feature_version: Option, - ) -> Result { - match batch_feature_version.unwrap_or( - platform_version - .dpp - .state_transition_serialization_versions - .documents_batch_state_transition - .default_current_version, - ) { - 0 => Ok( - DocumentsBatchTransitionV0::new_document_update_price_transition_from_document( - document, - document_type, - price, - identity_public_key, - identity_contract_nonce, - user_fee_increase, - signer, - platform_version, - batch_feature_version, - update_price_feature_version, - base_feature_version, - )?, - ), - version => Err(ProtocolError::UnknownVersionMismatch { - method: - "DocumentsBatchTransition::new_document_update_price_transition_from_document" - .to_string(), - known_versions: vec![0], - received: version, - }), - } - } - - #[cfg(feature = "state-transition-signing")] - fn new_document_purchase_transition_from_document( - document: Document, - document_type: DocumentTypeRef, - new_owner_id: Identifier, - price: Credits, - identity_public_key: &IdentityPublicKey, - identity_contract_nonce: IdentityNonce, - user_fee_increase: UserFeeIncrease, - signer: &S, - platform_version: &PlatformVersion, - batch_feature_version: Option, - purchase_feature_version: Option, - base_feature_version: Option, - ) -> Result { - match batch_feature_version.unwrap_or( - platform_version - .dpp - .state_transition_serialization_versions - .documents_batch_state_transition - .default_current_version, - ) { - 0 => Ok( - DocumentsBatchTransitionV0::new_document_purchase_transition_from_document( - document, - document_type, - new_owner_id, - price, - identity_public_key, - identity_contract_nonce, - user_fee_increase, - signer, - platform_version, - batch_feature_version, - purchase_feature_version, - base_feature_version, - )?, - ), - version => Err(ProtocolError::UnknownVersionMismatch { - method: "DocumentsBatchTransition::new_document_purchase_transition_from_document" - .to_string(), - known_versions: vec![0], - received: version, - }), - } - } -} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/mod.rs deleted file mode 100644 index f62e971fb7..0000000000 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/mod.rs +++ /dev/null @@ -1,598 +0,0 @@ -use bincode::{Decode, Encode}; - -use std::convert::TryInto; - -use derive_more::From; - -use platform_value::Value; -#[cfg(feature = "state-transition-serde-conversion")] -use serde::{Deserialize, Serialize}; - -use crate::ProtocolError; -use crate::{identity::SecurityLevel, state_transition::StateTransitionFieldTypes}; - -pub use self::document_transition::{ - document_base_transition, document_create_transition, - document_create_transition::DocumentCreateTransition, document_delete_transition, - document_delete_transition::DocumentDeleteTransition, document_replace_transition, - document_replace_transition::DocumentReplaceTransition, -}; - -use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize, PlatformSignable}; -use platform_versioning::PlatformVersioned; - -pub mod accessors; -pub mod document_transition; -pub mod fields; -mod identity_signed; -#[cfg(feature = "state-transition-json-conversion")] -mod json_conversion; -pub mod methods; -mod state_transition_like; -mod v0; -#[cfg(feature = "validation")] -mod validation; -#[cfg(feature = "state-transition-value-conversion")] -mod value_conversion; -mod version; - -use crate::state_transition::data_contract_update_transition::{ - SIGNATURE, SIGNATURE_PUBLIC_KEY_ID, -}; - -use crate::state_transition::documents_batch_transition::fields::property_names; - -use crate::identity::state_transition::OptionallyAssetLockProved; -pub use v0::*; - -#[derive( - Debug, - Clone, - PartialEq, - Encode, - Decode, - PlatformDeserialize, - PlatformSerialize, - PlatformSignable, - PlatformVersioned, - From, -)] -#[cfg_attr( - feature = "state-transition-serde-conversion", - derive(Serialize, Deserialize), - serde(tag = "$version") -)] -#[platform_serialize(unversioned)] //versioned directly, no need to use platform_version -#[platform_version_path_bounds( - "dpp.state_transition_serialization_versions.documents_batch_state_transition" -)] -pub enum DocumentsBatchTransition { - #[cfg_attr(feature = "state-transition-serde-conversion", serde(rename = "0"))] - V0(DocumentsBatchTransitionV0), -} - -// -// impl Default for DocumentsBatchTransition { -// fn default() -> Self { -// match LATEST_PLATFORM_VERSION -// .state_transitions -// .documents_batch_state_transition -// .default_current_version -// { -// 0 => DocumentsBatchTransitionV0::default().into(), -// _ => DocumentsBatchTransitionV0::default().into(), //for now -// } -// } -// } -// -// impl DocumentsBatchTransition { -// #[cfg(feature = "state-transition-json-conversion")] -// pub fn from_json_object( -// json_value: JsonValue, -// data_contracts: Vec, -// ) -> Result { -// let mut json_value = json_value; -// -// let maybe_signature = json_value.get_string(property_names::SIGNATURE).ok(); -// let signature = if let Some(signature) = maybe_signature { -// Some(BinaryData( -// BASE64_STANDARD.decode(signature).context("signature exists but isn't valid base64")?, -// )) -// } else { -// None -// }; -// -// let mut batch_transitions = DocumentsBatchTransition { -// feature_version: json_value -// .get_u64(property_names::STATE_TRANSITION_PROTOCOL_VERSION) -// // js-dpp allows `protocolVersion` to be undefined -// .unwrap_or(LATEST_VERSION as u64) as u16, -// signature, -// signature_public_key_id: json_value -// .get_u64(property_names::SIGNATURE_PUBLIC_KEY_ID) -// .ok() -// .map(|v| v as KeyID), -// owner_id: Identifier::from_string( -// json_value.get_string(property_names::OWNER_ID)?, -// Encoding::Base58, -// )?, -// ..Default::default() -// }; -// -// let mut document_transitions: Vec = vec![]; -// let maybe_transitions = json_value.remove(property_names::TRANSITIONS); -// if let Ok(JsonValue::Array(json_transitions)) = maybe_transitions { -// let data_contracts_map: HashMap, DataContract> = data_contracts -// .into_iter() -// .map(|dc| (dc.id.as_bytes().to_vec(), dc)) -// .collect(); -// -// for json_transition in json_transitions { -// let id = Identifier::from_string( -// json_transition.get_string(property_names::DATA_CONTRACT_ID)?, -// Encoding::Base58, -// )?; -// let data_contract = -// data_contracts_map -// .get(&id.as_bytes().to_vec()) -// .ok_or_else(|| { -// anyhow!( -// "Data Contract doesn't exists for Transition: {:?}", -// json_transition -// ) -// })?; -// let document_transition = -// DocumentTransition::from_json_object(json_transition, data_contract.clone())?; -// document_transitions.push(document_transition); -// } -// } -// -// batch_transitions.transitions = document_transitions; -// Ok(batch_transitions) -// } -// -// /// creates the instance of [`DocumentsBatchTransition`] from raw object -// pub fn from_object_with_contracts( -// raw_object: Value, -// data_contracts: Vec, -// ) -> Result { -// let map = raw_object -// .into_btree_string_map() -// .map_err(ProtocolError::ValueError)?; -// Self::from_value_map(map, data_contracts) -// } -// -// /// creates the instance of [`DocumentsBatchTransition`] from a value map -// pub fn from_value_map( -// mut map: BTreeMap, -// data_contracts: Vec, -// ) -> Result { -// let mut batch_transitions = DocumentsBatchTransition { -// feature_version: map -// .get_integer(property_names::STATE_TRANSITION_PROTOCOL_VERSION) -// // js-dpp allows `protocolVersion` to be undefined -// .unwrap_or(LATEST_VERSION as u64) as u16, -// signature: map -// .get_optional_binary_data(property_names::SIGNATURE) -// .map_err(ProtocolError::ValueError)?, -// signature_public_key_id: map -// .get_optional_integer(property_names::SIGNATURE_PUBLIC_KEY_ID) -// .map_err(ProtocolError::ValueError)?, -// owner_id: Identifier::from( -// map.get_hash256_bytes(property_names::OWNER_ID) -// .map_err(ProtocolError::ValueError)?, -// ), -// ..Default::default() -// }; -// -// let mut document_transitions: Vec = vec![]; -// let maybe_transitions = map.remove(property_names::TRANSITIONS); -// if let Some(Value::Array(raw_transitions)) = maybe_transitions { -// let data_contracts_map: HashMap, DataContract> = data_contracts -// .into_iter() -// .map(|dc| (dc.id.as_bytes().to_vec(), dc)) -// .collect(); -// -// for raw_transition in raw_transitions { -// let mut raw_transition_map = raw_transition -// .into_btree_string_map() -// .map_err(ProtocolError::ValueError)?; -// let data_contract_id = -// raw_transition_map.get_hash256_bytes(property_names::DATA_CONTRACT_ID)?; -// let document_type = raw_transition_map.get_str(property_names::DOCUMENT_TYPE)?; -// let data_contract = data_contracts_map -// .get(data_contract_id.as_slice()) -// .ok_or_else(|| { -// anyhow!( -// "Data Contract doesn't exists for Transition: {:?}", -// raw_transition_map -// ) -// })?; -// -// //Because we don't know how the json came in we need to sanitize it -// let (identifiers, binary_paths): (Vec<_>, Vec<_>) = -// data_contract.get_identifiers_and_binary_paths_owned(document_type)?; -// -// raw_transition_map -// .replace_at_paths( -// identifiers.into_iter().chain( -// document_base_transition::IDENTIFIER_FIELDS -// .iter() -// .map(|a| a.to_string()), -// ), -// ReplacementType::Identifier, -// ) -// .map_err(ProtocolError::ValueError)?; -// raw_transition_map -// .replace_at_paths( -// binary_paths.into_iter().chain( -// document_create_transition::BINARY_FIELDS -// .iter() -// .map(|a| a.to_string()), -// ), -// ReplacementType::BinaryBytes, -// ) -// .map_err(ProtocolError::ValueError)?; -// -// let document_transition = -// DocumentTransition::from_value_map(raw_transition_map, data_contract.clone())?; -// document_transitions.push(document_transition); -// } -// } -// -// batch_transitions.transitions = document_transitions; -// Ok(batch_transitions) -// } -// -// pub fn transitions(&self) -> &Vec { -// &self.transitions -// } -// -// pub fn transitions_slice(&self) -> &[DocumentTransition] { -// self.transitions.as_slice() -// } -// -// pub fn clean_value(value: &mut Value) -> Result<(), platform_value::Error> { -// value.replace_at_paths(IDENTIFIER_FIELDS, ReplacementType::Identifier)?; -// value.replace_integer_type_at_paths(U16_FIELDS, IntegerReplacementType::U16)?; -// Ok(()) -// } -// } -// -// -// impl DocumentsBatchTransition { -// fn to_value(&self, skip_signature: bool) -> Result { -// Ok(self.to_value_map(skip_signature)?.into()) -// } -// -// fn to_value_map(&self, skip_signature: bool) -> Result, ProtocolError> { -// let mut map = BTreeMap::new(); -// map.insert( -// property_names::STATE_TRANSITION_PROTOCOL_VERSION.to_string(), -// Value::U16(self.feature_version), -// ); -// map.insert( -// property_names::TRANSITION_TYPE.to_string(), -// Value::U8(self.transition_type as u8), -// ); -// map.insert( -// property_names::OWNER_ID.to_string(), -// Value::Identifier(self.owner_id.to_buffer()), -// ); -// -// if !skip_signature { -// if let Some(signature) = self.signature.as_ref() { -// map.insert( -// property_names::SIGNATURE.to_string(), -// Value::Bytes(signature.to_vec()), -// ); -// } -// if let Some(signature_key_id) = self.signature_public_key_id { -// map.insert( -// property_names::SIGNATURE.to_string(), -// Value::U32(signature_key_id), -// ); -// } -// } -// let mut transitions = vec![]; -// for transition in self.transitions.iter() { -// transitions.push(transition.to_object()?) -// } -// map.insert( -// property_names::TRANSITIONS.to_string(), -// Value::Array(transitions), -// ); -// -// Ok(map) -// } -// } - -impl StateTransitionFieldTypes for DocumentsBatchTransition { - fn binary_property_paths() -> Vec<&'static str> { - vec![SIGNATURE] - } - - fn identifiers_property_paths() -> Vec<&'static str> { - vec![property_names::OWNER_ID] - } - - fn signature_property_paths() -> Vec<&'static str> { - vec![SIGNATURE, SIGNATURE_PUBLIC_KEY_ID] - } - // - // fn to_json(&self, skip_signature: bool) -> Result { - // self.to_object(skip_signature) - // .and_then(|value| value.try_into().map_err(ProtocolError::ValueError)) - // } - // - // fn to_object(&self, skip_signature: bool) -> Result { - // let mut object: Value = platform_value::to_value(self)?; - // if skip_signature { - // for path in Self::signature_property_paths() { - // let _ = object.remove_values_matching_path(path); - // } - // } - // let mut transitions = vec![]; - // for transition in self.transitions.iter() { - // transitions.push(transition.to_object()?) - // } - // object.insert( - // String::from(property_names::TRANSITIONS), - // Value::Array(transitions), - // )?; - // - // Ok(object) - // } - // - // #[cfg(feature = "state-transition-cbor-conversion")] - // fn to_cbor_buffer(&self, skip_signature: bool) -> Result, ProtocolError> { - // let mut result_buf = self.feature_version.encode_var_vec(); - // let value: CborValue = self.to_object(skip_signature)?.try_into()?; - // - // let map = CborValue::serialized(&value) - // .map_err(|e| ProtocolError::EncodingError(e.to_string()))?; - // - // let mut canonical_map: CborCanonicalMap = map.try_into()?; - // canonical_map.remove(property_names::STATE_TRANSITION_PROTOCOL_VERSION); - // - // // Replace binary fields individually for every transition using respective data contract - // if let Some(CborValue::Array(ref mut transitions)) = - // canonical_map.get_mut(&CborValue::Text(property_names::TRANSITIONS.to_string())) - // { - // for (i, cbor_transition) in transitions.iter_mut().enumerate() { - // let transition = self - // .transitions - // .get(i) - // .context(format!("transition with index {} doesn't exist", i))?; - // - // let (identifier_properties, binary_properties) = transition - // .base() - // .data_contract - // .get_identifiers_and_binary_paths( - // &self.transitions[i].base().document_type_name, - // )?; - // - // if transition.get_updated_at().is_none() { - // cbor_transition.remove("$updatedAt"); - // } - // - // cbor_transition.replace_paths( - // identifier_properties - // .into_iter() - // .chain(binary_properties) - // .chain(document_base_transition::IDENTIFIER_FIELDS) - // .chain(document_create_transition::BINARY_FIELDS), - // FieldType::ArrayInt, - // FieldType::Bytes, - // ); - // } - // } - // - // canonical_map.replace_paths( - // Self::binary_property_paths() - // .into_iter() - // .chain(Self::identifiers_property_paths()), - // FieldType::ArrayInt, - // FieldType::Bytes, - // ); - // - // if !skip_signature { - // if self.signature.is_none() { - // canonical_map.insert(property_names::SIGNATURE, CborValue::Null) - // } - // if self.signature_public_key_id.is_none() { - // canonical_map.insert(property_names::SIGNATURE_PUBLIC_KEY_ID, CborValue::Null) - // } - // } - // - // canonical_map.sort_canonical(); - // - // let mut buffer = canonical_map - // .to_bytes() - // .map_err(|e| ProtocolError::EncodingError(e.to_string()))?; - // result_buf.append(&mut buffer); - // - // Ok(result_buf) - // } - // - // fn to_cleaned_object(&self, skip_signature: bool) -> Result { - // let mut object: Value = platform_value::to_value(self)?; - // if skip_signature { - // for path in Self::signature_property_paths() { - // let _ = object.remove_values_matching_path(path); - // } - // } - // let mut transitions = vec![]; - // for transition in self.transitions.iter() { - // transitions.push(transition.to_cleaned_object()?) - // } - // object.insert( - // String::from(property_names::TRANSITIONS), - // Value::Array(transitions), - // )?; - // - // Ok(object) - // } -} - -// TODO: Make a DocumentType method -pub fn get_security_level_requirement(v: &Value, default: SecurityLevel) -> SecurityLevel { - let maybe_security_level: Option = v - .get_optional_integer(property_names::SECURITY_LEVEL_REQUIREMENT) - // TODO: Data Contract must already valid so there is no chance that this will fail - .expect("document schema must be a map"); - - match maybe_security_level { - Some(some_level) => (some_level as u8).try_into().unwrap_or(default), - None => default, - } -} -// -// #[cfg(test)] -// mod test { -// use itertools::Itertools; -// use std::sync::Arc; -// -// use platform_value::Bytes32; -// use serde_json::json; -// -// use crate::tests::fixtures::get_extended_documents_fixture; -// use crate::{ -// document::{ -// document_factory::DocumentFactory, -// fetch_and_validate_data_contract::DataContractFetcherAndValidator, -// }, -// state_repository::MockStateRepositoryLike, -// tests::fixtures::{ -// get_data_contract_fixture, get_document_transitions_fixture, -// get_document_validator_fixture, -// }, -// }; -// -// use super::{document_transition::Action, *}; -// -// #[test] -// fn should_return_highest_sec_level_for_all_transitions() { -// let mut data_contract = get_data_contract_fixture(None).data_contract; -// data_contract -// .documents -// .get_mut("niceDocument") -// .unwrap() -// .insert( -// property_names::SECURITY_LEVEL_REQUIREMENT.to_string(), -// json!(SecurityLevel::MEDIUM), -// ) -// .unwrap(); -// data_contract -// .documents -// .get_mut("prettyDocument") -// .unwrap() -// .insert( -// property_names::SECURITY_LEVEL_REQUIREMENT.to_string(), -// json!(SecurityLevel::MASTER), -// ) -// .unwrap(); -// -// // 0 is niceDocument, -// // 1 and 2 are pretty documents, -// // 3 and 4 are indexed documents that do not have security level specified -// let documents = get_extended_documents_fixture(data_contract).unwrap(); -// let medium_security_document = documents.get(0).unwrap(); -// let master_security_document = documents.get(1).unwrap(); -// let no_security_level_document = documents.get(3).unwrap(); -// -// let document_factory = DocumentFactory::new( -// 1, -// get_document_validator_fixture(), -// DataContractFetcherAndValidator::new(Arc::new(MockStateRepositoryLike::new())), -// ); -// -// let batch_transition = document_factory -// .create_state_transition(vec![( -// Action::Create, -// vec![medium_security_document.to_owned()], -// )]) -// .expect("batch transition should be created"); -// -// assert!(batch_transition -// .get_security_level_requirement() -// .iter() -// .contains(&SecurityLevel::MEDIUM)); -// -// let batch_transition = document_factory -// .create_state_transition(vec![( -// Action::Create, -// vec![ -// medium_security_document.to_owned(), -// master_security_document.to_owned(), -// ], -// )]) -// .expect("batch transition should be created"); -// -// assert!(batch_transition -// .get_security_level_requirement() -// .iter() -// .contains(&SecurityLevel::MASTER)); -// -// let batch_transition = document_factory -// .create_state_transition(vec![( -// Action::Create, -// vec![no_security_level_document.to_owned()], -// )]) -// .expect("batch transition should be created"); -// -// assert!(batch_transition -// .get_security_level_requirement() -// .iter() -// .contains(&SecurityLevel::HIGH)); -// } -// -// #[test] -// fn should_convert_to_batch_transition_to_the_buffer() { -// let transition_id_base58 = "6o8UfoeE2s7dTkxxyPCixuxe8TM5DtCGHTMummUN6t5M"; -// let expected_bytes_hex ="01a5647479706501676f776e657249645820a858bdc49c968148cd12648ee048d34003e9da3fbf2cbc62c31bb4c717bf690d697369676e6174757265f76b7472616e736974696f6e7381a7632469645820561b9b2e90b7c0ca355f729777b45bc646a18f5426a9462f0333c766135a3120646e616d656543757469656524747970656c6e696365446f63756d656e746724616374696f6e006824656e74726f707958202cdbaeda81c14765ba48432ff5cc900a7cacd4538b817fc71f38907aaa7023746a246372656174656441741b000001853a3602876f2464617461436f6e74726163744964582049aea5df2124a51d5d8dcf466e238fbc77fd72601be69daeb6dba75e8d26b30c747369676e61747572655075626c69634b65794964f7" ; -// let data_contract_id_base58 = "5xdDqypFMPfvF6UdWxefCGvRFyxgkPZCAK6TS4pvvw6T"; -// let owner_id_base58 = "CL9ydpdxP4kQniGx6z5JUL8K72gnwcemKT2aJmh7sdwJ"; -// let entropy_base64 = "LNuu2oHBR2W6SEMv9cyQCnys1FOLgX/HHziQeqpwI3Q="; -// -// let transition_id = -// Identifier::from_string(transition_id_base58, Encoding::Base58).unwrap(); -// let expected_bytes = hex::decode(expected_bytes_hex).unwrap(); -// let data_contract_id = -// Identifier::from_string(data_contract_id_base58, Encoding::Base58).unwrap(); -// let owner_id = Identifier::from_string(owner_id_base58, Encoding::Base58).unwrap(); -// let entropy_bytes: [u8; 32] = BASE64_STANDARD.decode(entropy_base64).unwrap().try_into().unwrap(); -// -// let mut data_contract = get_data_contract_fixture(Some(owner_id)).data_contract; -// data_contract.id = data_contract_id; -// -// let documents = get_extended_documents_fixture(data_contract.clone()).unwrap(); -// let mut document = documents.first().unwrap().to_owned(); -// document.entropy = Bytes32::new(entropy_bytes); -// -// let transitions = get_document_transitions_fixture([(DocumentTransitionActionType::Create, vec![document])]); -// let mut transition = transitions.first().unwrap().to_owned(); -// if let DocumentTransition::Create(ref mut t) = transition { -// t.created_at = Some(1671718896263); -// t.base.id = transition_id; -// } -// -// let mut map = BTreeMap::new(); -// map.insert( -// "ownerId".to_string(), -// Value::Identifier(owner_id.to_buffer()), -// ); -// map.insert( -// "transitions".to_string(), -// Value::Array(vec![transition.to_object().unwrap()]), -// ); -// -// let state_transition = DocumentsBatchTransition::from_value_map(map, vec![data_contract]) -// .expect("transition should be created"); -// -// let bytes = state_transition.to_cbor_buffer(false).unwrap(); -// -// assert_eq!(hex::encode(expected_bytes), hex::encode(bytes)); -// } -// } -impl OptionallyAssetLockProved for DocumentsBatchTransition {} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/state_transition_like.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/state_transition_like.rs deleted file mode 100644 index 69b5bfa571..0000000000 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/state_transition_like.rs +++ /dev/null @@ -1,71 +0,0 @@ -use crate::prelude::UserFeeIncrease; -use crate::state_transition::documents_batch_transition::DocumentsBatchTransition; -use crate::state_transition::{StateTransitionLike, StateTransitionType}; -use crate::version::FeatureVersion; -use platform_value::{BinaryData, Identifier}; - -impl StateTransitionLike for DocumentsBatchTransition { - /// Returns ID of the created contract - fn modified_data_ids(&self) -> Vec { - match self { - DocumentsBatchTransition::V0(transition) => transition.modified_data_ids(), - } - } - - fn state_transition_protocol_version(&self) -> FeatureVersion { - match self { - DocumentsBatchTransition::V0(_) => 0, - } - } - /// returns the type of State Transition - fn state_transition_type(&self) -> StateTransitionType { - match self { - DocumentsBatchTransition::V0(transition) => transition.state_transition_type(), - } - } - /// returns the signature as a byte-array - fn signature(&self) -> &BinaryData { - match self { - DocumentsBatchTransition::V0(transition) => transition.signature(), - } - } - /// set a new signature - fn set_signature(&mut self, signature: BinaryData) { - match self { - DocumentsBatchTransition::V0(transition) => transition.set_signature(signature), - } - } - - fn set_signature_bytes(&mut self, signature: Vec) { - match self { - DocumentsBatchTransition::V0(transition) => transition.set_signature_bytes(signature), - } - } - - /// returns the fee multiplier - fn user_fee_increase(&self) -> UserFeeIncrease { - match self { - DocumentsBatchTransition::V0(transition) => transition.user_fee_increase(), - } - } - /// set a fee multiplier - fn set_user_fee_increase(&mut self, user_fee_increase: UserFeeIncrease) { - match self { - DocumentsBatchTransition::V0(transition) => { - transition.set_user_fee_increase(user_fee_increase) - } - } - } - - fn owner_id(&self) -> Identifier { - match self { - DocumentsBatchTransition::V0(transition) => transition.owner_id(), - } - } - - fn unique_identifiers(&self) -> Vec { - match self { - DocumentsBatchTransition::V0(transition) => transition.unique_identifiers(), - } - } -} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/json_conversion.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/json_conversion.rs deleted file mode 100644 index ac62cb41c7..0000000000 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/json_conversion.rs +++ /dev/null @@ -1,4 +0,0 @@ -use crate::state_transition::documents_batch_transition::DocumentsBatchTransitionV0; -use crate::state_transition::StateTransitionJsonConvert; - -impl<'a> StateTransitionJsonConvert<'a> for DocumentsBatchTransitionV0 {} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/value_conversion.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/value_conversion.rs deleted file mode 100644 index d82f708df4..0000000000 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/v0/value_conversion.rs +++ /dev/null @@ -1,4 +0,0 @@ -use crate::state_transition::documents_batch_transition::DocumentsBatchTransitionV0; -use crate::state_transition::StateTransitionValueConvert; - -impl<'a> StateTransitionValueConvert<'a> for DocumentsBatchTransitionV0 {} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/validate_basic_structure/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/validate_basic_structure/v0/mod.rs deleted file mode 100644 index 1bc2dd8b51..0000000000 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/validation/validate_basic_structure/v0/mod.rs +++ /dev/null @@ -1,104 +0,0 @@ -use crate::consensus::basic::document::{ - DocumentTransitionsAreAbsentError, DuplicateDocumentTransitionsWithIdsError, - MaxDocumentsTransitionsExceededError, NonceOutOfBoundsError, -}; -use crate::consensus::basic::BasicError; - -use crate::identity::identity_nonce::MISSING_IDENTITY_REVISIONS_FILTER; -use crate::state_transition::documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; -use crate::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use crate::state_transition::documents_batch_transition::document_transition::{ - DocumentTransition, DocumentTransitionV0Methods, -}; -use crate::state_transition::documents_batch_transition::validation::find_duplicates_by_id::find_duplicates_by_id; -use crate::state_transition::documents_batch_transition::DocumentsBatchTransition; -use crate::validation::SimpleConsensusValidationResult; -use crate::ProtocolError; -use platform_value::Identifier; -use platform_version::version::PlatformVersion; -use std::collections::btree_map::Entry; -use std::collections::BTreeMap; - -impl DocumentsBatchTransition { - #[inline(always)] - pub(super) fn validate_base_structure_v0( - &self, - platform_version: &PlatformVersion, - ) -> Result { - if self.transitions().is_empty() { - return Ok(SimpleConsensusValidationResult::new_with_error( - DocumentTransitionsAreAbsentError::new().into(), - )); - } - - let transitions_len = self.transitions().len(); - - if transitions_len > u16::MAX as usize - || transitions_len as u16 - > platform_version - .system_limits - .max_transitions_in_documents_batch - { - return Ok(SimpleConsensusValidationResult::new_with_error( - MaxDocumentsTransitionsExceededError::new( - platform_version - .system_limits - .max_transitions_in_documents_batch, - ) - .into(), - )); - } - - // Group transitions by contract ID - let mut document_transitions_by_contracts: BTreeMap> = - BTreeMap::new(); - - self.transitions().iter().for_each(|document_transition| { - let contract_identifier = document_transition.data_contract_id(); - - match document_transitions_by_contracts.entry(contract_identifier) { - Entry::Vacant(vacant) => { - vacant.insert(vec![document_transition]); - } - Entry::Occupied(mut identifiers) => { - identifiers.get_mut().push(document_transition); - } - }; - }); - - let mut result = SimpleConsensusValidationResult::default(); - - for transitions in document_transitions_by_contracts.values() { - for transition in transitions { - // We need to make sure that the identity contract nonce is within the allowed bounds - // This means that it is stored on 40 bits - if transition.identity_contract_nonce() & MISSING_IDENTITY_REVISIONS_FILTER > 0 { - result.add_error(BasicError::NonceOutOfBoundsError( - NonceOutOfBoundsError::new(transition.identity_contract_nonce()), - )); - } - } - - // Make sure we don't have duplicate transitions - let duplicate_transitions = find_duplicates_by_id(transitions, platform_version)?; - - if !duplicate_transitions.is_empty() { - let references: Vec<(String, [u8; 32])> = duplicate_transitions - .into_iter() - .map(|transition| { - Ok(( - transition.base().document_type_name().clone(), - transition.base().id().to_buffer(), - )) - }) - .collect::, anyhow::Error>>()?; - - result.add_error(BasicError::DuplicateDocumentTransitionsWithIdsError( - DuplicateDocumentTransitionsWithIdsError::new(references), - )); - } - } - - Ok(result) - } -} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/version.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/version.rs deleted file mode 100644 index f65071aabe..0000000000 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/version.rs +++ /dev/null @@ -1,11 +0,0 @@ -use crate::state_transition::documents_batch_transition::DocumentsBatchTransition; -use crate::state_transition::FeatureVersioned; -use crate::version::FeatureVersion; - -impl FeatureVersioned for DocumentsBatchTransition { - fn feature_version(&self) -> FeatureVersion { - match self { - DocumentsBatchTransition::V0(v0) => v0.feature_version(), - } - } -} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/mod.rs index 01a4fd6ffd..03238bee69 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/mod.rs @@ -1 +1 @@ -pub mod documents_batch_transition; +pub mod batch_transition; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/methods/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/methods/v0/mod.rs index 588fafe2c0..b68cd97892 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/methods/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/methods/v0/mod.rs @@ -6,6 +6,8 @@ use crate::{ ProtocolError, }; #[cfg(feature = "state-transition-signing")] +use platform_value::Identifier; +#[cfg(feature = "state-transition-signing")] use platform_version::version::{FeatureVersion, PlatformVersion}; use crate::state_transition::StateTransitionType; @@ -14,7 +16,7 @@ pub trait IdentityCreditTransferTransitionMethodsV0 { #[cfg(feature = "state-transition-signing")] fn try_from_identity( identity: &Identity, - to_identity_with_identifier: platform_value::Identifier, + to_identity_with_identifier: Identifier, amount: u64, user_fee_increase: UserFeeIncrease, signer: S, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/v0_methods.rs index cf376b9b83..bbcd3780c0 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/identity/identity_credit_transfer_transition/v0/v0_methods.rs @@ -8,10 +8,12 @@ use crate::{ state_transition::StateTransition, ProtocolError, }; +#[cfg(feature = "state-transition-signing")] use platform_value::Identifier; use crate::state_transition::identity_credit_transfer_transition::methods::IdentityCreditTransferTransitionMethodsV0; use crate::state_transition::identity_credit_transfer_transition::v0::IdentityCreditTransferTransitionV0; +#[cfg(feature = "state-transition-signing")] use crate::state_transition::GetDataContractSecurityLevelRequirementFn; #[cfg(feature = "state-transition-signing")] use platform_version::version::{FeatureVersion, PlatformVersion}; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/identity/public_key_in_creation/value_conversion.rs b/packages/rs-dpp/src/state_transition/state_transitions/identity/public_key_in_creation/value_conversion.rs index 2ebc3b6f85..6822f7d2c3 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/identity/public_key_in_creation/value_conversion.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/identity/public_key_in_creation/value_conversion.rs @@ -1,5 +1,5 @@ use crate::serialization::ValueConvertible; -use crate::state_transition::documents_batch_transition::fields::property_names::STATE_TRANSITION_PROTOCOL_VERSION; +use crate::state_transition::batch_transition::fields::property_names::STATE_TRANSITION_PROTOCOL_VERSION; use crate::state_transition::public_key_in_creation::v0::IdentityPublicKeyInCreationV0; use crate::state_transition::public_key_in_creation::IdentityPublicKeyInCreation; use crate::state_transition::StateTransitionValueConvert; diff --git a/packages/rs-dpp/src/state_transition/traits/state_transition_like.rs b/packages/rs-dpp/src/state_transition/traits/state_transition_like.rs index 4884fd46b6..e3084b6310 100644 --- a/packages/rs-dpp/src/state_transition/traits/state_transition_like.rs +++ b/packages/rs-dpp/src/state_transition/traits/state_transition_like.rs @@ -8,8 +8,7 @@ use crate::version::FeatureVersion; use crate::state_transition::StateTransitionType; use crate::state_transition::{StateTransition, StateTransitionFieldTypes}; -pub const DOCUMENT_TRANSITION_TYPES: [StateTransitionType; 1] = - [StateTransitionType::DocumentsBatch]; +pub const DOCUMENT_TRANSITION_TYPES: [StateTransitionType; 1] = [StateTransitionType::Batch]; pub const IDENTITY_TRANSITION_TYPE: [StateTransitionType; 5] = [ StateTransitionType::IdentityCreate, diff --git a/packages/rs-dpp/src/tests/fixtures/get_document_transitions_fixture.rs b/packages/rs-dpp/src/tests/fixtures/get_document_transitions_fixture.rs index dfb531b554..d50516c440 100644 --- a/packages/rs-dpp/src/tests/fixtures/get_document_transitions_fixture.rs +++ b/packages/rs-dpp/src/tests/fixtures/get_document_transitions_fixture.rs @@ -5,12 +5,10 @@ use platform_version::version::PlatformVersion; use std::collections::BTreeMap; use crate::document::Document; -use crate::state_transition::documents_batch_transition::document_transition::action_type::DocumentTransitionActionType; -use crate::state_transition::documents_batch_transition::document_transition::DocumentTransition; - -use crate::state_transition::documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; - -pub fn get_document_transitions_fixture<'a>( +use crate::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use crate::state_transition::batch_transition::batched_transition::BatchedTransition; +use crate::state_transition::batch_transition::batched_transition::document_transition_action_type::DocumentTransitionActionType; +pub fn get_batched_transitions_fixture<'a>( documents: impl IntoIterator< Item = ( DocumentTransitionActionType, @@ -18,7 +16,7 @@ pub fn get_document_transitions_fixture<'a>( ), >, nonce_counter: &mut BTreeMap<(Identifier, Identifier), u64>, //IdentityID/ContractID -> nonce -) -> Vec { +) -> Vec { let protocol_version = PlatformVersion::latest().protocol_version; let document_factory = DocumentFactory::new(protocol_version).expect("expected to get document factory"); @@ -26,6 +24,7 @@ pub fn get_document_transitions_fixture<'a>( document_factory .create_state_transition(documents, nonce_counter) .expect("the transitions should be created") - .transitions() - .to_owned() + .transitions_iter() + .map(|batched_transition_ref| batched_transition_ref.to_owned_transition()) + .collect() } diff --git a/packages/rs-dpp/src/tokens/allowed_currency.rs b/packages/rs-dpp/src/tokens/allowed_currency.rs new file mode 100644 index 0000000000..f6c5b4da93 --- /dev/null +++ b/packages/rs-dpp/src/tokens/allowed_currency.rs @@ -0,0 +1,7 @@ +use platform_value::Identifier; + +#[derive(Debug, PartialEq, Clone)] +pub enum AllowedCurrency { + TradingInDash, + OnContract(Identifier, String), +} diff --git a/packages/rs-dpp/src/tokens/emergency_action.rs b/packages/rs-dpp/src/tokens/emergency_action.rs new file mode 100644 index 0000000000..7e18e6f426 --- /dev/null +++ b/packages/rs-dpp/src/tokens/emergency_action.rs @@ -0,0 +1,30 @@ +use crate::tokens::status::TokenStatus; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_version::version::PlatformVersion; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Copy, Default, Encode, Decode, PartialOrd, PartialEq, Eq)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(rename_all = "camelCase") +)] +pub enum TokenEmergencyAction { + #[default] + Pause = 0, + Resume = 1, +} + +impl TokenEmergencyAction { + pub fn resulting_status( + &self, + platform_version: &PlatformVersion, + ) -> Result { + match self { + TokenEmergencyAction::Pause => TokenStatus::new(true, platform_version), + TokenEmergencyAction::Resume => TokenStatus::new(false, platform_version), + } + } +} diff --git a/packages/rs-dpp/src/tokens/errors.rs b/packages/rs-dpp/src/tokens/errors.rs new file mode 100644 index 0000000000..c23e619410 --- /dev/null +++ b/packages/rs-dpp/src/tokens/errors.rs @@ -0,0 +1,9 @@ +use thiserror::Error; + +#[derive(Error, Debug)] +pub enum TokenError { + #[error("There is no token at this position")] + TokenNotFoundAtPositionError, + #[error("The contract version does not allow tokens")] + TokenNotFoundOnContractVersion, +} diff --git a/packages/rs-dpp/src/tokens/info/methods.rs b/packages/rs-dpp/src/tokens/info/methods.rs new file mode 100644 index 0000000000..09884a8ab6 --- /dev/null +++ b/packages/rs-dpp/src/tokens/info/methods.rs @@ -0,0 +1,16 @@ +use crate::tokens::info::v0::IdentityTokenInfoV0Accessors; +use crate::tokens::info::IdentityTokenInfo; + +impl IdentityTokenInfoV0Accessors for IdentityTokenInfo { + fn frozen(&self) -> bool { + match self { + IdentityTokenInfo::V0(info) => info.frozen, + } + } + + fn set_frozen(&mut self, frozen: bool) { + match self { + IdentityTokenInfo::V0(info) => info.set_frozen(frozen), + } + } +} diff --git a/packages/rs-dpp/src/tokens/info/mod.rs b/packages/rs-dpp/src/tokens/info/mod.rs new file mode 100644 index 0000000000..ccf211d440 --- /dev/null +++ b/packages/rs-dpp/src/tokens/info/mod.rs @@ -0,0 +1,44 @@ +use crate::tokens::info::v0::IdentityTokenInfoV0; +use crate::ProtocolError; +use bincode::Encode; +use derive_more::From; +use platform_serialization::de::Decode; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use platform_version::version::PlatformVersion; +use platform_versioning::PlatformVersioned; + +mod methods; +pub mod v0; + +#[derive( + Debug, + Clone, + Encode, + Decode, + PlatformDeserialize, + PlatformSerialize, + PlatformVersioned, + From, + PartialEq, +)] +#[platform_serialize(unversioned)] //versioned directly, no need to use platform_version +pub enum IdentityTokenInfo { + V0(IdentityTokenInfoV0), +} + +impl IdentityTokenInfo { + pub fn new(frozen: bool, platform_version: &PlatformVersion) -> Result { + match platform_version + .dpp + .token_versions + .identity_token_info_default_structure_version + { + 0 => Ok(IdentityTokenInfo::V0(IdentityTokenInfoV0 { frozen })), + version => Err(ProtocolError::UnknownVersionMismatch { + method: "IdentityTokenInfo::new".to_string(), + known_versions: vec![0], + received: version, + }), + } + } +} diff --git a/packages/rs-dpp/src/tokens/info/v0/mod.rs b/packages/rs-dpp/src/tokens/info/v0/mod.rs new file mode 100644 index 0000000000..2fa6f5e310 --- /dev/null +++ b/packages/rs-dpp/src/tokens/info/v0/mod.rs @@ -0,0 +1,26 @@ +use bincode::{Decode, Encode}; +use derive_more::From; + +#[derive(Debug, Clone, Encode, Decode, From, PartialEq)] +/// Token information for an identity (version 0). +pub struct IdentityTokenInfoV0 { + pub frozen: bool, +} + +pub trait IdentityTokenInfoV0Accessors { + /// Gets the frozen state of the identity. + fn frozen(&self) -> bool; + + /// Sets the frozen state of the identity. + fn set_frozen(&mut self, frozen: bool); +} + +impl IdentityTokenInfoV0Accessors for IdentityTokenInfoV0 { + fn frozen(&self) -> bool { + self.frozen + } + + fn set_frozen(&mut self, frozen: bool) { + self.frozen = frozen; + } +} diff --git a/packages/rs-dpp/src/tokens/mod.rs b/packages/rs-dpp/src/tokens/mod.rs new file mode 100644 index 0000000000..aa8703acbf --- /dev/null +++ b/packages/rs-dpp/src/tokens/mod.rs @@ -0,0 +1,16 @@ +use crate::data_contract::TokenContractPosition; +use crate::util::hash::hash_double; + +pub mod allowed_currency; +pub mod emergency_action; +pub mod errors; +pub mod info; +pub mod status; +pub mod token_event; + +pub fn calculate_token_id(contract_id: &[u8; 32], token_pos: TokenContractPosition) -> [u8; 32] { + let mut bytes = b"dash_token".to_vec(); + bytes.extend_from_slice(contract_id); + bytes.extend_from_slice(&token_pos.to_be_bytes()); + hash_double(bytes) +} diff --git a/packages/rs-dpp/src/tokens/status/methods.rs b/packages/rs-dpp/src/tokens/status/methods.rs new file mode 100644 index 0000000000..e912ea562e --- /dev/null +++ b/packages/rs-dpp/src/tokens/status/methods.rs @@ -0,0 +1,16 @@ +use crate::tokens::status::v0::TokenStatusV0Accessors; +use crate::tokens::status::TokenStatus; + +impl TokenStatusV0Accessors for TokenStatus { + fn paused(&self) -> bool { + match self { + TokenStatus::V0(status) => status.paused, + } + } + + fn set_paused(&mut self, frozen: bool) { + match self { + TokenStatus::V0(status) => status.set_paused(frozen), + } + } +} diff --git a/packages/rs-dpp/src/tokens/status/mod.rs b/packages/rs-dpp/src/tokens/status/mod.rs new file mode 100644 index 0000000000..f39cc6be09 --- /dev/null +++ b/packages/rs-dpp/src/tokens/status/mod.rs @@ -0,0 +1,44 @@ +use crate::tokens::status::v0::TokenStatusV0; +use crate::ProtocolError; +use bincode::Encode; +use derive_more::From; +use platform_serialization::de::Decode; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use platform_version::version::PlatformVersion; +use platform_versioning::PlatformVersioned; + +mod methods; +pub mod v0; + +#[derive( + Debug, + Clone, + Encode, + Decode, + PlatformDeserialize, + PlatformSerialize, + PlatformVersioned, + From, + PartialEq, +)] +#[platform_serialize(unversioned)] //versioned directly, no need to use platform_version +pub enum TokenStatus { + V0(TokenStatusV0), +} + +impl TokenStatus { + pub fn new(paused: bool, platform_version: &PlatformVersion) -> Result { + match platform_version + .dpp + .token_versions + .identity_token_status_default_structure_version + { + 0 => Ok(TokenStatus::V0(TokenStatusV0 { paused })), + version => Err(ProtocolError::UnknownVersionMismatch { + method: "IdentityTokenStatus::new".to_string(), + known_versions: vec![0], + received: version, + }), + } + } +} diff --git a/packages/rs-dpp/src/tokens/status/v0/mod.rs b/packages/rs-dpp/src/tokens/status/v0/mod.rs new file mode 100644 index 0000000000..a8dd3a0f83 --- /dev/null +++ b/packages/rs-dpp/src/tokens/status/v0/mod.rs @@ -0,0 +1,26 @@ +use bincode::{Decode, Encode}; +use derive_more::From; + +#[derive(Debug, Clone, Encode, Decode, From, PartialEq)] +/// Token status +pub struct TokenStatusV0 { + pub paused: bool, +} + +pub trait TokenStatusV0Accessors { + /// Gets the paused state of the token. + fn paused(&self) -> bool; + + /// Sets the paused state of the token. + fn set_paused(&mut self, paused: bool); +} + +impl TokenStatusV0Accessors for TokenStatusV0 { + fn paused(&self) -> bool { + self.paused + } + + fn set_paused(&mut self, paused: bool) { + self.paused = paused; + } +} diff --git a/packages/rs-dpp/src/tokens/token_event.rs b/packages/rs-dpp/src/tokens/token_event.rs new file mode 100644 index 0000000000..df805788b1 --- /dev/null +++ b/packages/rs-dpp/src/tokens/token_event.rs @@ -0,0 +1,205 @@ +use crate::balances::credits::TokenAmount; +use crate::block::block_info::BlockInfo; +use crate::data_contract::accessors::v0::DataContractV0Getters; +use crate::data_contract::document_type::DocumentTypeRef; +use crate::document::{Document, DocumentV0}; +use crate::prelude::{ + DataContract, DerivationEncryptionKeyIndex, IdentityNonce, RecipientKeyIndex, + RootEncryptionKeyIndex, SenderKeyIndex, +}; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use platform_value::Identifier; +use std::collections::BTreeMap; + +pub type TokenEventPublicNote = Option; +pub type TokenEventSharedEncryptedNote = Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>; +pub type TokenEventPersonalEncryptedNote = Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, +)>; +use crate::tokens::emergency_action::TokenEmergencyAction; +use crate::ProtocolError; + +pub type RecipientIdentifier = Identifier; +pub type FrozenIdentifier = Identifier; + +#[derive( + Debug, PartialEq, PartialOrd, Clone, Eq, Encode, Decode, PlatformDeserialize, PlatformSerialize, +)] +#[platform_serialize(unversioned)] //versioned directly, no need to use platform_version +pub enum TokenEvent { + Mint(TokenAmount, RecipientIdentifier, TokenEventPublicNote), + Burn(TokenAmount, TokenEventPublicNote), + Freeze(FrozenIdentifier, TokenEventPublicNote), + Unfreeze(FrozenIdentifier, TokenEventPublicNote), + DestroyFrozenFunds(FrozenIdentifier, TokenAmount, TokenEventPublicNote), + Transfer( + RecipientIdentifier, + TokenEventPublicNote, + TokenEventSharedEncryptedNote, + TokenEventPersonalEncryptedNote, + TokenAmount, + ), + EmergencyAction(TokenEmergencyAction, TokenEventPublicNote), +} + +impl TokenEvent { + pub fn associated_document_type_name(&self) -> &str { + match self { + TokenEvent::Mint(_, _, _) => "mint", + TokenEvent::Burn(_, _) => "burn", + TokenEvent::Freeze(_, _) => "freeze", + TokenEvent::Unfreeze(_, _) => "unfreeze", + TokenEvent::DestroyFrozenFunds(_, _, _) => "destroyFrozenFunds", + TokenEvent::Transfer(_, _, _, _, _) => "transfer", + TokenEvent::EmergencyAction(_, _) => "emergencyAction", + } + } + + pub fn associated_document_type<'a>( + &self, + token_history_contract: &'a DataContract, + ) -> Result, ProtocolError> { + Ok(token_history_contract.document_type_for_name(self.associated_document_type_name())?) + } + + pub fn build_historical_document_owned( + self, + token_history_contract: &DataContract, + token_id: Identifier, + owner_id: Identifier, + owner_nonce: IdentityNonce, + block_info: &BlockInfo, + ) -> Result { + let document_id = Document::generate_document_id_v0( + &token_history_contract.id(), + &owner_id, + self.associated_document_type_name(), + owner_nonce.to_be_bytes().as_slice(), + ); + + let properties = match self { + TokenEvent::Mint(mint_amount, recipient_id, public_note) => { + let mut properties = BTreeMap::from([ + ("tokenId".to_string(), token_id.into()), + ("recipientId".to_string(), recipient_id.into()), + ("amount".to_string(), mint_amount.into()), + ]); + if let Some(note) = public_note { + properties.insert("note".to_string(), note.into()); + } + properties + } + TokenEvent::Burn(burn_amount, public_note) => { + let mut properties = BTreeMap::from([ + ("tokenId".to_string(), token_id.into()), + ("amount".to_string(), burn_amount.into()), + ]); + if let Some(note) = public_note { + properties.insert("note".to_string(), note.into()); + } + properties + } + TokenEvent::Transfer( + to, + public_note, + token_event_shared_encrypted_note, + token_event_personal_encrypted_note, + amount, + ) => { + let mut properties = BTreeMap::from([ + ("tokenId".to_string(), token_id.into()), + ("amount".to_string(), amount.into()), + ("toIdentityId".to_string(), to.into()), + ]); + if let Some(note) = public_note { + properties.insert("publicNote".to_string(), note.into()); + } + if let Some((sender_key_index, recipient_key_index, note)) = + token_event_shared_encrypted_note + { + properties.insert("encryptedSharedNote".to_string(), note.into()); + properties.insert("senderKeyIndex".to_string(), sender_key_index.into()); + properties.insert("recipientKeyIndex".to_string(), recipient_key_index.into()); + } + + if let Some((root_encryption_key_index, derivation_encryption_key_index, note)) = + token_event_personal_encrypted_note + { + properties.insert("encryptedPersonalNote".to_string(), note.into()); + properties.insert( + "rootEncryptionKeyIndex".to_string(), + root_encryption_key_index.into(), + ); + properties.insert( + "derivationEncryptionKeyIndex".to_string(), + derivation_encryption_key_index.into(), + ); + } + properties + } + TokenEvent::Freeze(frozen_identity_id, public_note) => { + let mut properties = BTreeMap::from([ + ("tokenId".to_string(), token_id.into()), + ("frozenIdentityId".to_string(), frozen_identity_id.into()), + ]); + if let Some(note) = public_note { + properties.insert("note".to_string(), note.into()); + } + properties + } + TokenEvent::Unfreeze(frozen_identity_id, public_note) => { + let mut properties = BTreeMap::from([ + ("tokenId".to_string(), token_id.into()), + ("frozenIdentityId".to_string(), frozen_identity_id.into()), + ]); + if let Some(note) = public_note { + properties.insert("note".to_string(), note.into()); + } + properties + } + TokenEvent::DestroyFrozenFunds(frozen_identity_id, amount, public_note) => { + let mut properties = BTreeMap::from([ + ("tokenId".to_string(), token_id.into()), + ("frozenIdentityId".to_string(), frozen_identity_id.into()), + ("amount".to_string(), amount.into()), + ]); + if let Some(note) = public_note { + properties.insert("note".to_string(), note.into()); + } + properties + } + TokenEvent::EmergencyAction(action, public_note) => { + let mut properties = BTreeMap::from([ + ("tokenId".to_string(), token_id.into()), + ("action".to_string(), (action as u8).into()), + ]); + if let Some(note) = public_note { + properties.insert("note".to_string(), note.into()); + } + properties + } + }; + + let document: Document = DocumentV0 { + id: document_id, + owner_id, + properties, + revision: None, + created_at: Some(block_info.time_ms), + updated_at: None, + transferred_at: None, + created_at_block_height: Some(block_info.height), + updated_at_block_height: None, + transferred_at_block_height: None, + created_at_core_block_height: None, + updated_at_core_block_height: None, + transferred_at_core_block_height: None, + } + .into(); + + Ok(document) + } +} diff --git a/packages/rs-dpp/src/validation/meta_validators/mod.rs b/packages/rs-dpp/src/validation/meta_validators/mod.rs index 8d1ce93b7e..05e1024a52 100644 --- a/packages/rs-dpp/src/validation/meta_validators/mod.rs +++ b/packages/rs-dpp/src/validation/meta_validators/mod.rs @@ -36,10 +36,14 @@ lazy_static! { "../../../schema/meta_schemas/draft2020-12/meta/content.json" )) .expect("Valid schema!"); - static ref DATA_CONTRACT_V0: Value = serde_json::from_str::(include_str!( + static ref DOCUMENT_META_JSON_V0: Value = serde_json::from_str::(include_str!( "../../../schema/meta_schemas/document/v0/document-meta.json" )) .unwrap(); + static ref TOKEN_META_JSON_V0: Value = serde_json::from_str::(include_str!( + "../../../schema/meta_schemas/token/v0/token-meta.json" + )) + .unwrap(); pub static ref DRAFT_202012_META_SCHEMA: JSONSchema = JSONSchema::options() .with_draft(Draft::Draft202012) @@ -85,8 +89,7 @@ lazy_static! { .compile(&DRAFT202012) .expect("Invalid data contract schema"); - - // Compiled version of data contract meta schema + // Compiled version of document meta schema pub static ref DOCUMENT_META_SCHEMA_V0: JSONSchema = JSONSchema::options() .with_keyword( "byteArray", @@ -137,6 +140,60 @@ lazy_static! { DRAFT202012.clone(), ) .to_owned() - .compile(&DATA_CONTRACT_V0) + .compile(&DOCUMENT_META_JSON_V0) + .expect("Invalid data contract schema"); + + // Compiled version of token meta schema + pub static ref TOKEN_META_SCHEMA_V0: JSONSchema = JSONSchema::options() + .with_keyword( + "byteArray", + |_, _, _| Ok(Box::new(ByteArrayKeyword)), + ) + .with_patterns_regex_engine(RegexEngine::Regex(RegexOptions { + size_limit: Some(5 * (1 << 20)), + ..Default::default() + })) + .should_ignore_unknown_formats(false) + .should_validate_formats(true) + .with_patterns_regex_engine(RegexEngine::Regex(Default::default())) + .with_draft(Draft::Draft202012) + .with_document( + "https://json-schema.org/draft/2020-12/meta/applicator".to_string(), + DRAFT202012_APPLICATOR.clone(), + ) + .with_document( + "https://json-schema.org/draft/2020-12/meta/core".to_string(), + DRAFT202012_CORE.clone(), + ) + .with_document( + "https://json-schema.org/draft/2020-12/meta/applicator".to_string(), + DRAFT202012_APPLICATOR.clone(), + ) + .with_document( + "https://json-schema.org/draft/2020-12/meta/unevaluated".to_string(), + DRAFT202012_UNEVALUATED.clone(), + ) + .with_document( + "https://json-schema.org/draft/2020-12/meta/validation".to_string(), + DRAFT202012_VALIDATION.clone(), + ) + .with_document( + "https://json-schema.org/draft/2020-12/meta/meta-data".to_string(), + DRAFT202012_META_DATA.clone(), + ) + .with_document( + "https://json-schema.org/draft/2020-12/meta/format-annotation".to_string(), + DRAFT202012_FORMAT_ANNOTATION.clone(), + ) + .with_document( + "https://json-schema.org/draft/2020-12/meta/content".to_string(), + DRAFT202012_CONTENT.clone(), + ) + .with_document( + "https://json-schema.org/draft/2020-12/schema".to_string(), + DRAFT202012.clone(), + ) + .to_owned() + .compile(&TOKEN_META_JSON_V0) .expect("Invalid data contract schema"); } diff --git a/packages/rs-dpp/src/voting/contender_structs/contender/v0/mod.rs b/packages/rs-dpp/src/voting/contender_structs/contender/v0/mod.rs index 7ff0929f61..ed4c0fc079 100644 --- a/packages/rs-dpp/src/voting/contender_structs/contender/v0/mod.rs +++ b/packages/rs-dpp/src/voting/contender_structs/contender/v0/mod.rs @@ -1,8 +1,8 @@ use crate::data_contract::document_type::DocumentTypeRef; use crate::document::serialization_traits::DocumentPlatformConversionMethodsV0; use crate::document::Document; -use crate::identity::state_transition::asset_lock_proof::{Decode, Encode}; use crate::ProtocolError; +use bincode::{Decode, Encode}; use platform_value::Identifier; use platform_version::version::PlatformVersion; diff --git a/packages/rs-dpp/src/voting/contender_structs/mod.rs b/packages/rs-dpp/src/voting/contender_structs/mod.rs index 0e8d96c25f..a71c77f19a 100644 --- a/packages/rs-dpp/src/voting/contender_structs/mod.rs +++ b/packages/rs-dpp/src/voting/contender_structs/mod.rs @@ -3,9 +3,9 @@ mod contender; use crate::data_contract::document_type::DocumentTypeRef; use crate::document::serialization_traits::DocumentPlatformConversionMethodsV0; use crate::document::Document; -use crate::identity::state_transition::asset_lock_proof::{Decode, Encode}; use crate::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; use crate::ProtocolError; +use bincode::{Decode, Encode}; use platform_value::Identifier; use platform_version::version::PlatformVersion; use std::fmt; diff --git a/packages/rs-dpp/src/voting/vote_info_storage/contested_document_vote_poll_stored_info/mod.rs b/packages/rs-dpp/src/voting/vote_info_storage/contested_document_vote_poll_stored_info/mod.rs index 12eb2b400c..90a920fa78 100644 --- a/packages/rs-dpp/src/voting/vote_info_storage/contested_document_vote_poll_stored_info/mod.rs +++ b/packages/rs-dpp/src/voting/vote_info_storage/contested_document_vote_poll_stored_info/mod.rs @@ -1,13 +1,13 @@ mod v0; use crate::block::block_info::BlockInfo; -use crate::identity::state_transition::asset_lock_proof::{Decode, Encode}; use crate::voting::contender_structs::{ ContenderWithSerializedDocument, FinalizedResourceVoteChoicesWithVoterInfo, }; use crate::voting::vote_info_storage::contested_document_vote_poll_stored_info::v0::ContestedDocumentVotePollStoredInfoV0; use crate::voting::vote_info_storage::contested_document_vote_poll_winner_info::ContestedDocumentVotePollWinnerInfo; use crate::ProtocolError; +use bincode::{Decode, Encode}; use derive_more::From; use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; use platform_value::Identifier; diff --git a/packages/rs-dpp/src/voting/vote_polls/contested_document_resource_vote_poll/mod.rs b/packages/rs-dpp/src/voting/vote_polls/contested_document_resource_vote_poll/mod.rs index 21f953f844..9342eae819 100644 --- a/packages/rs-dpp/src/voting/vote_polls/contested_document_resource_vote_poll/mod.rs +++ b/packages/rs-dpp/src/voting/vote_polls/contested_document_resource_vote_poll/mod.rs @@ -1,7 +1,7 @@ -use crate::identity::state_transition::asset_lock_proof::{Decode, Encode}; use crate::serialization::PlatformSerializable; use crate::util::hash::hash_double; use crate::ProtocolError; +use bincode::{Decode, Encode}; use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; use platform_value::{Identifier, Value}; #[cfg(feature = "vote-serde-conversion")] diff --git a/packages/rs-dpp/src/voting/vote_polls/mod.rs b/packages/rs-dpp/src/voting/vote_polls/mod.rs index 9186451e68..938a852ed4 100644 --- a/packages/rs-dpp/src/voting/vote_polls/mod.rs +++ b/packages/rs-dpp/src/voting/vote_polls/mod.rs @@ -1,6 +1,6 @@ -use crate::identity::state_transition::asset_lock_proof::{Decode, Encode}; use crate::voting::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePoll; use crate::ProtocolError; +use bincode::{Decode, Encode}; use derive_more::From; use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; use platform_value::Identifier; diff --git a/packages/rs-dpp/src/voting/votes/resource_vote/mod.rs b/packages/rs-dpp/src/voting/votes/resource_vote/mod.rs index 8ee89fe371..15787e88d7 100644 --- a/packages/rs-dpp/src/voting/votes/resource_vote/mod.rs +++ b/packages/rs-dpp/src/voting/votes/resource_vote/mod.rs @@ -1,6 +1,6 @@ -use crate::identity::state_transition::asset_lock_proof::{Decode, Encode}; use crate::voting::votes::resource_vote::v0::ResourceVoteV0; use crate::ProtocolError; +use bincode::{Decode, Encode}; use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; #[cfg(feature = "vote-serde-conversion")] use serde::{Deserialize, Serialize}; diff --git a/packages/rs-drive-abci/src/config.rs b/packages/rs-drive-abci/src/config.rs index 1e8f5f3c26..afa20e34f5 100644 --- a/packages/rs-drive-abci/src/config.rs +++ b/packages/rs-drive-abci/src/config.rs @@ -105,6 +105,10 @@ pub struct ExecutionConfig { #[serde(default = "ExecutionConfig::default_verify_sum_trees")] pub verify_sum_trees: bool, + /// Should we verify sum trees? Useful to set as `false` for tests + #[serde(default = "ExecutionConfig::default_verify_token_sum_trees")] + pub verify_token_sum_trees: bool, + /// How long in seconds should an epoch last /// It might last a lot longer if the chain is halted #[serde( @@ -614,6 +618,10 @@ impl ExecutionConfig { true } + fn default_verify_token_sum_trees() -> bool { + true + } + fn default_use_document_triggers() -> bool { true } @@ -669,6 +677,7 @@ impl Default for ExecutionConfig { Self { use_document_triggers: ExecutionConfig::default_use_document_triggers(), verify_sum_trees: ExecutionConfig::default_verify_sum_trees(), + verify_token_sum_trees: ExecutionConfig::default_verify_token_sum_trees(), epoch_time_length_s: ExecutionConfig::default_epoch_time_length_s(), } } diff --git a/packages/rs-drive-abci/src/execution/check_tx/v0/mod.rs b/packages/rs-drive-abci/src/execution/check_tx/v0/mod.rs index acfb7fca04..06292c2342 100644 --- a/packages/rs-drive-abci/src/execution/check_tx/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/check_tx/v0/mod.rs @@ -229,8 +229,8 @@ mod tests { use dpp::serialization::{PlatformSerializable, Signable}; use dpp::native_bls::NativeBlsModule; - use dpp::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; - use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; + use dpp::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; + use dpp::state_transition::batch_transition::BatchTransition; use dpp::state_transition::identity_create_transition::methods::IdentityCreateTransitionMethodsV0; use dpp::state_transition::identity_create_transition::IdentityCreateTransition; use dpp::state_transition::identity_topup_transition::methods::IdentityTopUpTransitionMethodsV0; @@ -381,7 +381,7 @@ mod tests { } #[test] - fn data_contract_create_check_tx() { + fn data_contract_create_check_tx_first_protocol_version() { let platform_config = PlatformConfig { testing_configs: PlatformTestConfig { disable_instant_lock_signature_verification: true, @@ -392,6 +392,7 @@ mod tests { let platform = TestPlatformBuilder::new() .with_config(platform_config) + .with_initial_protocol_version(1) .build_with_mock_rpc(); let platform_state = platform.state.load(); @@ -523,6 +524,149 @@ mod tests { )); } + #[test] + fn data_contract_create_check_tx_latest_protocol_version() { + let platform_config = PlatformConfig { + testing_configs: PlatformTestConfig { + disable_instant_lock_signature_verification: true, + ..Default::default() + }, + ..Default::default() + }; + + let platform = TestPlatformBuilder::new() + .with_config(platform_config) + .build_with_mock_rpc(); + + let platform_state = platform.state.load(); + let protocol_version = platform_state.current_protocol_version_in_consensus(); + let platform_version = PlatformVersion::get(protocol_version).unwrap(); + + let (key, private_key) = IdentityPublicKey::random_ecdsa_critical_level_authentication_key( + 1, + Some(1), + platform_version, + ) + .expect("expected to get key pair"); + + platform + .drive + .create_initial_state_structure(None, platform_version) + .expect("expected to create state structure"); + let identity: Identity = IdentityV0 { + id: Identifier::new([ + 158, 113, 180, 126, 91, 83, 62, 44, 83, 54, 97, 88, 240, 215, 84, 139, 167, 156, + 166, 203, 222, 4, 64, 31, 215, 199, 149, 151, 190, 246, 251, 44, + ]), + public_keys: BTreeMap::from([(1, key.clone())]), + balance: 1000000000, + revision: 0, + } + .into(); + + let dashpay = get_dashpay_contract_fixture(Some(identity.id()), 1, protocol_version); + let mut create_contract_state_transition: StateTransition = dashpay + .try_into_platform_versioned(platform_version) + .expect("expected a state transition"); + create_contract_state_transition + .sign(&key, private_key.as_slice(), &NativeBlsModule) + .expect("expected to sign transition"); + let serialized = create_contract_state_transition + .serialize_to_bytes() + .expect("serialized state transition"); + platform + .drive + .add_new_identity( + identity, + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert identity"); + + let platform_ref = PlatformRef { + drive: &platform.drive, + state: &platform_state, + config: &platform.config, + core_rpc: &platform.core_rpc, + }; + + let validation_result = platform + .check_tx( + serialized.as_slice(), + FirstTimeCheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(validation_result.errors.is_empty()); + + let check_result = platform + .check_tx( + serialized.as_slice(), + Recheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(check_result.is_valid()); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![serialized.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_eq!(processing_result.aggregated_fees().processing_fee, 2484410); + + let check_result = platform + .check_tx( + serialized.as_slice(), + Recheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(check_result.is_valid()); // it should still be valid, because we didn't commit the transaction + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + let check_result = platform + .check_tx( + serialized.as_slice(), + Recheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(!check_result.is_valid()); // it should no longer be valid, because of the nonce check + + assert!(matches!( + check_result.errors.first().expect("expected an error"), + ConsensusError::StateError(StateError::InvalidIdentityNonceError(_)) + )); + } + #[test] fn data_contract_create_check_tx_for_invalid_contract() { let platform_config = PlatformConfig { @@ -728,7 +872,7 @@ mod tests { } #[test] - fn data_contract_create_check_tx_priority() { + fn data_contract_create_check_tx_priority_first_protocol_version() { let platform_config = PlatformConfig { testing_configs: PlatformTestConfig { disable_instant_lock_signature_verification: true, @@ -739,6 +883,7 @@ mod tests { let platform = TestPlatformBuilder::new() .with_config(platform_config) + .with_initial_protocol_version(1) .build_with_mock_rpc(); let platform_state = platform.state.load(); @@ -882,7 +1027,7 @@ mod tests { } #[test] - fn data_contract_create_check_tx_after_identity_balance_used_up() { + fn data_contract_create_check_tx_priority_latest_protocol_version() { let platform_config = PlatformConfig { testing_configs: PlatformTestConfig { disable_instant_lock_signature_verification: true, @@ -923,7 +1068,7 @@ mod tests { 166, 203, 222, 4, 64, 31, 215, 199, 149, 151, 190, 246, 251, 44, ]), public_keys: BTreeMap::from([(1, key.clone())]), - balance: 200000000, // we have enough balance only for 1 insertion (this is where this test is different) + balance: 1000000000, revision: 0, } .into(); @@ -932,6 +1077,9 @@ mod tests { let mut create_contract_state_transition: StateTransition = dashpay .try_into_platform_versioned(platform_version) .expect("expected a state transition"); + + create_contract_state_transition.set_user_fee_increase(100); // This means that things will be twice as expensive + create_contract_state_transition .sign(&key, private_key.as_slice(), &NativeBlsModule) .expect("expected to sign transition"); @@ -961,6 +1109,8 @@ mod tests { assert!(validation_result.errors.is_empty()); + assert_eq!(validation_result.data.unwrap().priority, 10000); + let check_result = platform .check_tx( serialized.as_slice(), @@ -972,9 +1122,11 @@ mod tests { assert!(check_result.is_valid()); + assert_eq!(check_result.data.unwrap().priority, 10000); + let transaction = platform.drive.grove.start_transaction(); - platform + let processing_result = platform .platform .process_raw_state_transitions( &vec![serialized.clone()], @@ -987,6 +1139,10 @@ mod tests { ) .expect("expected to process state transition"); + // The processing fees should be twice as much as a fee multiplier of 0, + // since a fee multiplier of 100 means 100% more of 1 (gives 2) + assert_eq!(processing_result.aggregated_fees().processing_fee, 4968820); + let check_result = platform .check_tx( serialized.as_slice(), @@ -998,6 +1154,8 @@ mod tests { assert!(check_result.is_valid()); // it should still be valid, because we didn't commit the transaction + assert_eq!(check_result.data.unwrap().priority, 10000); + platform .drive .grove @@ -1014,11 +1172,16 @@ mod tests { ) .expect("expected to check tx"); - assert!(!check_result.is_valid()); // the identity shouldn't have enough balance anymore + assert!(!check_result.is_valid()); // it should no longer be valid, because of the nonce check + + assert!(matches!( + check_result.errors.first().expect("expected an error"), + ConsensusError::StateError(StateError::InvalidIdentityNonceError(_)) + )); } #[test] - fn data_contract_update_check_tx() { + fn data_contract_create_check_tx_after_identity_balance_used_up() { let platform_config = PlatformConfig { testing_configs: PlatformTestConfig { disable_instant_lock_signature_verification: true, @@ -1059,15 +1222,13 @@ mod tests { 166, 203, 222, 4, 64, 31, 215, 199, 149, 151, 190, 246, 251, 44, ]), public_keys: BTreeMap::from([(1, key.clone())]), - balance: 1000000000, + balance: 200000000, // we have enough balance only for 1 insertion (this is where this test is different) revision: 0, } .into(); - let dashpay_created_contract = - get_dashpay_contract_fixture(Some(identity.id()), 1, protocol_version); - let mut modified_dashpay_contract = dashpay_created_contract.data_contract().clone(); - let mut create_contract_state_transition: StateTransition = dashpay_created_contract + let dashpay = get_dashpay_contract_fixture(Some(identity.id()), 1, protocol_version); + let mut create_contract_state_transition: StateTransition = dashpay .try_into_platform_versioned(platform_version) .expect("expected a state transition"); create_contract_state_transition @@ -1079,7 +1240,7 @@ mod tests { platform .drive .add_new_identity( - identity.clone(), + identity, false, &BlockInfo::default(), true, @@ -1088,68 +1249,9 @@ mod tests { ) .expect("expected to insert identity"); - let transaction = platform.drive.grove.start_transaction(); - - let processing_result = platform - .platform - .process_raw_state_transitions( - &vec![serialized.clone()], - &platform_state, - &BlockInfo::default(), - &transaction, - platform_version, - false, - None, - ) - .expect("expected to process state transition"); - - assert_eq!(processing_result.aggregated_fees().processing_fee, 2483610); - - platform - .drive - .grove - .commit_transaction(transaction) - .unwrap() - .expect("expected to commit"); - - // Now let's do the data contract update - let _dashpay_id = modified_dashpay_contract.id(); - // we need to alter dashpay to make it invalid - - modified_dashpay_contract.set_version(2); - - let document_types = modified_dashpay_contract.document_types_mut(); - - let dpns_contract = - get_dpns_data_contract_fixture(Some(identity.id()), 1, protocol_version) - .data_contract_owned(); - - document_types.insert( - "preorder".to_string(), - dpns_contract - .document_type_for_name("preorder") - .expect("expected document type") - .to_owned_document_type(), - ); - - let mut update_contract_state_transition: StateTransition = - DataContractUpdateTransition::try_from_platform_versioned( - (modified_dashpay_contract, 2), - platform_version, - ) - .expect("expected a state transition") - .into(); - - update_contract_state_transition - .sign(&key, private_key.as_slice(), &NativeBlsModule) - .expect("expected to sign transition"); - let serialized_update = update_contract_state_transition - .serialize_to_bytes() - .expect("serialized state transition"); - let validation_result = platform .check_tx( - serialized_update.as_slice(), + serialized.as_slice(), FirstTimeCheck, &platform_ref, platform_version, @@ -1160,7 +1262,7 @@ mod tests { let check_result = platform .check_tx( - serialized_update.as_slice(), + serialized.as_slice(), Recheck, &platform_ref, platform_version, @@ -1171,10 +1273,10 @@ mod tests { let transaction = platform.drive.grove.start_transaction(); - let update_processing_result = platform + platform .platform .process_raw_state_transitions( - &vec![serialized_update.clone()], + &vec![serialized.clone()], &platform_state, &BlockInfo::default(), &transaction, @@ -1184,17 +1286,9 @@ mod tests { ) .expect("expected to process state transition"); - // We have one invalid paid for state transition - assert_eq!(update_processing_result.valid_count(), 1); - - assert_eq!( - update_processing_result.aggregated_fees().processing_fee, - 2495990 - ); - let check_result = platform .check_tx( - serialized_update.as_slice(), + serialized.as_slice(), Recheck, &platform_ref, platform_version, @@ -1212,14 +1306,430 @@ mod tests { let check_result = platform .check_tx( - serialized_update.as_slice(), + serialized.as_slice(), Recheck, &platform_ref, platform_version, ) .expect("expected to check tx"); - assert!(!check_result.is_valid()); // it should no longer be valid, because of the nonce check + assert!(!check_result.is_valid()); // the identity shouldn't have enough balance anymore + } + + #[test] + fn data_contract_update_check_tx_first_protocol_version() { + let platform_config = PlatformConfig { + testing_configs: PlatformTestConfig { + disable_instant_lock_signature_verification: true, + ..Default::default() + }, + ..Default::default() + }; + + let platform = TestPlatformBuilder::new() + .with_config(platform_config) + .with_initial_protocol_version(1) + .build_with_mock_rpc(); + + let platform_state = platform.state.load(); + let protocol_version = platform_state.current_protocol_version_in_consensus(); + let platform_version = PlatformVersion::get(protocol_version).unwrap(); + + let platform_ref = PlatformRef { + drive: &platform.drive, + state: &platform_state, + config: &platform.config, + core_rpc: &platform.core_rpc, + }; + + let (key, private_key) = IdentityPublicKey::random_ecdsa_critical_level_authentication_key( + 1, + Some(1), + platform_version, + ) + .expect("expected to get key pair"); + + platform + .drive + .create_initial_state_structure(None, platform_version) + .expect("expected to create state structure"); + let identity: Identity = IdentityV0 { + id: Identifier::new([ + 158, 113, 180, 126, 91, 83, 62, 44, 83, 54, 97, 88, 240, 215, 84, 139, 167, 156, + 166, 203, 222, 4, 64, 31, 215, 199, 149, 151, 190, 246, 251, 44, + ]), + public_keys: BTreeMap::from([(1, key.clone())]), + balance: 1000000000, + revision: 0, + } + .into(); + + let dashpay_created_contract = + get_dashpay_contract_fixture(Some(identity.id()), 1, protocol_version); + let mut modified_dashpay_contract = dashpay_created_contract.data_contract().clone(); + let mut create_contract_state_transition: StateTransition = dashpay_created_contract + .try_into_platform_versioned(platform_version) + .expect("expected a state transition"); + create_contract_state_transition + .sign(&key, private_key.as_slice(), &NativeBlsModule) + .expect("expected to sign transition"); + let serialized = create_contract_state_transition + .serialize_to_bytes() + .expect("serialized state transition"); + platform + .drive + .add_new_identity( + identity.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert identity"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![serialized.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_eq!(processing_result.aggregated_fees().processing_fee, 2483610); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + // Now let's do the data contract update + let _dashpay_id = modified_dashpay_contract.id(); + // we need to alter dashpay to make it invalid + + modified_dashpay_contract.set_version(2); + + let document_types = modified_dashpay_contract.document_types_mut(); + + let dpns_contract = + get_dpns_data_contract_fixture(Some(identity.id()), 1, protocol_version) + .data_contract_owned(); + + document_types.insert( + "preorder".to_string(), + dpns_contract + .document_type_for_name("preorder") + .expect("expected document type") + .to_owned_document_type(), + ); + + let mut update_contract_state_transition: StateTransition = + DataContractUpdateTransition::try_from_platform_versioned( + (modified_dashpay_contract, 2), + platform_version, + ) + .expect("expected a state transition") + .into(); + + update_contract_state_transition + .sign(&key, private_key.as_slice(), &NativeBlsModule) + .expect("expected to sign transition"); + let serialized_update = update_contract_state_transition + .serialize_to_bytes() + .expect("serialized state transition"); + + let validation_result = platform + .check_tx( + serialized_update.as_slice(), + FirstTimeCheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(validation_result.errors.is_empty()); + + let check_result = platform + .check_tx( + serialized_update.as_slice(), + Recheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(check_result.is_valid()); + + let transaction = platform.drive.grove.start_transaction(); + + let update_processing_result = platform + .platform + .process_raw_state_transitions( + &vec![serialized_update.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + // We have one invalid paid for state transition + assert_eq!(update_processing_result.valid_count(), 1); + + assert_eq!( + update_processing_result.aggregated_fees().processing_fee, + 2495990 + ); + + let check_result = platform + .check_tx( + serialized_update.as_slice(), + Recheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(check_result.is_valid()); // it should still be valid, because we didn't commit the transaction + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + let check_result = platform + .check_tx( + serialized_update.as_slice(), + Recheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(!check_result.is_valid()); // it should no longer be valid, because of the nonce check + + assert!(matches!( + check_result.errors.first().expect("expected an error"), + ConsensusError::StateError(StateError::InvalidIdentityNonceError(_)) + )); + } + + #[test] + fn data_contract_update_check_tx_latest_protocol_version() { + let platform_config = PlatformConfig { + testing_configs: PlatformTestConfig { + disable_instant_lock_signature_verification: true, + ..Default::default() + }, + ..Default::default() + }; + + let platform = TestPlatformBuilder::new() + .with_config(platform_config) + .build_with_mock_rpc(); + + let platform_state = platform.state.load(); + let protocol_version = platform_state.current_protocol_version_in_consensus(); + let platform_version = PlatformVersion::get(protocol_version).unwrap(); + + let platform_ref = PlatformRef { + drive: &platform.drive, + state: &platform_state, + config: &platform.config, + core_rpc: &platform.core_rpc, + }; + + let (key, private_key) = IdentityPublicKey::random_ecdsa_critical_level_authentication_key( + 1, + Some(1), + platform_version, + ) + .expect("expected to get key pair"); + + platform + .drive + .create_initial_state_structure(None, platform_version) + .expect("expected to create state structure"); + let identity: Identity = IdentityV0 { + id: Identifier::new([ + 158, 113, 180, 126, 91, 83, 62, 44, 83, 54, 97, 88, 240, 215, 84, 139, 167, 156, + 166, 203, 222, 4, 64, 31, 215, 199, 149, 151, 190, 246, 251, 44, + ]), + public_keys: BTreeMap::from([(1, key.clone())]), + balance: 1000000000, + revision: 0, + } + .into(); + + let dashpay_created_contract = + get_dashpay_contract_fixture(Some(identity.id()), 1, protocol_version); + let mut modified_dashpay_contract = dashpay_created_contract.data_contract().clone(); + let mut create_contract_state_transition: StateTransition = dashpay_created_contract + .try_into_platform_versioned(platform_version) + .expect("expected a state transition"); + create_contract_state_transition + .sign(&key, private_key.as_slice(), &NativeBlsModule) + .expect("expected to sign transition"); + let serialized = create_contract_state_transition + .serialize_to_bytes() + .expect("serialized state transition"); + platform + .drive + .add_new_identity( + identity.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert identity"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![serialized.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_eq!(processing_result.aggregated_fees().processing_fee, 2484410); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + // Now let's do the data contract update + let _dashpay_id = modified_dashpay_contract.id(); + // we need to alter dashpay to make it invalid + + modified_dashpay_contract.set_version(2); + + let document_types = modified_dashpay_contract.document_types_mut(); + + let dpns_contract = + get_dpns_data_contract_fixture(Some(identity.id()), 1, protocol_version) + .data_contract_owned(); + + document_types.insert( + "preorder".to_string(), + dpns_contract + .document_type_for_name("preorder") + .expect("expected document type") + .to_owned_document_type(), + ); + + let mut update_contract_state_transition: StateTransition = + DataContractUpdateTransition::try_from_platform_versioned( + (modified_dashpay_contract, 2), + platform_version, + ) + .expect("expected a state transition") + .into(); + + update_contract_state_transition + .sign(&key, private_key.as_slice(), &NativeBlsModule) + .expect("expected to sign transition"); + let serialized_update = update_contract_state_transition + .serialize_to_bytes() + .expect("serialized state transition"); + + let validation_result = platform + .check_tx( + serialized_update.as_slice(), + FirstTimeCheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(validation_result.errors.is_empty()); + + let check_result = platform + .check_tx( + serialized_update.as_slice(), + Recheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(check_result.is_valid()); + + let transaction = platform.drive.grove.start_transaction(); + + let update_processing_result = platform + .platform + .process_raw_state_transitions( + &vec![serialized_update.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + // We have one invalid paid for state transition + assert_eq!(update_processing_result.valid_count(), 1); + + assert_eq!( + update_processing_result.aggregated_fees().processing_fee, + 2496910 + ); + + let check_result = platform + .check_tx( + serialized_update.as_slice(), + Recheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(check_result.is_valid()); // it should still be valid, because we didn't commit the transaction + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + let check_result = platform + .check_tx( + serialized_update.as_slice(), + Recheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(!check_result.is_valid()); // it should no longer be valid, because of the nonce check assert!(matches!( check_result.errors.first().expect("expected an error"), @@ -1228,7 +1738,7 @@ mod tests { } #[test] - fn data_contract_update_check_tx_for_invalid_update() { + fn data_contract_update_check_tx_for_invalid_update_first_protocol_version() { let platform_config = PlatformConfig { testing_configs: PlatformTestConfig { disable_instant_lock_signature_verification: true, @@ -1239,6 +1749,7 @@ mod tests { let platform = TestPlatformBuilder::new() .with_config(platform_config) + .with_initial_protocol_version(1) .build_with_mock_rpc(); let platform_state = platform.state.load(); @@ -1472,6 +1983,251 @@ mod tests { )); } + #[test] + fn data_contract_update_check_tx_for_invalid_update_latest_protocol_version() { + let platform_config = PlatformConfig { + testing_configs: PlatformTestConfig { + disable_instant_lock_signature_verification: true, + ..Default::default() + }, + ..Default::default() + }; + + let platform = TestPlatformBuilder::new() + .with_config(platform_config) + .build_with_mock_rpc(); + + let platform_state = platform.state.load(); + let protocol_version = platform_state.current_protocol_version_in_consensus(); + let platform_version = PlatformVersion::get(protocol_version).unwrap(); + + let platform_ref = PlatformRef { + drive: &platform.drive, + state: &platform_state, + config: &platform.config, + core_rpc: &platform.core_rpc, + }; + + let (key, private_key) = IdentityPublicKey::random_ecdsa_critical_level_authentication_key( + 1, + Some(1), + platform_version, + ) + .expect("expected to get key pair"); + + platform + .drive + .create_initial_state_structure(None, platform_version) + .expect("expected to create state structure"); + let identity: Identity = IdentityV0 { + id: Identifier::new([ + 158, 113, 180, 126, 91, 83, 62, 44, 83, 54, 97, 88, 240, 215, 84, 139, 167, 156, + 166, 203, 222, 4, 64, 31, 215, 199, 149, 151, 190, 246, 251, 44, + ]), + public_keys: BTreeMap::from([(1, key.clone())]), + balance: 1000000000, + revision: 0, + } + .into(); + + let dashpay_created_contract = + get_dashpay_contract_fixture(Some(identity.id()), 1, protocol_version); + let mut modified_dashpay_contract = dashpay_created_contract.data_contract().clone(); + let mut create_contract_state_transition: StateTransition = dashpay_created_contract + .try_into_platform_versioned(platform_version) + .expect("expected a state transition"); + create_contract_state_transition + .sign(&key, private_key.as_slice(), &NativeBlsModule) + .expect("expected to sign transition"); + let serialized = create_contract_state_transition + .serialize_to_bytes() + .expect("serialized state transition"); + platform + .drive + .add_new_identity( + identity, + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert identity"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![serialized.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_eq!(processing_result.aggregated_fees().processing_fee, 2484410); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + // Now let's do the data contract update + let dashpay_id = modified_dashpay_contract.id(); + // we need to alter dashpay to make it invalid + + let document_types = modified_dashpay_contract.document_types_mut(); + + let parameters = RandomDocumentTypeParameters { + new_fields_optional_count_range: 5..6, + new_fields_required_count_range: 3..4, + new_indexes_count_range: Default::default(), + field_weights: FieldTypeWeights { + string_weight: 5, + float_weight: 3, + integer_weight: 2, + date_weight: 0, + boolean_weight: 1, + byte_array_weight: 0, + }, + field_bounds: FieldMinMaxBounds { + string_min_len: Default::default(), + string_has_min_len_chance: 0.0, + string_max_len: Default::default(), + string_has_max_len_chance: 0.0, + integer_min: Default::default(), + integer_has_min_chance: 0.0, + integer_max: Default::default(), + integer_has_max_chance: 0.0, + float_min: Default::default(), + float_has_min_chance: 0.0, + float_max: Default::default(), + float_has_max_chance: 0.0, + date_min: 0, + date_max: 100, + byte_array_min_len: Default::default(), + byte_array_has_min_len_chance: 0.0, + byte_array_max_len: Default::default(), + byte_array_has_max_len_chance: 0.0, + }, + keep_history_chance: 0.0, + documents_mutable_chance: 0.0, + documents_can_be_deleted_chance: 0.0, + }; + + let mut rng = StdRng::seed_from_u64(6); + + document_types.insert( + "invalid".to_string(), + DocumentType::V0( + DocumentTypeV0::invalid_random_document_type( + parameters, + dashpay_id, + &mut rng, + platform_version, + ) + .expect("expected an invalid document type"), + ), + ); + + let mut update_contract_state_transition: StateTransition = + DataContractUpdateTransition::try_from_platform_versioned( + (modified_dashpay_contract, 2), + platform_version, + ) + .expect("expected a state transition") + .into(); + + update_contract_state_transition + .sign(&key, private_key.as_slice(), &NativeBlsModule) + .expect("expected to sign transition"); + let serialized_update = update_contract_state_transition + .serialize_to_bytes() + .expect("serialized state transition"); + + let validation_result = platform + .check_tx( + serialized_update.as_slice(), + FirstTimeCheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(validation_result.errors.is_empty()); + + let check_result = platform + .check_tx( + serialized_update.as_slice(), + Recheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(check_result.is_valid()); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![serialized_update.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + // We have one invalid paid for state transition + assert_eq!(processing_result.invalid_paid_count(), 1); + + assert_eq!(processing_result.aggregated_fees().processing_fee, 448640); + + let check_result = platform + .check_tx( + serialized_update.as_slice(), + Recheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(check_result.is_valid()); // it should still be valid, because we didn't commit the transaction + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + let check_result = platform + .check_tx( + serialized_update.as_slice(), + Recheck, + &platform_ref, + platform_version, + ) + .expect("expected to check tx"); + + assert!(!check_result.is_valid()); // it should no longer be valid, because of the nonce check + + assert!(matches!( + check_result.errors.first().expect("expected an error"), + ConsensusError::StateError(StateError::InvalidIdentityNonceError(_)) + )); + } + #[test] fn document_update_check_tx() { let platform_config = PlatformConfig { @@ -1592,7 +2348,7 @@ mod tests { altered_document.set("avatarUrl", "http://test.com/cat.jpg".into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, profile, entropy.0, @@ -1612,7 +2368,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_update_transition = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( altered_document, profile, &key, 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 6eb4fd82bb..67590faa83 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 @@ -368,7 +368,7 @@ where let block_fees_v0: BlockFeesV0 = state_transitions_result.aggregated_fees().clone().into(); // Process fees - let processed_block_fees = self.process_block_fees( + let processed_block_fees = self.process_block_fees_and_validate_sum_trees( &block_execution_context, block_fees_v0.into(), transaction, diff --git a/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/add_process_epoch_change_operations/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/add_process_epoch_change_operations/mod.rs similarity index 100% rename from packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/add_process_epoch_change_operations/mod.rs rename to packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/add_process_epoch_change_operations/mod.rs 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_processing_end_events/add_process_epoch_change_operations/v0/mod.rs similarity index 100% rename from packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/add_process_epoch_change_operations/v0/mod.rs rename to packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/add_process_epoch_change_operations/v0/mod.rs diff --git a/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/mod.rs similarity index 56% rename from packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/mod.rs rename to packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/mod.rs index 232c76143e..03c783e1dd 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/mod.rs @@ -1,5 +1,5 @@ mod add_process_epoch_change_operations; -pub mod process_block_fees; +pub mod process_block_fees_and_validate_sum_trees; #[cfg(test)] mod tests; diff --git a/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/process_block_fees/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/process_block_fees_and_validate_sum_trees/mod.rs similarity index 79% rename from packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/process_block_fees/mod.rs rename to packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/process_block_fees_and_validate_sum_trees/mod.rs index 7ab4cbe08d..012bc0528b 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/process_block_fees/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/process_block_fees_and_validate_sum_trees/mod.rs @@ -1,4 +1,5 @@ mod v0; +mod v1; use dpp::version::PlatformVersion; @@ -34,7 +35,7 @@ impl Platform { /// * `Result` - /// If the operation is successful, it returns `Ok(ProcessedBlockFeesOutcome)`. If there is an error, it returns `Error`. /// - pub fn process_block_fees( + pub fn process_block_fees_and_validate_sum_trees( &self, block_execution_context: &BlockExecutionContext, block_fees: BlockFees, @@ -45,17 +46,23 @@ impl Platform { .drive_abci .methods .block_fee_processing - .process_block_fees + .process_block_fees_and_validate_sum_trees { - 0 => self.process_block_fees_v0( + 0 => self.process_block_fees_and_validate_sum_trees_v0( + block_execution_context, + block_fees, + transaction, + platform_version, + ), + 1 => self.process_block_fees_and_validate_sum_trees_v1( block_execution_context, block_fees, transaction, platform_version, ), version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { - method: "process_block_fees".to_string(), - known_versions: vec![0], + method: "process_block_fees_and_validate_sum_trees".to_string(), + known_versions: vec![0, 1], received: version, })), } 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_processing_end_events/process_block_fees_and_validate_sum_trees/v0/mod.rs similarity index 99% rename from packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/process_block_fees/v0/mod.rs rename to packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/process_block_fees_and_validate_sum_trees/v0/mod.rs index 4bb341a678..a3fa671956 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_processing_end_events/process_block_fees_and_validate_sum_trees/v0/mod.rs @@ -47,7 +47,7 @@ impl Platform { /// /// Returns `ProcessedBlockFeesOutcome`. #[inline(always)] - pub(super) fn process_block_fees_v0( + pub(super) fn process_block_fees_and_validate_sum_trees_v0( &self, block_execution_context: &BlockExecutionContext, block_fees: BlockFees, @@ -274,7 +274,7 @@ mod tests { }; let storage_fee_distribution_outcome = platform - .process_block_fees_v0( + .process_block_fees_and_validate_sum_trees_v0( &block_execution_context.into(), block_fees.clone(), transaction, diff --git a/packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/process_block_fees_and_validate_sum_trees/v1/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/process_block_fees_and_validate_sum_trees/v1/mod.rs new file mode 100644 index 0000000000..4e9edf37f2 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/process_block_fees_and_validate_sum_trees/v1/mod.rs @@ -0,0 +1,54 @@ +//! Block Fees Processing. +//! +//! This module defines functions related to processing block fees upon block and +//! epoch changes. +//! + +use crate::error::Error; +use crate::execution::types::block_execution_context::BlockExecutionContext; +use crate::execution::types::block_fees::BlockFees; +use crate::execution::types::processed_block_fees_outcome; +use crate::platform_types::platform::Platform; +use dpp::version::PlatformVersion; +use drive::grovedb::Transaction; + +/// From the Dash Improvement Proposal: + +/// For the purpose of this explanation we can trivialize that the execution of a block comprises +/// the sum of the execution of all state transitions contained within the block. In order to +/// avoid altering participating masternode identity balances every block and distribute fees +/// evenly, the concept of pools is introduced. We will also introduce the concepts of an Epoch +/// and the Epoch Era that are both covered later in this document. As the block executes state +/// transitions, processing and storage fees are accumulated, as well as a list of refunded fees +/// from various Epochs and fee multipliers. When there are no more state transitions to execute +/// we can say the block has ended its state transition execution phase. The system will then add +/// the accumulated fees to their corresponding pools, and in the case of deletion of data, remove +/// storage fees from future Epoch storage pools. + +impl Platform { + /// Adds operations to GroveDB op batch related to processing + /// and distributing the block fees from the previous block and applies the batch. + /// + /// Returns `ProcessedBlockFeesOutcome`. + /// + /// V1 adds the validation of the token aggregated balance + #[inline(always)] + pub(super) fn process_block_fees_and_validate_sum_trees_v1( + &self, + block_execution_context: &BlockExecutionContext, + block_fees: BlockFees, + transaction: &Transaction, + platform_version: &PlatformVersion, + ) -> Result { + let outcome = self.process_block_fees_and_validate_sum_trees_v0( + block_execution_context, + block_fees, + transaction, + platform_version, + )?; + + self.validate_token_aggregated_balance(transaction, platform_version)?; + + Ok(outcome) + } +} 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_processing_end_events/tests.rs similarity index 95% rename from packages/rs-drive-abci/src/execution/platform_events/block_fee_processing/tests.rs rename to packages/rs-drive-abci/src/execution/platform_events/block_processing_end_events/tests.rs index 1cbac74c74..2c0fe0a027 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_processing_end_events/tests.rs @@ -16,6 +16,7 @@ mod refund_tests { CreateRandomDocument, DocumentFieldFillSize, DocumentFieldFillType, }; use dpp::data_contract::document_type::DocumentTypeRef; + use dpp::data_contract::DataContract; use dpp::document::document_methods::DocumentMethodsV0; use dpp::document::serialization_traits::DocumentPlatformConversionMethodsV0; use dpp::document::{Document, DocumentV0Setters}; @@ -24,8 +25,8 @@ mod refund_tests { use dpp::identity::accessors::IdentityGettersV0; use dpp::identity::{Identity, IdentityPublicKey}; use dpp::platform_value::Bytes32; - use dpp::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; - use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; + use dpp::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; + use dpp::state_transition::batch_transition::BatchTransition; use drive::util::test_helpers::setup_contract; use platform_version::version::PlatformVersion; use rand::prelude::StdRng; @@ -71,7 +72,7 @@ mod refund_tests { altered_document.set("avatarUrl", "http://test.com/dog.jpg".into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), profile, entropy.0, @@ -178,7 +179,7 @@ mod refund_tests { assert_eq!(serialized_len, 173); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), profile, entropy.0, @@ -272,6 +273,9 @@ mod refund_tests { "tests/supporting_files/contract/dashpay/dashpay-contract-no-indexes.json", None, None, + None::, + None, + None, ); let profile = dashpay_contract_no_indexes @@ -296,7 +300,7 @@ mod refund_tests { setup_initial_document(&platform, profile, &mut rng, &identity, &key, &signer); let documents_batch_delete_transition = - DocumentsBatchTransition::new_document_deletion_transition_from_document( + BatchTransition::new_document_deletion_transition_from_document( document, profile, &key, @@ -368,6 +372,9 @@ mod refund_tests { "tests/supporting_files/contract/dashpay/dashpay-contract-no-indexes.json", None, None, + None::, + None, + None, ); let profile = dashpay_contract_no_indexes @@ -392,7 +399,7 @@ mod refund_tests { fast_forward_to_block(&platform, 1_200_000_000, 900, 42, 1, false); //next epoch let documents_batch_delete_transition = - DocumentsBatchTransition::new_document_deletion_transition_from_document( + BatchTransition::new_document_deletion_transition_from_document( document, profile, &key, @@ -467,6 +474,9 @@ mod refund_tests { "tests/supporting_files/contract/dashpay/dashpay-contract-no-indexes.json", None, None, + None::, + None, + None, ); let profile = dashpay_contract_no_indexes @@ -491,7 +501,7 @@ mod refund_tests { fast_forward_to_block(&platform, 1_200_000_000, 900, 42, 40, false); //a year later let documents_batch_delete_transition = - DocumentsBatchTransition::new_document_deletion_transition_from_document( + BatchTransition::new_document_deletion_transition_from_document( document, profile, &key, @@ -562,6 +572,9 @@ mod refund_tests { "tests/supporting_files/contract/dashpay/dashpay-contract-no-indexes.json", None, None, + None::, + None, + None, ); let profile = dashpay_contract_no_indexes @@ -586,7 +599,7 @@ mod refund_tests { fast_forward_to_block(&platform, 10_200_000_000, 9000, 42, 40 * 25, false); //25 years later let documents_batch_delete_transition = - DocumentsBatchTransition::new_document_deletion_transition_from_document( + BatchTransition::new_document_deletion_transition_from_document( document, profile, &key, @@ -657,6 +670,9 @@ mod refund_tests { "tests/supporting_files/contract/dashpay/dashpay-contract-no-indexes.json", None, None, + None::, + None, + None, ); let profile = dashpay_contract_no_indexes @@ -681,7 +697,7 @@ mod refund_tests { fast_forward_to_block(&platform, 10_200_000_000, 9000, 42, 40 * 50, false); //50 years later let documents_batch_delete_transition = - DocumentsBatchTransition::new_document_deletion_transition_from_document( + BatchTransition::new_document_deletion_transition_from_document( document, profile, &key, @@ -753,6 +769,9 @@ mod refund_tests { "tests/supporting_files/contract/dashpay/dashpay-contract-no-indexes.json", None, None, + None::, + None, + None, ); let profile = dashpay_contract_no_indexes @@ -777,7 +796,7 @@ mod refund_tests { fast_forward_to_block(&platform, 1_200_000_000, 900, 42, 10, false); //next epoch let documents_batch_delete_transition = - DocumentsBatchTransition::new_document_deletion_transition_from_document( + BatchTransition::new_document_deletion_transition_from_document( document, profile, &key, @@ -823,9 +842,6 @@ mod refund_tests { .calculate_refunds_amount_for_identity(identity.id()) .expect("expected refunds for identity"); - // 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; assert_eq!(refunded_percentage, 98); diff --git a/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/common.rs b/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/common.rs new file mode 100644 index 0000000000..9d0a27dec4 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/common.rs @@ -0,0 +1,101 @@ +use crate::error::Error; +use crate::platform_types::platform::Platform; + +use dpp::platform_value::platform_value; +use dpp::ProtocolError; + +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::DataContract; +use dpp::document::DocumentV0; +use dpp::serialization::PlatformSerializableWithPlatformVersion; +use dpp::system_data_contracts::dpns_contract::DPNS_DASH_TLD_DOCUMENT_ID; +use dpp::version::PlatformVersion; +use drive::dpp::identity::TimestampMillis; +use drive::util::batch::{DataContractOperationType, DocumentOperationType, DriveOperation}; +use drive::util::object_size_info::{ + DataContractInfo, DocumentInfo, DocumentTypeInfo, OwnedDocumentInfo, +}; +use std::borrow::Cow; + +impl Platform { + pub(in crate::execution::platform_events::initialization::create_genesis_state) fn register_system_data_contract_operations< + 'a, + >( + &self, + data_contract: &'a DataContract, + operations: &mut Vec>, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let serialization = + data_contract.serialize_to_bytes_with_platform_version(platform_version)?; + operations.push(DriveOperation::DataContractOperation( + DataContractOperationType::ApplyContractWithSerialization { + contract: Cow::Borrowed(data_contract), + serialized_contract: serialization, + storage_flags: None, + }, + )); + Ok(()) + } + + pub(in crate::execution::platform_events::initialization::create_genesis_state) fn register_dpns_top_level_domain_operations< + 'a, + >( + &'a self, + contract: &'a DataContract, + genesis_time: TimestampMillis, + operations: &mut Vec>, + ) -> Result<(), Error> { + let domain = "dash"; + + let document_stub_properties_value = platform_value!({ + "label" : domain, + "normalizedLabel" : domain, + "parentDomainName" : "", + "normalizedParentDomainName" : "", + "records" : { + "identity" : contract.owner_id(), + }, + "subdomainRules": { + "allowSubdomains": true, + } + }); + + let document_stub_properties = document_stub_properties_value + .into_btree_string_map() + .map_err(|e| Error::Protocol(ProtocolError::ValueError(e)))?; + + let document = DocumentV0 { + id: DPNS_DASH_TLD_DOCUMENT_ID.into(), + properties: document_stub_properties, + owner_id: contract.owner_id(), + revision: None, + created_at: Some(genesis_time), + updated_at: Some(genesis_time), + transferred_at: Some(genesis_time), + created_at_block_height: None, + updated_at_block_height: None, + transferred_at_block_height: None, + created_at_core_block_height: None, + updated_at_core_block_height: None, + transferred_at_core_block_height: None, + } + .into(); + + let document_type = contract.document_type_for_name("domain")?; + + let operation = DriveOperation::DocumentOperation(DocumentOperationType::AddDocument { + owned_document_info: OwnedDocumentInfo { + document_info: DocumentInfo::DocumentOwnedInfo((document, None)), + owner_id: None, + }, + contract_info: DataContractInfo::BorrowedDataContract(contract), + document_type_info: DocumentTypeInfo::DocumentTypeRef(document_type), + override_document: false, + }); + + operations.push(operation); + + Ok(()) + } +} diff --git a/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/mod.rs index e046d8bc3d..72819eb993 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/mod.rs @@ -6,7 +6,9 @@ use dpp::prelude::CoreBlockHeight; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; +mod common; pub mod v0; +pub mod v1; impl Platform { /// Creates trees and populates them with necessary identities, contracts and documents @@ -29,9 +31,15 @@ impl Platform { transaction, platform_version, ), + 1 => self.create_genesis_state_v1( + genesis_core_height, + genesis_time, + transaction, + platform_version, + ), version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { method: "create_genesis_state".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: 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 e343d710c8..89f8ccd79e 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 @@ -1,27 +1,13 @@ use crate::error::Error; use crate::platform_types::platform::Platform; -use dpp::platform_value::platform_value; -use dpp::ProtocolError; - use drive::dpp::identity::TimestampMillis; use dpp::block::block_info::BlockInfo; -use dpp::data_contract::accessors::v0::DataContractV0Getters; -use dpp::data_contract::DataContract; -use dpp::document::DocumentV0; -use dpp::serialization::PlatformSerializableWithPlatformVersion; +use dpp::prelude::CoreBlockHeight; use dpp::version::PlatformVersion; use drive::dpp::system_data_contracts::SystemDataContract; -use drive::util::batch::{DataContractOperationType, DocumentOperationType, DriveOperation}; - -use dpp::prelude::CoreBlockHeight; -use dpp::system_data_contracts::dpns_contract::DPNS_DASH_TLD_DOCUMENT_ID; use drive::query::TransactionArg; -use drive::util::object_size_info::{ - DataContractInfo, DocumentInfo, DocumentTypeInfo, OwnedDocumentInfo, -}; -use std::borrow::Cow; use std::collections::BTreeMap; impl Platform { @@ -92,83 +78,6 @@ impl Platform { Ok(()) } - - fn register_system_data_contract_operations<'a>( - &self, - data_contract: &'a DataContract, - operations: &mut Vec>, - platform_version: &PlatformVersion, - ) -> Result<(), Error> { - let serialization = - data_contract.serialize_to_bytes_with_platform_version(platform_version)?; - operations.push(DriveOperation::DataContractOperation( - DataContractOperationType::ApplyContractWithSerialization { - contract: Cow::Borrowed(data_contract), - serialized_contract: serialization, - storage_flags: None, - }, - )); - Ok(()) - } - - fn register_dpns_top_level_domain_operations<'a>( - &'a self, - contract: &'a DataContract, - genesis_time: TimestampMillis, - operations: &mut Vec>, - ) -> Result<(), Error> { - let domain = "dash"; - - let document_stub_properties_value = platform_value!({ - "label" : domain, - "normalizedLabel" : domain, - "parentDomainName" : "", - "normalizedParentDomainName" : "", - "records" : { - "identity" : contract.owner_id(), - }, - "subdomainRules": { - "allowSubdomains": true, - } - }); - - let document_stub_properties = document_stub_properties_value - .into_btree_string_map() - .map_err(|e| Error::Protocol(ProtocolError::ValueError(e)))?; - - let document = DocumentV0 { - id: DPNS_DASH_TLD_DOCUMENT_ID.into(), - properties: document_stub_properties, - owner_id: contract.owner_id(), - revision: None, - created_at: Some(genesis_time), - updated_at: Some(genesis_time), - transferred_at: Some(genesis_time), - created_at_block_height: None, - updated_at_block_height: None, - transferred_at_block_height: None, - created_at_core_block_height: None, - updated_at_core_block_height: None, - transferred_at_core_block_height: None, - } - .into(); - - let document_type = contract.document_type_for_name("domain")?; - - let operation = DriveOperation::DocumentOperation(DocumentOperationType::AddDocument { - owned_document_info: OwnedDocumentInfo { - document_info: DocumentInfo::DocumentOwnedInfo((document, None)), - owner_id: None, - }, - contract_info: DataContractInfo::BorrowedDataContract(contract), - document_type_info: DocumentTypeInfo::DocumentTypeRef(document_type), - override_document: false, - }); - - operations.push(operation); - - Ok(()) - } } #[cfg(test)] diff --git a/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/v1/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/v1/mod.rs new file mode 100644 index 0000000000..d6a1cf7039 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/platform_events/initialization/create_genesis_state/v1/mod.rs @@ -0,0 +1,125 @@ +use crate::error::Error; +use crate::platform_types::platform::Platform; + +use drive::dpp::identity::TimestampMillis; + +use dpp::block::block_info::BlockInfo; +use dpp::prelude::CoreBlockHeight; +use dpp::version::PlatformVersion; +use drive::dpp::system_data_contracts::SystemDataContract; +use drive::query::TransactionArg; +use std::collections::BTreeMap; + +impl Platform { + /// Creates trees and populates them with necessary identities, contracts and documents + #[inline(always)] + pub(super) fn create_genesis_state_v1( + &self, + genesis_core_height: CoreBlockHeight, + genesis_time: TimestampMillis, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + //versioned call + self.drive + .create_initial_state_structure(transaction, platform_version)?; + + self.drive + .store_genesis_core_height(genesis_core_height, transaction, platform_version)?; + + let mut operations = vec![]; + + // Create system identities and contracts + + let system_data_contracts = &self.drive.cache.system_data_contracts; + + let system_data_contract_types = BTreeMap::from_iter([ + (SystemDataContract::DPNS, system_data_contracts.load_dpns()), + ( + SystemDataContract::Withdrawals, + system_data_contracts.load_withdrawals(), + ), + ( + SystemDataContract::Dashpay, + system_data_contracts.load_dashpay(), + ), + ( + SystemDataContract::MasternodeRewards, + system_data_contracts.load_masternode_reward_shares(), + ), + ( + SystemDataContract::TokenHistory, + system_data_contracts.load_token_history(), + ), + ]); + //todo add Wallet Utils (maybe) + + for data_contract in system_data_contract_types.values() { + self.register_system_data_contract_operations( + data_contract, + &mut operations, + platform_version, + )?; + } + + let dpns_contract = system_data_contracts.load_dpns(); + + self.register_dpns_top_level_domain_operations( + &dpns_contract, + genesis_time, + &mut operations, + )?; + + let block_info = BlockInfo::default_with_time(genesis_time); + + self.drive.apply_drive_operations( + operations, + true, + &block_info, + transaction, + platform_version, + None, // No previous_fee_versions needed for genesis state creation + )?; + + Ok(()) + } +} + +#[cfg(test)] +mod tests { + mod create_genesis_state { + use crate::config::PlatformConfig; + use crate::test::helpers::setup::TestPlatformBuilder; + use drive::config::DriveConfig; + use platform_version::version::{PlatformVersion, INITIAL_PROTOCOL_VERSION}; + + #[test] + pub fn should_create_genesis_state_deterministically() { + let platform_version = PlatformVersion::first(); + let platform = TestPlatformBuilder::new() + .with_config(PlatformConfig { + drive: DriveConfig { + epochs_per_era: 20, + ..Default::default() + }, + ..Default::default() + }) + .with_initial_protocol_version(INITIAL_PROTOCOL_VERSION) + .build_with_mock_rpc() + .set_genesis_state(); + + let root_hash = platform + .drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .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/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/mod.rs index 41b64d63b1..1ac0715b9d 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/mod.rs @@ -1,7 +1,7 @@ /// Methods occurring at the finalization of a block pub(in crate::execution) mod block_end; /// Block fee processing -pub(in crate::execution) mod block_fee_processing; +pub(in crate::execution) mod block_processing_end_events; /// Events happening what starting to process a block pub(in crate::execution) mod block_start; /// Update from core such as a masternode list update or quorums being updated @@ -22,6 +22,7 @@ pub(in crate::execution) mod initialization; pub(in crate::execution) mod protocol_upgrade; /// State transition processing pub(in crate::execution) mod state_transition_processing; +mod tokens; /// Voting pub(in crate::execution) mod voting; /// Withdrawal methods diff --git a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs index 27a10ad10c..4f65b48978 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs @@ -13,6 +13,7 @@ use dpp::system_data_contracts::load_system_data_contract; use dpp::version::PlatformVersion; use dpp::version::ProtocolVersion; use dpp::voting::vote_polls::VotePoll; +use drive::drive::balances::TOTAL_TOKEN_SUPPLIES_STORAGE_KEY; use drive::drive::identity::key::fetch::{ IdentityKeysRequest, KeyIDIdentityPublicKeyPairBTreeMap, KeyRequestType, }; @@ -24,8 +25,14 @@ use drive::drive::prefunded_specialized_balances::{ prefunded_specialized_balances_for_voting_path, prefunded_specialized_balances_for_voting_path_vec, }; +use drive::drive::system::misc_path; +use drive::drive::tokens::paths::{ + tokens_root_path, TOKEN_BALANCES_KEY, TOKEN_IDENTITY_INFO_KEY, TOKEN_STATUS_INFO_KEY, +}; use drive::drive::votes::paths::vote_end_date_queries_tree_path_vec; +use drive::drive::RootTree; use drive::grovedb::{Element, PathQuery, Query, QueryItem, SizedQuery, Transaction}; +use drive::grovedb_path::SubtreePath; use drive::query::QueryResultType; use std::collections::HashSet; use std::ops::RangeFull; @@ -79,12 +86,16 @@ impl Platform { "Error while transitioning to version 8: {e}" ); - // We ignore this transition errors because it's not changing the state stucture + // We ignore this transition errors because it's not changing the state structure // and not critical for the system Ok::<(), Error>(()) })?; } + if previous_protocol_version < 9 && platform_version.protocol_version >= 9 { + self.transition_to_version_9(block_info, transaction, platform_version)?; + } + Ok(()) } @@ -238,6 +249,77 @@ impl Platform { Ok(()) } + /// Adds all trees needed for tokens, also adds the token history system data contract + /// + /// This function is called during the transition from protocol version 5 to protocol version 6 + /// and higher to set up the wallet contract in the platform. + fn transition_to_version_9( + &self, + block_info: &BlockInfo, + transaction: &Transaction, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + self.drive.grove_insert_empty_tree( + SubtreePath::empty(), + &[RootTree::GroupActions as u8], + Some(transaction), + None, + &mut vec![], + &platform_version.drive, + )?; + + let path = tokens_root_path(); + self.drive.grove_insert_if_not_exists( + (&path).into(), + &[TOKEN_BALANCES_KEY], + Element::empty_big_sum_tree(), + Some(transaction), + None, + &platform_version.drive, + )?; + + self.drive.grove_insert_if_not_exists( + (&path).into(), + &[TOKEN_IDENTITY_INFO_KEY], + Element::empty_tree(), + Some(transaction), + None, + &platform_version.drive, + )?; + + self.drive.grove_insert_if_not_exists( + (&path).into(), + &[TOKEN_STATUS_INFO_KEY], + Element::empty_tree(), + Some(transaction), + None, + &platform_version.drive, + )?; + + let path = misc_path(); + self.drive.grove_insert_if_not_exists( + (&path).into(), + TOTAL_TOKEN_SUPPLIES_STORAGE_KEY.as_slice(), + Element::empty_big_sum_tree(), + Some(transaction), + None, + &platform_version.drive, + )?; + + let contract = + load_system_data_contract(SystemDataContract::TokenHistory, platform_version)?; + + self.drive.insert_contract( + &contract, + *block_info, + true, + Some(transaction), + platform_version, + )?; + + Ok(()) + } + /// Initializes an empty sum tree for withdrawal transactions required for protocol version 4. /// /// This function is called during the transition to protocol version 4 to set up diff --git a/packages/rs-drive-abci/src/execution/platform_events/tokens/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/tokens/mod.rs new file mode 100644 index 0000000000..b3c9f415e5 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/platform_events/tokens/mod.rs @@ -0,0 +1 @@ +mod validate_token_aggregated_balance; diff --git a/packages/rs-drive-abci/src/execution/platform_events/tokens/validate_token_aggregated_balance/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/tokens/validate_token_aggregated_balance/mod.rs new file mode 100644 index 0000000000..68718a29b6 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/platform_events/tokens/validate_token_aggregated_balance/mod.rs @@ -0,0 +1,54 @@ +mod v0; + +use dpp::version::PlatformVersion; + +use drive::grovedb::Transaction; + +use crate::error::execution::ExecutionError; +use crate::error::Error; + +use crate::platform_types::platform::Platform; + +impl Platform { + /// Validates the aggregated token balance for the platform. + /// + /// This function verifies that the total token balances in the platform are consistent + /// and correctly aggregated. It delegates the validation to a version-specific implementation + /// based on the `PlatformVersion` provided. + /// + /// # Arguments + /// + /// * `transaction` - A reference to the current transaction. + /// * `platform_version` - The platform version specifying the implementation to use. + /// + /// # Returns + /// + /// * `Ok(())` if the token balances are validated successfully. + /// * `Err(Error)` if the validation fails due to inconsistencies or an unknown version. + /// + /// # Errors + /// + /// Returns an `ExecutionError::CorruptedCreditsNotBalanced` if the token sum trees + /// are not balanced. + /// + /// Returns an `ExecutionError::UnknownVersionMismatch` if the platform version is not recognized. + pub fn validate_token_aggregated_balance( + &self, + transaction: &Transaction, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version + .drive_abci + .methods + .tokens_processing + .validate_token_aggregated_balance + { + 0 => self.validate_token_aggregated_balance_v0(transaction, platform_version), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "validate_token_aggregated_balance".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive-abci/src/execution/platform_events/tokens/validate_token_aggregated_balance/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/tokens/validate_token_aggregated_balance/v0/mod.rs new file mode 100644 index 0000000000..072d8dfc7e --- /dev/null +++ b/packages/rs-drive-abci/src/execution/platform_events/tokens/validate_token_aggregated_balance/v0/mod.rs @@ -0,0 +1,37 @@ +use drive::grovedb::Transaction; + +use crate::error::execution::ExecutionError; +use crate::error::Error; +use crate::platform_types::platform::Platform; +use dpp::version::PlatformVersion; + +impl Platform { + #[inline(always)] + pub(super) fn validate_token_aggregated_balance_v0( + &self, + transaction: &Transaction, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + if self.config.execution.verify_token_sum_trees { + // Verify sum trees + let token_balance = self + .drive + .calculate_total_tokens_balance(Some(transaction), &platform_version.drive) + .map_err(Error::Drive)?; + + if !token_balance.ok()? { + return Err(Error::Execution( + ExecutionError::CorruptedCreditsNotBalanced(format!( + "credits are not balanced after block execution {:?} off by {}", + token_balance, + token_balance + .total_identity_token_balances + .abs_diff(token_balance.total_tokens_in_platform) + )), + )); + } + } + + Ok(()) + } +} diff --git a/packages/rs-drive-abci/src/execution/platform_events/withdrawals/cleanup_expired_locks_of_withdrawal_amounts/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/withdrawals/cleanup_expired_locks_of_withdrawal_amounts/v0/mod.rs index 74315a1d6c..0c4ab33a05 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/withdrawals/cleanup_expired_locks_of_withdrawal_amounts/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/withdrawals/cleanup_expired_locks_of_withdrawal_amounts/v0/mod.rs @@ -6,7 +6,7 @@ use dpp::block::block_info::BlockInfo; use dpp::version::PlatformVersion; use drive::drive::identity::withdrawals::paths::get_withdrawal_transactions_sum_tree_path_vec; -use drive::grovedb::{PathQuery, QueryItem, Transaction}; +use drive::grovedb::{MaybeTree, PathQuery, QueryItem, Transaction}; use drive::util::grove_operations::BatchDeleteApplyType; impl Platform @@ -49,7 +49,7 @@ where true, // we know that we are not deleting a subtree BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, Some(transaction), &mut batch_operations, diff --git a/packages/rs-drive-abci/src/execution/types/execution_event/mod.rs b/packages/rs-drive-abci/src/execution/types/execution_event/mod.rs index 1150faaca1..73c87119d0 100644 --- a/packages/rs-drive-abci/src/execution/types/execution_event/mod.rs +++ b/packages/rs-drive-abci/src/execution/types/execution_event/mod.rs @@ -162,7 +162,7 @@ impl<'a> ExecutionEvent<'a> { ))) } } - StateTransitionAction::DocumentsBatchAction(document_batch_action) => { + StateTransitionAction::BatchAction(document_batch_action) => { let user_fee_increase = action.user_fee_increase(); let removed_balance = document_batch_action.all_used_balances()?; let operations = diff --git a/packages/rs-drive-abci/src/execution/types/execution_operation/mod.rs b/packages/rs-drive-abci/src/execution/types/execution_operation/mod.rs index d44b854495..c0dc1fa91e 100644 --- a/packages/rs-drive-abci/src/execution/types/execution_operation/mod.rs +++ b/packages/rs-drive-abci/src/execution/types/execution_operation/mod.rs @@ -65,6 +65,7 @@ pub const SHA256_BLOCK_SIZE: u16 = 64; #[derive(Debug, Clone, PartialEq, Eq)] pub enum ValidationOperation { Protocol(ProtocolValidationOperation), + RetrieveIdentityTokenBalance, RetrieveIdentity(RetrieveIdentityInfo), RetrievePrefundedSpecializedBalance, PerformNetworkThresholdSigning, @@ -224,6 +225,19 @@ impl ValidationOperation { "execution processing fee overflow error", ))?; } + ValidationOperation::RetrieveIdentityTokenBalance => { + let operation_cost = platform_version + .fee_version + .processing + .fetch_identity_token_balance_processing_cost; + + fee_result.processing_fee = fee_result + .processing_fee + .checked_add(operation_cost) + .ok_or(ExecutionError::Overflow( + "execution processing fee overflow error", + ))?; + } } } Ok(()) diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/common/asset_lock/transaction/fetch_asset_lock_transaction_output_sync/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/common/asset_lock/transaction/fetch_asset_lock_transaction_output_sync/v0/mod.rs index 0f11ba2a64..b48a79bf8e 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/common/asset_lock/transaction/fetch_asset_lock_transaction_output_sync/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/common/asset_lock/transaction/fetch_asset_lock_transaction_output_sync/v0/mod.rs @@ -49,7 +49,7 @@ pub fn fetch_asset_lock_transaction_output_sync_v0( let Some(transaction_info) = maybe_transaction_info else { // Transaction hash bytes needs to be reversed to match actual transaction hash - let mut hash: [u8; 32] = *transaction_hash.as_raw_hash().as_byte_array(); + let mut hash: [u8; 32] = transaction_hash.as_raw_hash().to_byte_array(); hash.reverse(); return Ok(ValidationResult::new_with_error( diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_simple_pre_check_balance/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_simple_pre_check_balance/v0/mod.rs index 6f9cfb87ad..9a9e2f8901 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_simple_pre_check_balance/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_simple_pre_check_balance/v0/mod.rs @@ -33,7 +33,7 @@ impl ValidateSimplePreCheckBalanceV0 for StateTransition { .state_transition_min_fees .contract_update } - StateTransition::DocumentsBatch(_) => { + StateTransition::Batch(_) => { platform_version .fee_version .state_transition_min_fees diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/processor/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/processor/v0/mod.rs index c3f10fa275..12d7bdd4e0 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/processor/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/processor/v0/mod.rs @@ -528,7 +528,7 @@ impl StateTransitionBasicStructureValidationV0 for StateTransition { StateTransition::IdentityCreditWithdrawal(st) => { st.validate_basic_structure(platform_version) } - StateTransition::DocumentsBatch(st) => st.validate_basic_structure(platform_version), + StateTransition::Batch(st) => st.validate_basic_structure(platform_version), StateTransition::IdentityCreditTransfer(st) => { st.validate_basic_structure(platform_version) } @@ -554,7 +554,7 @@ impl StateTransitionNonceValidationV0 for StateTransition { platform_version: &PlatformVersion, ) -> Result { match self { - StateTransition::DocumentsBatch(st) => st.validate_nonces( + StateTransition::Batch(st) => st.validate_nonces( platform, block_info, tx, @@ -618,7 +618,7 @@ impl StateTransitionHasNonceValidationV0 for StateTransition { 0 => { let has_nonce_validation = matches!( self, - StateTransition::DocumentsBatch(_) + StateTransition::Batch(_) | StateTransition::DataContractCreate(_) | StateTransition::DataContractUpdate(_) | StateTransition::IdentityUpdate(_) @@ -632,7 +632,7 @@ impl StateTransitionHasNonceValidationV0 for StateTransition { // Preferably to use match without wildcard arm (_) to avoid missing cases // in the future when new state transitions are added let has_nonce_validation = match self { - StateTransition::DocumentsBatch(_) + StateTransition::Batch(_) | StateTransition::DataContractCreate(_) | StateTransition::DataContractUpdate(_) | StateTransition::IdentityUpdate(_) @@ -666,7 +666,7 @@ impl StateTransitionIdentityBalanceValidationV0 for StateTransition { StateTransition::IdentityCreditWithdrawal(st) => { st.validate_minimum_balance_pre_check(identity, platform_version) } - StateTransition::DocumentsBatch(st) => { + StateTransition::Batch(st) => { st.validate_minimum_balance_pre_check(identity, platform_version) } StateTransition::DataContractCreate(_) @@ -687,7 +687,7 @@ impl StateTransitionIdentityBalanceValidationV0 for StateTransition { | StateTransition::IdentityCreditWithdrawal(_) | StateTransition::DataContractCreate(_) | StateTransition::DataContractUpdate(_) - | StateTransition::DocumentsBatch(_) + | StateTransition::Batch(_) | StateTransition::IdentityUpdate(_) ) } @@ -790,7 +790,7 @@ impl StateTransitionStructureKnownInStateValidationV0 for StateTransition { platform_version: &PlatformVersion, ) -> Result, Error> { match self { - StateTransition::DocumentsBatch(st) => st.validate_advanced_structure_from_state( + StateTransition::Batch(st) => st.validate_advanced_structure_from_state( block_info, network, action, @@ -829,7 +829,7 @@ impl StateTransitionStructureKnownInStateValidationV0 for StateTransition { fn has_advanced_structure_validation_with_state(&self) -> bool { matches!( self, - StateTransition::DocumentsBatch(_) + StateTransition::Batch(_) | StateTransition::IdentityCreate(_) | StateTransition::MasternodeVote(_) ) @@ -838,7 +838,7 @@ impl StateTransitionStructureKnownInStateValidationV0 for StateTransition { /// This means we should transform into the action before validation of the advanced structure, /// and that we must even do this on check_tx fn requires_advanced_structure_validation_with_state_on_check_tx(&self) -> bool { - matches!(self, StateTransition::DocumentsBatch(_)) + matches!(self, StateTransition::Batch(_)) } } @@ -854,7 +854,7 @@ impl StateTransitionIdentityBasedSignatureValidationV0 for StateTransition { StateTransition::DataContractCreate(_) | StateTransition::DataContractUpdate(_) | StateTransition::IdentityCreditTransfer(_) - | StateTransition::DocumentsBatch(_) => { + | StateTransition::Batch(_) => { //Basic signature verification Ok(self.validate_state_transition_identity_signed( drive, @@ -1029,7 +1029,7 @@ impl StateTransitionStateValidationV0 for StateTransition { tx, ), // The replay attack is prevented by identity data contract nonce - StateTransition::DocumentsBatch(st) => st.validate_state( + StateTransition::Batch(st) => st.validate_state( action, platform, validation_mode, @@ -1060,7 +1060,7 @@ impl StateTransitionStateValidationV0 for StateTransition { impl StateTransitionIsAllowedValidationV0 for StateTransition { fn has_is_allowed_validation(&self, platform_version: &PlatformVersion) -> Result { match self { - StateTransition::DocumentsBatch(st) => st.has_is_allowed_validation(platform_version), + StateTransition::Batch(st) => st.has_is_allowed_validation(platform_version), StateTransition::DataContractCreate(_) | StateTransition::DataContractUpdate(_) | StateTransition::IdentityCreate(_) @@ -1078,9 +1078,7 @@ impl StateTransitionIsAllowedValidationV0 for StateTransition { platform_version: &PlatformVersion, ) -> Result, Error> { match self { - StateTransition::DocumentsBatch(st) => { - st.validate_is_allowed(platform, platform_version) - } + StateTransition::Batch(st) => st.validate_is_allowed(platform, platform_version), _ => Err(Error::Execution(ExecutionError::CorruptedCodeExecution( "validate_is_allowed is not implemented for this state transition", ))), 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/batch/action_validation/document_create_transition_action/mod.rs similarity index 83% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/mod.rs index 7dfa5e8eba..56c8458ced 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/batch/action_validation/document_create_transition_action/mod.rs @@ -2,15 +2,15 @@ use dashcore_rpc::dashcore::Network; use dpp::block::block_info::BlockInfo; use dpp::identifier::Identifier; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::DocumentCreateTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::DocumentCreateTransitionAction; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; 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::execution::validation::state_transition::batch::action_validation::document_create_transition_action::state_v0::DocumentCreateTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document_create_transition_action::state_v1::DocumentCreateTransitionActionStateValidationV1; +use crate::execution::validation::state_transition::batch::action_validation::document_create_transition_action::structure_v0::DocumentCreateTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; @@ -49,7 +49,7 @@ impl DocumentCreateTransitionActionValidation for DocumentCreateTransitionAction .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .document_create_transition_structure_validation { 0 => self.validate_structure_v0(owner_id, block_info, network, platform_version), @@ -74,7 +74,7 @@ impl DocumentCreateTransitionActionValidation for DocumentCreateTransitionAction .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .document_create_transition_state_validation { 0 => self.validate_state_v0( 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/batch/action_validation/document_create_transition_action/state_v0/mod.rs similarity index 96% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/state_v0/mod.rs index fdc1c0a2df..aa752dc2fd 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/batch/action_validation/document_create_transition_action/state_v0/mod.rs @@ -10,8 +10,8 @@ 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 drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::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; @@ -19,8 +19,8 @@ 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; +use crate::execution::validation::state_transition::batch::state::v0::fetch_contender::fetch_contender; +use crate::execution::validation::state_transition::batch::state::v0::fetch_documents::fetch_document_with_id; use crate::platform_types::platform::PlatformStateRef; pub(super) trait DocumentCreateTransitionActionStateValidationV0 { 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/batch/action_validation/document_create_transition_action/state_v1/mod.rs similarity index 96% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/state_v1/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/state_v1/mod.rs index 2e2908d9b5..14cb413f30 100644 --- 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/batch/action_validation/document_create_transition_action/state_v1/mod.rs @@ -12,8 +12,8 @@ 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 drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::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; @@ -21,8 +21,8 @@ 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::execution::validation::state_transition::batch::state::v0::fetch_contender::fetch_contender; +use crate::execution::validation::state_transition::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 { diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/structure_v0/mod.rs similarity index 97% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/structure_v0/mod.rs index 7ae98cf477..49b71dc021 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_create_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/structure_v0/mod.rs @@ -9,8 +9,8 @@ use dpp::data_contract::document_type::restricted_creation::CreationRestrictionM use dpp::data_contract::validate_document::DataContractDocumentValidationMethodsV0; use dpp::identifier::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 drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::{DocumentCreateTransitionAction, DocumentCreateTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::Error; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_delete_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/mod.rs similarity index 84% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_delete_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/mod.rs index b36e68daa9..a3b7196204 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_delete_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/mod.rs @@ -1,14 +1,14 @@ use dpp::block::block_info::BlockInfo; use dpp::identifier::Identifier; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; 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_delete_transition_action::state_v0::DocumentDeleteTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::documents_batch::action_validation::document_delete_transition_action::structure_v0::DocumentDeleteTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document_delete_transition_action::state_v0::DocumentDeleteTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document_delete_transition_action::structure_v0::DocumentDeleteTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; @@ -40,7 +40,7 @@ impl DocumentDeleteTransitionActionValidation for DocumentDeleteTransitionAction .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .document_delete_transition_structure_validation { 0 => self.validate_structure_v0(), @@ -65,7 +65,7 @@ impl DocumentDeleteTransitionActionValidation for DocumentDeleteTransitionAction .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .document_delete_transition_state_validation { 0 => self.validate_state_v0( diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_delete_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/state_v0/mod.rs similarity index 92% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_delete_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/state_v0/mod.rs index 98ce7ed92b..6ccb56aa5b 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_delete_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/state_v0/mod.rs @@ -9,15 +9,15 @@ use dpp::document::{Document, DocumentV0Getters}; use dpp::identifier::Identifier; use dpp::prelude::ConsensusValidationResult; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; -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_delete_transition_action::v0::DocumentDeleteTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionAccessorsV0; 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_documents::fetch_document_with_id; +use crate::execution::validation::state_transition::batch::state::v0::fetch_documents::fetch_document_with_id; use crate::platform_types::platform::PlatformStateRef; pub(super) trait DocumentDeleteTransitionActionStateValidationV0 { diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_delete_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/structure_v0/mod.rs similarity index 91% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_delete_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/structure_v0/mod.rs index 3813405201..347e495894 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_delete_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/structure_v0/mod.rs @@ -2,9 +2,9 @@ use dpp::consensus::basic::document::{InvalidDocumentTransitionActionError, Inva use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; 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_delete_transition_action::DocumentDeleteTransitionAction; -use drive::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionAccessorsV0; use crate::error::Error; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_purchase_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/mod.rs similarity index 84% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_purchase_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/mod.rs index ef6c32b996..8396ba0577 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_purchase_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/mod.rs @@ -2,14 +2,14 @@ use dpp::block::block_info::BlockInfo; use dpp::identifier::Identifier; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::document::documents_batch::document_transition::document_purchase_transition_action::DocumentPurchaseTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::DocumentPurchaseTransitionAction; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; 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_purchase_transition_action::state_v0::DocumentPurchaseTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::documents_batch::action_validation::document_purchase_transition_action::structure_v0::DocumentPurchaseTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document_purchase_transition_action::state_v0::DocumentPurchaseTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document_purchase_transition_action::structure_v0::DocumentPurchaseTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; @@ -41,7 +41,7 @@ impl DocumentPurchaseTransitionActionValidation for DocumentPurchaseTransitionAc .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .document_purchase_transition_structure_validation { 0 => self.validate_structure_v0(platform_version), @@ -66,7 +66,7 @@ impl DocumentPurchaseTransitionActionValidation for DocumentPurchaseTransitionAc .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .document_purchase_transition_state_validation { 0 => self.validate_state_v0( diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_purchase_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/state_v0/mod.rs similarity index 95% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_purchase_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/state_v0/mod.rs index 79e4311344..c5060437b7 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_purchase_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/state_v0/mod.rs @@ -4,10 +4,10 @@ use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::identifier::Identifier; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::document::documents_batch::document_transition::document_purchase_transition_action::{DocumentPurchaseTransitionAction, DocumentPurchaseTransitionActionAccessorsV0}; +use drive::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::{DocumentPurchaseTransitionAction, DocumentPurchaseTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; -use drive::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; use crate::error::Error; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; use crate::platform_types::platform::PlatformStateRef; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_purchase_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/structure_v0/mod.rs similarity index 95% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_purchase_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/structure_v0/mod.rs index afbe3ae28b..5a77bd645b 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_purchase_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/structure_v0/mod.rs @@ -4,8 +4,8 @@ use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::document::DocumentV0Getters; use dpp::nft::TradeMode; 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_purchase_transition_action::{DocumentPurchaseTransitionAction, DocumentPurchaseTransitionActionAccessorsV0}; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::{DocumentPurchaseTransitionAction, DocumentPurchaseTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::Error; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_replace_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/mod.rs similarity index 84% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_replace_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/mod.rs index fe65d922dd..6392eb6870 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_replace_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/mod.rs @@ -2,14 +2,14 @@ use dpp::block::block_info::BlockInfo; use dpp::identifier::Identifier; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::document::documents_batch::document_transition::document_replace_transition_action::DocumentReplaceTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_replace_transition_action::DocumentReplaceTransitionAction; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; 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_replace_transition_action::state_v0::DocumentReplaceTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::documents_batch::action_validation::document_replace_transition_action::structure_v0::DocumentReplaceTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document_replace_transition_action::state_v0::DocumentReplaceTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document_replace_transition_action::structure_v0::DocumentReplaceTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; @@ -41,7 +41,7 @@ impl DocumentReplaceTransitionActionValidation for DocumentReplaceTransitionActi .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .document_replace_transition_structure_validation { 0 => self.validate_structure_v0(platform_version), @@ -66,7 +66,7 @@ impl DocumentReplaceTransitionActionValidation for DocumentReplaceTransitionActi .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .document_replace_transition_state_validation { 0 => self.validate_state_v0( diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_replace_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/state_v0/mod.rs similarity index 95% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_replace_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/state_v0/mod.rs index 8fea8e2856..01359fb61e 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_replace_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/state_v0/mod.rs @@ -4,10 +4,10 @@ use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::identifier::Identifier; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::document::documents_batch::document_transition::document_replace_transition_action::{DocumentReplaceTransitionAction, DocumentReplaceTransitionActionAccessorsV0}; +use drive::state_transition_action::batch::batched_transition::document_transition::document_replace_transition_action::{DocumentReplaceTransitionAction, DocumentReplaceTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; -use drive::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; use crate::error::Error; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; use crate::platform_types::platform::PlatformStateRef; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_replace_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/structure_v0/mod.rs similarity index 94% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_replace_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/structure_v0/mod.rs index 6f77359d1a..acb8488346 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_replace_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/structure_v0/mod.rs @@ -3,8 +3,8 @@ use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::data_contract::validate_document::DataContractDocumentValidationMethodsV0; 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_replace_transition_action::{DocumentReplaceTransitionAction, DocumentReplaceTransitionActionAccessorsV0}; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_replace_transition_action::{DocumentReplaceTransitionAction, DocumentReplaceTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::Error; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_transfer_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/mod.rs similarity index 84% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_transfer_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/mod.rs index 9b4f6e8b55..6a517d7140 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_transfer_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/mod.rs @@ -2,14 +2,14 @@ use dpp::block::block_info::BlockInfo; use dpp::identifier::Identifier; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::document::documents_batch::document_transition::document_transfer_transition_action::DocumentTransferTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::DocumentTransferTransitionAction; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; 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_transfer_transition_action::state_v0::DocumentTransferTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::documents_batch::action_validation::document_transfer_transition_action::structure_v0::DocumentTransferTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document_transfer_transition_action::state_v0::DocumentTransferTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document_transfer_transition_action::structure_v0::DocumentTransferTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; @@ -41,7 +41,7 @@ impl DocumentTransferTransitionActionValidation for DocumentTransferTransitionAc .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .document_transfer_transition_structure_validation { 0 => self.validate_structure_v0(platform_version), @@ -66,7 +66,7 @@ impl DocumentTransferTransitionActionValidation for DocumentTransferTransitionAc .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .document_transfer_transition_state_validation { 0 => self.validate_state_v0( diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_transfer_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/state_v0/mod.rs similarity index 95% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_transfer_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/state_v0/mod.rs index 7613df9afc..3a779e1302 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_transfer_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/state_v0/mod.rs @@ -4,10 +4,10 @@ use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::identifier::Identifier; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::document::documents_batch::document_transition::document_transfer_transition_action::{DocumentTransferTransitionAction, DocumentTransferTransitionActionAccessorsV0}; +use drive::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::{DocumentTransferTransitionAction, DocumentTransferTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; -use drive::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; use crate::error::Error; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; use crate::platform_types::platform::PlatformStateRef; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_transfer_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/structure_v0/mod.rs similarity index 94% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_transfer_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/structure_v0/mod.rs index 3910574a61..a8beba7bae 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_transfer_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/structure_v0/mod.rs @@ -2,8 +2,8 @@ use dpp::consensus::basic::document::{InvalidDocumentTransitionActionError, Inva use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; 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_transfer_transition_action::{DocumentTransferTransitionAction, DocumentTransferTransitionActionAccessorsV0}; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::{DocumentTransferTransitionAction, DocumentTransferTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::Error; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_update_price_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/mod.rs similarity index 84% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_update_price_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/mod.rs index 39a18561c0..b541eb15e1 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_update_price_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/mod.rs @@ -4,12 +4,12 @@ use dpp::identifier::Identifier; use dpp::validation::SimpleConsensusValidationResult; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; -use drive::state_transition_action::document::documents_batch::document_transition::document_update_price_transition_action::DocumentUpdatePriceTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::DocumentUpdatePriceTransitionAction; 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_update_price_transition_action::state_v0::DocumentUpdatePriceTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::documents_batch::action_validation::document_update_price_transition_action::structure_v0::DocumentUpdatePriceTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document_update_price_transition_action::state_v0::DocumentUpdatePriceTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document_update_price_transition_action::structure_v0::DocumentUpdatePriceTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; @@ -41,7 +41,7 @@ impl DocumentUpdatePriceTransitionActionValidation for DocumentUpdatePriceTransi .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .document_transfer_transition_structure_validation { 0 => self.validate_structure_v0(platform_version), @@ -66,7 +66,7 @@ impl DocumentUpdatePriceTransitionActionValidation for DocumentUpdatePriceTransi .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .document_transfer_transition_state_validation { 0 => self.validate_state_v0( diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_update_price_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/state_v0/mod.rs similarity index 95% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_update_price_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/state_v0/mod.rs index 43a72d50a5..9dc2abd730 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_update_price_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/state_v0/mod.rs @@ -4,10 +4,10 @@ use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::identifier::Identifier; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::document::documents_batch::document_transition::document_update_price_transition_action::{DocumentUpdatePriceTransitionAction, DocumentUpdatePriceTransitionActionAccessorsV0}; +use drive::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::{DocumentUpdatePriceTransitionAction, DocumentUpdatePriceTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; -use drive::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; use crate::error::Error; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; use crate::platform_types::platform::PlatformStateRef; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_update_price_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/structure_v0/mod.rs similarity index 94% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_update_price_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/structure_v0/mod.rs index f8b66fe374..8635df40dd 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/document_update_price_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/structure_v0/mod.rs @@ -2,8 +2,8 @@ use dpp::consensus::basic::document::{InvalidDocumentTransitionActionError, Inva use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; 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_update_price_transition_action::{DocumentUpdatePriceTransitionAction, DocumentUpdatePriceTransitionActionAccessorsV0}; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::{DocumentUpdatePriceTransitionAction, DocumentUpdatePriceTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::Error; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/mod.rs new file mode 100644 index 0000000000..f9872eec43 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/mod.rs @@ -0,0 +1,14 @@ +pub(crate) mod document_create_transition_action; +pub(crate) mod document_delete_transition_action; +pub(crate) mod document_purchase_transition_action; +pub(crate) mod document_replace_transition_action; +pub(crate) mod document_transfer_transition_action; +pub(crate) mod document_update_price_transition_action; +pub(crate) mod token_base_transition_action; +pub(crate) mod token_burn_transition_action; +pub(crate) mod token_destroy_frozen_funds_transition_action; +pub(crate) mod token_emergency_action_transition_action; +pub(crate) mod token_freeze_transition_action; +pub(crate) mod token_mint_transition_action; +pub(crate) mod token_transfer_transition_action; +pub(crate) mod token_unfreeze_transition_action; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/mod.rs new file mode 100644 index 0000000000..ed77bb370d --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/mod.rs @@ -0,0 +1,86 @@ +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; +use dpp::version::PlatformVersion; +use drive::grovedb::TransactionArg; +use crate::error::Error; +use crate::error::execution::ExecutionError; +use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; +use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::state_v0::TokenBaseTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::structure_v0::TokenBaseTransitionActionStructureValidationV0; +use crate::platform_types::platform::PlatformStateRef; + +mod state_v0; +mod structure_v0; + +pub trait TokenBaseTransitionActionValidation { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result; + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} + +impl TokenBaseTransitionActionValidation for TokenBaseTransitionAction { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_base_transition_structure_validation + { + 0 => self.validate_structure_v0(platform_version), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenBaseTransitionAction::validate_structure".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_base_transition_structure_validation + { + 0 => self.validate_state_v0( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + ), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenBaseTransitionAction::validate_state".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/state_v0/mod.rs new file mode 100644 index 0000000000..d072a906d3 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/state_v0/mod.rs @@ -0,0 +1,67 @@ +use dpp::block::block_info::BlockInfo; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::group::GroupActionAlreadySignedByIdentityError; +use dpp::consensus::state::state_error::StateError; +use dpp::prelude::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +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::platform_types::platform::PlatformStateRef; + +pub(super) trait TokenBaseTransitionActionStateValidationV0 { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenBaseTransitionActionStateValidationV0 for TokenBaseTransitionAction { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + // We should start by validating that if we did not yet sign + if let Some(group_state_transition_resolved_info) = self.store_in_group() { + let (already_signed, cost) = platform.drive.fetch_action_id_has_signer_with_costs( + self.data_contract_id(), + group_state_transition_resolved_info.group_contract_position, + group_state_transition_resolved_info.action_id, + owner_id, + block_info, + transaction, + platform_version, + )?; + execution_context.add_operation(ValidationOperation::PrecalculatedOperation(cost)); + if already_signed { + // We already have signed this state transition group action + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError( + StateError::GroupActionAlreadySignedByIdentityError( + GroupActionAlreadySignedByIdentityError::new( + owner_id, + self.data_contract_id(), + group_state_transition_resolved_info.group_contract_position, + group_state_transition_resolved_info.action_id, + ), + ), + ), + )); + } + } + + Ok(SimpleConsensusValidationResult::new()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/structure_v0/mod.rs new file mode 100644 index 0000000000..034d208c51 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/structure_v0/mod.rs @@ -0,0 +1,49 @@ +use dpp::consensus::basic::BasicError; +use dpp::consensus::basic::token::ContractHasNoTokensError; +use dpp::consensus::basic::token::InvalidTokenPositionError; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::validation::{SimpleConsensusValidationResult}; +use drive::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use crate::error::Error; + +pub(super) trait TokenBaseTransitionActionStructureValidationV0 { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenBaseTransitionActionStructureValidationV0 for TokenBaseTransitionAction { + fn validate_structure_v0( + &self, + _platform_version: &PlatformVersion, + ) -> Result { + let token_position = self.token_position(); + let contract = self.data_contract_fetch_info_ref(); + if contract.contract.tokens().get(&token_position).is_none() { + return if contract.contract.tokens().is_empty() { + Ok(SimpleConsensusValidationResult::new_with_error( + BasicError::ContractHasNoTokensError(ContractHasNoTokensError::new( + contract.contract.id(), + )) + .into(), + )) + } else { + Ok(SimpleConsensusValidationResult::new_with_error( + BasicError::InvalidTokenPositionError(InvalidTokenPositionError::new( + *contract + .contract + .tokens() + .keys() + .last() + .expect("we already checked this was not empty"), + token_position, + )) + .into(), + )) + }; + } + Ok(SimpleConsensusValidationResult::default()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/mod.rs new file mode 100644 index 0000000000..0ed8bdfb4d --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/mod.rs @@ -0,0 +1,86 @@ +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::TokenBurnTransitionAction; +use dpp::version::PlatformVersion; +use drive::grovedb::TransactionArg; +use crate::error::Error; +use crate::error::execution::ExecutionError; +use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; +use crate::execution::validation::state_transition::batch::action_validation::token_burn_transition_action::state_v0::TokenBurnTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token_burn_transition_action::structure_v0::TokenBurnTransitionActionStructureValidationV0; +use crate::platform_types::platform::PlatformStateRef; + +mod state_v0; +mod structure_v0; + +pub trait TokenBurnTransitionActionValidation { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result; + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} + +impl TokenBurnTransitionActionValidation for TokenBurnTransitionAction { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_burn_transition_structure_validation + { + 0 => self.validate_structure_v0(platform_version), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenBurnTransitionAction::validate_structure".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_burn_transition_state_validation + { + 0 => self.validate_state_v0( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + ), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenBurnTransitionAction::validate_state".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/state_v0/mod.rs new file mode 100644 index 0000000000..85ad0983ef --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/state_v0/mod.rs @@ -0,0 +1,108 @@ +use dpp::block::block_info::BlockInfo; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::state_error::StateError; +use dpp::consensus::state::token::{IdentityDoesNotHaveEnoughTokenBalanceError, UnauthorizedTokenActionError}; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::multi_identity_events::ActionTaker; +use dpp::prelude::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::{TokenBurnTransitionAction, TokenBurnTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +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::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::platform_types::platform::PlatformStateRef; + +pub(super) trait TokenBurnTransitionActionStateValidationV0 { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenBurnTransitionActionStateValidationV0 for TokenBurnTransitionAction { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + // Let's first check to see if we are authorized to perform this action + let contract = &self.data_contract_fetch_info_ref().contract; + let token_configuration = contract.expected_token_configuration(self.token_position())?; + let rules = token_configuration.manual_burning_rules(); + let main_control_group = token_configuration + .main_control_group() + .map(|position| contract.expected_group(position)) + .transpose()?; + + if !rules.can_make_change( + &contract.owner_id(), + main_control_group, + contract.groups(), + &ActionTaker::SingleIdentity(owner_id), + ) { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::UnauthorizedTokenActionError( + UnauthorizedTokenActionError::new( + self.token_id(), + owner_id, + "burn".to_string(), + rules.authorized_to_make_change_action_takers().clone(), + ), + )), + )); + } + + // We need to verify that we have enough of the token + let balance = platform + .drive + .fetch_identity_token_balance( + self.token_id().to_buffer(), + owner_id.to_buffer(), + transaction, + platform_version, + )? + .unwrap_or_default(); + execution_context.add_operation(ValidationOperation::RetrieveIdentityTokenBalance); + if balance < self.burn_amount() { + // The identity does not exist + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::IdentityDoesNotHaveEnoughTokenBalanceError( + IdentityDoesNotHaveEnoughTokenBalanceError::new( + self.token_id(), + owner_id, + self.burn_amount(), + balance, + "burn".to_string(), + ), + )), + )); + } + + Ok(SimpleConsensusValidationResult::new()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/structure_v0/mod.rs new file mode 100644 index 0000000000..3529a60558 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/structure_v0/mod.rs @@ -0,0 +1,25 @@ +use dpp::validation::{SimpleConsensusValidationResult}; +use drive::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::{TokenBurnTransitionAction, TokenBurnTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use crate::error::Error; +use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; + +pub(super) trait TokenBurnTransitionActionStructureValidationV0 { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenBurnTransitionActionStructureValidationV0 for TokenBurnTransitionAction { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_structure(platform_version)?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + Ok(SimpleConsensusValidationResult::default()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/mod.rs new file mode 100644 index 0000000000..9b8428f51d --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/mod.rs @@ -0,0 +1,86 @@ +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionAction; +use dpp::version::PlatformVersion; +use drive::grovedb::TransactionArg; +use crate::error::Error; +use crate::error::execution::ExecutionError; +use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; +use crate::execution::validation::state_transition::batch::action_validation::token_destroy_frozen_funds_transition_action::state_v0::TokenDestroyFrozenFundsTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token_destroy_frozen_funds_transition_action::structure_v0::TokenDestroyFrozenFundsTransitionActionStructureValidationV0; +use crate::platform_types::platform::PlatformStateRef; + +mod state_v0; +mod structure_v0; + +pub trait TokenDestroyFrozenFundsTransitionActionValidation { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result; + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} + +impl TokenDestroyFrozenFundsTransitionActionValidation for TokenDestroyFrozenFundsTransitionAction { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_destroy_frozen_funds_transition_structure_validation + { + 0 => self.validate_structure_v0(platform_version), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenDestroyFrozenFundsTransitionAction::validate_structure".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_destroy_frozen_funds_transition_state_validation + { + 0 => self.validate_state_v0( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + ), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenDestroyFrozenFundsTransitionAction::validate_state".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/state_v0/mod.rs new file mode 100644 index 0000000000..99bf2b350c --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/state_v0/mod.rs @@ -0,0 +1,109 @@ +use dpp::block::block_info::BlockInfo; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::state_error::StateError; +use dpp::consensus::state::token::{IdentityTokenAccountNotFrozenError, UnauthorizedTokenActionError}; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::multi_identity_events::ActionTaker; +use dpp::prelude::Identifier; +use dpp::tokens::info::v0::IdentityTokenInfoV0Accessors; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::{TokenDestroyFrozenFundsTransitionAction, TokenDestroyFrozenFundsTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +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::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::platform_types::platform::PlatformStateRef; + +pub(super) trait TokenDestroyFrozenFundsTransitionActionStateValidationV0 { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenDestroyFrozenFundsTransitionActionStateValidationV0 + for TokenDestroyFrozenFundsTransitionAction +{ + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + // We need to validate that we are frozen + + let (info, fee_result) = platform.drive.fetch_identity_token_info_with_costs( + self.token_id().to_buffer(), + self.frozen_identity_id().to_buffer(), + block_info, + true, + transaction, + platform_version, + )?; + execution_context.add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + if info.is_none() || !info.unwrap().frozen() { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::IdentityTokenAccountNotFrozenError( + IdentityTokenAccountNotFrozenError::new( + self.token_id(), + self.frozen_identity_id(), + "destroy_frozen_funds".to_string(), + ), + )), + )); + } + + // Let's first check to see if we are authorized to perform this action + let contract = &self.data_contract_fetch_info_ref().contract; + let token_configuration = contract.expected_token_configuration(self.token_position())?; + let rules = token_configuration.destroy_frozen_funds_rules(); + let main_control_group = token_configuration + .main_control_group() + .map(|position| contract.expected_group(position)) + .transpose()?; + + if !rules.can_make_change( + &contract.owner_id(), + main_control_group, + contract.groups(), + &ActionTaker::SingleIdentity(owner_id), + ) { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::UnauthorizedTokenActionError( + UnauthorizedTokenActionError::new( + self.token_id(), + owner_id, + "destroy_frozen_funds".to_string(), + rules.authorized_to_make_change_action_takers().clone(), + ), + )), + )); + } + + Ok(SimpleConsensusValidationResult::new()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/structure_v0/mod.rs new file mode 100644 index 0000000000..2f0c22d417 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/structure_v0/mod.rs @@ -0,0 +1,27 @@ +use dpp::validation::{SimpleConsensusValidationResult}; +use drive::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::{TokenDestroyFrozenFundsTransitionAction, TokenDestroyFrozenFundsTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use crate::error::Error; +use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; + +pub(super) trait TokenDestroyFrozenFundsTransitionActionStructureValidationV0 { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenDestroyFrozenFundsTransitionActionStructureValidationV0 + for TokenDestroyFrozenFundsTransitionAction +{ + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_structure(platform_version)?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + Ok(SimpleConsensusValidationResult::default()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/mod.rs new file mode 100644 index 0000000000..a78f9e9537 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/mod.rs @@ -0,0 +1,86 @@ +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::TokenEmergencyActionTransitionAction; +use dpp::version::PlatformVersion; +use drive::grovedb::TransactionArg; +use crate::error::Error; +use crate::error::execution::ExecutionError; +use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; +use crate::execution::validation::state_transition::batch::action_validation::token_emergency_action_transition_action::state_v0::TokenEmergencyActionTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token_emergency_action_transition_action::structure_v0::TokenEmergencyActionTransitionActionStructureValidationV0; +use crate::platform_types::platform::PlatformStateRef; + +mod state_v0; +mod structure_v0; + +pub trait TokenEmergencyActionTransitionActionValidation { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result; + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} + +impl TokenEmergencyActionTransitionActionValidation for TokenEmergencyActionTransitionAction { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_emergency_action_transition_structure_validation + { + 0 => self.validate_structure_v0(platform_version), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenEmergencyActionTransitionAction::validate_structure".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_emergency_action_transition_state_validation + { + 0 => self.validate_state_v0( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + ), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenEmergencyActionTransitionAction::validate_state".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/state_v0/mod.rs new file mode 100644 index 0000000000..c5ea53f9b0 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/state_v0/mod.rs @@ -0,0 +1,83 @@ +use dpp::block::block_info::BlockInfo; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::state_error::StateError; +use dpp::consensus::state::token::UnauthorizedTokenActionError; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::multi_identity_events::ActionTaker; +use dpp::prelude::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::{TokenEmergencyActionTransitionAction, TokenEmergencyActionTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use drive::query::TransactionArg; +use crate::error::Error; +use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; +use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::platform_types::platform::PlatformStateRef; + +pub(super) trait TokenEmergencyActionTransitionActionStateValidationV0 { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenEmergencyActionTransitionActionStateValidationV0 + for TokenEmergencyActionTransitionAction +{ + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + // Let's first check to see if we are authorized to perform this action + let contract = &self.data_contract_fetch_info_ref().contract; + let token_configuration = contract.expected_token_configuration(self.token_position())?; + let rules = token_configuration.emergency_action_rules(); + let main_control_group = token_configuration + .main_control_group() + .map(|position| contract.expected_group(position)) + .transpose()?; + + if !rules.can_make_change( + &contract.owner_id(), + main_control_group, + contract.groups(), + &ActionTaker::SingleIdentity(owner_id), + ) { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::UnauthorizedTokenActionError( + UnauthorizedTokenActionError::new( + self.token_id(), + owner_id, + "emergency_action".to_string(), + rules.authorized_to_make_change_action_takers().clone(), + ), + )), + )); + } + + Ok(SimpleConsensusValidationResult::new()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/structure_v0/mod.rs new file mode 100644 index 0000000000..cc4f6b8d25 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/structure_v0/mod.rs @@ -0,0 +1,27 @@ +use dpp::validation::{SimpleConsensusValidationResult}; +use drive::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::{TokenEmergencyActionTransitionAction, TokenEmergencyActionTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use crate::error::Error; +use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; + +pub(super) trait TokenEmergencyActionTransitionActionStructureValidationV0 { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenEmergencyActionTransitionActionStructureValidationV0 + for TokenEmergencyActionTransitionAction +{ + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_structure(platform_version)?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + Ok(SimpleConsensusValidationResult::default()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/mod.rs new file mode 100644 index 0000000000..47777b8d73 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/mod.rs @@ -0,0 +1,86 @@ +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::TokenFreezeTransitionAction; +use dpp::version::PlatformVersion; +use drive::grovedb::TransactionArg; +use crate::error::Error; +use crate::error::execution::ExecutionError; +use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; +use crate::execution::validation::state_transition::batch::action_validation::token_freeze_transition_action::state_v0::TokenFreezeTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token_freeze_transition_action::structure_v0::TokenFreezeTransitionActionStructureValidationV0; +use crate::platform_types::platform::PlatformStateRef; + +mod state_v0; +mod structure_v0; + +pub trait TokenFreezeTransitionActionValidation { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result; + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} + +impl TokenFreezeTransitionActionValidation for TokenFreezeTransitionAction { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_freeze_transition_structure_validation + { + 0 => self.validate_structure_v0(platform_version), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenFreezeTransitionAction::validate_structure".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_freeze_transition_state_validation + { + 0 => self.validate_state_v0( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + ), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenFreezeTransitionAction::validate_state".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/state_v0/mod.rs new file mode 100644 index 0000000000..507f02c281 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/state_v0/mod.rs @@ -0,0 +1,81 @@ +use dpp::block::block_info::BlockInfo; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::state_error::StateError; +use dpp::consensus::state::token::UnauthorizedTokenActionError; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::multi_identity_events::ActionTaker; +use dpp::prelude::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::{TokenFreezeTransitionAction, TokenFreezeTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use drive::query::TransactionArg; +use crate::error::Error; +use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; +use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::platform_types::platform::PlatformStateRef; + +pub(super) trait TokenFreezeTransitionActionStateValidationV0 { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenFreezeTransitionActionStateValidationV0 for TokenFreezeTransitionAction { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + // Let's first check to see if we are authorized to perform this action + let contract = &self.data_contract_fetch_info_ref().contract; + let token_configuration = contract.expected_token_configuration(self.token_position())?; + let rules = token_configuration.freeze_rules(); + let main_control_group = token_configuration + .main_control_group() + .map(|position| contract.expected_group(position)) + .transpose()?; + + if !rules.can_make_change( + &contract.owner_id(), + main_control_group, + contract.groups(), + &ActionTaker::SingleIdentity(owner_id), + ) { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::UnauthorizedTokenActionError( + UnauthorizedTokenActionError::new( + self.token_id(), + owner_id, + "freeze".to_string(), + rules.authorized_to_make_change_action_takers().clone(), + ), + )), + )); + } + + Ok(SimpleConsensusValidationResult::new()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/structure_v0/mod.rs new file mode 100644 index 0000000000..8b754e60e7 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/structure_v0/mod.rs @@ -0,0 +1,25 @@ +use dpp::validation::{SimpleConsensusValidationResult}; +use drive::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::{TokenFreezeTransitionAction, TokenFreezeTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use crate::error::Error; +use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; + +pub(super) trait TokenFreezeTransitionActionStructureValidationV0 { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenFreezeTransitionActionStructureValidationV0 for TokenFreezeTransitionAction { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_structure(platform_version)?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + Ok(SimpleConsensusValidationResult::default()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/mod.rs new file mode 100644 index 0000000000..f8cd83b7a6 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/mod.rs @@ -0,0 +1,86 @@ +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::TokenMintTransitionAction; +use dpp::version::PlatformVersion; +use drive::grovedb::TransactionArg; +use crate::error::Error; +use crate::error::execution::ExecutionError; +use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; +use crate::execution::validation::state_transition::batch::action_validation::token_mint_transition_action::state_v0::TokenMintTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token_mint_transition_action::structure_v0::TokenMintTransitionActionStructureValidationV0; +use crate::platform_types::platform::PlatformStateRef; + +mod state_v0; +mod structure_v0; + +pub trait TokenMintTransitionActionValidation { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result; + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} + +impl TokenMintTransitionActionValidation for TokenMintTransitionAction { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_mint_transition_structure_validation + { + 0 => self.validate_structure_v0(platform_version), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenMintTransitionAction::validate_structure".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_issuance_transition_state_validation + { + 0 => self.validate_state_v0( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + ), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenMintTransitionAction::validate_state".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/state_v0/mod.rs new file mode 100644 index 0000000000..7653477deb --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/state_v0/mod.rs @@ -0,0 +1,166 @@ +use dpp::block::block_info::BlockInfo; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::identity::RecipientIdentityDoesNotExistError; +use dpp::consensus::state::state_error::StateError; +use dpp::consensus::state::token::UnauthorizedTokenActionError; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; +use dpp::multi_identity_events::ActionTaker; +use dpp::prelude::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::{TokenMintTransitionAction, TokenMintTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use drive::query::TransactionArg; +use drive::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; +use crate::error::Error; +use crate::execution::types::execution_operation::{RetrieveIdentityInfo, ValidationOperation}; +use crate::execution::types::state_transition_execution_context::{StateTransitionExecutionContext, StateTransitionExecutionContextMethodsV0}; +use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::platform_types::platform::PlatformStateRef; + +pub(super) trait TokenMintTransitionActionStateValidationV0 { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenMintTransitionActionStateValidationV0 for TokenMintTransitionAction { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + // Let's first check to see if we are authorized to perform this action + let contract = &self.data_contract_fetch_info_ref().contract; + let token_configuration = contract.expected_token_configuration(self.token_position())?; + let rules = token_configuration.manual_minting_rules(); + let main_control_group = token_configuration + .main_control_group() + .map(|position| contract.expected_group(position)) + .transpose()?; + + if let Some(resolved_group_info) = self.base().store_in_group() { + // We are trying to do a group action + // We have already checked when converting into an action that we are a member of the Group + // Now we need to just check that the group is the actual group set by the contract + match rules.authorized_to_make_change_action_takers() { + AuthorizedActionTakers::NoOne | AuthorizedActionTakers::ContractOwner => { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::UnauthorizedTokenActionError( + UnauthorizedTokenActionError::new( + self.token_id(), + owner_id, + "mint".to_string(), + rules.authorized_to_make_change_action_takers().clone(), + ), + )), + )) + } + AuthorizedActionTakers::MainGroup => { + if let Some(main_control_group_contract_position) = + token_configuration.main_control_group() + { + if main_control_group_contract_position + != resolved_group_info.group_contract_position + { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError( + StateError::UnauthorizedTokenActionError( + UnauthorizedTokenActionError::new( + self.token_id(), + owner_id, + "mint".to_string(), + rules.authorized_to_make_change_action_takers().clone(), + ), + ), + ), + )); + } + } + } + AuthorizedActionTakers::Group(group_contract_position) => { + if *group_contract_position != resolved_group_info.group_contract_position { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::UnauthorizedTokenActionError( + UnauthorizedTokenActionError::new( + self.token_id(), + owner_id, + "mint".to_string(), + rules.authorized_to_make_change_action_takers().clone(), + ), + )), + )); + } + } + } + } else { + if !rules.can_make_change( + &contract.owner_id(), + main_control_group, + contract.groups(), + &ActionTaker::SingleIdentity(owner_id), + ) { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::UnauthorizedTokenActionError( + UnauthorizedTokenActionError::new( + self.token_id(), + owner_id, + "mint".to_string(), + rules.authorized_to_make_change_action_takers().clone(), + ), + )), + )); + } + } + + // todo verify that minting would not break max supply + + // We need to verify that the receiver is a valid identity + + let recipient = self.identity_balance_holder_id(); + if recipient != owner_id { + // We have already checked that this user exists if the recipient is the owner id + let balance = platform.drive.fetch_identity_balance( + recipient.to_buffer(), + transaction, + platform_version, + )?; + execution_context.add_operation(ValidationOperation::RetrieveIdentity( + RetrieveIdentityInfo::only_balance(), + )); + if balance.is_none() { + // The identity does not exist + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::RecipientIdentityDoesNotExistError( + RecipientIdentityDoesNotExistError::new(recipient), + )), + )); + } + } + + Ok(SimpleConsensusValidationResult::new()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/structure_v0/mod.rs new file mode 100644 index 0000000000..33648a7e26 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/structure_v0/mod.rs @@ -0,0 +1,25 @@ +use dpp::validation::{SimpleConsensusValidationResult}; +use drive::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::{TokenMintTransitionAction, TokenMintTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use crate::error::Error; +use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; + +pub(super) trait TokenMintTransitionActionStructureValidationV0 { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenMintTransitionActionStructureValidationV0 for TokenMintTransitionAction { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_structure(platform_version)?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + Ok(SimpleConsensusValidationResult::default()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/mod.rs new file mode 100644 index 0000000000..2d9754412f --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/mod.rs @@ -0,0 +1,88 @@ +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::TokenTransferTransitionAction; +use dpp::version::PlatformVersion; +use drive::grovedb::TransactionArg; +use crate::error::Error; +use crate::error::execution::ExecutionError; +use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; +use crate::execution::validation::state_transition::batch::action_validation::token_transfer_transition_action::state_v0::TokenTransferTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token_transfer_transition_action::structure_v0::TokenTransferTransitionActionStructureValidationV0; +use crate::platform_types::platform::PlatformStateRef; + +mod state_v0; +mod structure_v0; + +pub trait TokenTransferTransitionActionValidation { + fn validate_structure( + &self, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result; + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} + +impl TokenTransferTransitionActionValidation for TokenTransferTransitionAction { + fn validate_structure( + &self, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_transfer_transition_structure_validation + { + 0 => self.validate_structure_v0(owner_id, platform_version), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenTransferTransitionAction::validate_structure".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_issuance_transition_state_validation + { + 0 => self.validate_state_v0( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + ), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenTransferTransitionAction::validate_state".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/state_v0/mod.rs new file mode 100644 index 0000000000..04336501c9 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/state_v0/mod.rs @@ -0,0 +1,103 @@ +use dpp::block::block_info::BlockInfo; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::state_error::StateError; +use dpp::consensus::state::token::{IdentityDoesNotHaveEnoughTokenBalanceError, IdentityTokenAccountFrozenError}; +use dpp::prelude::Identifier; +use dpp::tokens::info::v0::IdentityTokenInfoV0Accessors; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::{TokenTransferTransitionAction}; +use dpp::version::PlatformVersion; +use drive::query::TransactionArg; +use drive::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::v0::TokenTransferTransitionActionAccessorsV0; +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::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::platform_types::platform::PlatformStateRef; + +pub(super) trait TokenTransferTransitionActionStateValidationV0 { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenTransferTransitionActionStateValidationV0 for TokenTransferTransitionAction { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + // We need to verify that we have enough of the token + let balance = platform + .drive + .fetch_identity_token_balance( + self.token_id().to_buffer(), + owner_id.to_buffer(), + transaction, + platform_version, + )? + .unwrap_or_default(); + execution_context.add_operation(ValidationOperation::RetrieveIdentityTokenBalance); + if balance < self.amount() { + // The identity does not exist + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::IdentityDoesNotHaveEnoughTokenBalanceError( + IdentityDoesNotHaveEnoughTokenBalanceError::new( + self.token_id(), + owner_id, + self.amount(), + balance, + "transfer".to_string(), + ), + )), + )); + } + + // We need to verify that our token account is not frozen + + // We need to verify that we have enough of the token + let info = platform.drive.fetch_identity_token_info( + self.token_id().to_buffer(), + owner_id.to_buffer(), + transaction, + platform_version, + )?; + if let Some(info) = info { + // We have an info, we need to check that we are not frozen + if info.frozen() == true { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::IdentityTokenAccountFrozenError( + IdentityTokenAccountFrozenError::new( + self.token_id(), + owner_id, + "transfer".to_string(), + ), + )), + )); + } + }; + + Ok(SimpleConsensusValidationResult::new()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/structure_v0/mod.rs new file mode 100644 index 0000000000..92747e6d4f --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/structure_v0/mod.rs @@ -0,0 +1,29 @@ +use dpp::identifier::Identifier; +use dpp::validation::{SimpleConsensusValidationResult}; +use drive::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::TokenTransferTransitionAction; +use dpp::version::PlatformVersion; +use drive::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::v0::TokenTransferTransitionActionAccessorsV0; +use crate::error::Error; +use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; + +pub(super) trait TokenTransferTransitionActionStructureValidationV0 { + fn validate_structure_v0( + &self, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenTransferTransitionActionStructureValidationV0 for TokenTransferTransitionAction { + fn validate_structure_v0( + &self, + _owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_structure(platform_version)?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + Ok(SimpleConsensusValidationResult::default()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/mod.rs new file mode 100644 index 0000000000..0cb5f563fc --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/mod.rs @@ -0,0 +1,86 @@ +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_unfreeze_transition_action::TokenUnfreezeTransitionAction; +use dpp::version::PlatformVersion; +use drive::grovedb::TransactionArg; +use crate::error::Error; +use crate::error::execution::ExecutionError; +use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; +use crate::execution::validation::state_transition::batch::action_validation::token_unfreeze_transition_action::state_v0::TokenUnfreezeTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token_unfreeze_transition_action::structure_v0::TokenUnfreezeTransitionActionStructureValidationV0; +use crate::platform_types::platform::PlatformStateRef; + +mod state_v0; +mod structure_v0; + +pub trait TokenUnfreezeTransitionActionValidation { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result; + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} + +impl TokenUnfreezeTransitionActionValidation for TokenUnfreezeTransitionAction { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_unfreeze_transition_structure_validation + { + 0 => self.validate_structure_v0(platform_version), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenUnfreezeTransitionAction::validate_structure".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_unfreeze_transition_state_validation + { + 0 => self.validate_state_v0( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + ), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenUnfreezeTransitionAction::validate_state".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/state_v0/mod.rs new file mode 100644 index 0000000000..e8ba23d7f4 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/state_v0/mod.rs @@ -0,0 +1,107 @@ +use dpp::block::block_info::BlockInfo; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::state_error::StateError; +use dpp::consensus::state::token::{IdentityTokenAccountNotFrozenError, UnauthorizedTokenActionError}; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::multi_identity_events::ActionTaker; +use dpp::prelude::Identifier; +use dpp::tokens::info::v0::IdentityTokenInfoV0Accessors; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_unfreeze_transition_action::{TokenUnfreezeTransitionAction, TokenUnfreezeTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +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::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::platform_types::platform::PlatformStateRef; + +pub(super) trait TokenUnfreezeTransitionActionStateValidationV0 { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenUnfreezeTransitionActionStateValidationV0 for TokenUnfreezeTransitionAction { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + // We need to validate that we are frozen + + let (info, fee_result) = platform.drive.fetch_identity_token_info_with_costs( + self.token_id().to_buffer(), + self.frozen_identity_id().to_buffer(), + block_info, + true, + transaction, + platform_version, + )?; + execution_context.add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + if info.is_none() || !info.unwrap().frozen() { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::IdentityTokenAccountNotFrozenError( + IdentityTokenAccountNotFrozenError::new( + self.token_id(), + self.frozen_identity_id(), + "destroy_frozen_funds".to_string(), + ), + )), + )); + } + + // Let's first check to see if we are authorized to perform this action + let contract = &self.data_contract_fetch_info_ref().contract; + let token_configuration = contract.expected_token_configuration(self.token_position())?; + let rules = token_configuration.unfreeze_rules(); + let main_control_group = token_configuration + .main_control_group() + .map(|position| contract.expected_group(position)) + .transpose()?; + + if !rules.can_make_change( + &contract.owner_id(), + main_control_group, + contract.groups(), + &ActionTaker::SingleIdentity(owner_id), + ) { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::UnauthorizedTokenActionError( + UnauthorizedTokenActionError::new( + self.token_id(), + owner_id, + "unfreeze".to_string(), + rules.authorized_to_make_change_action_takers().clone(), + ), + )), + )); + } + + Ok(SimpleConsensusValidationResult::new()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/structure_v0/mod.rs new file mode 100644 index 0000000000..ba729c1f5e --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/structure_v0/mod.rs @@ -0,0 +1,25 @@ +use dpp::validation::{SimpleConsensusValidationResult}; +use drive::state_transition_action::batch::batched_transition::token_transition::token_unfreeze_transition_action::{TokenUnfreezeTransitionAction, TokenUnfreezeTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use crate::error::Error; +use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; + +pub(super) trait TokenUnfreezeTransitionActionStructureValidationV0 { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenUnfreezeTransitionActionStructureValidationV0 for TokenUnfreezeTransitionAction { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_structure(platform_version)?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + Ok(SimpleConsensusValidationResult::default()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/advanced_structure/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/advanced_structure/mod.rs similarity index 100% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/advanced_structure/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/advanced_structure/mod.rs diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/advanced_structure/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/advanced_structure/v0/mod.rs new file mode 100644 index 0000000000..d4da544dc9 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/advanced_structure/v0/mod.rs @@ -0,0 +1,339 @@ +use crate::error::Error; +use dpp::block::block_info::BlockInfo; +use dpp::consensus::basic::document::InvalidDocumentTransitionIdError; +use dpp::consensus::signature::{InvalidSignaturePublicKeySecurityLevelError, SignatureError}; +use dpp::dashcore::Network; +use dpp::document::Document; +use dpp::identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0; +use dpp::identity::PartialIdentity; +use dpp::state_transition::batch_transition::batched_transition::document_transition::DocumentTransition; +use dpp::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; +use dpp::state_transition::batch_transition::BatchTransition; +use dpp::state_transition::{StateTransitionIdentitySigned, StateTransitionLike}; +use dpp::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use dpp::state_transition::batch_transition::batched_transition::BatchedTransitionRef; +use dpp::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use dpp::validation::ConsensusValidationResult; + +use dpp::version::PlatformVersion; + +use drive::state_transition_action::batch::BatchTransitionAction; +use crate::execution::validation::state_transition::state_transitions::batch::action_validation::document_replace_transition_action::DocumentReplaceTransitionActionValidation; +use crate::execution::validation::state_transition::state_transitions::batch::action_validation::document_delete_transition_action::DocumentDeleteTransitionActionValidation; +use crate::execution::validation::state_transition::state_transitions::batch::action_validation::document_create_transition_action::DocumentCreateTransitionActionValidation; +use dpp::state_transition::batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; +use drive::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::DocumentPurchaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_replace_transition_action::DocumentReplaceTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::DocumentTransferTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::DocumentUpdatePriceTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::TokenEmergencyActionTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::TokenFreezeTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::TokenMintTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::v0::TokenTransferTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::token_transition::token_unfreeze_transition_action::TokenUnfreezeTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; +use drive::state_transition_action::StateTransitionAction; +use drive::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; +use crate::error::execution::ExecutionError; +use crate::execution::types::execution_operation::ValidationOperation; +use crate::execution::types::state_transition_execution_context::{StateTransitionExecutionContext, StateTransitionExecutionContextMethodsV0}; +use crate::execution::validation::state_transition::batch::action_validation::document_purchase_transition_action::DocumentPurchaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document_transfer_transition_action::DocumentTransferTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document_update_price_transition_action::DocumentUpdatePriceTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_burn_transition_action::TokenBurnTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_emergency_action_transition_action::TokenEmergencyActionTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_freeze_transition_action::TokenFreezeTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_mint_transition_action::TokenMintTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_transfer_transition_action::TokenTransferTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_unfreeze_transition_action::TokenUnfreezeTransitionActionValidation; + +pub(in crate::execution::validation::state_transition::state_transitions::batch) trait DocumentsBatchStateTransitionStructureValidationV0 +{ + fn validate_advanced_structure_from_state_v0( + &self, + block_info: &BlockInfo, + network: Network, + action: &BatchTransitionAction, + identity: &PartialIdentity, + execution_context: &mut StateTransitionExecutionContext, + platform_version: &PlatformVersion, + ) -> Result, Error>; +} + +impl DocumentsBatchStateTransitionStructureValidationV0 for BatchTransition { + fn validate_advanced_structure_from_state_v0( + &self, + block_info: &BlockInfo, + network: Network, + action: &BatchTransitionAction, + identity: &PartialIdentity, + execution_context: &mut StateTransitionExecutionContext, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let security_levels = action.contract_based_security_level_requirement()?; + + let signing_key = identity.loaded_public_keys.get(&self.signature_public_key_id()).ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution("the key must exist for advanced structure validation as we already fetched it during signature validation")))?; + + if !security_levels.contains(&signing_key.security_level()) { + // We only need to bump the first identity data contract nonce as that will make a replay + // attack not possible + + let first_transition = self.first_transition().ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution("There must be at least one state transition as this is already verified in basic validation")))?; + + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_batched_transition_ref( + first_transition, + self.owner_id(), + self.user_fee_increase(), + ), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + vec![SignatureError::InvalidSignaturePublicKeySecurityLevelError( + InvalidSignaturePublicKeySecurityLevelError::new( + signing_key.security_level(), + security_levels, + ), + ) + .into()], + )); + } + + // We should validate that all newly created documents have valid ids + for transition in self.transitions_iter() { + if let BatchedTransitionRef::Document(DocumentTransition::Create(create_transition)) = + transition + { + // Validate the ID + let generated_document_id = Document::generate_document_id_v0( + create_transition.base().data_contract_id_ref(), + &self.owner_id(), + create_transition.base().document_type_name(), + &create_transition.entropy(), + ); + + // This hash will take 2 blocks (128 bytes) + execution_context.add_operation(ValidationOperation::DoubleSha256(2)); + + let id = create_transition.base().id(); + if generated_document_id != id { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition( + create_transition.base(), + self.owner_id(), + self.user_fee_increase(), + ), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + vec![ + InvalidDocumentTransitionIdError::new(generated_document_id, id).into(), + ], + )); + } + } + } + + // Next we need to validate the structure of all actions (this means with the data contract) + for transition in action.transitions() { + match transition { + BatchedTransitionAction::DocumentAction(document_action) => match document_action { + DocumentTransitionAction::CreateAction(create_action) => { + let result = create_action.validate_structure( + identity.id, + block_info, + network, + platform_version, + )?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action(document_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + DocumentTransitionAction::ReplaceAction(replace_action) => { + let result = replace_action.validate_structure(platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action(replace_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + DocumentTransitionAction::DeleteAction(delete_action) => { + let result = delete_action.validate_structure(platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action(delete_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + DocumentTransitionAction::TransferAction(transfer_action) => { + let result = transfer_action.validate_structure(platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action(transfer_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + DocumentTransitionAction::UpdatePriceAction(update_price_action) => { + let result = update_price_action.validate_structure(platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action(update_price_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + DocumentTransitionAction::PurchaseAction(purchase_action) => { + let result = purchase_action.validate_structure(platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action(purchase_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + }, + BatchedTransitionAction::TokenAction(token_action) => match token_action { + TokenTransitionAction::BurnAction(burn_action) => { + let result = burn_action.validate_structure(platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action(token_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + TokenTransitionAction::MintAction(mint_action) => { + let result = mint_action.validate_structure(platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action(mint_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + TokenTransitionAction::TransferAction(transfer_action) => { + let result = transfer_action + .validate_structure(self.owner_id(), platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action(transfer_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + TokenTransitionAction::FreezeAction(freeze_action) => { + let result = freeze_action.validate_structure(platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action(freeze_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + TokenTransitionAction::UnfreezeAction(unfreeze_action) => { + let result = unfreeze_action.validate_structure(platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action(unfreeze_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + TokenTransitionAction::EmergencyActionAction(emergency_action_action) => { + let result = + emergency_action_action.validate_structure(platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action(emergency_action_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + TokenTransitionAction::DestroyFrozenFundsAction( + destroy_frozen_funds_action, + ) => { + let result = + destroy_frozen_funds_action.validate_structure(platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action(destroy_frozen_funds_action.base(), self.owner_id(), self.user_fee_increase()), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + }, + BatchedTransitionAction::BumpIdentityDataContractNonce(_) => { + return Err(Error::Execution(ExecutionError::CorruptedCodeExecution( + "we should not have a bump identity contract nonce at this stage", + ))); + } + } + } + Ok(ConsensusValidationResult::new()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/balance/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/balance/mod.rs similarity index 76% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/balance/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/balance/mod.rs index b56c2b8ff3..2b46fb6624 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/balance/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/balance/mod.rs @@ -1,14 +1,14 @@ use crate::error::execution::ExecutionError; use crate::error::Error; -use crate::execution::validation::state_transition::documents_batch::balance::v0::DocumentsBatchTransitionBalanceValidationV0; +use crate::execution::validation::state_transition::batch::balance::v0::DocumentsBatchTransitionBalanceValidationV0; use crate::execution::validation::state_transition::processor::v0::StateTransitionIdentityBalanceValidationV0; use dpp::identity::PartialIdentity; -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; +use dpp::state_transition::batch_transition::BatchTransition; use dpp::validation::SimpleConsensusValidationResult; use dpp::version::PlatformVersion; pub(crate) mod v0; -impl StateTransitionIdentityBalanceValidationV0 for DocumentsBatchTransition { +impl StateTransitionIdentityBalanceValidationV0 for BatchTransition { fn validate_minimum_balance_pre_check( &self, identity: &PartialIdentity, @@ -18,7 +18,7 @@ impl StateTransitionIdentityBalanceValidationV0 for DocumentsBatchTransition { .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .balance_pre_check { 0 => self.validate_advanced_minimum_balance_pre_check_v0(identity, platform_version), diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/balance/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/balance/v0/mod.rs similarity index 89% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/balance/v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/balance/v0/mod.rs index 6f2dc0fd99..63b5472314 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/balance/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/balance/v0/mod.rs @@ -4,12 +4,11 @@ use dpp::consensus::basic::BasicError; use dpp::consensus::state::identity::IdentityInsufficientBalanceError; use dpp::consensus::ConsensusError; use dpp::identity::PartialIdentity; -use dpp::state_transition::documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; -use dpp::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; -use dpp::ProtocolError; - +use dpp::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use dpp::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; +use dpp::state_transition::batch_transition::BatchTransition; use dpp::validation::SimpleConsensusValidationResult; +use dpp::ProtocolError; use crate::error::execution::ExecutionError; use dpp::version::PlatformVersion; @@ -23,7 +22,7 @@ pub(in crate::execution::validation::state_transition::state_transitions) trait ) -> Result; } -impl DocumentsBatchTransitionBalanceValidationV0 for DocumentsBatchTransition { +impl DocumentsBatchTransitionBalanceValidationV0 for BatchTransition { fn validate_advanced_minimum_balance_pre_check_v0( &self, identity: &PartialIdentity, @@ -36,7 +35,7 @@ impl DocumentsBatchTransitionBalanceValidationV0 for DocumentsBatchTransition { "expected to have a balance on identity for documents batch transition", )))?; - let purchases_amount = match self.all_purchases_amount() { + let purchases_amount = match self.all_document_purchases_amount() { Ok(purchase_amount) => purchase_amount.unwrap_or_default(), Err(ProtocolError::Overflow(e)) => { return Ok(SimpleConsensusValidationResult::new_with_error( @@ -65,7 +64,7 @@ impl DocumentsBatchTransitionBalanceValidationV0 for DocumentsBatchTransition { Err(e) => return Err(e.into()), }; - let base_fees = match platform_version.fee_version.state_transition_min_fees.document_batch_sub_transition.checked_mul(self.transitions().len() as u64) { + let base_fees = match platform_version.fee_version.state_transition_min_fees.document_batch_sub_transition.checked_mul(self.transitions_len() as u64) { None => return Ok(SimpleConsensusValidationResult::new_with_error(ConsensusError::BasicError(BasicError::OverflowError(OverflowError::new("overflow when multiplying base fee and amount of sub transitions in documents batch transition".to_string()))))), Some(base_fees) => base_fees }; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/data_trigger_binding/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/data_trigger_binding/mod.rs similarity index 89% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/data_trigger_binding/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/data_trigger_binding/mod.rs index 6ab41f3800..9c06e6b429 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/data_trigger_binding/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/data_trigger_binding/mod.rs @@ -1,10 +1,10 @@ -use crate::execution::validation::state_transition::documents_batch::data_triggers::{ +use crate::execution::validation::state_transition::batch::data_triggers::{ DataTriggerExecutionContext, DataTriggerExecutionResult, }; use derive_more::From; use dpp::identifier::Identifier; use dpp::version::PlatformVersion; -use drive::state_transition_action::document::documents_batch::document_transition::{ +use drive::state_transition_action::batch::batched_transition::document_transition::{ DocumentTransitionAction, DocumentTransitionActionType, }; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/data_trigger_binding/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/data_trigger_binding/v0/mod.rs similarity index 96% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/data_trigger_binding/v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/data_trigger_binding/v0/mod.rs index 7c390af6f2..39e3c871c6 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/data_trigger_binding/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/data_trigger_binding/v0/mod.rs @@ -1,10 +1,10 @@ use crate::error::Error; -use crate::execution::validation::state_transition::documents_batch::data_triggers::{ +use crate::execution::validation::state_transition::batch::data_triggers::{ DataTrigger, DataTriggerExecutionContext, DataTriggerExecutionResult, }; use dpp::identifier::Identifier; use dpp::version::PlatformVersion; -use drive::state_transition_action::document::documents_batch::document_transition::{ +use drive::state_transition_action::batch::batched_transition::document_transition::{ DocumentTransitionAction, DocumentTransitionActionType, }; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/list/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/list/mod.rs similarity index 79% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/list/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/list/mod.rs index ea2bdcc07a..52c0d8c55b 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/list/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/list/mod.rs @@ -1,6 +1,6 @@ use dpp::ProtocolError; use dpp::version::PlatformVersion; -use crate::execution::validation::state_transition::documents_batch::data_triggers::bindings::data_trigger_binding::DataTriggerBinding; +use crate::execution::validation::state_transition::batch::data_triggers::bindings::data_trigger_binding::DataTriggerBinding; mod v0; @@ -11,7 +11,7 @@ pub fn data_trigger_bindings_list( .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .data_triggers .bindings { diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/list/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/list/v0/mod.rs similarity index 88% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/list/v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/list/v0/mod.rs index 4e11bd50ee..fe3c94b3e4 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/list/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/list/v0/mod.rs @@ -1,13 +1,13 @@ -use crate::execution::validation::state_transition::documents_batch::data_triggers::triggers::dashpay::create_contact_request_data_trigger; -use crate::execution::validation::state_transition::documents_batch::data_triggers::triggers::dpns::create_domain_data_trigger; -use crate::execution::validation::state_transition::documents_batch::data_triggers::triggers::reject::reject_data_trigger; -use crate::execution::validation::state_transition::documents_batch::data_triggers::triggers::withdrawals::delete_withdrawal_data_trigger; -use crate::execution::validation::state_transition::documents_batch::data_triggers::bindings::data_trigger_binding::DataTriggerBindingV0; +use crate::execution::validation::state_transition::batch::data_triggers::triggers::dashpay::create_contact_request_data_trigger; +use crate::execution::validation::state_transition::batch::data_triggers::triggers::dpns::create_domain_data_trigger; +use crate::execution::validation::state_transition::batch::data_triggers::triggers::reject::reject_data_trigger; +use crate::execution::validation::state_transition::batch::data_triggers::triggers::withdrawals::delete_withdrawal_data_trigger; +use crate::execution::validation::state_transition::batch::data_triggers::bindings::data_trigger_binding::DataTriggerBindingV0; use dpp::errors::ProtocolError; use dpp::system_data_contracts::withdrawals_contract::v1::document_types::withdrawal; use dpp::system_data_contracts::{dashpay_contract, dpns_contract, SystemDataContract}; -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionActionType; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionActionType; /// Retrieves a list of data triggers binding with matching params. /// diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/mod.rs similarity index 100% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/bindings/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/bindings/mod.rs diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/context.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/context.rs similarity index 100% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/context.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/context.rs diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/executor.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/executor.rs similarity index 58% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/executor.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/executor.rs index ac229976a5..a85f1b6feb 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/executor.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/executor.rs @@ -1,15 +1,14 @@ -use crate::execution::validation::state_transition::documents_batch::data_triggers::{ +use crate::execution::validation::state_transition::batch::data_triggers::{ DataTriggerExecutionContext, DataTriggerExecutionResult, }; -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; -use dpp::state_transition::documents_batch_transition::document_transition::action_type::TransitionActionTypeGetter; -use drive::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use dpp::state_transition::batch_transition::batched_transition::document_transition_action_type::DocumentTransitionActionTypeGetter; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; use dpp::version::PlatformVersion; -use crate::execution::validation::state_transition::documents_batch::data_triggers::bindings::data_trigger_binding::DataTriggerBinding; -use crate::execution::validation::state_transition::documents_batch::data_triggers::bindings::data_trigger_binding::DataTriggerBindingV0Getters; +use crate::execution::validation::state_transition::batch::data_triggers::bindings::data_trigger_binding::DataTriggerBinding; +use crate::execution::validation::state_transition::batch::data_triggers::bindings::data_trigger_binding::DataTriggerBindingV0Getters; use crate::error::Error; -use crate::error::execution::ExecutionError; pub trait DataTriggerExecutor { fn validate_with_data_triggers( @@ -27,18 +26,8 @@ impl DataTriggerExecutor for DocumentTransitionAction { context: &DataTriggerExecutionContext, platform_version: &PlatformVersion, ) -> Result { - let data_contract_id = self - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .data_contract_id(); - let document_type_name = self - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .document_type_name(); + let data_contract_id = self.base().data_contract_id(); + let document_type_name = self.base().document_type_name(); let transition_action = self.action_type(); // Match data triggers by action type, contract ID and document type name diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/mod.rs similarity index 94% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/mod.rs index 9920418f53..21bdb91774 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/mod.rs @@ -2,7 +2,7 @@ use dpp::validation::SimpleValidationResult; /// Data triggers implement custom validation logic for state transitions /// that modifies documents in a specific data contract. /// Data triggers can be assigned based on the data contract ID, document type, and action. -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; use crate::error::Error; use dpp::consensus::state::data_trigger::DataTriggerError; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dashpay/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dashpay/mod.rs similarity index 74% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dashpay/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dashpay/mod.rs index 1f2e7fbbf8..61c486c13a 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dashpay/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dashpay/mod.rs @@ -1,11 +1,11 @@ use crate::error::execution::ExecutionError; use crate::error::Error; -use crate::execution::validation::state_transition::documents_batch::data_triggers::{ +use crate::execution::validation::state_transition::batch::data_triggers::triggers::dashpay::v0::create_contact_request_data_trigger_v0; +use crate::execution::validation::state_transition::batch::data_triggers::{ DataTriggerExecutionContext, DataTriggerExecutionResult, }; -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; use dpp::version::PlatformVersion; -use crate::execution::validation::state_transition::documents_batch::data_triggers::triggers::dashpay::v0::create_contact_request_data_trigger_v0; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; mod v0; @@ -18,7 +18,7 @@ pub fn create_contact_request_data_trigger( .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .data_triggers .triggers .create_contact_request_data_trigger diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dashpay/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dashpay/v0/mod.rs similarity index 86% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dashpay/v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dashpay/v0/mod.rs index b1b183ef24..d3cdf28513 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dashpay/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dashpay/v0/mod.rs @@ -6,14 +6,14 @@ use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::platform_value::btreemap_extensions::BTreeValueMapHelper; use dpp::ProtocolError; -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::DocumentTransitionAction; -use drive::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::DocumentCreateTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::DocumentCreateTransitionActionAccessorsV0; use dpp::system_data_contracts::dashpay_contract::v1::document_types::contact_request::properties ::{TO_USER_ID}; use dpp::version::PlatformVersion; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContextMethodsV0; -use crate::execution::validation::state_transition::documents_batch::data_triggers::{DataTriggerExecutionContext, DataTriggerExecutionResult}; +use crate::execution::validation::state_transition::batch::data_triggers::{DataTriggerExecutionContext, DataTriggerExecutionResult}; /// Creates a data trigger for handling contact request documents. /// @@ -36,12 +36,7 @@ pub(super) fn create_contact_request_data_trigger_v0( context: &DataTriggerExecutionContext<'_>, platform_version: &PlatformVersion, ) -> Result { - let data_contract_fetch_info = document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .data_contract_fetch_info(); + let data_contract_fetch_info = document_transition.base().data_contract_fetch_info(); let data_contract = &data_contract_fetch_info.contract; let mut result = DataTriggerExecutionResult::default(); let is_dry_run = context.state_transition_execution_context.in_dry_run(); @@ -52,12 +47,7 @@ pub(super) fn create_contact_request_data_trigger_v0( return Err(Error::Execution(ExecutionError::DataTriggerExecutionError( format!( "the Document Transition {} isn't 'CREATE", - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base" - )))? - .id() + document_transition.base().id() ), ))); }; @@ -72,12 +62,7 @@ pub(super) fn create_contact_request_data_trigger_v0( if !is_dry_run && owner_id == &to_user_id { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), format!("Identity {to_user_id} must not be equal to owner id"), ); @@ -120,14 +105,15 @@ mod test { use dpp::document::{DocumentV0Getters, DocumentV0Setters}; use dpp::platform_value; use dpp::platform_value::{Bytes32}; - use drive::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::DocumentCreateTransitionAction; - use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionActionType; - use crate::execution::validation::state_transition::documents_batch::data_triggers::triggers::dashpay::create_contact_request_data_trigger; + use drive::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::DocumentCreateTransitionAction; + use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionActionType; + use crate::execution::validation::state_transition::batch::data_triggers::triggers::dashpay::create_contact_request_data_trigger; use crate::platform_types::platform::PlatformStateRef; use crate::test::helpers::setup::TestPlatformBuilder; use super::*; use dpp::errors::consensus::state::data_trigger::DataTriggerError; - use dpp::tests::fixtures::{get_contact_request_document_fixture, get_dashpay_contract_fixture, get_document_transitions_fixture, get_identity_fixture}; + use dpp::state_transition::batch_transition::resolvers::v0::BatchTransitionResolversV0; + use dpp::tests::fixtures::{get_contact_request_document_fixture, get_dashpay_contract_fixture, get_batched_transitions_fixture, get_identity_fixture}; use dpp::version::DefaultForPlatformVersion; use drive::drive::contract::DataContractFetchInfo; use crate::execution::types::state_transition_execution_context::{StateTransitionExecutionContext, StateTransitionExecutionContextMethodsV0}; @@ -165,7 +151,7 @@ mod test { .document_type_for_name("contactRequest") .expect("expected a contact request"); - let document_transitions = get_document_transitions_fixture( + let document_transitions = get_batched_transitions_fixture( [( DocumentTransitionActionType::Create, vec![(contact_request_document, document_type, Bytes32::default())], @@ -194,7 +180,7 @@ mod test { }; let result = create_contact_request_data_trigger( - &DocumentCreateTransitionAction::from_document_borrowed_create_transition_with_contract_lookup(&platform.drive, None, document_create_transition, &BlockInfo::default(), |_identifier| { + &DocumentCreateTransitionAction::try_from_document_borrowed_create_transition_with_contract_lookup(&platform.drive, None, document_create_transition, &BlockInfo::default(), |_identifier| { Ok(Arc::new(DataContractFetchInfo::dashpay_contract_fixture(protocol_version))) }, platform_version).expect("expected to create action").0.into(), &data_trigger_context, @@ -268,7 +254,7 @@ mod test { .document_type_for_name("contactRequest") .expect("expected a contact request"); - let document_transitions = get_document_transitions_fixture( + let document_transitions = get_batched_transitions_fixture( [( DocumentTransitionActionType::Create, vec![(contact_request_document, document_type, Bytes32::default())], @@ -312,7 +298,7 @@ mod test { let _dashpay_identity_id = data_trigger_context.owner_id.to_owned(); let result = create_contact_request_data_trigger( - &DocumentCreateTransitionAction::from_document_borrowed_create_transition_with_contract_lookup(&platform.drive, None, document_create_transition, &BlockInfo::default(), |_identifier| { + &DocumentCreateTransitionAction::try_from_document_borrowed_create_transition_with_contract_lookup(&platform.drive, None, document_create_transition, &BlockInfo::default(), |_identifier| { Ok(Arc::new(DataContractFetchInfo::dashpay_contract_fixture(protocol_version))) }, platform_version).expect("expected to create action").0.into(), &data_trigger_context, @@ -396,7 +382,7 @@ mod test { .get_identifier("toUserId") .expect("expected to get toUserId"); - let document_transitions = get_document_transitions_fixture( + let document_transitions = get_batched_transitions_fixture( [( DocumentTransitionActionType::Create, vec![(contact_request_document, document_type, Bytes32::default())], @@ -425,7 +411,7 @@ mod test { let _dashpay_identity_id = data_trigger_context.owner_id.to_owned(); let result = create_contact_request_data_trigger( - &DocumentCreateTransitionAction::from_document_borrowed_create_transition_with_contract_lookup(&platform.drive, None, document_create_transition, &BlockInfo::default(), |_identifier| { + &DocumentCreateTransitionAction::try_from_document_borrowed_create_transition_with_contract_lookup(&platform.drive, None, document_create_transition, &BlockInfo::default(), |_identifier| { Ok(Arc::new(DataContractFetchInfo::dashpay_contract_fixture(protocol_version))) }, platform_version).expect("expected to create action").0.into(), &data_trigger_context, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dpns/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dpns/mod.rs similarity index 70% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dpns/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dpns/mod.rs index efd55c380f..42159810dd 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dpns/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dpns/mod.rs @@ -1,9 +1,11 @@ -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; -use dpp::version::PlatformVersion; -use crate::error::Error; use crate::error::execution::ExecutionError; -use crate::execution::validation::state_transition::documents_batch::data_triggers::{DataTriggerExecutionContext, DataTriggerExecutionResult}; -use crate::execution::validation::state_transition::documents_batch::data_triggers::triggers::dpns::v0::create_domain_data_trigger_v0; +use crate::error::Error; +use crate::execution::validation::state_transition::batch::data_triggers::triggers::dpns::v0::create_domain_data_trigger_v0; +use crate::execution::validation::state_transition::batch::data_triggers::{ + DataTriggerExecutionContext, DataTriggerExecutionResult, +}; +use dpp::version::PlatformVersion; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; mod v0; @@ -16,7 +18,7 @@ pub fn create_domain_data_trigger( .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .data_triggers .triggers .create_domain_data_trigger 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/batch/data_triggers/triggers/dpns/v0/mod.rs similarity index 79% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/dpns/v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/dpns/v0/mod.rs index a790d727bd..55ffa74672 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/batch/data_triggers/triggers/dpns/v0/mod.rs @@ -8,16 +8,16 @@ use std::collections::BTreeMap; use crate::error::execution::ExecutionError; use crate::error::Error; -use crate::execution::validation::state_transition::documents_batch::data_triggers::{ +use crate::execution::validation::state_transition::batch::data_triggers::{ DataTriggerExecutionContext, DataTriggerExecutionResult, }; use dpp::document::DocumentV0Getters; use dpp::platform_value::btreemap_extensions::{BTreeValueMapHelper, BTreeValueMapPathHelper}; use dpp::platform_value::Value; use dpp::ProtocolError; -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::DocumentCreateTransitionActionAccessorsV0; -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::DocumentCreateTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; use dpp::system_data_contracts::dpns_contract; use dpp::system_data_contracts::dpns_contract::v1::document_types::domain::properties::{ALLOW_SUBDOMAINS, DASH_ALIAS_IDENTITY_ID, DASH_UNIQUE_IDENTITY_ID, LABEL, NORMALIZED_LABEL, NORMALIZED_PARENT_DOMAIN_NAME, PREORDER_SALT, RECORDS}; @@ -50,12 +50,7 @@ pub(super) fn create_domain_data_trigger_v0( context: &DataTriggerExecutionContext<'_>, platform_version: &PlatformVersion, ) -> Result { - let data_contract_fetch_info = document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .data_contract_fetch_info(); + let data_contract_fetch_info = document_transition.base().data_contract_fetch_info(); let data_contract = &data_contract_fetch_info.contract; let is_dry_run = context.state_transition_execution_context.in_dry_run(); let document_create_transition = match document_transition { @@ -64,12 +59,7 @@ pub(super) fn create_domain_data_trigger_v0( return Err(Error::Execution(ExecutionError::DataTriggerExecutionError( format!( "the Document Transition {} isn't 'CREATE", - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base" - )))? - .id() + document_transition.base().id() ), ))) } @@ -118,12 +108,7 @@ pub(super) fn create_domain_data_trigger_v0( if full_domain_name.len() > MAX_PRINTABLE_DOMAIN_NAME_LENGTH { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), format!( "Full domain name length can not be more than {} characters long but got {}", MAX_PRINTABLE_DOMAIN_NAME_LENGTH, @@ -137,12 +122,7 @@ pub(super) fn create_domain_data_trigger_v0( if normalized_label != convert_to_homograph_safe_chars(label.as_str()) { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), format!( "Normalized label doesn't match label: {} != {}", normalized_label, label @@ -157,12 +137,7 @@ pub(super) fn create_domain_data_trigger_v0( { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), format!( "Normalized parent domain name doesn't match parent domain name: {} != {}", normalized_parent_domain_name, parent_domain_name @@ -179,12 +154,7 @@ pub(super) fn create_domain_data_trigger_v0( if id != owner_id { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), format!( "ownerId {} doesn't match {} {}", owner_id, DASH_UNIQUE_IDENTITY_ID, id @@ -202,12 +172,7 @@ pub(super) fn create_domain_data_trigger_v0( if id != owner_id { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), format!( "ownerId {} doesn't match {} {}", owner_id, DASH_ALIAS_IDENTITY_ID, id @@ -222,12 +187,7 @@ pub(super) fn create_domain_data_trigger_v0( { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), "Can't create top level domain for this identity".to_string(), ); @@ -299,12 +259,7 @@ pub(super) fn create_domain_data_trigger_v0( if documents.is_empty() { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), "Parent domain is not present".to_string(), ); @@ -317,12 +272,7 @@ pub(super) fn create_domain_data_trigger_v0( if rule_allow_subdomains { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), "Allowing subdomains registration is forbidden for this domain".to_string(), ); @@ -339,12 +289,7 @@ pub(super) fn create_domain_data_trigger_v0( { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), "The subdomain can be created only by the parent domain owner".to_string(), ); @@ -407,12 +352,7 @@ pub(super) fn create_domain_data_trigger_v0( if preorder_documents.is_empty() { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), format!( "preorderDocument was not found with a salted domain hash of {}", hex::encode(salted_domain_hash) @@ -429,9 +369,9 @@ mod test { use std::sync::Arc; use dpp::block::block_info::BlockInfo; use dpp::platform_value::Bytes32; - use drive::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::DocumentCreateTransitionAction; - use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionActionType; - use dpp::tests::fixtures::{get_document_transitions_fixture, get_dpns_data_contract_fixture, get_dpns_parent_document_fixture, ParentDocumentOptions}; + use drive::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::DocumentCreateTransitionAction; + use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionActionType; + use dpp::tests::fixtures::{get_batched_transitions_fixture, get_dpns_data_contract_fixture, get_dpns_parent_document_fixture, ParentDocumentOptions}; use dpp::tests::utils::generate_random_identifier_struct; use dpp::version::{DefaultForPlatformVersion}; use drive::drive::contract::DataContractFetchInfo; @@ -440,6 +380,7 @@ mod test { use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::test::helpers::setup::TestPlatformBuilder; use super::*; + use dpp::state_transition::batch_transition::resolvers::v0::BatchTransitionResolversV0; #[test] fn should_return_execution_result_on_dry_run() { @@ -481,7 +422,7 @@ mod test { let document_type = data_contract .document_type_for_name("domain") .expect("expected to get domain document type"); - let transitions = get_document_transitions_fixture( + let transitions = get_batched_transitions_fixture( [( DocumentTransitionActionType::Create, vec![(document, document_type, Bytes32::default())], @@ -504,8 +445,8 @@ mod test { }; let result = create_domain_data_trigger_v0( - &DocumentCreateTransitionAction::from_document_borrowed_create_transition_with_contract_lookup(&platform.drive, None, - document_create_transition, &BlockInfo::default(), |_identifier| { + &DocumentCreateTransitionAction::try_from_document_borrowed_create_transition_with_contract_lookup(&platform.drive, None, + document_create_transition, &BlockInfo::default(), |_identifier| { Ok(Arc::new(DataContractFetchInfo::dpns_contract_fixture(platform_version.protocol_version))) }, platform_version).expect("expected to create action").0.into(), &data_trigger_context, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/feature_flags/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/feature_flags/mod.rs similarity index 70% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/feature_flags/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/feature_flags/mod.rs index 9b0ecd6187..31f4b43ccb 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/feature_flags/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/feature_flags/mod.rs @@ -1,9 +1,9 @@ -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; use dpp::version::PlatformVersion; use crate::error::Error; use crate::error::execution::ExecutionError; -use crate::execution::validation::state_transition::documents_batch::data_triggers::{DataTriggerExecutionContext, DataTriggerExecutionResult}; -use crate::execution::validation::state_transition::documents_batch::data_triggers::triggers::feature_flags::v0::create_feature_flag_data_trigger_v0; +use crate::execution::validation::state_transition::batch::data_triggers::{DataTriggerExecutionContext, DataTriggerExecutionResult}; +use crate::execution::validation::state_transition::batch::data_triggers::triggers::feature_flags::v0::create_feature_flag_data_trigger_v0; mod v0; @@ -17,7 +17,7 @@ pub fn create_feature_flag_data_trigger( .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .data_triggers .triggers .create_feature_flag_data_trigger diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/feature_flags/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/feature_flags/v0/mod.rs similarity index 83% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/feature_flags/v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/feature_flags/v0/mod.rs index 50c867efa6..d1cca4bf1a 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/feature_flags/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/feature_flags/v0/mod.rs @@ -6,9 +6,9 @@ use dpp::consensus::state::data_trigger::data_trigger_condition_error::DataTrigg use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::platform_value::btreemap_extensions::BTreeValueMapHelper; -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::DocumentCreateTransitionActionAccessorsV0; -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::DocumentCreateTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; use dpp::system_data_contracts::feature_flags_contract; use dpp::system_data_contracts::feature_flags_contract::v1::document_types::update_consensus_params::properties ::PROPERTY_ENABLE_AT_HEIGHT; @@ -39,12 +39,7 @@ pub(super) fn create_feature_flag_data_trigger_v0( _platform_version: &PlatformVersion, ) -> Result { let mut result = DataTriggerExecutionResult::default(); - let data_contract_fetch_info = document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .data_contract_fetch_info(); + let data_contract_fetch_info = document_transition.base().data_contract_fetch_info(); let data_contract = &data_contract_fetch_info.contract; let document_create_transition = match document_transition { @@ -53,12 +48,7 @@ pub(super) fn create_feature_flag_data_trigger_v0( return Err(Error::Execution(ExecutionError::DataTriggerExecutionError( format!( "the Document Transition {} isn't 'CREATE", - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base" - )))? - .id() + document_transition.base().id() ), ))) } @@ -78,12 +68,7 @@ pub(super) fn create_feature_flag_data_trigger_v0( if enable_at_height < latest_block_height { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), "This identity can't activate selected feature flag".to_string(), ); @@ -95,12 +80,7 @@ pub(super) fn create_feature_flag_data_trigger_v0( if context.owner_id != &feature_flags_contract::OWNER_ID { let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), "This identity can't activate selected feature flag".to_string(), ); diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/mod.rs similarity index 100% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/mod.rs diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/reject/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/reject/mod.rs similarity index 69% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/reject/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/reject/mod.rs index 402668738d..7c540836ca 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/reject/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/reject/mod.rs @@ -1,9 +1,11 @@ -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; -use dpp::version::PlatformVersion; -use crate::error::Error; use crate::error::execution::ExecutionError; -use crate::execution::validation::state_transition::documents_batch::data_triggers::{DataTriggerExecutionContext, DataTriggerExecutionResult}; -use crate::execution::validation::state_transition::documents_batch::data_triggers::triggers::reject::v0::reject_data_trigger_v0; +use crate::error::Error; +use crate::execution::validation::state_transition::batch::data_triggers::triggers::reject::v0::reject_data_trigger_v0; +use crate::execution::validation::state_transition::batch::data_triggers::{ + DataTriggerExecutionContext, DataTriggerExecutionResult, +}; +use dpp::version::PlatformVersion; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; mod v0; @@ -16,7 +18,7 @@ pub fn reject_data_trigger( .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .data_triggers .triggers .reject_data_trigger diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/reject/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/reject/v0/mod.rs similarity index 68% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/reject/v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/reject/v0/mod.rs index 69c287e600..1fe229182f 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/reject/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/reject/v0/mod.rs @@ -1,10 +1,9 @@ use dpp::consensus::state::data_trigger::data_trigger_condition_error::DataTriggerConditionError; use dpp::data_contract::accessors::v0::DataContractV0Getters; -use drive::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; use crate::error::Error; -use crate::execution::validation::state_transition::documents_batch::data_triggers::DataTriggerExecutionResult; -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; -use crate::error::execution::ExecutionError; +use crate::execution::validation::state_transition::batch::data_triggers::DataTriggerExecutionResult; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; /// Creates a data trigger for handling document rejections. /// @@ -26,23 +25,13 @@ use crate::error::execution::ExecutionError; pub(super) fn reject_data_trigger_v0( document_transition: &DocumentTransitionAction, ) -> Result { - let data_contract_fetch_info = document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .data_contract_fetch_info(); + let data_contract_fetch_info = document_transition.base().data_contract_fetch_info(); let data_contract = &data_contract_fetch_info.contract; let mut result = DataTriggerExecutionResult::default(); let err = DataTriggerConditionError::new( data_contract.id(), - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .id(), + document_transition.base().id(), "Action is not allowed".to_string(), ); diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/withdrawals/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/withdrawals/mod.rs similarity index 74% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/withdrawals/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/withdrawals/mod.rs index ae8758fe06..967adaba8c 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/withdrawals/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/withdrawals/mod.rs @@ -1,11 +1,11 @@ use crate::error::execution::ExecutionError; use crate::error::Error; -use crate::execution::validation::state_transition::documents_batch::data_triggers::{ +use crate::execution::validation::state_transition::batch::data_triggers::{ DataTriggerExecutionContext, DataTriggerExecutionResult, }; -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; use dpp::version::PlatformVersion; -use crate::execution::validation::state_transition::documents_batch::data_triggers::triggers::withdrawals::v0::delete_withdrawal_data_trigger_v0; +use crate::execution::validation::state_transition::batch::data_triggers::triggers::withdrawals::v0::delete_withdrawal_data_trigger_v0; mod v0; @@ -18,7 +18,7 @@ pub fn delete_withdrawal_data_trigger( .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .data_triggers .triggers .delete_withdrawal_data_trigger diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/withdrawals/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/withdrawals/v0/mod.rs similarity index 91% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/withdrawals/v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/withdrawals/v0/mod.rs index e0960ea715..e39046a670 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/data_triggers/triggers/withdrawals/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/data_triggers/triggers/withdrawals/v0/mod.rs @@ -4,7 +4,7 @@ use crate::error::Error; use dpp::platform_value::btreemap_extensions::BTreeValueMapHelper; use dpp::platform_value::Value; -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; use dpp::system_data_contracts::withdrawals_contract; use dpp::version::PlatformVersion; use drive::query::{DriveDocumentQuery, InternalClauses, WhereClause, WhereOperator}; @@ -13,11 +13,11 @@ use dpp::consensus::state::data_trigger::data_trigger_condition_error::DataTrigg use dpp::{document, ProtocolError}; use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::document::DocumentV0Getters; -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_delete_transition_action::v0::DocumentDeleteTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionAccessorsV0; use dpp::system_data_contracts::withdrawals_contract::v1::document_types::withdrawal; use drive::drive::document::query::QueryDocumentsOutcomeV0Methods; -use crate::execution::validation::state_transition::documents_batch::data_triggers::{DataTriggerExecutionContext, DataTriggerExecutionResult}; +use crate::execution::validation::state_transition::batch::data_triggers::{DataTriggerExecutionContext, DataTriggerExecutionResult}; /// Creates a data trigger for handling deletion of withdrawal documents. /// @@ -39,12 +39,7 @@ pub(super) fn delete_withdrawal_data_trigger_v0( context: &DataTriggerExecutionContext<'_>, platform_version: &PlatformVersion, ) -> Result { - let data_contract_fetch_info = document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base", - )))? - .data_contract_fetch_info(); + let data_contract_fetch_info = document_transition.base().data_contract_fetch_info(); let data_contract = &data_contract_fetch_info.contract; let mut result = DataTriggerExecutionResult::default(); @@ -52,12 +47,7 @@ pub(super) fn delete_withdrawal_data_trigger_v0( return Err(Error::Execution(ExecutionError::DataTriggerExecutionError( format!( "the Document Transition {} isn't 'DELETE", - document_transition - .base() - .ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( - "expecting action to have a base" - )))? - .id() + document_transition.base().id() ), ))); }; @@ -141,9 +131,9 @@ mod tests { use dpp::document::serialization_traits::DocumentPlatformConversionMethodsV0; use dpp::document::{Document, DocumentV0Getters}; use dpp::platform_value::platform_value; - use drive::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionV0}; - use drive::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; - use drive::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionV0; + use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionV0}; + use drive::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; + use drive::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionV0; use dpp::system_data_contracts::{load_system_data_contract, SystemDataContract}; use dpp::tests::fixtures::{get_data_contract_fixture, get_withdrawal_document_fixture}; use dpp::version::PlatformVersion; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/identity_contract_nonce/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/identity_contract_nonce/mod.rs similarity index 100% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/identity_contract_nonce/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/identity_contract_nonce/mod.rs diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/identity_contract_nonce/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/identity_contract_nonce/v0/mod.rs similarity index 82% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/identity_contract_nonce/v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/identity_contract_nonce/v0/mod.rs index 1487567a4b..32829c45b7 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/identity_contract_nonce/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/identity_contract_nonce/v0/mod.rs @@ -1,10 +1,9 @@ use crate::error::Error; use dpp::block::block_info::BlockInfo; use dpp::identity::identity_nonce::{validate_identity_nonce_update, validate_new_identity_nonce}; -use dpp::state_transition::documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; -use dpp::state_transition::documents_batch_transition::document_transition::DocumentTransitionV0Methods; +use dpp::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; +use dpp::state_transition::batch_transition::BatchTransition; use dpp::state_transition::StateTransitionLike; use dpp::validation::SimpleConsensusValidationResult; @@ -17,7 +16,7 @@ use crate::platform_types::platform::PlatformStateRef; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; -pub(in crate::execution::validation::state_transition::state_transitions::documents_batch) trait DocumentsBatchStateTransitionIdentityContractNonceV0 +pub(in crate::execution::validation::state_transition::state_transitions::batch) trait DocumentsBatchStateTransitionIdentityContractNonceV0 { fn validate_identity_contract_nonces_v0( &self, @@ -29,7 +28,7 @@ pub(in crate::execution::validation::state_transition::state_transitions::docume ) -> Result; } -impl DocumentsBatchStateTransitionIdentityContractNonceV0 for DocumentsBatchTransition { +impl DocumentsBatchStateTransitionIdentityContractNonceV0 for BatchTransition { fn validate_identity_contract_nonces_v0( &self, platform: &PlatformStateRef, @@ -39,7 +38,7 @@ impl DocumentsBatchStateTransitionIdentityContractNonceV0 for DocumentsBatchTran platform_version: &PlatformVersion, ) -> Result { // We should validate that all newly created documents have valid ids - for transition in self.transitions() { + for transition in self.transitions_iter() { let revision_nonce = transition.identity_contract_nonce(); let identity_id = self.owner_id(); let (existing_nonce, fee) = platform.drive.fetch_identity_contract_nonce_with_fees( diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/is_allowed/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/is_allowed/mod.rs similarity index 86% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/is_allowed/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/is_allowed/mod.rs index 8ff239d954..0e594bc589 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/is_allowed/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/is_allowed/mod.rs @@ -2,19 +2,19 @@ use crate::error::execution::ExecutionError; use crate::error::Error; use crate::execution::validation::state_transition::processor::v0::StateTransitionIsAllowedValidationV0; use crate::platform_types::platform::PlatformRef; -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; +use dpp::state_transition::batch_transition::BatchTransition; use dpp::validation::ConsensusValidationResult; use dpp::version::PlatformVersion; mod v0; -impl StateTransitionIsAllowedValidationV0 for DocumentsBatchTransition { +impl StateTransitionIsAllowedValidationV0 for BatchTransition { fn has_is_allowed_validation(&self, platform_version: &PlatformVersion) -> Result { match platform_version .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .is_allowed { 0 => Ok(true), @@ -36,7 +36,7 @@ impl StateTransitionIsAllowedValidationV0 for DocumentsBatchTransition { .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .is_allowed { 0 => Ok(v0::validate_is_allowed_v0(self, platform)), 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/batch/is_allowed/v0/mod.rs similarity index 75% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/is_allowed/v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/is_allowed/v0/mod.rs index a98801ee70..82f7855f1c 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/batch/is_allowed/v0/mod.rs @@ -2,9 +2,10 @@ use crate::platform_types::platform::PlatformRef; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use dpp::block::epoch::EpochIndex; use dpp::consensus::basic::document::ContestedDocumentsTemporarilyNotAllowedError; -use dpp::state_transition::documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; -use dpp::state_transition::documents_batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; +use dpp::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use dpp::state_transition::batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; +use dpp::state_transition::batch_transition::resolvers::v0::BatchTransitionResolversV0; +use dpp::state_transition::batch_transition::BatchTransition; use dpp::validation::ConsensusValidationResult; // TARGET_EPOCH_INDEX was introduced without versioning. @@ -15,7 +16,7 @@ pub const TARGET_EPOCH_INDEX: EpochIndex = 4; #[inline(always)] pub fn validate_is_allowed_v0( - state_transition: &DocumentsBatchTransition, + state_transition: &BatchTransition, platform: &PlatformRef, ) -> ConsensusValidationResult<()> { #[cfg(feature = "testing-config")] @@ -33,7 +34,7 @@ pub fn validate_is_allowed_v0( return ConsensusValidationResult::new(); } - let is_contested = state_transition.transitions().iter().any(|transition| { + let is_contested = state_transition.transitions_iter().any(|transition| { transition .as_transition_create() .and_then(|create| create.prefunded_voting_balance().as_ref()) 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/batch/mod.rs similarity index 66% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/mod.rs index e5ee8b9919..83ac4eb0f6 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/batch/mod.rs @@ -11,7 +11,7 @@ use dpp::block::block_info::BlockInfo; use dpp::dashcore::Network; use dpp::identity::PartialIdentity; use dpp::prelude::*; -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; +use dpp::state_transition::batch_transition::BatchTransition; use dpp::validation::SimpleConsensusValidationResult; use dpp::version::PlatformVersion; use drive::state_transition_action::StateTransitionAction; @@ -25,9 +25,9 @@ use crate::execution::types::state_transition_execution_context::StateTransition use crate::platform_types::platform::{PlatformRef, PlatformStateRef}; use crate::rpc::core::CoreRPCLike; -use crate::execution::validation::state_transition::documents_batch::advanced_structure::v0::DocumentsBatchStateTransitionStructureValidationV0; -use crate::execution::validation::state_transition::documents_batch::identity_contract_nonce::v0::DocumentsBatchStateTransitionIdentityContractNonceV0; -use crate::execution::validation::state_transition::documents_batch::state::v0::DocumentsBatchStateTransitionStateValidationV0; +use crate::execution::validation::state_transition::batch::advanced_structure::v0::DocumentsBatchStateTransitionStructureValidationV0; +use crate::execution::validation::state_transition::batch::identity_contract_nonce::v0::DocumentsBatchStateTransitionIdentityContractNonceV0; +use crate::execution::validation::state_transition::batch::state::v0::DocumentsBatchStateTransitionStateValidationV0; use crate::execution::validation::state_transition::processor::v0::{ StateTransitionBasicStructureValidationV0, StateTransitionNonceValidationV0, @@ -38,8 +38,8 @@ use crate::execution::validation::state_transition::ValidationMode; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; impl ValidationMode { - /// Returns a bool on whether we should validate that documents are valid against the state - pub fn should_validate_document_valid_against_state(&self) -> bool { + /// Returns a bool on whether we should validate that batched transitions are valid against the state + pub fn should_validate_batch_valid_against_state(&self) -> bool { match self { ValidationMode::CheckTx => false, ValidationMode::RecheckTx => false, @@ -49,7 +49,7 @@ impl ValidationMode { } } -impl StateTransitionActionTransformerV0 for DocumentsBatchTransition { +impl StateTransitionActionTransformerV0 for BatchTransition { fn transform_into_action( &self, platform: &PlatformRef, @@ -64,7 +64,7 @@ impl StateTransitionActionTransformerV0 for DocumentsBatchTransition { .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .transform_into_action { 0 => self.transform_into_action_v0(&platform.into(), block_info, validation_mode, tx), @@ -77,7 +77,7 @@ impl StateTransitionActionTransformerV0 for DocumentsBatchTransition { } } -impl StateTransitionBasicStructureValidationV0 for DocumentsBatchTransition { +impl StateTransitionBasicStructureValidationV0 for BatchTransition { fn validate_basic_structure( &self, platform_version: &PlatformVersion, @@ -86,7 +86,7 @@ impl StateTransitionBasicStructureValidationV0 for DocumentsBatchTransition { .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .basic_structure { 0 => { @@ -103,7 +103,7 @@ impl StateTransitionBasicStructureValidationV0 for DocumentsBatchTransition { } } -impl StateTransitionNonceValidationV0 for DocumentsBatchTransition { +impl StateTransitionNonceValidationV0 for BatchTransition { fn validate_nonces( &self, platform: &PlatformStateRef, @@ -116,7 +116,7 @@ impl StateTransitionNonceValidationV0 for DocumentsBatchTransition { .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .revision { 0 => self.validate_identity_contract_nonces_v0( @@ -135,7 +135,7 @@ impl StateTransitionNonceValidationV0 for DocumentsBatchTransition { } } -impl StateTransitionStructureKnownInStateValidationV0 for DocumentsBatchTransition { +impl StateTransitionStructureKnownInStateValidationV0 for BatchTransition { fn validate_advanced_structure_from_state( &self, block_info: &BlockInfo, @@ -149,7 +149,7 @@ impl StateTransitionStructureKnownInStateValidationV0 for DocumentsBatchTransiti .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .advanced_structure { 0 => { @@ -157,8 +157,7 @@ impl StateTransitionStructureKnownInStateValidationV0 for DocumentsBatchTransiti identity.ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( "The identity must be known on advanced structure validation", )))?; - let StateTransitionAction::DocumentsBatchAction(documents_batch_transition_action) = - action + let StateTransitionAction::BatchAction(documents_batch_transition_action) = action else { return Err(Error::Execution(ExecutionError::CorruptedCodeExecution( "action must be a documents batch transition action", @@ -190,7 +189,7 @@ impl StateTransitionStructureKnownInStateValidationV0 for DocumentsBatchTransiti } } -impl StateTransitionStateValidationV0 for DocumentsBatchTransition { +impl StateTransitionStateValidationV0 for BatchTransition { fn validate_state( &self, action: Option, @@ -206,7 +205,7 @@ impl StateTransitionStateValidationV0 for DocumentsBatchTransition { .drive_abci .validation_and_processing .state_transitions - .documents_batch_state_transition + .batch_state_transition .state { 0 => { @@ -214,8 +213,7 @@ impl StateTransitionStateValidationV0 for DocumentsBatchTransition { action.ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution( "documents batch structure validation should have an action", )))?; - let StateTransitionAction::DocumentsBatchAction(documents_batch_transition_action) = - action + let StateTransitionAction::BatchAction(documents_batch_transition_action) = action else { return Err(Error::Execution(ExecutionError::CorruptedCodeExecution( "action must be a documents batch transition action", @@ -245,7 +243,11 @@ mod tests { use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::state_transitions_processing_result::StateTransitionExecutionResult; use crate::test::helpers::setup::TestPlatformBuilder; + use assert_matches::assert_matches; use dpp::block::block_info::BlockInfo; + use dpp::consensus::basic::BasicError; + use dpp::consensus::state::state_error::StateError; + use dpp::consensus::ConsensusError; use dpp::dash_to_credits; use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; @@ -257,13 +259,14 @@ mod tests { use dpp::document::{DocumentV0Getters, DocumentV0Setters}; use dpp::fee::fee_result::BalanceChange; use dpp::fee::Credits; + use dpp::identifier::Identifier; use dpp::identity::accessors::IdentityGettersV0; use dpp::nft::TradeMode; use dpp::platform_value::btreemap_extensions::BTreeValueMapHelper; use dpp::platform_value::{Bytes32, Value}; use dpp::serialization::PlatformSerializable; - use dpp::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; - use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; + use dpp::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; + use dpp::state_transition::batch_transition::BatchTransition; use dpp::tests::json_document::json_document_to_contract; use drive::drive::document::query::QueryDocumentsOutcomeV0Methods; use drive::drive::document::query::QueryDocumentsWithFlagsOutcomeV0Methods; @@ -271,10 +274,10 @@ mod tests { use drive::util::storage_flags::StorageFlags; use platform_version::version::PlatformVersion; use rand::prelude::StdRng; + use rand::Rng; use rand::SeedableRng; mod creation_tests { - use rand::Rng; use dapi_grpc::platform::v0::{get_contested_resource_vote_state_request, get_contested_resource_vote_state_response, GetContestedResourceVoteStateRequest, GetContestedResourceVoteStateResponse}; use dapi_grpc::platform::v0::get_contested_resource_vote_state_request::get_contested_resource_vote_state_request_v0::ResultType; use dapi_grpc::platform::v0::get_contested_resource_vote_state_request::GetContestedResourceVoteStateRequestV0; @@ -306,10 +309,11 @@ mod tests { use dpp::consensus::state::state_error::StateError; use dpp::dashcore::Network; use dpp::dashcore::Network::Testnet; + use dpp::data_contract::DataContract; use dpp::identity::SecurityLevel; - use dpp::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; - use dpp::state_transition::documents_batch_transition::document_create_transition::DocumentCreateTransitionV0; - use dpp::state_transition::documents_batch_transition::{DocumentCreateTransition, DocumentsBatchTransitionV0}; + use dpp::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; + use dpp::state_transition::batch_transition::document_create_transition::DocumentCreateTransitionV0; + use dpp::state_transition::batch_transition::{DocumentCreateTransition, BatchTransitionV0}; use dpp::state_transition::StateTransition; use crate::config::PlatformConfig; @@ -352,7 +356,7 @@ mod tests { document.set("avatarUrl", "http://test.com/bob.jpg".into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, profile, entropy.0, @@ -438,7 +442,7 @@ mod tests { document.set("avatarUrl", "http://test.com/bob.jpg".into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, profile, entropy.0, @@ -500,7 +504,7 @@ mod tests { document.set("avatarUrl", "http://test.com/coy.jpg".into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, profile, entropy.0, @@ -569,6 +573,9 @@ mod tests { "tests/supporting_files/contract/dashpay/dashpay-contract-no-max-length.json", None, None, + None::, + None, + None, ); let dashpay_contract = dashpay_contract_no_max_length.clone(); @@ -605,7 +612,7 @@ mod tests { ); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, profile, entropy.0, @@ -785,7 +792,7 @@ mod tests { document_2.set("preorderSalt", salt_2.into()); let documents_batch_create_preorder_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_1, preorder, entropy.0, @@ -806,7 +813,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_preorder_transition_2 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_2, preorder, entropy.0, @@ -827,7 +834,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_1, domain, entropy.0, @@ -848,7 +855,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_2 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_2, domain, entropy.0, @@ -1208,7 +1215,7 @@ mod tests { document_1.set("preorderSalt", salt_1.into()); let documents_batch_create_preorder_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_1, preorder, entropy.0, @@ -1244,15 +1251,14 @@ mod tests { prefunded_voting_balance: None, } .into(); - let documents_batch_inner_create_transition_1: DocumentsBatchTransition = - DocumentsBatchTransitionV0 { - owner_id, - transitions: vec![create_transition.into()], - user_fee_increase: 0, - signature_public_key_id: 0, - signature: Default::default(), - } - .into(); + let documents_batch_inner_create_transition_1: BatchTransition = BatchTransitionV0 { + owner_id, + transitions: vec![create_transition.into()], + user_fee_increase: 0, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); let mut documents_batch_create_transition_1: StateTransition = documents_batch_inner_create_transition_1.into(); documents_batch_create_transition_1 @@ -1486,7 +1492,7 @@ mod tests { document_1.set("preorderSalt", salt_1.into()); let documents_batch_create_preorder_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_1, preorder, entropy.0, @@ -1521,15 +1527,14 @@ mod tests { prefunded_voting_balance: None, } .into(); - let documents_batch_inner_create_transition_1: DocumentsBatchTransition = - DocumentsBatchTransitionV0 { - owner_id, - transitions: vec![create_transition.into()], - user_fee_increase: 0, - signature_public_key_id: 0, - signature: Default::default(), - } - .into(); + let documents_batch_inner_create_transition_1: BatchTransition = BatchTransitionV0 { + owner_id, + transitions: vec![create_transition.into()], + user_fee_increase: 0, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); let mut documents_batch_create_transition_1: StateTransition = documents_batch_inner_create_transition_1.into(); documents_batch_create_transition_1 @@ -1838,7 +1843,7 @@ mod tests { document_3_on_identity_1.set("preorderSalt", salt_3.into()); let documents_batch_create_preorder_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_1, preorder, entropy.0, @@ -1859,7 +1864,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_preorder_transition_2 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_2, preorder, entropy.0, @@ -1880,7 +1885,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_preorder_transition_3 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_3_on_identity_1, preorder, new_entropy.0, @@ -1901,7 +1906,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_1, domain, entropy.0, @@ -1922,7 +1927,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_2 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_2, domain, entropy.0, @@ -1943,7 +1948,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_3 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_3_on_identity_1, domain, entropy.0, @@ -2383,7 +2388,7 @@ mod tests { )); let documents_batch_create_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_1, domain, different_entropy.0, @@ -2616,7 +2621,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -2678,7 +2683,7 @@ mod tests { document.set("defense", 2.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -2787,7 +2792,7 @@ mod tests { altered_document.set("avatarUrl", "http://test.com/cat.jpg".into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, profile, entropy.0, @@ -2831,7 +2836,7 @@ mod tests { .expect("expected to commit transaction"); let documents_batch_update_transition = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( altered_document, profile, &key, @@ -2877,7 +2882,7 @@ mod tests { assert_eq!(processing_result.valid_count(), 1); - assert_eq!(processing_result.aggregated_fees().processing_fee, 1341740); + assert_eq!(processing_result.aggregated_fees().processing_fee, 1443820); let issues = platform .drive @@ -2939,7 +2944,7 @@ mod tests { document.set("avatarUrl", "http://test.com/bob.jpg".into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), profile, entropy.0, @@ -2996,7 +3001,7 @@ mod tests { ); //less than a week let documents_batch_update_transition = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( document.clone(), profile, &key, @@ -3286,7 +3291,7 @@ mod tests { altered_document.set("senderKeyIndex", Value::U32(2)); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, contact_request_document_type, entropy.0, @@ -3330,7 +3335,7 @@ mod tests { .expect("expected to commit transaction"); let documents_batch_update_transition = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( altered_document, contact_request_document_type, &key, @@ -3416,7 +3421,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -3512,7 +3517,7 @@ mod tests { document.set("defense", 0.into()); let documents_batch_transfer_transition = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( document, card_document_type, &key, @@ -3620,7 +3625,7 @@ mod tests { altered_document.set("avatarUrl", "http://test.com/cat.jpg".into()); let documents_batch_update_transition = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( altered_document, profile, &key, @@ -3722,7 +3727,7 @@ mod tests { altered_document_2.set("avatarUrl", "http://test.com/drapes.jpg".into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, profile, entropy.0, @@ -3787,7 +3792,7 @@ mod tests { assert_eq!(document.to_string(), "v0 : id:GcviwUsEr9Ji4rCrnnsgmVAghNaVPDumsfcagvBbBy45 owner_id:CisQdz2ej7EwWv8JbetSXBNsV4xsf8QsSS8tqp4tEf7V created_at:1970-01-14 21:20:00 updated_at:1970-01-14 21:20:00 avatarFingerprint:bytes d7b0e2b357c10312 avatarHash:bytes32 YonaRoE0hMgat53AYt5LTlQlIkKLReGpB7xNAqJ5HM8= avatarUrl:string http://test.com/bob.[...(23)] displayName:string QBwBNNXXYCngB0er publicMessage:string 8XG7KBGNvm2 "); let documents_batch_update_transition_1 = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( altered_document, profile, &key, @@ -3807,7 +3812,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_update_transition_2 = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( altered_document_2, profile, &key, @@ -3940,7 +3945,7 @@ mod tests { altered_document_2.set("avatarUrl", "http://test.com/drapes.jpg".into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, profile, entropy.0, @@ -4009,7 +4014,7 @@ mod tests { let platform_state = platform.state.load(); let documents_batch_update_transition_1 = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( altered_document, profile, &key, @@ -4029,7 +4034,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_update_transition_2 = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( altered_document_2, profile, &key, @@ -4199,7 +4204,7 @@ mod tests { altered_document_2.increment_revision().unwrap(); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, profile, entropy.0, @@ -4268,7 +4273,7 @@ mod tests { let platform_state = platform.state.load(); let documents_batch_update_transition_1 = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( altered_document, profile, &key, @@ -4288,7 +4293,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_update_transition_2 = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( altered_document_2, profile, &key, @@ -4462,7 +4467,7 @@ mod tests { altered_document_2.set("avatarUrl", "http://test.com/drapes.jpg".into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, profile, entropy.0, @@ -4531,7 +4536,7 @@ mod tests { let platform_state = platform.state.load(); let documents_batch_update_transition_1 = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( altered_document, profile, &key, @@ -4551,7 +4556,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_update_transition_2 = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( altered_document_2, profile, &key, @@ -4723,7 +4728,7 @@ mod tests { altered_document.set("avatarUrl", "http://test.com/cat.jpg".into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, profile, entropy.0, @@ -4767,7 +4772,7 @@ mod tests { .expect("expected to commit transaction"); let documents_batch_deletion_transition = - DocumentsBatchTransition::new_document_deletion_transition_from_document( + BatchTransition::new_document_deletion_transition_from_document( altered_document, profile, &key, @@ -4813,7 +4818,7 @@ mod tests { assert_eq!(processing_result.valid_count(), 1); - assert_eq!(processing_result.aggregated_fees().processing_fee, 1609340); + assert_eq!(processing_result.aggregated_fees().processing_fee, 1711420); let issues = platform .drive @@ -4904,7 +4909,7 @@ mod tests { altered_document.set("senderKeyIndex", Value::U32(2)); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, contact_request_document_type, entropy.0, @@ -4948,7 +4953,7 @@ mod tests { .expect("expected to commit transaction"); let documents_batch_deletion_transition = - DocumentsBatchTransition::new_document_deletion_transition_from_document( + BatchTransition::new_document_deletion_transition_from_document( altered_document, contact_request_document_type, &key, @@ -5069,7 +5074,7 @@ mod tests { altered_document.set("senderKeyIndex", Value::U32(2)); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, contact_request_document_type, entropy.0, @@ -5113,7 +5118,7 @@ mod tests { .expect("expected to commit transaction"); let documents_batch_deletion_transition = - DocumentsBatchTransition::new_document_deletion_transition_from_document( + BatchTransition::new_document_deletion_transition_from_document( altered_document, contact_request_document_type, &key, @@ -5234,7 +5239,7 @@ mod tests { altered_document.set("senderKeyIndex", Value::U32(2)); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document, contact_request_document_type, entropy.0, @@ -5278,7 +5283,7 @@ mod tests { .expect("expected to commit transaction"); let documents_batch_deletion_transition = - DocumentsBatchTransition::new_document_deletion_transition_from_document( + BatchTransition::new_document_deletion_transition_from_document( altered_document, contact_request_document_type, &key, @@ -5371,7 +5376,7 @@ mod tests { altered_document.set("avatarUrl", "http://test.com/cat.jpg".into()); let documents_batch_delete_transition = - DocumentsBatchTransition::new_document_deletion_transition_from_document( + BatchTransition::new_document_deletion_transition_from_document( altered_document, profile, &key, @@ -5484,7 +5489,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -5530,7 +5535,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_transfer_transition = - DocumentsBatchTransition::new_document_transfer_transition_from_document( + BatchTransition::new_document_transfer_transition_from_document( document, card_document_type, receiver.id(), @@ -5639,7 +5644,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -5732,7 +5737,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_transfer_transition = - DocumentsBatchTransition::new_document_transfer_transition_from_document( + BatchTransition::new_document_transfer_transition_from_document( document, card_document_type, receiver.id(), @@ -5864,7 +5869,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -5957,7 +5962,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_transfer_transition = - DocumentsBatchTransition::new_document_transfer_transition_from_document( + BatchTransition::new_document_transfer_transition_from_document( document, card_document_type, receiver.id(), @@ -6109,7 +6114,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_transfer_transition = - DocumentsBatchTransition::new_document_transfer_transition_from_document( + BatchTransition::new_document_transfer_transition_from_document( document, card_document_type, receiver.id(), @@ -6215,7 +6220,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -6308,7 +6313,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_transfer_transition = - DocumentsBatchTransition::new_document_transfer_transition_from_document( + BatchTransition::new_document_transfer_transition_from_document( document.clone(), card_document_type, receiver.id(), @@ -6378,7 +6383,7 @@ mod tests { document.set_owner_id(receiver.id()); let documents_batch_deletion_transition = - DocumentsBatchTransition::new_document_deletion_transition_from_document( + BatchTransition::new_document_deletion_transition_from_document( document, card_document_type, &recipient_key, @@ -6486,7 +6491,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -6556,7 +6561,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_update_price_transition = - DocumentsBatchTransition::new_document_update_price_transition_from_document( + BatchTransition::new_document_update_price_transition_from_document( document.clone(), card_document_type, dash_to_credits!(0.1), @@ -6646,7 +6651,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -6739,7 +6744,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_update_price_transition = - DocumentsBatchTransition::new_document_update_price_transition_from_document( + BatchTransition::new_document_update_price_transition_from_document( document.clone(), card_document_type, dash_to_credits!(0.1), @@ -6866,7 +6871,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -6985,7 +6990,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_update_price_transition = - DocumentsBatchTransition::new_document_update_price_transition_from_document( + BatchTransition::new_document_update_price_transition_from_document( document.clone(), card_document_type, dash_to_credits!(0.1), @@ -7100,7 +7105,7 @@ mod tests { document.set_revision(Some(3)); let documents_batch_purchase_transition = - DocumentsBatchTransition::new_document_purchase_transition_from_document( + BatchTransition::new_document_purchase_transition_from_document( document.clone(), card_document_type, purchaser.id(), @@ -7262,7 +7267,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -7386,7 +7391,7 @@ mod tests { document.bump_revision(); let documents_batch_update_transition = - DocumentsBatchTransition::new_document_replacement_transition_from_document( + BatchTransition::new_document_replacement_transition_from_document( document.clone(), card_document_type, &key, @@ -7480,7 +7485,7 @@ mod tests { document.bump_revision(); let documents_batch_update_price_transition = - DocumentsBatchTransition::new_document_update_price_transition_from_document( + BatchTransition::new_document_update_price_transition_from_document( document.clone(), card_document_type, dash_to_credits!(0.1), @@ -7612,7 +7617,7 @@ mod tests { document.bump_revision(); let documents_batch_purchase_transition = - DocumentsBatchTransition::new_document_purchase_transition_from_document( + BatchTransition::new_document_purchase_transition_from_document( document.clone(), card_document_type, purchaser.id(), @@ -7773,7 +7778,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -7896,7 +7901,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_update_price_transition = - DocumentsBatchTransition::new_document_update_price_transition_from_document( + BatchTransition::new_document_update_price_transition_from_document( document.clone(), card_document_type, dash_to_credits!(0.1), @@ -8013,7 +8018,7 @@ mod tests { document.set_revision(Some(3)); let documents_batch_purchase_transition = - DocumentsBatchTransition::new_document_purchase_transition_from_document( + BatchTransition::new_document_purchase_transition_from_document( document.clone(), card_document_type, purchaser.id(), @@ -8159,7 +8164,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -8205,7 +8210,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_update_price_transition = - DocumentsBatchTransition::new_document_update_price_transition_from_document( + BatchTransition::new_document_update_price_transition_from_document( document.clone(), card_document_type, dash_to_credits!(0.5), @@ -8254,7 +8259,7 @@ mod tests { document.set_revision(Some(3)); let documents_batch_purchase_transition = - DocumentsBatchTransition::new_document_purchase_transition_from_document( + BatchTransition::new_document_purchase_transition_from_document( document.clone(), card_document_type, purchaser.id(), @@ -8353,7 +8358,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -8399,7 +8404,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_update_price_transition = - DocumentsBatchTransition::new_document_update_price_transition_from_document( + BatchTransition::new_document_update_price_transition_from_document( document.clone(), card_document_type, dash_to_credits!(0.1), @@ -8448,7 +8453,7 @@ mod tests { document.set_revision(Some(3)); let documents_batch_purchase_transition = - DocumentsBatchTransition::new_document_purchase_transition_from_document( + BatchTransition::new_document_purchase_transition_from_document( document.clone(), card_document_type, identity.id(), @@ -8552,7 +8557,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -8598,7 +8603,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_update_price_transition = - DocumentsBatchTransition::new_document_update_price_transition_from_document( + BatchTransition::new_document_update_price_transition_from_document( document.clone(), card_document_type, dash_to_credits!(0.1), @@ -8647,7 +8652,7 @@ mod tests { document.set_revision(Some(3)); let documents_batch_purchase_transition = - DocumentsBatchTransition::new_document_purchase_transition_from_document( + BatchTransition::new_document_purchase_transition_from_document( document.clone(), card_document_type, purchaser.id(), @@ -8759,7 +8764,7 @@ mod tests { document.set_revision(Some(4)); let documents_batch_purchase_transition = - DocumentsBatchTransition::new_document_purchase_transition_from_document( + BatchTransition::new_document_purchase_transition_from_document( document.clone(), card_document_type, identity.id(), @@ -8857,7 +8862,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -8950,7 +8955,7 @@ mod tests { document.set_revision(Some(2)); let documents_batch_update_price_transition = - DocumentsBatchTransition::new_document_update_price_transition_from_document( + BatchTransition::new_document_update_price_transition_from_document( document.clone(), card_document_type, dash_to_credits!(0.1), @@ -9043,7 +9048,7 @@ mod tests { document.set_revision(Some(3)); let documents_batch_purchase_transition = - DocumentsBatchTransition::new_document_purchase_transition_from_document( + BatchTransition::new_document_purchase_transition_from_document( document.clone(), card_document_type, receiver.id(), @@ -9137,7 +9142,7 @@ mod tests { document.set("defense", 7.into()); let documents_batch_create_transition = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document.clone(), card_document_type, entropy.0, @@ -9185,7 +9190,7 @@ mod tests { document.set_owner_id(other_identity.id()); // we do this to trick the system let documents_batch_update_price_transition = - DocumentsBatchTransition::new_document_update_price_transition_from_document( + BatchTransition::new_document_update_price_transition_from_document( document.clone(), card_document_type, dash_to_credits!(0.1), @@ -9272,15 +9277,15 @@ mod tests { use dpp::data_contract::document_type::random_document::{ DocumentFieldFillSize, DocumentFieldFillType, }; + use dpp::data_contract::DataContract; use dpp::platform_value::Bytes32; - use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; + use dpp::state_transition::batch_transition::BatchTransition; use dpp::util::hash::hash_double; use drive::query::{InternalClauses, OrderClause, WhereClause, WhereOperator}; use drive::util::test_helpers::setup_contract; use indexmap::IndexMap; use platform_version::version::PlatformVersion; use rand::prelude::StdRng; - use rand::Rng; use std::collections::BTreeMap; #[test] @@ -9309,6 +9314,9 @@ mod tests { "tests/supporting_files/contract/dashpay/dashpay-contract-all-mutable.json", None, None, + None::, + None, + None, ); let card_game = setup_contract( @@ -9316,6 +9324,9 @@ mod tests { "tests/supporting_files/contract/crypto-card-game/crypto-card-game-direct-purchase.json", None, None, + None::, + None, + None, ); let dpns_contract = setup_contract( @@ -9323,6 +9334,9 @@ mod tests { "tests/supporting_files/contract/dpns/dpns-contract-contested-unique-index-with-contract-id.json", None, None, + None::, + None, + None, ); let preorder = dpns_contract @@ -9462,7 +9476,7 @@ mod tests { document_3.set("preorderSalt", salt_3.into()); let documents_batch_create_preorder_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_1, preorder, entropy.0, @@ -9483,7 +9497,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_preorder_transition_2 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_2, preorder, entropy.0, @@ -9504,7 +9518,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_preorder_transition_3 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_3, preorder, entropy.0, @@ -9525,7 +9539,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_1, domain, entropy.0, @@ -9546,7 +9560,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_2 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_2, domain, entropy.0, @@ -9567,7 +9581,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_3 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_3.clone(), domain, entropy.0, @@ -9758,6 +9772,9 @@ mod tests { "tests/supporting_files/contract/dashpay/dashpay-contract-all-mutable.json", None, None, + None::, + None, + None, ); let card_game = setup_contract( @@ -9765,6 +9782,9 @@ mod tests { "tests/supporting_files/contract/crypto-card-game/crypto-card-game-direct-purchase.json", None, None, + None::, + None, + None, ); let dpns_contract = setup_contract( @@ -9772,6 +9792,9 @@ mod tests { "tests/supporting_files/contract/dpns/dpns-contract-contested-unique-index-with-contract-id-null-searchable-true.json", None, None, + None::, + None, + None, ); let preorder = dpns_contract @@ -9911,7 +9934,7 @@ mod tests { document_3.set("preorderSalt", salt_3.into()); let documents_batch_create_preorder_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_1, preorder, entropy.0, @@ -9932,7 +9955,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_preorder_transition_2 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_2, preorder, entropy.0, @@ -9953,7 +9976,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_preorder_transition_3 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_3, preorder, entropy.0, @@ -9974,7 +9997,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_1, domain, entropy.0, @@ -9995,7 +10018,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_2 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_2, domain, entropy.0, @@ -10016,7 +10039,7 @@ mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_3 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_3.clone(), domain, entropy.0, @@ -10167,4 +10190,4238 @@ mod tests { assert_eq!(documents.len(), 2); } } + + mod token_tests { + use super::*; + use crate::execution::validation::state_transition::tests::create_token_contract_with_owner_identity; + use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Setters; + use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; + use dpp::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; + use dpp::data_contract::change_control_rules::v0::ChangeControlRulesV0; + use dpp::data_contract::change_control_rules::ChangeControlRules; + use dpp::state_transition::batch_transition::methods::v1::DocumentsBatchTransitionMethodsV1; + mod token_mint_tests { + use super::*; + + mod token_mint_tests_normal_scenarios { + use super::*; + + #[test] + fn test_token_mint_by_owner_allowed_sending_to_self() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + None::, + None, + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + None, + &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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(101337)); + } + + #[test] + fn test_token_mint_by_owner_allowed_sending_to_other() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (receiver, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + None::, + None, + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(receiver.id()), + None, + None, + &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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + receiver.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(1337)); + } + + #[test] + fn test_token_mint_sending_to_non_existing_identity_causes_error() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let receiver = Identifier::random_with_rng(&mut rng); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + None::, + None, + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(receiver), + None, + None, + &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::PaidConsensusError( + ConsensusError::StateError( + StateError::RecipientIdentityDoesNotExistError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + receiver.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_token_mint_by_owner_no_destination_causes_error() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + None::, + None, + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + None, + None, + None, + &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::PaidConsensusError( + ConsensusError::BasicError( + BasicError::DestinationIdentityForTokenMintingNotSetError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + } + } + + mod token_mint_tests_no_recipient_minting { + use super::*; + + #[test] + fn test_token_mint_by_owned_id_allowed_sending_to_self() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_minting_allow_choosing_destination(false); + }), + None, + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + None, + &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::PaidConsensusError( + ConsensusError::BasicError( + BasicError::ChoosingTokenMintRecipientNotAllowedError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + } + + #[test] + fn test_token_mint_by_owned_id_allowed_sending_to_other() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (receiver, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_minting_allow_choosing_destination(false); + }), + None, + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(receiver.id()), + None, + None, + &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::PaidConsensusError( + ConsensusError::BasicError( + BasicError::ChoosingTokenMintRecipientNotAllowedError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + receiver.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_token_mint_by_owned_id_no_destination_causes_error() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_minting_allow_choosing_destination(false); + }), + None, + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + None, + None, + None, + &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::PaidConsensusError( + ConsensusError::BasicError( + BasicError::DestinationIdentityForTokenMintingNotSetError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + } + } + + mod token_mint_tests_contract_has_recipient { + use super::*; + + #[test] + fn test_token_mint_by_owned_id_allowed_sending_to_self() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_minting_allow_choosing_destination(false); + token_configuration + .set_new_tokens_destination_identity(Some(identity.id())); + }), + None, + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + None, + &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::PaidConsensusError( + ConsensusError::BasicError( + BasicError::ChoosingTokenMintRecipientNotAllowedError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + } + + #[test] + fn test_token_mint_by_owned_id_allowed_sending_to_other() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (receiver, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_minting_allow_choosing_destination(false); + token_configuration + .set_new_tokens_destination_identity(Some(identity.id())); + }), + None, + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(receiver.id()), + None, + None, + &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::PaidConsensusError( + ConsensusError::BasicError( + BasicError::ChoosingTokenMintRecipientNotAllowedError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + receiver.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_token_mint_by_owned_id_no_set_destination_should_use_contracts() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_minting_allow_choosing_destination(false); + token_configuration + .set_new_tokens_destination_identity(Some(identity.id())); + }), + None, + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + None, + None, + None, + &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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(101337)); + } + } + + mod token_mint_tests_authorization_scenarios { + use super::*; + use dpp::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; + use dpp::data_contract::change_control_rules::v0::ChangeControlRulesV0; + use dpp::data_contract::change_control_rules::ChangeControlRules; + use dpp::data_contract::group::v0::GroupV0; + use dpp::data_contract::group::Group; + use dpp::group::{GroupStateTransitionInfo, GroupStateTransitionInfoStatus}; + use dpp::state_transition::batch_transition::TokenMintTransition; + + #[test] + fn test_token_mint_by_owner_sending_to_self_minting_not_allowed() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::NoOne, + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: + false, + }, + )); + }), + None, + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + None, + &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::PaidConsensusError( + ConsensusError::StateError(StateError::UnauthorizedTokenActionError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + } + + #[test] + fn test_token_mint_by_owner_sending_to_self_minting_only_allowed_by_group() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_2, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: + false, + }, + )); + }), + Some( + [( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 5), (identity_2.id(), 5)].into(), + required_power: 10, + }), + )] + .into(), + ), + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + None, + &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::PaidConsensusError( + ConsensusError::StateError(StateError::UnauthorizedTokenActionError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + } + + #[test] + fn test_token_mint_by_owner_sending_to_self_minting_only_allowed_by_group_enough_member_power( + ) { + // We are using a group, but our member alone has enough power in the group to do the action + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_2, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: + false, + }, + )); + }), + Some( + [( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 5), (identity_2.id(), 1)].into(), + required_power: 5, + }), + )] + .into(), + ), + platform_version, + ); + + let documents_batch_create_transition = + BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + None, + &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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(101337)); + } + + #[test] + fn test_token_mint_by_owner_requires_group_other_member() { + // We are using a group, and two members need to sign for the event to happen + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_2, signer2, key2) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: + false, + }, + )); + }), + Some( + [( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + )] + .into(), + ), + platform_version, + ); + + let token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some(GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer(0)), + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_mint_serialized_transition = token_mint_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![token_mint_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + + // Now we need to get the second identity to also sign it + let action_id = TokenMintTransition::calculate_action_id_with_fields( + token_id.as_bytes(), + identity.id().as_bytes(), + 2, + 1337, + ); + let confirm_token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity_2.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some( + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner( + GroupStateTransitionInfo { + group_contract_position: 0, + action_id, + action_is_proposer: false, + }, + ), + ), + &key2, + 2, + 0, + &signer2, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let confirm_token_mint_serialized_transition = confirm_token_mint_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![confirm_token_mint_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(101337)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity_2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_token_mint_by_owner_requires_group_resubmitting_causes_error() { + // We are using a group, and two members need to sign for the event to happen + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_2, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: + false, + }, + )); + }), + Some( + [( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + )] + .into(), + ), + platform_version, + ); + + let token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some(GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer(0)), + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_mint_serialized_transition = token_mint_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![token_mint_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + + // Now we need to get the second identity to also sign it, but we are going to resubmit with first + // This will create an error + let action_id = TokenMintTransition::calculate_action_id_with_fields( + token_id.as_bytes(), + identity.id().as_bytes(), + 2, + 1337, + ); + let confirm_token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some( + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner( + GroupStateTransitionInfo { + group_contract_position: 0, + action_id, + action_is_proposer: false, + }, + ), + ), + &key, + 3, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let confirm_token_mint_serialized_transition = confirm_token_mint_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![confirm_token_mint_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::GroupActionAlreadySignedByIdentityError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity_2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_token_mint_by_owner_requires_group_other_member_resubmitting_causes_error() + { + // We are using a group, and two members need to sign for the event to happen + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_2, signer2, key2) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_3, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: + false, + }, + )); + }), + Some( + [( + 0, + Group::V0(GroupV0 { + members: [ + (identity.id(), 1), + (identity_2.id(), 1), + (identity_3.id(), 1), + ] + .into(), + required_power: 3, + }), + )] + .into(), + ), + platform_version, + ); + + let token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some(GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer(0)), + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_mint_serialized_transition = token_mint_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![token_mint_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + + // Now we need to get the second identity to also sign it + let action_id = TokenMintTransition::calculate_action_id_with_fields( + token_id.as_bytes(), + identity.id().as_bytes(), + 2, + 1337, + ); + let confirm_token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity_2.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some( + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner( + GroupStateTransitionInfo { + group_contract_position: 0, + action_id, + action_is_proposer: false, + }, + ), + ), + &key2, + 2, + 0, + &signer2, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let confirm_token_mint_serialized_transition = confirm_token_mint_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![confirm_token_mint_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity_2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + + // Now we need to get the second identity to sign it again to cause the error + let confirm_token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity_2.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some( + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner( + GroupStateTransitionInfo { + group_contract_position: 0, + action_id, + action_is_proposer: false, + }, + ), + ), + &key2, + 3, + 0, + &signer2, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let confirm_token_mint_serialized_transition = confirm_token_mint_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![confirm_token_mint_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::GroupActionAlreadySignedByIdentityError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity_2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_token_mint_by_owner_requires_group_other_member_submitting_after_completion_causes_error( + ) { + // We are using a group, and two members need to sign for the event to happen + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_2, signer2, key2) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_3, signer3, key3) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: + false, + }, + )); + }), + Some( + [( + 0, + Group::V0(GroupV0 { + members: [ + (identity.id(), 1), + (identity_2.id(), 1), + (identity_3.id(), 1), + ] + .into(), + required_power: 2, + }), + )] + .into(), + ), + platform_version, + ); + + let token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some(GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer(0)), + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_mint_serialized_transition = token_mint_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![token_mint_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + + // Now we need to get the second identity to also sign it + let action_id = TokenMintTransition::calculate_action_id_with_fields( + token_id.as_bytes(), + identity.id().as_bytes(), + 2, + 1337, + ); + let confirm_token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity_2.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some( + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner( + GroupStateTransitionInfo { + group_contract_position: 0, + action_id, + action_is_proposer: false, + }, + ), + ), + &key2, + 2, + 0, + &signer2, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let confirm_token_mint_serialized_transition = confirm_token_mint_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![confirm_token_mint_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(101337)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity_2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + + // Now we need to get the second identity to sign it again to cause the error + let confirm_token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity_3.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some( + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner( + GroupStateTransitionInfo { + group_contract_position: 0, + action_id, + action_is_proposer: false, + }, + ), + ), + &key3, + 2, + 0, + &signer3, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let confirm_token_mint_serialized_transition = confirm_token_mint_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![confirm_token_mint_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::GroupActionAlreadyCompletedError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(101337)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity_2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_token_mint_by_owner_requires_group_proposer_not_in_group() { + // We are using a group, and two members need to sign for the event to happen + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_2, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_3, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: + false, + }, + )); + }), + Some( + [( + 0, + Group::V0(GroupV0 { + members: [(identity_3.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + )] + .into(), + ), + platform_version, + ); + + let token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some(GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer(0)), + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_mint_serialized_transition = token_mint_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![token_mint_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::IdentityNotMemberOfGroupError( + _ + )), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + } + + #[test] + fn test_token_mint_by_owner_requires_group_other_signer_not_part_of_group() { + // We are using a group, and two members need to sign for the event to happen + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_2, signer2, key2) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_3, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: + false, + }, + )); + }), + Some( + [( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_3.id(), 1)].into(), + required_power: 2, + }), + )] + .into(), + ), + platform_version, + ); + + let token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some(GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer(0)), + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_mint_serialized_transition = token_mint_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![token_mint_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + + // Now we need to get the second identity to also sign it + let action_id = TokenMintTransition::calculate_action_id_with_fields( + token_id.as_bytes(), + identity.id().as_bytes(), + 2, + 1337, + ); + let confirm_token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity_2.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some( + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner( + GroupStateTransitionInfo { + group_contract_position: 0, + action_id, + action_is_proposer: false, + }, + ), + ), + &key2, + 2, + 0, + &signer2, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let confirm_token_mint_serialized_transition = confirm_token_mint_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![confirm_token_mint_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::IdentityNotMemberOfGroupError( + _ + )), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity_2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_token_mint_other_signer_going_first_causes_error() { + // We are using a group, and the second member gets a bit hasty and signs first + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_2, signer2, key2) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: + false, + }, + )); + }), + Some( + [( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + )] + .into(), + ), + platform_version, + ); + + // The second identity to also sign it + let action_id = TokenMintTransition::calculate_action_id_with_fields( + token_id.as_bytes(), + identity.id().as_bytes(), + 2, + 1337, + ); + let confirm_token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity_2.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some( + GroupStateTransitionInfoStatus::GroupStateTransitionInfoOtherSigner( + GroupStateTransitionInfo { + group_contract_position: 0, + action_id, + action_is_proposer: false, + }, + ), + ), + &key2, + 2, + 0, + &signer2, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let confirm_token_mint_serialized_transition = confirm_token_mint_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![confirm_token_mint_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::GroupActionDoesNotExistError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity_2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + } + } + + mod token_burn_tests { + use super::*; + + #[test] + fn test_token_burn() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + None::, + None, + platform_version, + ); + + let documents_batch_create_transition = BatchTransition::new_token_burn_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + None, + None, + &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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + let expected_amount = 100000 - 1337; + assert_eq!(token_balance, Some(expected_amount)); + } + + #[test] + fn test_token_burn_trying_to_burn_more_than_we_have() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + None::, + None, + platform_version, + ); + + let documents_batch_create_transition = BatchTransition::new_token_burn_transition( + token_id, + identity.id(), + contract.id(), + 0, + 200000, + None, + None, + &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::PaidConsensusError( + ConsensusError::StateError( + StateError::IdentityDoesNotHaveEnoughTokenBalanceError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); // nothing was burned + } + + #[test] + fn test_token_burn_gives_error_if_trying_to_burn_from_not_allowed_identity() { + 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(49853); + + let platform_state = platform.state.load(); + + let (contract_owner_identity, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + contract_owner_identity.id(), + None::, + None, + platform_version, + ); + + let documents_batch_create_transition = BatchTransition::new_token_burn_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + None, + None, + &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::PaidConsensusError( + ConsensusError::StateError(StateError::UnauthorizedTokenActionError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + contract_owner_identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + } + + mod token_transfer_tests { + use dpp::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; + use dpp::data_contract::change_control_rules::ChangeControlRules; + use dpp::data_contract::change_control_rules::v0::ChangeControlRulesV0; + use dpp::data_contract::group::Group; + use dpp::state_transition::batch_transition::TokenMintTransition; + use dpp::data_contract::group::v0::GroupV0; + use dpp::group::{GroupStateTransitionInfo, GroupStateTransitionInfoStatus}; + use dpp::identity::SecurityLevel; + use dpp::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; + use dpp::state_transition::batch_transition::batched_transition::token_transition::TokenTransition; + use dpp::state_transition::StateTransition; + use dpp::state_transition::batch_transition::batched_transition::BatchedTransitionMutRef; + use dpp::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; + use dpp::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; + use super::*; + + #[test] + fn test_token_transfer() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (recipient, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + None::, + None, + platform_version, + ); + + let token_transfer_transition = BatchTransition::new_token_transfer_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + recipient.id(), + None, + None, + None, + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_transfer_serialized_transition = token_transfer_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![token_transfer_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + let expected_amount = 100000 - 1337; + assert_eq!(token_balance, Some(expected_amount)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + recipient.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + let expected_amount = 1337; + assert_eq!(token_balance, Some(expected_amount)); + } + + #[test] + fn test_token_transfer_to_ourself_should_fail() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + None::, + None, + platform_version, + ); + + let token_transfer_transition = BatchTransition::new_token_transfer_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + identity.id(), + None, + None, + None, + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_transfer_serialized_transition = token_transfer_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![token_transfer_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::UnpaidConsensusError( + ConsensusError::BasicError(BasicError::TokenTransferToOurselfError(_)) + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(100000)); + } + + #[test] + fn test_token_transfer_trying_to_send_more_than_we_have() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (recipient, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + None::, + None, + platform_version, + ); + + let token_transfer_transition = BatchTransition::new_token_transfer_transition( + token_id, + identity.id(), + contract.id(), + 0, + 200000, + recipient.id(), + None, + None, + None, + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_transfer_serialized_transition = token_transfer_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![token_transfer_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::IdentityDoesNotHaveEnoughTokenBalanceError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + let expected_amount = 100000; + assert_eq!(token_balance, Some(expected_amount)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + recipient.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_token_transfer_adding_group_info_causes_error() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (recipient, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + // let's start by creating a real action + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + }, + )); + }), + Some( + [( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (recipient.id(), 1)].into(), + required_power: 2, + }), + )] + .into(), + ), + platform_version, + ); + + let token_mint_transition = BatchTransition::new_token_mint_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + Some(identity.id()), + None, + Some(GroupStateTransitionInfoStatus::GroupStateTransitionInfoProposer(0)), + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_mint_serialized_transition = token_mint_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![token_mint_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"); + + let action_id = TokenMintTransition::calculate_action_id_with_fields( + token_id.as_bytes(), + identity.id().as_bytes(), + 2, + 1337, + ); + + let mut token_transfer_transition = BatchTransition::new_token_transfer_transition( + token_id, + identity.id(), + contract.id(), + 0, + 200000, + recipient.id(), + None, + None, + None, + &key, + 3, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + // here we add fake info + match &mut token_transfer_transition { + StateTransition::Batch(batch) => { + let first_transition = batch + .first_transition_mut() + .expect("expected_first_transition"); + match first_transition { + BatchedTransitionMutRef::Token(token) => match token { + TokenTransition::Transfer(transfer) => transfer + .base_mut() + .set_using_group_info(Some(GroupStateTransitionInfo { + group_contract_position: 0, + action_id, + action_is_proposer: true, + })), + _ => {} + }, + _ => {} + } + } + _ => {} + } + + token_transfer_transition + .sign_external(&key, &signer, Some(|_, _| Ok(SecurityLevel::HIGH))) + .expect("expected to resign transaction"); + + let token_transfer_serialized_transition = token_transfer_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![token_transfer_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::UnpaidConsensusError( + ConsensusError::BasicError( + BasicError::GroupActionNotAllowedOnTransitionError(_) + ) + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + let expected_amount = 100000; + assert_eq!(token_balance, Some(expected_amount)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + recipient.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + } + + mod token_freeze_tests { + use super::*; + use dpp::tokens::info::v0::IdentityTokenInfoV0Accessors; + + #[test] + fn test_token_freeze() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_2, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_freeze_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::ContractOwner, + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + }, + )); + }), + None, + platform_version, + ); + + let freeze_transition = BatchTransition::new_token_freeze_transition( + token_id, + identity.id(), + contract.id(), + 0, + identity_2.id(), + None, + None, + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let freeze_serialized_transition = freeze_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![freeze_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"); + + let token_frozen = platform + .drive + .fetch_identity_token_info( + token_id.to_buffer(), + identity_2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token info") + .map(|info| info.frozen()); + assert_eq!(token_frozen, Some(true)); + } + + #[test] + fn test_token_freeze_and_unfreeze() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (identity_2, _, _) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_freeze_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::ContractOwner, + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + }, + )); + token_configuration.set_unfreeze_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::ContractOwner, + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + }, + )); + }), + None, + platform_version, + ); + + let freeze_transition = BatchTransition::new_token_freeze_transition( + token_id, + identity.id(), + contract.id(), + 0, + identity_2.id(), + None, + None, + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let freeze_serialized_transition = freeze_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![freeze_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"); + + let token_frozen = platform + .drive + .fetch_identity_token_info( + token_id.to_buffer(), + identity_2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token info") + .map(|info| info.frozen()); + assert_eq!(token_frozen, Some(true)); + + let unfreeze_transition = BatchTransition::new_token_unfreeze_transition( + token_id, + identity.id(), + contract.id(), + 0, + identity_2.id(), + None, + None, + &key, + 3, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let unfreeze_serialized_transition = unfreeze_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![unfreeze_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"); + + let token_frozen = platform + .drive + .fetch_identity_token_info( + token_id.to_buffer(), + identity_2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token info") + .map(|info| info.frozen()); + assert_eq!(token_frozen, Some(false)); + } + + #[test] + fn test_token_frozen_receive_balance_allowed_sending_not_allowed_till_unfrozen() { + 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(49853); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (recipient, signer2, key2) = + setup_identity(&mut platform, rng.gen(), dash_to_credits!(0.5)); + + let (contract, token_id) = create_token_contract_with_owner_identity( + &mut platform, + identity.id(), + Some(|token_configuration: &mut TokenConfiguration| { + token_configuration.set_freeze_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::ContractOwner, + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + }, + )); + token_configuration.set_unfreeze_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::ContractOwner, + authorized_to_change_authorized_action_takers: + AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_authorized_action_takers_to_contract_owner_allowed: false, + }, + )); + }), + None, + platform_version, + ); + + let freeze_transition = BatchTransition::new_token_freeze_transition( + token_id, + identity.id(), + contract.id(), + 0, + recipient.id(), + None, + None, + &key, + 2, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let freeze_serialized_transition = freeze_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![freeze_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"); + + let token_frozen = platform + .drive + .fetch_identity_token_info( + token_id.to_buffer(), + recipient.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token info") + .map(|info| info.frozen()); + assert_eq!(token_frozen, Some(true)); + + let token_transfer_transition = BatchTransition::new_token_transfer_transition( + token_id, + identity.id(), + contract.id(), + 0, + 1337, + recipient.id(), + None, + None, + None, + &key, + 3, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_transfer_serialized_transition = token_transfer_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![token_transfer_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + let expected_amount = 100000 - 1337; + assert_eq!(token_balance, Some(expected_amount)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + recipient.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + let expected_amount = 1337; + assert_eq!(token_balance, Some(expected_amount)); + + //now let's try sending our balance + + let token_transfer_back_transition = + BatchTransition::new_token_transfer_transition( + token_id, + recipient.id(), + contract.id(), + 0, + 300, + identity.id(), + None, + None, + None, + &key2, + 2, + 0, + &signer2, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_transfer_back_serialized_transition = token_transfer_back_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![token_transfer_back_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::IdentityTokenAccountFrozenError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + // We expect no change + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + let expected_amount = 100000 - 1337; + assert_eq!(token_balance, Some(expected_amount)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + recipient.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + let expected_amount = 1337; + assert_eq!(token_balance, Some(expected_amount)); + + let unfreeze_transition = BatchTransition::new_token_unfreeze_transition( + token_id, + identity.id(), + contract.id(), + 0, + recipient.id(), + None, + None, + &key, + 4, + 0, + &signer, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let unfreeze_serialized_transition = unfreeze_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![unfreeze_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"); + + let token_frozen = platform + .drive + .fetch_identity_token_info( + token_id.to_buffer(), + recipient.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token info") + .map(|info| info.frozen()); + assert_eq!(token_frozen, Some(false)); + + let token_transfer_transition = BatchTransition::new_token_transfer_transition( + token_id, + recipient.id(), + contract.id(), + 0, + 300, + identity.id(), + None, + None, + None, + &key2, + 3, + 0, + &signer2, + platform_version, + None, + None, + None, + ) + .expect("expect to create documents batch transition"); + + let token_transfer_serialized_transition = token_transfer_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![token_transfer_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + let expected_amount = 100000 - 1337 + 300; + assert_eq!(token_balance, Some(expected_amount)); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id.to_buffer(), + recipient.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + let expected_amount = 1337 - 300; + assert_eq!(token_balance, Some(expected_amount)); + } + } + } } diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/mod.rs similarity index 100% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/mod.rs diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/data_triggers.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/data_triggers.rs similarity index 76% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/data_triggers.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/data_triggers.rs index 47a71a2e69..554fac6807 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/data_triggers.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/data_triggers.rs @@ -1,11 +1,11 @@ use crate::error::Error; -use crate::execution::validation::state_transition::documents_batch::data_triggers::{ +use crate::execution::validation::state_transition::batch::data_triggers::{ data_trigger_bindings_list, DataTriggerExecutionContext, DataTriggerExecutionResult, DataTriggerExecutor, }; use dpp::version::PlatformVersion; -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; #[allow(dead_code)] #[deprecated(note = "This function is marked as unused.")] @@ -18,12 +18,6 @@ pub(super) fn execute_data_triggers( let data_trigger_bindings = data_trigger_bindings_list(platform_version)?; for document_transition_action in document_transition_actions { - if matches!( - document_transition_action, - DocumentTransitionAction::BumpIdentityDataContractNonce(_) - ) { - continue; - } let data_trigger_execution_result = document_transition_action .validate_with_data_triggers(&data_trigger_bindings, context, platform_version)?; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/fetch_contender.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/fetch_contender.rs similarity index 100% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/fetch_contender.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/fetch_contender.rs 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/batch/state/v0/fetch_documents.rs similarity index 97% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/fetch_documents.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/fetch_documents.rs index 8db9245d3f..c206b54bd5 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/batch/state/v0/fetch_documents.rs @@ -14,10 +14,10 @@ use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use dpp::document::Document; use dpp::fee::fee_result::FeeResult; use dpp::platform_value::{Identifier, Value}; -use dpp::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_transition::{ +use dpp::state_transition::batch_transition::batched_transition::document_transition::{ DocumentTransition, DocumentTransitionV0Methods, }; +use dpp::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; use dpp::validation::ConsensusValidationResult; use dpp::version::PlatformVersion; use drive::drive::document::query::query_contested_documents_storage::QueryContestedDocumentsOutcomeV0Methods; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/mod.rs new file mode 100644 index 0000000000..5b225e70a7 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/mod.rs @@ -0,0 +1,302 @@ +use dpp::block::block_info::BlockInfo; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::state_error::StateError; +use dpp::prelude::ConsensusValidationResult; +use dpp::state_transition::batch_transition::BatchTransition; +use dpp::state_transition::StateTransitionLike; +use drive::state_transition_action::StateTransitionAction; +use dpp::version::{DefaultForPlatformVersion, PlatformVersion}; +use drive::grovedb::TransactionArg; +use drive::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; +use drive::state_transition_action::batch::BatchTransitionAction; +use drive::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; +use crate::error::Error; +use crate::error::execution::ExecutionError; +use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; +use crate::execution::validation::state_transition::batch::action_validation::document_create_transition_action::DocumentCreateTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document_delete_transition_action::DocumentDeleteTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document_purchase_transition_action::DocumentPurchaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document_replace_transition_action::DocumentReplaceTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document_transfer_transition_action::DocumentTransferTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document_update_price_transition_action::DocumentUpdatePriceTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_burn_transition_action::TokenBurnTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_emergency_action_transition_action::TokenEmergencyActionTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_freeze_transition_action::TokenFreezeTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_mint_transition_action::TokenMintTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_transfer_transition_action::TokenTransferTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token_unfreeze_transition_action::TokenUnfreezeTransitionActionValidation; +use crate::execution::validation::state_transition::batch::data_triggers::{data_trigger_bindings_list, DataTriggerExecutionContext, DataTriggerExecutor}; +use crate::platform_types::platform::{PlatformStateRef}; +use crate::execution::validation::state_transition::state_transitions::batch::transformer::v0::BatchTransitionTransformerV0; +use crate::execution::validation::state_transition::ValidationMode; +use crate::platform_types::platform_state::v0::PlatformStateV0Methods; + +mod data_triggers; +pub mod fetch_contender; +pub mod fetch_documents; + +pub(in crate::execution::validation::state_transition::state_transitions::batch) trait DocumentsBatchStateTransitionStateValidationV0 +{ + fn validate_state_v0( + &self, + action: BatchTransitionAction, + platform: &PlatformStateRef, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + tx: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error>; + + fn transform_into_action_v0( + &self, + platform: &PlatformStateRef, + block_info: &BlockInfo, + validation_mode: ValidationMode, + tx: TransactionArg, + ) -> Result, Error>; +} + +impl DocumentsBatchStateTransitionStateValidationV0 for BatchTransition { + fn validate_state_v0( + &self, + mut state_transition_action: BatchTransitionAction, + platform: &PlatformStateRef, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut validation_result = ConsensusValidationResult::::new(); + + let state_transition_execution_context = + StateTransitionExecutionContext::default_for_platform_version(platform_version)?; + + let owner_id = state_transition_action.owner_id(); + + let mut validated_transitions = vec![]; + + let data_trigger_bindings = if platform.config.execution.use_document_triggers { + data_trigger_bindings_list(platform_version)? + } else { + vec![] + }; + + // Next we need to validate the structure of all actions (this means with the data contract) + for transition in state_transition_action.transitions_take() { + let transition_validation_result = match &transition { + BatchedTransitionAction::DocumentAction(document_action) => match document_action { + DocumentTransitionAction::CreateAction(create_action) => create_action + .validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?, + DocumentTransitionAction::ReplaceAction(replace_action) => replace_action + .validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?, + DocumentTransitionAction::TransferAction(transfer_action) => transfer_action + .validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?, + DocumentTransitionAction::DeleteAction(delete_action) => delete_action + .validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?, + DocumentTransitionAction::UpdatePriceAction(update_price_action) => { + update_price_action.validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )? + } + DocumentTransitionAction::PurchaseAction(purchase_action) => purchase_action + .validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?, + }, + BatchedTransitionAction::TokenAction(token_action) => match token_action { + TokenTransitionAction::BurnAction(burn_action) => burn_action.validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?, + TokenTransitionAction::MintAction(mint_action) => mint_action.validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?, + TokenTransitionAction::TransferAction(transfer_action) => transfer_action + .validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?, + TokenTransitionAction::FreezeAction(freeze_action) => freeze_action + .validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?, + TokenTransitionAction::UnfreezeAction(unfreeze_action) => unfreeze_action + .validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?, + TokenTransitionAction::EmergencyActionAction(emergency_action_action) => { + emergency_action_action.validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )? + } + TokenTransitionAction::DestroyFrozenFundsAction( + destroy_frozen_funds_action, + ) => destroy_frozen_funds_action.validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?, + }, + BatchedTransitionAction::BumpIdentityDataContractNonce(_) => { + return Err(Error::Execution(ExecutionError::CorruptedCodeExecution( + "we should never start with a bump identity data contract nonce", + ))); + } + }; + + if !transition_validation_result.is_valid() { + // If a state transition isn't valid we still need to bump the identity data contract nonce + validation_result.add_errors(transition_validation_result.errors); + validated_transitions.push(BatchedTransitionAction::BumpIdentityDataContractNonce( + BumpIdentityDataContractNonceAction::try_from_batched_transition_action( + transition, + owner_id, + state_transition_action.user_fee_increase(), + )?, + )); + } else if platform.config.execution.use_document_triggers { + if let BatchedTransitionAction::DocumentAction(document_transition) = &transition { + // we should also validate document triggers + let data_trigger_execution_context = DataTriggerExecutionContext { + platform, + transaction, + owner_id: &self.owner_id(), + state_transition_execution_context: &state_transition_execution_context, + }; + let data_trigger_execution_result = document_transition + .validate_with_data_triggers( + &data_trigger_bindings, + &data_trigger_execution_context, + platform_version, + )?; + + if !data_trigger_execution_result.is_valid() { + // If a state transition isn't valid because of data triggers we still need + // to bump the identity data contract nonce + let consensus_errors: Vec = data_trigger_execution_result + .errors + .into_iter() + .map(|e| ConsensusError::StateError(StateError::DataTriggerError(e))) + .collect(); + validation_result.add_errors(consensus_errors); + validated_transitions + .push(BatchedTransitionAction::BumpIdentityDataContractNonce( + BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action( + document_transition.base(), + owner_id, + state_transition_action.user_fee_increase(), + ), + )); + } else { + validated_transitions.push(transition); + } + } else { + validated_transitions.push(transition); + } + } else { + validated_transitions.push(transition); + } + } + + state_transition_action.set_transitions(validated_transitions); + + validation_result.set_data(state_transition_action.into()); + + Ok(validation_result) + } + + fn transform_into_action_v0( + &self, + platform: &PlatformStateRef, + block_info: &BlockInfo, + validation_mode: ValidationMode, + tx: TransactionArg, + ) -> Result, Error> { + let platform_version = platform.state.current_platform_version()?; + + let mut execution_context = + StateTransitionExecutionContext::default_for_platform_version(platform_version)?; + + let validation_result = self.try_into_action_v0( + platform, + block_info, + validation_mode.should_validate_batch_valid_against_state(), + tx, + &mut execution_context, + )?; + + Ok(validation_result.map(Into::into)) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/transformer/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/transformer/mod.rs similarity index 100% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/transformer/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/transformer/mod.rs diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/transformer/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/transformer/v0/mod.rs similarity index 60% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/transformer/v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/transformer/v0/mod.rs index 68ec4de478..f9ed1d6d66 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/transformer/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/transformer/v0/mod.rs @@ -21,41 +21,53 @@ use dpp::document::property_names::PRICE; use dpp::document::{Document, DocumentV0Getters}; use dpp::fee::Credits; use dpp::platform_value::btreemap_extensions::BTreeValueMapHelper; -use dpp::prelude::Revision; +use dpp::prelude::{Revision, UserFeeIncrease}; use dpp::validation::SimpleConsensusValidationResult; use dpp::{consensus::ConsensusError, prelude::Identifier, validation::ConsensusValidationResult}; - -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; -use dpp::state_transition::documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; -use dpp::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_transition::{DocumentTransition, DocumentTransitionV0Methods}; -use dpp::state_transition::documents_batch_transition::document_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods; +use dpp::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use dpp::state_transition::batch_transition::batched_transition::BatchedTransitionRef; +use dpp::state_transition::batch_transition::BatchTransition; +use dpp::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; +use dpp::state_transition::batch_transition::batched_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods; use dpp::state_transition::StateTransitionLike; -use drive::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::DocumentCreateTransitionAction; -use drive::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; -use drive::state_transition_action::document::documents_batch::document_transition::document_replace_transition_action::DocumentReplaceTransitionAction; -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; -use drive::state_transition_action::document::documents_batch::DocumentsBatchTransitionAction; -use drive::state_transition_action::document::documents_batch::v0::DocumentsBatchTransitionActionV0; - -use crate::execution::validation::state_transition::documents_batch::state::v0::fetch_documents::fetch_documents_for_transitions_knowing_contract_and_document_type; +use drive::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::DocumentCreateTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_replace_transition_action::DocumentReplaceTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::BatchTransitionAction; +use drive::state_transition_action::batch::v0::BatchTransitionActionV0; + +use crate::execution::validation::state_transition::batch::state::v0::fetch_documents::fetch_documents_for_transitions_knowing_contract_and_document_type; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; -use dpp::state_transition::documents_batch_transition::document_transition::document_replace_transition::v0::v0_methods::DocumentReplaceTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_transition::document_transfer_transition::v0::v0_methods::DocumentTransferTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods; +use dpp::state_transition::batch_transition::batched_transition::document_replace_transition::v0::v0_methods::DocumentReplaceTransitionV0Methods; +use dpp::state_transition::batch_transition::batched_transition::document_transfer_transition::v0::v0_methods::DocumentTransferTransitionV0Methods; +use dpp::state_transition::batch_transition::batched_transition::document_transition::{DocumentTransition, DocumentTransitionV0Methods}; +use dpp::state_transition::batch_transition::batched_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods; +use dpp::state_transition::batch_transition::batched_transition::token_transition::{TokenTransition, TokenTransitionV0Methods}; +use dpp::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use dpp::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; use drive::drive::contract::DataContractFetchInfo; use drive::drive::Drive; -use drive::state_transition_action::document::documents_batch::document_transition::document_purchase_transition_action::DocumentPurchaseTransitionAction; -use drive::state_transition_action::document::documents_batch::document_transition::document_transfer_transition_action::DocumentTransferTransitionAction; -use drive::state_transition_action::document::documents_batch::document_transition::document_update_price_transition_action::DocumentUpdatePriceTransitionAction; +use drive::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::DocumentPurchaseTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::DocumentTransferTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::DocumentUpdatePriceTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::TokenBurnTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::TokenEmergencyActionTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::TokenFreezeTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::TokenMintTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::TokenTransferTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::token_unfreeze_transition_action::TokenUnfreezeTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; use drive::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; use crate::execution::types::execution_operation::ValidationOperation; use crate::execution::types::state_transition_execution_context::{StateTransitionExecutionContext, StateTransitionExecutionContextMethodsV0}; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; -pub(in crate::execution::validation::state_transition::state_transitions::documents_batch) trait DocumentsBatchTransitionTransformerV0 +pub(in crate::execution::validation::state_transition::state_transitions::batch) trait BatchTransitionTransformerV0 { fn try_into_action_v0( &self, @@ -64,10 +76,10 @@ pub(in crate::execution::validation::state_transition::state_transitions::docume full_validation: bool, transaction: TransactionArg, execution_context: &mut StateTransitionExecutionContext, - ) -> Result, Error>; + ) -> Result, Error>; } -trait DocumentsBatchTransitionInternalTransformerV0 { +trait BatchTransitionInternalTransformerV0 { fn transform_document_transitions_within_contract_v0( platform: &PlatformStateRef, block_info: &BlockInfo, @@ -78,7 +90,7 @@ trait DocumentsBatchTransitionInternalTransformerV0 { execution_context: &mut StateTransitionExecutionContext, transaction: TransactionArg, platform_version: &PlatformVersion, - ) -> Result>, Error>; + ) -> Result>, Error>; fn transform_document_transitions_within_document_type_v0( platform: &PlatformStateRef, block_info: &BlockInfo, @@ -90,9 +102,34 @@ trait DocumentsBatchTransitionInternalTransformerV0 { execution_context: &mut StateTransitionExecutionContext, transaction: TransactionArg, platform_version: &PlatformVersion, - ) -> Result>, Error>; + ) -> Result>, Error>; + fn transform_token_transitions_within_contract_v0( + platform: &PlatformStateRef, + data_contract_id: &Identifier, + block_info: &BlockInfo, + validate_against_state: bool, + owner_id: Identifier, + token_transitions: &Vec<&TokenTransition>, + user_fee_increase: UserFeeIncrease, + transaction: TransactionArg, + execution_context: &mut StateTransitionExecutionContext, + platform_version: &PlatformVersion, + ) -> Result>, Error>; + /// Transfer token transition + fn transform_token_transition_v0( + drive: &Drive, + transaction: TransactionArg, + block_info: &BlockInfo, + validate_against_state: bool, + data_contract_fetch_info: Arc, + transition: &TokenTransition, + owner_id: Identifier, + user_fee_increase: UserFeeIncrease, + execution_context: &mut StateTransitionExecutionContext, + platform_version: &PlatformVersion, + ) -> Result, Error>; /// The data contract can be of multiple difference versions - fn transform_transition_v0( + fn transform_document_transition_v0( drive: &Drive, transaction: TransactionArg, full_validation: bool, @@ -103,7 +140,7 @@ trait DocumentsBatchTransitionInternalTransformerV0 { owner_id: Identifier, execution_context: &mut StateTransitionExecutionContext, platform_version: &PlatformVersion, - ) -> Result, Error>; + ) -> Result, Error>; fn find_replaced_document_v0<'a>( document_transition: &'a DocumentTransition, fetched_documents: &'a [Document], @@ -120,7 +157,7 @@ trait DocumentsBatchTransitionInternalTransformerV0 { ) -> SimpleConsensusValidationResult; } -impl DocumentsBatchTransitionTransformerV0 for DocumentsBatchTransition { +impl BatchTransitionTransformerV0 for BatchTransition { fn try_into_action_v0( &self, platform: &PlatformStateRef, @@ -128,39 +165,60 @@ impl DocumentsBatchTransitionTransformerV0 for DocumentsBatchTransition { validate_against_state: bool, transaction: TransactionArg, execution_context: &mut StateTransitionExecutionContext, - ) -> Result, Error> { + ) -> Result, Error> { let owner_id = self.owner_id(); let user_fee_increase = self.user_fee_increase(); let platform_version = platform.state.current_platform_version()?; - let mut transitions_by_contracts_and_types: BTreeMap< + let mut document_transitions_by_contracts_and_types: BTreeMap< &Identifier, BTreeMap<&String, Vec<&DocumentTransition>>, > = BTreeMap::new(); + let mut token_transitions_by_contracts: BTreeMap<&Identifier, Vec<&TokenTransition>> = + BTreeMap::new(); + // We want to validate by contract, and then for each document type within a contract - for document_transition in self.transitions().iter() { - let document_type = document_transition.base().document_type_name(); - let data_contract_id = document_transition.base().data_contract_id_ref(); + for transition in self.transitions_iter() { + match transition { + BatchedTransitionRef::Document(document_transition) => { + let document_type = document_transition.base().document_type_name(); + let data_contract_id = document_transition.base().data_contract_id_ref(); - match transitions_by_contracts_and_types.entry(data_contract_id) { - Entry::Vacant(v) => { - v.insert(BTreeMap::from([(document_type, vec![document_transition])])); + match document_transitions_by_contracts_and_types.entry(data_contract_id) { + Entry::Vacant(v) => { + v.insert(BTreeMap::from([(document_type, vec![document_transition])])); + } + Entry::Occupied(mut transitions_by_types_in_contract) => { + match transitions_by_types_in_contract + .get_mut() + .entry(document_type) + { + Entry::Vacant(v) => { + v.insert(vec![document_transition]); + } + Entry::Occupied(mut o) => o.get_mut().push(document_transition), + } + } + } } - Entry::Occupied(mut transitions_by_types_in_contract) => { - match transitions_by_types_in_contract - .get_mut() - .entry(document_type) - { + BatchedTransitionRef::Token(token_transition) => { + let data_contract_id = token_transition.base().data_contract_id_ref(); + + match token_transitions_by_contracts.entry(data_contract_id) { Entry::Vacant(v) => { - v.insert(vec![document_transition]); + v.insert(vec![token_transition]); + } + Entry::Occupied(mut transitions_by_tokens_in_contract) => { + transitions_by_tokens_in_contract + .get_mut() + .push(token_transition) } - Entry::Occupied(mut o) => o.get_mut().push(document_transition), } } } } - let validation_result = transitions_by_contracts_and_types + let validation_result_documents = document_transitions_by_contracts_and_types .iter() .map( |(data_contract_id, document_transitions_by_document_type)| { @@ -177,12 +235,37 @@ impl DocumentsBatchTransitionTransformerV0 for DocumentsBatchTransition { ) }, ) - .collect::>>, Error>>()?; - let validation_result = ConsensusValidationResult::flatten(validation_result); + .collect::>>, Error>>( + )?; + + let mut validation_result_tokens = token_transitions_by_contracts + .iter() + .map(|(data_contract_id, token_transitions)| { + Self::transform_token_transitions_within_contract_v0( + platform, + data_contract_id, + block_info, + validate_against_state, + owner_id, + token_transitions, + user_fee_increase, + transaction, + execution_context, + platform_version, + ) + }) + .collect::>>, Error>>( + )?; + + let mut validation_results = validation_result_documents; + + validation_results.append(&mut validation_result_tokens); + + let validation_result = ConsensusValidationResult::flatten(validation_results); if validation_result.has_data() { let (transitions, errors) = validation_result.into_data_and_errors()?; - let batch_transition_action = DocumentsBatchTransitionActionV0 { + let batch_transition_action = BatchTransitionActionV0 { owner_id, transitions, user_fee_increase, @@ -200,7 +283,59 @@ impl DocumentsBatchTransitionTransformerV0 for DocumentsBatchTransition { } } -impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition { +impl BatchTransitionInternalTransformerV0 for BatchTransition { + fn transform_token_transitions_within_contract_v0( + platform: &PlatformStateRef, + data_contract_id: &Identifier, + block_info: &BlockInfo, + validate_against_state: bool, + owner_id: Identifier, + token_transitions: &Vec<&TokenTransition>, + user_fee_increase: UserFeeIncrease, + transaction: TransactionArg, + execution_context: &mut StateTransitionExecutionContext, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + let drive = platform.drive; + // Data Contract must exist + let Some(data_contract_fetch_info) = drive + .get_contract_with_fetch_info_and_fee( + data_contract_id.0 .0, + None, + false, + transaction, + platform_version, + )? + .1 + else { + return Ok(ConsensusValidationResult::new_with_error( + BasicError::DataContractNotPresentError(DataContractNotPresentError::new( + *data_contract_id, + )) + .into(), + )); + }; + + let validation_result = token_transitions + .iter() + .map(|token_transition| { + Self::transform_token_transition_v0( + platform.drive, + transaction, + block_info, + validate_against_state, + data_contract_fetch_info.clone(), + token_transition, + owner_id, + user_fee_increase, + execution_context, + platform_version, + ) + }) + .collect::>, Error>>()?; + let validation_result = ConsensusValidationResult::merge_many(validation_result); + Ok(validation_result) + } fn transform_document_transitions_within_contract_v0( platform: &PlatformStateRef, block_info: &BlockInfo, @@ -211,7 +346,7 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition execution_context: &mut StateTransitionExecutionContext, transaction: TransactionArg, platform_version: &PlatformVersion, - ) -> Result>, Error> { + ) -> Result>, Error> { let drive = platform.drive; // Data Contract must exist let Some(data_contract_fetch_info) = drive @@ -248,7 +383,8 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition platform_version, ) }) - .collect::>>, Error>>()?; + .collect::>>, Error>>( + )?; Ok(ConsensusValidationResult::flatten(validation_result)) } @@ -263,7 +399,7 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition execution_context: &mut StateTransitionExecutionContext, transaction: TransactionArg, platform_version: &PlatformVersion, - ) -> Result>, Error> { + ) -> Result>, Error> { // We use temporary execution context without dry run, // because despite the dryRun, we need to get the // data contract to proceed with following logic @@ -325,7 +461,7 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition .iter() .map(|transition| { // we validate every transition in this document type - Self::transform_transition_v0( + Self::transform_document_transition_v0( platform.drive, transaction, validate_against_state, @@ -338,7 +474,7 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition platform_version, ) }) - .collect::>, Error>>( + .collect::>, Error>>( )?; let result = ConsensusValidationResult::merge_many( @@ -355,7 +491,98 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition } /// The data contract can be of multiple difference versions - fn transform_transition_v0<'a>( + fn transform_token_transition_v0( + drive: &Drive, + transaction: TransactionArg, + block_info: &BlockInfo, + validate_against_state: bool, + data_contract_fetch_info: Arc, + transition: &TokenTransition, + owner_id: Identifier, + user_fee_increase: UserFeeIncrease, + execution_context: &mut StateTransitionExecutionContext, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let approximate_for_costs = !validate_against_state; + match transition { + TokenTransition::Burn(token_burn_transition) => { + let (batched_action, fee_result) = TokenBurnTransitionAction::try_from_borrowed_token_burn_transition_with_contract_lookup(drive, owner_id, token_burn_transition, approximate_for_costs, transaction, block_info,user_fee_increase, |_identifier| { + Ok(data_contract_fetch_info.clone()) + }, platform_version)?; + + execution_context + .add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + Ok(batched_action) + } + TokenTransition::Mint(token_mint_transition) => { + let (batched_action, fee_result) = TokenMintTransitionAction::try_from_borrowed_token_mint_transition_with_contract_lookup(drive, owner_id, token_mint_transition, approximate_for_costs, transaction, block_info, user_fee_increase, |_identifier| { + Ok(data_contract_fetch_info.clone()) + }, platform_version)?; + + execution_context + .add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + Ok(batched_action) + } + TokenTransition::Transfer(token_transfer_transition) => { + let (token_transfer_action, fee_result) = TokenTransferTransitionAction::try_from_borrowed_token_transfer_transition_with_contract_lookup(drive, owner_id, token_transfer_transition, approximate_for_costs, transaction, block_info, |_identifier| { + Ok(data_contract_fetch_info.clone()) + }, platform_version)?; + + execution_context + .add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + let batched_action = BatchedTransitionAction::TokenAction( + TokenTransitionAction::TransferAction(token_transfer_action), + ); + Ok(batched_action.into()) + } + TokenTransition::Freeze(token_freeze_transition) => { + let (batched_action, fee_result) = TokenFreezeTransitionAction::try_from_borrowed_token_freeze_transition_with_contract_lookup(drive, owner_id, token_freeze_transition, approximate_for_costs, transaction, block_info, user_fee_increase, |_identifier| { + Ok(data_contract_fetch_info.clone()) + }, platform_version)?; + + execution_context + .add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + Ok(batched_action) + } + TokenTransition::Unfreeze(token_unfreeze_transition) => { + let (batched_action, fee_result) = TokenUnfreezeTransitionAction::try_from_borrowed_token_unfreeze_transition_with_contract_lookup(drive, owner_id, token_unfreeze_transition, approximate_for_costs, transaction, block_info, user_fee_increase, |_identifier| { + Ok(data_contract_fetch_info.clone()) + }, platform_version)?; + + execution_context + .add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + Ok(batched_action) + } + TokenTransition::DestroyFrozenFunds(destroy_frozen_funds) => { + let (batched_action, fee_result) = TokenDestroyFrozenFundsTransitionAction::try_from_borrowed_token_destroy_frozen_funds_transition_with_contract_lookup(drive, owner_id, destroy_frozen_funds, approximate_for_costs, transaction, block_info, user_fee_increase, |_identifier| { + Ok(data_contract_fetch_info.clone()) + }, platform_version)?; + + execution_context + .add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + Ok(batched_action) + } + TokenTransition::EmergencyAction(emergency_action) => { + let (batched_action, fee_result) = TokenEmergencyActionTransitionAction::try_from_borrowed_token_emergency_action_transition_with_contract_lookup(drive, owner_id, emergency_action, approximate_for_costs, transaction, block_info, user_fee_increase, |_identifier| { + Ok(data_contract_fetch_info.clone()) + }, platform_version)?; + + execution_context + .add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + Ok(batched_action) + } + } + } + + /// The data contract can be of multiple difference versions + fn transform_document_transition_v0<'a>( drive: &Drive, transaction: TransactionArg, validate_against_state: bool, @@ -366,12 +593,10 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition owner_id: Identifier, execution_context: &mut StateTransitionExecutionContext, platform_version: &PlatformVersion, - ) -> Result, Error> { + ) -> Result, Error> { match transition { DocumentTransition::Create(document_create_transition) => { - let result = ConsensusValidationResult::::new(); - - let (document_create_action, fee_result) = DocumentCreateTransitionAction::from_document_borrowed_create_transition_with_contract_lookup( + let (document_create_action, fee_result) = DocumentCreateTransitionAction::try_from_document_borrowed_create_transition_with_contract_lookup( drive, transaction, document_create_transition, block_info, |_identifier| { Ok(data_contract_fetch_info.clone()) @@ -380,14 +605,13 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition execution_context .add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); - if result.is_valid() { - Ok(DocumentTransitionAction::CreateAction(document_create_action).into()) - } else { - Ok(result) - } + let batched_action = BatchedTransitionAction::DocumentAction( + DocumentTransitionAction::CreateAction(document_create_action), + ); + Ok(batched_action.into()) } DocumentTransition::Replace(document_replace_transition) => { - let mut result = ConsensusValidationResult::::new(); + let mut result = ConsensusValidationResult::::new(); let validation_result = Self::find_replaced_document_v0(transition, replaced_documents); @@ -400,9 +624,11 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition owner_id, 0, ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); return Ok(ConsensusValidationResult::new_with_data_and_errors( - bump_action.into(), + batched_action.into(), validation_result.errors, )); } @@ -468,19 +694,25 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition )?; if result.is_valid() { - Ok(DocumentTransitionAction::ReplaceAction(document_replace_action).into()) + let batched_action = BatchedTransitionAction::DocumentAction( + DocumentTransitionAction::ReplaceAction(document_replace_action), + ); + Ok(batched_action.into()) } else { Ok(result) } } DocumentTransition::Delete(document_delete_transition) => { - let action = DocumentDeleteTransitionAction::from_document_borrowed_create_transition_with_contract_lookup(document_delete_transition, |_identifier| { + let action = DocumentDeleteTransitionAction::try_from_document_borrowed_create_transition_with_contract_lookup(document_delete_transition, |_identifier| { Ok(data_contract_fetch_info.clone()) })?; - Ok(DocumentTransitionAction::DeleteAction(action).into()) + let batched_action = BatchedTransitionAction::DocumentAction( + DocumentTransitionAction::DeleteAction(action), + ); + Ok(batched_action.into()) } DocumentTransition::Transfer(document_transfer_transition) => { - let mut result = ConsensusValidationResult::::new(); + let mut result = ConsensusValidationResult::::new(); let validation_result = Self::find_replaced_document_v0(transition, replaced_documents); @@ -528,13 +760,16 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition )?; if result.is_valid() { - Ok(DocumentTransitionAction::TransferAction(document_transfer_action).into()) + let batched_action = BatchedTransitionAction::DocumentAction( + DocumentTransitionAction::TransferAction(document_transfer_action), + ); + Ok(batched_action.into()) } else { Ok(result) } } DocumentTransition::UpdatePrice(document_update_price_transition) => { - let mut result = ConsensusValidationResult::::new(); + let mut result = ConsensusValidationResult::::new(); let validation_result = Self::find_replaced_document_v0(transition, replaced_documents); @@ -582,16 +817,16 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition )?; if result.is_valid() { - Ok( - DocumentTransitionAction::UpdatePriceAction(document_update_price_action) - .into(), - ) + let batched_action = BatchedTransitionAction::DocumentAction( + DocumentTransitionAction::UpdatePriceAction(document_update_price_action), + ); + Ok(batched_action.into()) } else { Ok(result) } } DocumentTransition::Purchase(document_purchase_transition) => { - let mut result = ConsensusValidationResult::::new(); + let mut result = ConsensusValidationResult::::new(); let validation_result = Self::find_replaced_document_v0(transition, replaced_documents); @@ -650,7 +885,10 @@ impl DocumentsBatchTransitionInternalTransformerV0 for DocumentsBatchTransition )?; if result.is_valid() { - Ok(DocumentTransitionAction::PurchaseAction(document_purchase_action).into()) + let batched_action = BatchedTransitionAction::DocumentAction( + DocumentTransitionAction::PurchaseAction(document_purchase_action), + ); + Ok(batched_action.into()) } else { Ok(result) } diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/advanced_structure/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/advanced_structure/v0/mod.rs index 9bdc1119eb..6d81da251c 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/advanced_structure/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/advanced_structure/v0/mod.rs @@ -4,9 +4,11 @@ use crate::execution::types::state_transition_execution_context::{ StateTransitionExecutionContext, StateTransitionExecutionContextMethodsV0, }; use dpp::consensus::basic::data_contract::{ - InvalidDataContractIdError, InvalidDataContractVersionError, + InvalidDataContractIdError, InvalidDataContractVersionError, InvalidTokenBaseSupplyError, + NonContiguousContractTokenPositionsError, }; use dpp::consensus::basic::BasicError; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; use dpp::data_contract::INITIAL_DATA_CONTRACT_VERSION; use dpp::prelude::DataContract; use dpp::state_transition::data_contract_create_transition::accessors::DataContractCreateTransitionAccessorsV0; @@ -67,6 +69,38 @@ impl DataContractCreatedStateTransitionAdvancedStructureValidationV0 )); } + let expected_position = 0; + + for (token_contract_position, token_configuration) in self.data_contract().tokens() { + if expected_position != *token_contract_position { + let bump_action = StateTransitionAction::BumpIdentityNonceAction( + BumpIdentityNonceAction::from_borrowed_data_contract_create_transition(self), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + vec![NonContiguousContractTokenPositionsError::new( + expected_position, + *token_contract_position, + ) + .into()], + )); + } + + if token_configuration.base_supply() > i64::MAX as u64 { + let bump_action = StateTransitionAction::BumpIdentityNonceAction( + BumpIdentityNonceAction::from_borrowed_data_contract_create_transition(self), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + vec![ + InvalidTokenBaseSupplyError::new(token_configuration.base_supply()).into(), + ], + )); + } + } + Ok(ConsensusValidationResult::default()) } } diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/mod.rs index c22ef31de1..a5a0983202 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/mod.rs @@ -149,11 +149,16 @@ mod tests { use dpp::consensus::basic::BasicError; use dpp::consensus::ConsensusError; use dpp::dash_to_credits; + use dpp::data_contract::accessors::v1::DataContractV1Getters; + use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Setters; + use dpp::data_contract::DataContract; + use dpp::identity::accessors::IdentityGettersV0; use dpp::identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0; use dpp::serialization::PlatformSerializable; use dpp::state_transition::data_contract_create_transition::methods::DataContractCreateTransitionMethodsV0; use dpp::state_transition::data_contract_create_transition::DataContractCreateTransition; use dpp::tests::json_document::json_document_to_contract_with_ids; + use dpp::tokens::calculate_token_id; use platform_version::version::PlatformVersion; #[test] @@ -347,4 +352,265 @@ mod tests { .unwrap() .expect("expected to commit transaction"); } + + #[test] + fn test_data_contract_creation_with_single_token() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + let base_supply_start_amount = 0; + + { + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_base_supply(base_supply_start_amount); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_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![data_contract_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance(token_id, identity_id.to_buffer(), None, platform_version) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_data_contract_creation_with_single_token_with_starting_balance() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let base_supply_start_amount = 10000; + + { + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_base_supply(base_supply_start_amount); + } + + let identity_id = identity.id(); + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let data_contract_create_transition = DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_serialized_transition = data_contract_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![data_contract_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"); + + let token_balance = platform + .drive + .fetch_identity_token_balance(token_id, identity_id.to_buffer(), None, platform_version) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, Some(base_supply_start_amount)); + } + + #[test] + fn test_data_contract_creation_with_single_token_with_starting_balance_over_limit_should_cause_error( + ) { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let base_supply_start_amount = u64::MAX; + + { + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_base_supply(base_supply_start_amount); + } + + let identity_id = identity.id(); + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let data_contract_create_transition = DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_serialized_transition = data_contract_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![data_contract_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::BasicError(BasicError::InvalidTokenBaseSupplyError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance(token_id, identity_id.to_buffer(), None, platform_version) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } } diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/state/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/state/v0/mod.rs index 27c7a5ce4e..3385fd125d 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/state/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/state/v0/mod.rs @@ -161,8 +161,8 @@ mod tests { use super::*; #[test] - fn should_return_invalid_result_when_transform_into_action_failed() { - let platform_version = PlatformVersion::latest(); + fn should_return_invalid_result_when_transform_into_action_failed_v7() { + let platform_version = PlatformVersion::get(7).expect("expected version 7"); let identity_nonce = IdentityNonce::default(); let platform = TestPlatformBuilder::new() @@ -193,7 +193,103 @@ mod tests { // Make the contract invalid let DataContractInSerializationFormat::V0(ref mut contract) = - data_contract_for_serialization; + data_contract_for_serialization + else { + panic!("expected serialization version 0") + }; + + contract + .document_schemas + .insert("invalidType".to_string(), Value::Null); + + let transition: DataContractCreateTransition = DataContractCreateTransitionV0 { + data_contract: data_contract_for_serialization, + identity_nonce, + user_fee_increase: 0, + signature_public_key_id: 0, + signature: Default::default(), + } + .into(); + + let mut execution_context = + StateTransitionExecutionContext::default_for_platform_version(platform_version) + .expect("failed to create execution context"); + + let state = platform.state.load_full(); + + let platform_ref = PlatformRef { + drive: &platform.drive, + state: &state, + config: &platform.config, + core_rpc: &platform.core_rpc, + }; + + let result = transition + .validate_state_v0::( + &platform_ref, + ValidationMode::Validator, + &Epoch::default(), + None, + &mut execution_context, + platform_version, + ) + .expect("failed to validate advanced structure"); + + assert_matches!( + result.errors.as_slice(), + [ConsensusError::BasicError( + BasicError::ContractError( + DataContractError::InvalidContractStructure(message) + ) + )] if message == "document schema must be an object: structure error: value is not a map" + ); + + assert_matches!( + result.data, + Some(StateTransitionAction::BumpIdentityNonceAction(action)) if action.identity_id() == identity_id && action.identity_nonce() == identity_nonce + ); + + // We have tons of operations here so not sure we want to assert all of them + assert!(!execution_context.operations_slice().is_empty()); + } + + #[test] + fn should_return_invalid_result_when_transform_into_action_failed_latest() { + let platform_version = PlatformVersion::latest(); + let identity_nonce = IdentityNonce::default(); + + let platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let data_contract = + get_data_contract_fixture(None, identity_nonce, platform_version.protocol_version) + .data_contract_owned(); + + let identity_id = data_contract.owner_id(); + + platform + .drive + .apply_contract( + &data_contract, + BlockInfo::default(), + true, + None, + None, + platform_version, + ) + .expect("failed to apply contract"); + + let mut data_contract_for_serialization = data_contract + .try_into_platform_versioned(platform_version) + .expect("failed to convert data contract"); + + // Make the contract invalid + let DataContractInSerializationFormat::V1(ref mut contract) = + data_contract_for_serialization + else { + panic!("expected serialization version 1") + }; contract .document_schemas @@ -413,8 +509,11 @@ mod tests { .expect("failed to convert data contract"); // Make the contract invalid - let DataContractInSerializationFormat::V0(ref mut contract) = - data_contract_for_serialization; + let DataContractInSerializationFormat::V1(ref mut contract) = + data_contract_for_serialization + else { + panic!("expected serialization version 1") + }; contract .document_schemas diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_update/state/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_update/state/v0/mod.rs index ef81c1a365..5435c8ad18 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_update/state/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_update/state/v0/mod.rs @@ -231,8 +231,11 @@ mod tests { .expect("failed to convert data contract"); // Make the contract invalid - let DataContractInSerializationFormat::V0(ref mut contract) = - data_contract_for_serialization; + let DataContractInSerializationFormat::V1(ref mut contract) = + data_contract_for_serialization + else { + panic!("expected serialization version 1") + }; contract .document_schemas @@ -553,8 +556,11 @@ mod tests { .expect("failed to convert data contract"); // Make the contract invalid - let DataContractInSerializationFormat::V0(ref mut contract) = - data_contract_for_serialization; + let DataContractInSerializationFormat::V1(ref mut contract) = + data_contract_for_serialization + else { + panic!("expected serialization version 1") + }; contract .document_schemas diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/mod.rs deleted file mode 100644 index 32c28c43fa..0000000000 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/action_validation/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub(crate) mod document_create_transition_action; -pub(crate) mod document_delete_transition_action; -pub(crate) mod document_purchase_transition_action; -pub(crate) mod document_replace_transition_action; -pub(crate) mod document_transfer_transition_action; -pub(crate) mod document_update_price_transition_action; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/advanced_structure/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/advanced_structure/v0/mod.rs deleted file mode 100644 index 5ac5d1630d..0000000000 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/advanced_structure/v0/mod.rs +++ /dev/null @@ -1,219 +0,0 @@ -use crate::error::Error; -use dpp::block::block_info::BlockInfo; -use dpp::consensus::basic::document::InvalidDocumentTransitionIdError; -use dpp::consensus::signature::{InvalidSignaturePublicKeySecurityLevelError, SignatureError}; -use dpp::dashcore::Network; -use dpp::document::Document; -use dpp::identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0; -use dpp::identity::PartialIdentity; -use dpp::state_transition::documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; -use dpp::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_transition::{ - DocumentTransition, DocumentTransitionV0Methods, -}; - -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; -use dpp::state_transition::{StateTransitionIdentitySigned, StateTransitionLike}; - -use dpp::validation::ConsensusValidationResult; - -use dpp::version::PlatformVersion; - -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; -use drive::state_transition_action::document::documents_batch::DocumentsBatchTransitionAction; -use crate::execution::validation::state_transition::state_transitions::documents_batch::action_validation::document_replace_transition_action::DocumentReplaceTransitionActionValidation; -use crate::execution::validation::state_transition::state_transitions::documents_batch::action_validation::document_delete_transition_action::DocumentDeleteTransitionActionValidation; -use crate::execution::validation::state_transition::state_transitions::documents_batch::action_validation::document_create_transition_action::DocumentCreateTransitionActionValidation; -use dpp::state_transition::documents_batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; -use drive::state_transition_action::StateTransitionAction; -use drive::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; -use crate::error::execution::ExecutionError; -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::action_validation::document_purchase_transition_action::DocumentPurchaseTransitionActionValidation; -use crate::execution::validation::state_transition::documents_batch::action_validation::document_transfer_transition_action::DocumentTransferTransitionActionValidation; -use crate::execution::validation::state_transition::documents_batch::action_validation::document_update_price_transition_action::DocumentUpdatePriceTransitionActionValidation; - -pub(in crate::execution::validation::state_transition::state_transitions::documents_batch) trait DocumentsBatchStateTransitionStructureValidationV0 -{ - fn validate_advanced_structure_from_state_v0( - &self, - block_info: &BlockInfo, - network: Network, - action: &DocumentsBatchTransitionAction, - identity: &PartialIdentity, - execution_context: &mut StateTransitionExecutionContext, - platform_version: &PlatformVersion, - ) -> Result, Error>; -} - -impl DocumentsBatchStateTransitionStructureValidationV0 for DocumentsBatchTransition { - fn validate_advanced_structure_from_state_v0( - &self, - block_info: &BlockInfo, - network: Network, - action: &DocumentsBatchTransitionAction, - identity: &PartialIdentity, - execution_context: &mut StateTransitionExecutionContext, - platform_version: &PlatformVersion, - ) -> Result, Error> { - let security_levels = action.contract_based_security_level_requirement()?; - - let signing_key = identity.loaded_public_keys.get(&self.signature_public_key_id()).ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution("the key must exist for advanced structure validation as we already fetched it during signature validation")))?; - - if !security_levels.contains(&signing_key.security_level()) { - // We only need to bump the first identity data contract nonce as that will make a replay - // attack not possible - - let first_transition = self.transitions().first().ok_or(Error::Execution(ExecutionError::CorruptedCodeExecution("There must be at least one state transition as this is already verified in basic validation")))?; - - let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( - BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition( - first_transition.base(), - self.owner_id(), - self.user_fee_increase(), - ), - ); - - return Ok(ConsensusValidationResult::new_with_data_and_errors( - bump_action, - vec![SignatureError::InvalidSignaturePublicKeySecurityLevelError( - InvalidSignaturePublicKeySecurityLevelError::new( - signing_key.security_level(), - security_levels, - ), - ) - .into()], - )); - } - - // We should validate that all newly created documents have valid ids - for transition in self.transitions() { - if let DocumentTransition::Create(create_transition) = transition { - // Validate the ID - let generated_document_id = Document::generate_document_id_v0( - create_transition.base().data_contract_id_ref(), - &self.owner_id(), - create_transition.base().document_type_name(), - &create_transition.entropy(), - ); - - // This hash will take 2 blocks (128 bytes) - execution_context.add_operation(ValidationOperation::DoubleSha256(2)); - - let id = create_transition.base().id(); - if generated_document_id != id { - let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( - BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition( - transition.base(), - self.owner_id(), - self.user_fee_increase(), - ), - ); - - return Ok(ConsensusValidationResult::new_with_data_and_errors( - bump_action, - vec![ - InvalidDocumentTransitionIdError::new(generated_document_id, id).into(), - ], - )); - } - } - } - - // Next we need to validate the structure of all actions (this means with the data contract) - for transition in action.transitions() { - match transition { - DocumentTransitionAction::CreateAction(create_action) => { - let result = create_action.validate_structure( - identity.id, - block_info, - network, - platform_version, - )?; - if !result.is_valid() { - let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( - BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action(transition.base().expect("there is always a base for the create action"), self.owner_id(), self.user_fee_increase()), - ); - - return Ok(ConsensusValidationResult::new_with_data_and_errors( - bump_action, - result.errors, - )); - } - } - DocumentTransitionAction::ReplaceAction(replace_action) => { - let result = replace_action.validate_structure(platform_version)?; - if !result.is_valid() { - let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( - BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action(transition.base().expect("there is always a base for the replace action"), self.owner_id(), self.user_fee_increase()), - ); - - return Ok(ConsensusValidationResult::new_with_data_and_errors( - bump_action, - result.errors, - )); - } - } - DocumentTransitionAction::DeleteAction(delete_action) => { - let result = delete_action.validate_structure(platform_version)?; - if !result.is_valid() { - let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( - BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action(transition.base().expect("there is always a base for the delete action"), self.owner_id(), self.user_fee_increase()), - ); - - return Ok(ConsensusValidationResult::new_with_data_and_errors( - bump_action, - result.errors, - )); - } - } - DocumentTransitionAction::TransferAction(transfer_action) => { - let result = transfer_action.validate_structure(platform_version)?; - if !result.is_valid() { - let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( - BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action(transition.base().expect("there is always a base for the transfer action"), self.owner_id(), self.user_fee_increase()), - ); - - return Ok(ConsensusValidationResult::new_with_data_and_errors( - bump_action, - result.errors, - )); - } - } - DocumentTransitionAction::UpdatePriceAction(update_price_action) => { - let result = update_price_action.validate_structure(platform_version)?; - if !result.is_valid() { - let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( - BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action(transition.base().expect("there is always a base for the update price action"), self.owner_id(), self.user_fee_increase()), - ); - - return Ok(ConsensusValidationResult::new_with_data_and_errors( - bump_action, - result.errors, - )); - } - } - DocumentTransitionAction::PurchaseAction(purchase_action) => { - let result = purchase_action.validate_structure(platform_version)?; - if !result.is_valid() { - let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( - BumpIdentityDataContractNonceAction::from_borrowed_document_base_transition_action(transition.base().expect("there is always a base for the purchase action"), self.owner_id(), self.user_fee_increase()), - ); - - return Ok(ConsensusValidationResult::new_with_data_and_errors( - bump_action, - result.errors, - )); - } - } - DocumentTransitionAction::BumpIdentityDataContractNonce(_) => { - return Err(Error::Execution(ExecutionError::CorruptedCodeExecution( - "we should not have a bump identity contract nonce at this stage", - ))); - } - } - } - Ok(ConsensusValidationResult::new()) - } -} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/mod.rs deleted file mode 100644 index 5ee90a17ab..0000000000 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/documents_batch/state/v0/mod.rs +++ /dev/null @@ -1,231 +0,0 @@ -use dpp::block::block_info::BlockInfo; -use dpp::consensus::ConsensusError; -use dpp::consensus::state::state_error::StateError; -use dpp::prelude::ConsensusValidationResult; -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; -use dpp::state_transition::StateTransitionLike; -use drive::state_transition_action::StateTransitionAction; -use dpp::version::{DefaultForPlatformVersion, PlatformVersion}; -use drive::grovedb::TransactionArg; -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; -use drive::state_transition_action::document::documents_batch::DocumentsBatchTransitionAction; -use drive::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; -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::DocumentCreateTransitionActionValidation; -use crate::execution::validation::state_transition::documents_batch::action_validation::document_delete_transition_action::DocumentDeleteTransitionActionValidation; -use crate::execution::validation::state_transition::documents_batch::action_validation::document_purchase_transition_action::DocumentPurchaseTransitionActionValidation; -use crate::execution::validation::state_transition::documents_batch::action_validation::document_replace_transition_action::DocumentReplaceTransitionActionValidation; -use crate::execution::validation::state_transition::documents_batch::action_validation::document_transfer_transition_action::DocumentTransferTransitionActionValidation; -use crate::execution::validation::state_transition::documents_batch::action_validation::document_update_price_transition_action::DocumentUpdatePriceTransitionActionValidation; -use crate::execution::validation::state_transition::documents_batch::data_triggers::{data_trigger_bindings_list, DataTriggerExecutionContext, DataTriggerExecutor}; -use crate::platform_types::platform::{PlatformStateRef}; -use crate::execution::validation::state_transition::state_transitions::documents_batch::transformer::v0::DocumentsBatchTransitionTransformerV0; -use crate::execution::validation::state_transition::ValidationMode; -use crate::platform_types::platform_state::v0::PlatformStateV0Methods; - -mod data_triggers; -pub mod fetch_contender; -pub mod fetch_documents; - -pub(in crate::execution::validation::state_transition::state_transitions::documents_batch) trait DocumentsBatchStateTransitionStateValidationV0 -{ - fn validate_state_v0( - &self, - action: DocumentsBatchTransitionAction, - platform: &PlatformStateRef, - block_info: &BlockInfo, - execution_context: &mut StateTransitionExecutionContext, - tx: TransactionArg, - platform_version: &PlatformVersion, - ) -> Result, Error>; - - fn transform_into_action_v0( - &self, - platform: &PlatformStateRef, - block_info: &BlockInfo, - validation_mode: ValidationMode, - tx: TransactionArg, - ) -> Result, Error>; -} - -impl DocumentsBatchStateTransitionStateValidationV0 for DocumentsBatchTransition { - fn validate_state_v0( - &self, - mut state_transition_action: DocumentsBatchTransitionAction, - platform: &PlatformStateRef, - block_info: &BlockInfo, - execution_context: &mut StateTransitionExecutionContext, - transaction: TransactionArg, - platform_version: &PlatformVersion, - ) -> Result, Error> { - let mut validation_result = ConsensusValidationResult::::new(); - - let state_transition_execution_context = - StateTransitionExecutionContext::default_for_platform_version(platform_version)?; - - let owner_id = state_transition_action.owner_id(); - - let mut validated_transitions = vec![]; - - let data_trigger_bindings = if platform.config.execution.use_document_triggers { - data_trigger_bindings_list(platform_version)? - } else { - vec![] - }; - - // Next we need to validate the structure of all actions (this means with the data contract) - for transition in state_transition_action.transitions_take() { - let transition_validation_result = match &transition { - DocumentTransitionAction::CreateAction(create_action) => create_action - .validate_state( - platform, - owner_id, - block_info, - execution_context, - transaction, - platform_version, - )?, - DocumentTransitionAction::ReplaceAction(replace_action) => replace_action - .validate_state( - platform, - owner_id, - block_info, - execution_context, - transaction, - platform_version, - )?, - DocumentTransitionAction::TransferAction(transfer_action) => transfer_action - .validate_state( - platform, - owner_id, - block_info, - execution_context, - transaction, - platform_version, - )?, - DocumentTransitionAction::DeleteAction(delete_action) => delete_action - .validate_state( - platform, - owner_id, - block_info, - execution_context, - transaction, - platform_version, - )?, - DocumentTransitionAction::UpdatePriceAction(update_price_action) => { - update_price_action.validate_state( - platform, - owner_id, - block_info, - execution_context, - transaction, - platform_version, - )? - } - DocumentTransitionAction::PurchaseAction(purchase_action) => purchase_action - .validate_state( - platform, - owner_id, - block_info, - execution_context, - transaction, - platform_version, - )?, - DocumentTransitionAction::BumpIdentityDataContractNonce(..) => { - return Err(Error::Execution(ExecutionError::CorruptedCodeExecution( - "we should never start with a bump identity data contract nonce", - ))); - } - }; - - if !transition_validation_result.is_valid() { - // If a state transition isn't valid we still need to bump the identity data contract nonce - validation_result.add_errors(transition_validation_result.errors); - validated_transitions.push( - DocumentTransitionAction::BumpIdentityDataContractNonce( - BumpIdentityDataContractNonceAction::from_document_base_transition_action( - transition.base_owned().ok_or(Error::Execution( - ExecutionError::CorruptedCodeExecution( - "base should always exist on transition", - ), - ))?, - owner_id, - state_transition_action.user_fee_increase(), - ), - ), - ); - } else if platform.config.execution.use_document_triggers { - // we should also validate document triggers - let data_trigger_execution_context = DataTriggerExecutionContext { - platform, - transaction, - owner_id: &self.owner_id(), - state_transition_execution_context: &state_transition_execution_context, - }; - let data_trigger_execution_result = transition.validate_with_data_triggers( - &data_trigger_bindings, - &data_trigger_execution_context, - platform_version, - )?; - - if !data_trigger_execution_result.is_valid() { - // If a state transition isn't valid because of data triggers we still need - // to bump the identity data contract nonce - let consensus_errors: Vec = data_trigger_execution_result - .errors - .into_iter() - .map(|e| ConsensusError::StateError(StateError::DataTriggerError(e))) - .collect(); - validation_result.add_errors(consensus_errors); - validated_transitions - .push(DocumentTransitionAction::BumpIdentityDataContractNonce( - BumpIdentityDataContractNonceAction::from_document_base_transition_action( - transition.base_owned().ok_or(Error::Execution( - ExecutionError::CorruptedCodeExecution( - "base should always exist on transition", - ), - ))?, - owner_id, - state_transition_action.user_fee_increase(), - ), - )); - } else { - validated_transitions.push(transition); - } - } else { - validated_transitions.push(transition); - } - } - - state_transition_action.set_transitions(validated_transitions); - - validation_result.set_data(state_transition_action.into()); - - Ok(validation_result) - } - - fn transform_into_action_v0( - &self, - platform: &PlatformStateRef, - block_info: &BlockInfo, - validation_mode: ValidationMode, - tx: TransactionArg, - ) -> Result, Error> { - let platform_version = platform.state.current_platform_version()?; - - let mut execution_context = - StateTransitionExecutionContext::default_for_platform_version(platform_version)?; - - let validation_result = self.try_into_action_v0( - platform, - block_info, - validation_mode.should_validate_document_valid_against_state(), - tx, - &mut execution_context, - )?; - - Ok(validation_result.map(Into::into)) - } -} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_create/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_create/mod.rs index 1e0d8bf4b0..4b9f552345 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_create/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_create/mod.rs @@ -215,7 +215,121 @@ mod tests { use std::collections::BTreeMap; #[test] - fn test_identity_create_validation() { + fn test_identity_create_validation_first_protocol_version() { + let platform_version = PlatformVersion::first(); + let platform_config = PlatformConfig { + testing_configs: PlatformTestConfig { + disable_instant_lock_signature_verification: true, + ..Default::default() + }, + ..Default::default() + }; + + let platform = TestPlatformBuilder::new() + .with_config(platform_config) + .with_initial_protocol_version(1) + .build_with_mock_rpc() + .set_initial_state_structure(); + + let platform_state = platform.state.load(); + + let mut signer = SimpleSigner::default(); + + let mut rng = StdRng::seed_from_u64(567); + + let (master_key, master_private_key) = + IdentityPublicKey::random_ecdsa_master_authentication_key( + 0, + Some(58), + platform_version, + ) + .expect("expected to get key pair"); + + signer.add_key(master_key.clone(), master_private_key.clone()); + + let (key, private_key) = IdentityPublicKey::random_ecdsa_critical_level_authentication_key( + 1, + Some(999), + platform_version, + ) + .expect("expected to get key pair"); + + signer.add_key(key.clone(), private_key.clone()); + + let (_, pk) = ECDSA_SECP256K1 + .random_public_and_private_key_data(&mut rng, platform_version) + .unwrap(); + + let asset_lock_proof = instant_asset_lock_proof_fixture( + Some(PrivateKey::from_slice(pk.as_slice(), Network::Testnet).unwrap()), + None, + ); + + let identifier = asset_lock_proof + .create_identifier() + .expect("expected an identifier"); + + let identity: Identity = IdentityV0 { + id: identifier, + public_keys: BTreeMap::from([(0, master_key.clone()), (1, key.clone())]), + balance: 1000000000, + revision: 0, + } + .into(); + + let identity_create_transition: StateTransition = + IdentityCreateTransition::try_from_identity_with_signer( + &identity, + asset_lock_proof, + pk.as_slice(), + &signer, + &NativeBlsModule, + 0, + platform_version, + ) + .expect("expected an identity create transition"); + + let identity_create_serialized_transition = identity_create_transition + .serialize_to_bytes() + .expect("serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![identity_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_eq!(processing_result.valid_count(), 1); + + assert_eq!(processing_result.aggregated_fees().processing_fee, 1871240); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + let identity_balance = platform + .drive + .fetch_identity_balance(identity.id().into_buffer(), None, platform_version) + .expect("expected to get identity balance") + .expect("expected there to be an identity balance for this identity"); + + assert_eq!(identity_balance, 99913915760); + } + + #[test] + fn test_identity_create_validation_latest_protocol_version() { let platform_version = PlatformVersion::latest(); let platform_config = PlatformConfig { testing_configs: PlatformTestConfig { @@ -309,7 +423,230 @@ mod tests { assert_eq!(processing_result.valid_count(), 1); - assert_eq!(processing_result.aggregated_fees().processing_fee, 1871240); + assert_eq!(processing_result.aggregated_fees().processing_fee, 1919540); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + let identity_balance = platform + .drive + .fetch_identity_balance(identity.id().into_buffer(), None, platform_version) + .expect("expected to get identity balance") + .expect("expected there to be an identity balance for this identity"); + + assert_eq!(identity_balance, 99913867460); + } + + #[test] + fn test_identity_create_asset_lock_reuse_after_issue_first_protocol_version() { + let platform_version = PlatformVersion::first(); + let platform_config = PlatformConfig { + testing_configs: PlatformTestConfig { + disable_instant_lock_signature_verification: true, + ..Default::default() + }, + ..Default::default() + }; + + let platform = TestPlatformBuilder::new() + .with_config(platform_config) + .with_initial_protocol_version(1) + .build_with_mock_rpc() + .set_initial_state_structure(); + + let platform_state = platform.state.load(); + + let mut signer = SimpleSigner::default(); + + let mut rng = StdRng::seed_from_u64(567); + + let (master_key, master_private_key) = + IdentityPublicKey::random_ecdsa_master_authentication_key( + 0, + Some(58), + platform_version, + ) + .expect("expected to get key pair"); + + signer.add_key(master_key.clone(), master_private_key.clone()); + + let (critical_public_key_that_is_already_in_system, private_key) = + IdentityPublicKey::random_ecdsa_critical_level_authentication_key( + 1, + Some(999), + platform_version, + ) + .expect("expected to get key pair"); + + // Let's start by adding this critical key to another identity + + let (another_master_key, _) = IdentityPublicKey::random_ecdsa_master_authentication_key( + 0, + Some(53), + platform_version, + ) + .expect("expected to get key pair"); + + let identity_already_in_system: Identity = IdentityV0 { + id: Identifier::random_with_rng(&mut rng), + public_keys: BTreeMap::from([ + (0, another_master_key.clone()), + (1, critical_public_key_that_is_already_in_system.clone()), + ]), + balance: 100000, + revision: 0, + } + .into(); + + // We just add this identity to the system first + + platform + .drive + .add_new_identity( + identity_already_in_system, + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add a new identity"); + + signer.add_key( + critical_public_key_that_is_already_in_system.clone(), + private_key.clone(), + ); + + let (_, pk) = ECDSA_SECP256K1 + .random_public_and_private_key_data(&mut rng, platform_version) + .unwrap(); + + let asset_lock_proof = instant_asset_lock_proof_fixture( + Some(PrivateKey::from_slice(pk.as_slice(), Network::Testnet).unwrap()), + None, + ); + + let identifier = asset_lock_proof + .create_identifier() + .expect("expected an identifier"); + + let mut identity: Identity = IdentityV0 { + id: identifier, + public_keys: BTreeMap::from([ + (0, master_key.clone()), + (1, critical_public_key_that_is_already_in_system.clone()), + ]), + balance: 1000000000, + revision: 0, + } + .into(); + + let identity_create_transition: StateTransition = + IdentityCreateTransition::try_from_identity_with_signer( + &identity, + asset_lock_proof.clone(), + pk.as_slice(), + &signer, + &NativeBlsModule, + 0, + platform_version, + ) + .expect("expected an identity create transition"); + + let identity_create_serialized_transition = identity_create_transition + .serialize_to_bytes() + .expect("serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![identity_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_eq!(processing_result.invalid_paid_count(), 1); + + assert_eq!(processing_result.invalid_unpaid_count(), 0); + + assert_eq!(processing_result.valid_count(), 0); + + assert_eq!(processing_result.aggregated_fees().processing_fee, 10080700); // 10000000 penalty + 80700 processing + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + // Okay now let us try to reuse the asset lock + + let (new_public_key, new_private_key) = + IdentityPublicKey::random_ecdsa_critical_level_authentication_key( + 1, + Some(13), + platform_version, + ) + .expect("expected to get key pair"); + + signer.add_key(new_public_key.clone(), new_private_key.clone()); + + // let's set the new key to the identity (replacing the one that was causing the issue + identity.set_public_keys(BTreeMap::from([ + (0, master_key.clone()), + (1, new_public_key.clone()), + ])); + + let identity_create_transition: StateTransition = + IdentityCreateTransition::try_from_identity_with_signer( + &identity, + asset_lock_proof, + pk.as_slice(), + &signer, + &NativeBlsModule, + 0, + platform_version, + ) + .expect("expected an identity create transition"); + + let identity_create_serialized_transition = identity_create_transition + .serialize_to_bytes() + .expect("serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![identity_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_eq!(processing_result.invalid_paid_count(), 0); + + assert_eq!(processing_result.invalid_unpaid_count(), 0); + + assert_eq!(processing_result.valid_count(), 1); + + assert_eq!(processing_result.aggregated_fees().processing_fee, 2146900); platform .drive @@ -324,11 +661,11 @@ mod tests { .expect("expected to get identity balance") .expect("expected there to be an identity balance for this identity"); - assert_eq!(identity_balance, 99913915760); + assert_eq!(identity_balance, 99909310400); // The identity balance is smaller than if there hadn't been any issue } #[test] - fn test_identity_create_asset_lock_reuse_after_issue() { + fn test_identity_create_asset_lock_reuse_after_issue_latest_protocol_version() { let platform_version = PlatformVersion::latest(); let platform_config = PlatformConfig { testing_configs: PlatformTestConfig { @@ -531,7 +868,7 @@ mod tests { assert_eq!(processing_result.valid_count(), 1); - assert_eq!(processing_result.aggregated_fees().processing_fee, 2146900); + assert_eq!(processing_result.aggregated_fees().processing_fee, 2195200); platform .drive @@ -546,7 +883,7 @@ mod tests { .expect("expected to get identity balance") .expect("expected there to be an identity balance for this identity"); - assert_eq!(identity_balance, 99909310400); // The identity balance is smaller than if there hadn't been any issue + assert_eq!(identity_balance, 99909262100); // The identity balance is smaller than if there hadn't been any issue } #[test] @@ -1007,8 +1344,8 @@ mod tests { } #[test] - fn test_identity_create_asset_lock_replay_attack() { - let platform_version = PlatformVersion::latest(); + fn test_identity_create_asset_lock_replay_attack_first_protocol_version() { + let platform_version = PlatformVersion::first(); let platform_config = PlatformConfig { testing_configs: PlatformTestConfig { disable_instant_lock_signature_verification: true, @@ -1019,6 +1356,7 @@ mod tests { let platform = TestPlatformBuilder::new() .with_config(platform_config) + .with_initial_protocol_version(1) .build_with_mock_rpc() .set_initial_state_structure(); @@ -1252,4 +1590,251 @@ mod tests { assert_eq!(identity_balance, 99909310400); // The identity balance is smaller than if there hadn't been any issue } + + #[test] + fn test_identity_create_asset_lock_replay_attack_latest_protocol_version() { + let platform_version = PlatformVersion::latest(); + let platform_config = PlatformConfig { + testing_configs: PlatformTestConfig { + disable_instant_lock_signature_verification: true, + ..Default::default() + }, + ..Default::default() + }; + + let platform = TestPlatformBuilder::new() + .with_config(platform_config) + .build_with_mock_rpc() + .set_initial_state_structure(); + + let platform_state = platform.state.load(); + + let mut signer = SimpleSigner::default(); + + let mut rng = StdRng::seed_from_u64(567); + + let (master_key, master_private_key) = + IdentityPublicKey::random_ecdsa_master_authentication_key( + 0, + Some(58), + platform_version, + ) + .expect("expected to get key pair"); + + signer.add_key(master_key.clone(), master_private_key.clone()); + + let (critical_public_key_that_is_already_in_system, private_key) = + IdentityPublicKey::random_ecdsa_critical_level_authentication_key( + 1, + Some(999), + platform_version, + ) + .expect("expected to get key pair"); + + // Let's start by adding this critical key to another identity + + let (another_master_key, _) = IdentityPublicKey::random_ecdsa_master_authentication_key( + 0, + Some(53), + platform_version, + ) + .expect("expected to get key pair"); + + let identity_already_in_system: Identity = IdentityV0 { + id: Identifier::random_with_rng(&mut rng), + public_keys: BTreeMap::from([ + (0, another_master_key.clone()), + (1, critical_public_key_that_is_already_in_system.clone()), + ]), + balance: 100000, + revision: 0, + } + .into(); + + // We just add this identity to the system first + + platform + .drive + .add_new_identity( + identity_already_in_system, + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add a new identity"); + + signer.add_key( + critical_public_key_that_is_already_in_system.clone(), + private_key.clone(), + ); + + let (_, pk) = ECDSA_SECP256K1 + .random_public_and_private_key_data(&mut rng, platform_version) + .unwrap(); + + let asset_lock_proof = instant_asset_lock_proof_fixture( + Some(PrivateKey::from_slice(pk.as_slice(), Network::Testnet).unwrap()), + None, + ); + + let identifier = asset_lock_proof + .create_identifier() + .expect("expected an identifier"); + + let mut identity: Identity = IdentityV0 { + id: identifier, + public_keys: BTreeMap::from([ + (0, master_key.clone()), + (1, critical_public_key_that_is_already_in_system.clone()), + ]), + balance: 1000000000, + revision: 0, + } + .into(); + + let identity_create_transition: StateTransition = + IdentityCreateTransition::try_from_identity_with_signer( + &identity, + asset_lock_proof.clone(), + pk.as_slice(), + &signer, + &NativeBlsModule, + 0, + platform_version, + ) + .expect("expected an identity create transition"); + + let identity_create_serialized_transition = identity_create_transition + .serialize_to_bytes() + .expect("serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![identity_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_eq!(processing_result.invalid_paid_count(), 1); + + assert_eq!(processing_result.invalid_unpaid_count(), 0); + + assert_eq!(processing_result.valid_count(), 0); + + assert_eq!(processing_result.aggregated_fees().processing_fee, 10080700); // 10000000 penalty + 80700 processing + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + // let's try to replay the bad transaction + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![identity_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_eq!(processing_result.invalid_paid_count(), 0); + + assert_eq!(processing_result.invalid_unpaid_count(), 1); + + assert_eq!(processing_result.valid_count(), 0); + + assert_eq!(processing_result.aggregated_fees().processing_fee, 0); + + // Okay now let us try to reuse the asset lock + + let (new_public_key, new_private_key) = + IdentityPublicKey::random_ecdsa_critical_level_authentication_key( + 1, + Some(13), + platform_version, + ) + .expect("expected to get key pair"); + + signer.add_key(new_public_key.clone(), new_private_key.clone()); + + // let's set the new key to the identity (replacing the one that was causing the issue + identity.set_public_keys(BTreeMap::from([ + (0, master_key.clone()), + (1, new_public_key.clone()), + ])); + + let identity_create_transition: StateTransition = + IdentityCreateTransition::try_from_identity_with_signer( + &identity, + asset_lock_proof, + pk.as_slice(), + &signer, + &NativeBlsModule, + 0, + platform_version, + ) + .expect("expected an identity create transition"); + + let identity_create_serialized_transition = identity_create_transition + .serialize_to_bytes() + .expect("serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![identity_create_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_eq!(processing_result.invalid_paid_count(), 0); + + assert_eq!(processing_result.invalid_unpaid_count(), 0); + + assert_eq!(processing_result.valid_count(), 1); + + assert_eq!(processing_result.aggregated_fees().processing_fee, 2195200); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + let identity_balance = platform + .drive + .fetch_identity_balance(identity.id().into_buffer(), None, platform_version) + .expect("expected to get identity balance") + .expect("expected there to be an identity balance for this identity"); + + assert_eq!(identity_balance, 99909262100); // The identity balance is smaller than if there hadn't been any issue + } } diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_top_up/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_top_up/mod.rs index e3fe348207..1b35c36131 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_top_up/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_top_up/mod.rs @@ -121,8 +121,8 @@ mod tests { use std::collections::BTreeMap; #[test] - fn test_identity_top_up_validation() { - let platform_version = PlatformVersion::latest(); + fn test_identity_top_up_validation_first_version() { + let platform_version = PlatformVersion::first(); let platform_config = PlatformConfig { testing_configs: PlatformTestConfig { disable_instant_lock_signature_verification: true, @@ -133,6 +133,7 @@ mod tests { let platform = TestPlatformBuilder::new() .with_config(platform_config) + .with_initial_protocol_version(1) .build_with_mock_rpc() .set_initial_state_structure(); @@ -249,4 +250,134 @@ mod tests { assert_eq!(identity_balance, 149993654420); // about 0.5 Dash starting balance + 1 Dash asset lock top up } + + #[test] + fn test_identity_top_up_validation_latest_version() { + let platform_version = PlatformVersion::latest(); + let platform_config = PlatformConfig { + testing_configs: PlatformTestConfig { + disable_instant_lock_signature_verification: true, + ..Default::default() + }, + ..Default::default() + }; + + let platform = TestPlatformBuilder::new() + .with_config(platform_config) + .build_with_mock_rpc() + .set_initial_state_structure(); + + let platform_state = platform.state.load(); + + let mut signer = SimpleSigner::default(); + + let mut rng = StdRng::seed_from_u64(567); + + let (master_key, master_private_key) = + IdentityPublicKey::random_ecdsa_master_authentication_key( + 0, + Some(58), + 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( + 1, + Some(999), + platform_version, + ) + .expect("expected to get key pair"); + + let identity_already_in_system: Identity = IdentityV0 { + id: Identifier::random_with_rng(&mut rng), + public_keys: BTreeMap::from([ + (0, master_key.clone()), + (1, critical_public_key.clone()), + ]), + balance: 50000000000, + revision: 0, + } + .into(); + + // We just add this identity to the system first + + platform + .drive + .add_new_identity( + identity_already_in_system.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add a new identity"); + + signer.add_key(critical_public_key.clone(), private_key.clone()); + + let (_, pk) = ECDSA_SECP256K1 + .random_public_and_private_key_data(&mut rng, platform_version) + .unwrap(); + + let asset_lock_proof = instant_asset_lock_proof_fixture( + Some(PrivateKey::from_slice(pk.as_slice(), Network::Testnet).unwrap()), + None, + ); + + let identity_top_up_transition: StateTransition = + IdentityTopUpTransition::try_from_identity( + &identity_already_in_system, + asset_lock_proof, + pk.as_slice(), + 0, + platform_version, + None, + ) + .expect("expected an identity create transition"); + + let identity_top_up_serialized_transition = identity_top_up_transition + .serialize_to_bytes() + .expect("serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![identity_top_up_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + assert_eq!(processing_result.valid_count(), 1); + + assert_eq!(processing_result.aggregated_fees().processing_fee, 588840); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit"); + + let identity_balance = platform + .drive + .fetch_identity_balance( + identity_already_in_system.id().into_buffer(), + None, + platform_version, + ) + .expect("expected to get identity balance") + .expect("expected there to be an identity balance for this identity"); + + assert_eq!(identity_balance, 149993606160); // about 0.5 Dash starting balance + 1 Dash asset lock top up + } } 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 b0986e026d..0c7b345be7 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 @@ -1,5 +1,5 @@ /// Module containing functionality related to batch processing of documents. -pub mod documents_batch; +pub mod batch; /// Module for creating an identity entity. pub mod identity_create; @@ -78,7 +78,8 @@ pub(in crate::execution) mod tests { use dpp::dashcore::{ProTxHash, Txid}; use dpp::dashcore::hashes::Hash; use dpp::data_contract::accessors::v0::DataContractV0Getters; - use dpp::data_contract::DataContract; + use dpp::data_contract::accessors::v1::{DataContractV1Getters, DataContractV1Setters}; + use dpp::data_contract::{DataContract, GroupContractPosition}; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::data_contract::document_type::random_document::{CreateRandomDocument, DocumentFieldFillSize, DocumentFieldFillType}; use dpp::document::{Document, DocumentV0Getters, DocumentV0Setters}; @@ -90,11 +91,12 @@ pub(in crate::execution) mod tests { use dpp::identity::hash::IdentityPublicKeyHashMethodsV0; 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; + use dpp::state_transition::batch_transition::BatchTransition; + use dpp::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; use dpp::state_transition::masternode_vote_transition::MasternodeVoteTransition; use dpp::state_transition::masternode_vote_transition::methods::MasternodeVoteTransitionMethodsV0; use dpp::state_transition::StateTransition; + use dpp::tokens::calculate_token_id; use dpp::util::hash::hash_double; use dpp::util::strings::convert_to_homograph_safe_chars; use dpp::voting::contender_structs::{Contender, ContenderV0}; @@ -123,6 +125,8 @@ pub(in crate::execution) mod tests { use crate::platform_types::epoch_info::v0::EpochInfoV0; use crate::execution::types::block_fees::v0::BlockFeesV0; use crate::execution::types::processed_block_fees_outcome::v0::ProcessedBlockFeesOutcome; + use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; + use dpp::data_contract::group::Group; /// We add an identity, but we also add the same amount to system credits pub(in crate::execution) fn setup_identity_with_system_credits( @@ -478,7 +482,7 @@ pub(in crate::execution) mod tests { // Process fees let processed_block_fees = platform - .process_block_fees( + .process_block_fees_and_validate_sum_trees( &block_execution_context, block_fees_v0.into(), &transaction, @@ -894,6 +898,9 @@ pub(in crate::execution) mod tests { "tests/supporting_files/contract/dashpay/dashpay-contract-all-mutable.json", None, None, + None::, + None, + None, ); let card_game = setup_contract( @@ -901,6 +908,9 @@ pub(in crate::execution) mod tests { "tests/supporting_files/contract/crypto-card-game/crypto-card-game-direct-purchase.json", None, None, + None::, + None, + None, ); let (_, _, dpns_contract) = create_dpns_name_contest_on_identities_for_contract_records( @@ -1044,7 +1054,7 @@ pub(in crate::execution) mod tests { document_2.set("preorderSalt", salt_2.into()); let documents_batch_create_preorder_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_1.clone(), preorder, entropy.0, @@ -1065,7 +1075,7 @@ pub(in crate::execution) mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_preorder_transition_2 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_2.clone(), preorder, entropy.0, @@ -1086,7 +1096,7 @@ pub(in crate::execution) mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_1.clone(), domain, entropy.0, @@ -1106,7 +1116,7 @@ pub(in crate::execution) mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_2 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_2.clone(), domain, entropy.0, @@ -1245,6 +1255,9 @@ pub(in crate::execution) mod tests { "tests/supporting_files/contract/dpns/dpns-contract-contested-unique-index-with-contract-id.json", None, None, + None::, + None, + None, ); let preorder = dpns_contract @@ -1354,7 +1367,7 @@ pub(in crate::execution) mod tests { document_2.set("preorderSalt", salt_2.into()); let documents_batch_create_preorder_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_1.clone(), preorder, entropy.0, @@ -1375,7 +1388,7 @@ pub(in crate::execution) mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_preorder_transition_2 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_2.clone(), preorder, entropy.0, @@ -1396,7 +1409,7 @@ pub(in crate::execution) mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_1.clone(), domain, entropy.0, @@ -1416,7 +1429,7 @@ pub(in crate::execution) mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_2 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_2.clone(), domain, entropy.0, @@ -1576,7 +1589,7 @@ pub(in crate::execution) mod tests { document_1.set("preorderSalt", salt_1.into()); let documents_batch_create_preorder_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( preorder_document_1, preorder, entropy.0, @@ -1597,7 +1610,7 @@ pub(in crate::execution) mod tests { .expect("expected documents batch serialized state transition"); let documents_batch_create_transition_1 = - DocumentsBatchTransition::new_document_creation_transition_from_document( + BatchTransition::new_document_creation_transition_from_document( document_1, domain, entropy.0, @@ -2274,4 +2287,38 @@ pub(in crate::execution) mod tests { finished_vote_info, ) } + + pub(in crate::execution) fn create_token_contract_with_owner_identity( + platform: &mut TempPlatform, + identity_id: Identifier, + token_configuration_modification: Option, + add_groups: Option>, + platform_version: &PlatformVersion, + ) -> (DataContract, Identifier) { + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let basic_token_contract = setup_contract( + &platform.drive, + "tests/supporting_files/contract/basic-token/basic-token.json", + Some(data_contract_id.to_buffer()), + Some(identity_id.to_buffer()), + Some(|data_contract: &mut DataContract| { + if let Some(token_configuration_modification) = token_configuration_modification { + let token_configuration = data_contract + .token_configuration_mut(0) + .expect("expected token configuration"); + token_configuration_modification(token_configuration); + } + if let Some(add_groups) = add_groups { + data_contract.set_groups(add_groups); + } + }), + None, + Some(platform_version), + ); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + (basic_token_contract, token_id.into()) + } } diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/transformer/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/transformer/mod.rs index e078e0c8b6..cb26dd4fbc 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/transformer/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/transformer/mod.rs @@ -98,7 +98,7 @@ impl StateTransitionActionTransformerV0 for StateTransition { execution_context, tx, ), - StateTransition::DocumentsBatch(st) => st.transform_into_action( + StateTransition::Batch(st) => st.transform_into_action( platform, block_info, validation_mode, diff --git a/packages/rs-drive-abci/src/main.rs b/packages/rs-drive-abci/src/main.rs index a8ae1adccd..67a68a4091 100644 --- a/packages/rs-drive-abci/src/main.rs +++ b/packages/rs-drive-abci/src/main.rs @@ -468,10 +468,10 @@ mod test { let path = tempdir.join("db"); fs::create_dir(&path).expect("create db dir"); - let (drive, _) = Drive::open(&path, None).expect("open drive"); - let platform_version = PlatformVersion::latest(); + let (drive, _) = Drive::open(&path, None, Some(platform_version)).expect("open drive"); + drive .create_initial_state_structure(None, platform_version) .expect("should create root tree successfully"); 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 d5d99f71b3..379c3a4b57 100644 --- a/packages/rs-drive-abci/src/platform_types/platform/mod.rs +++ b/packages/rs-drive-abci/src/platform_types/platform/mod.rs @@ -180,12 +180,18 @@ impl Platform { { let config = config.unwrap_or(PlatformConfig::default_testnet()); - let (drive, current_protocol_version) = - Drive::open(path, Some(config.drive.clone())).map_err(Error::Drive)?; - - if let Some(protocol_version) = current_protocol_version { - let platform_version = PlatformVersion::get(protocol_version)?; + let default_initial_platform_version = initial_protocol_version + .map(|protocol_version| PlatformVersion::get(protocol_version)) + .transpose()?; + + let (drive, current_platform_version) = Drive::open( + path, + Some(config.drive.clone()), + default_initial_platform_version, + ) + .map_err(Error::Drive)?; + if let Some(platform_version) = current_platform_version { let Some(execution_state) = Platform::::fetch_platform_state(&drive, None, platform_version)? else { diff --git a/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving.rs b/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving.rs index de69aff56d..1682b24321 100644 --- a/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving.rs +++ b/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving.rs @@ -5,11 +5,10 @@ use crate::platform_types::signature_verification_quorum_set::{ Quorums, SignatureVerificationQuorumSetForSaving, SignatureVerificationQuorumSetV0, VerificationQuorum, }; +use bincode::{Decode, Encode}; use dashcore_rpc::dashcore::hashes::Hash; use dashcore_rpc::dashcore::QuorumHash; use dashcore_rpc::json::QuorumType; -use dpp::identity::state_transition::asset_lock_proof::Encode; -use dpp::platform_serialization::de::Decode; use dpp::platform_value::Bytes32; #[derive(Debug, Clone, Encode, Decode)] diff --git a/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs b/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs index bfb596e451..b06d75eacc 100644 --- a/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs +++ b/packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving_v1.rs @@ -5,11 +5,10 @@ use crate::platform_types::signature_verification_quorum_set::{ Quorums, SignatureVerificationQuorumSetForSaving, SignatureVerificationQuorumSetV0, ThresholdBlsPublicKey, VerificationQuorum, }; +use bincode::{Decode, Encode}; use dashcore_rpc::dashcore::hashes::Hash; use dashcore_rpc::dashcore::QuorumHash; use dpp::bls_signatures::Bls12381G2Impl; -use dpp::identity::state_transition::asset_lock_proof::Encode; -use dpp::platform_serialization::de::Decode; use dpp::platform_value::Bytes32; #[derive(Debug, Clone, Encode, Decode)] diff --git a/packages/rs-drive-abci/src/query/group_queries/group_info/mod.rs b/packages/rs-drive-abci/src/query/group_queries/group_info/mod.rs new file mode 100644 index 0000000000..00dcdac6c4 --- /dev/null +++ b/packages/rs-drive-abci/src/query/group_queries/group_info/mod.rs @@ -0,0 +1,53 @@ +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_group_info_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_group_info_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{GetGroupInfoRequest, GetGroupInfoResponse}; +use dpp::version::PlatformVersion; +mod v0; + +impl Platform { + /// Querying of group info + pub fn query_group_info( + &self, + GetGroupInfoRequest { version }: GetGroupInfoRequest, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let Some(version) = version else { + return Ok(QueryValidationResult::new_with_error( + QueryError::DecodingError("could not decode group info query".to_string()), + )); + }; + + let feature_version_bounds = &platform_version.drive_abci.query.group_queries.group_info; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "group_info".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_group_info_v0(request_v0, platform_state, platform_version)?; + Ok(result.map(|response_v0| GetGroupInfoResponse { + version: Some(ResponseVersion::V0(response_v0)), + })) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/group_queries/group_info/v0/mod.rs b/packages/rs-drive-abci/src/query/group_queries/group_info/v0/mod.rs new file mode 100644 index 0000000000..a5175ac3cf --- /dev/null +++ b/packages/rs-drive-abci/src/query/group_queries/group_info/v0/mod.rs @@ -0,0 +1,95 @@ +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_group_info_request::GetGroupInfoRequestV0; +use dapi_grpc::platform::v0::get_group_info_response::get_group_info_response_v0::{ + GroupInfo, GroupInfoEntry, GroupMemberEntry, +}; +use dapi_grpc::platform::v0::get_group_info_response::{ + get_group_info_response_v0, GetGroupInfoResponseV0, +}; +use dpp::check_validation_result_with_data; +use dpp::data_contract::group::accessors::v0::GroupV0Getters; +use dpp::identifier::Identifier; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; +use drive::error::query::QuerySyntaxError; + +impl Platform { + pub(super) fn query_group_info_v0( + &self, + GetGroupInfoRequestV0 { + contract_id, + group_contract_position, + prove, + }: GetGroupInfoRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let contract_id: Identifier = + check_validation_result_with_data!(contract_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "token_id must be a valid identifier (32 bytes long)".to_string(), + ) + })); + + if group_contract_position > u16::MAX as u32 { + return Ok(QueryValidationResult::new_with_error(QueryError::Query( + QuerySyntaxError::InvalidParameter(format!( + "group contract position {} can not be over u16::MAX", + group_contract_position + )), + ))); + } + + let response = if prove { + let proof = check_validation_result_with_data!(self.drive.prove_group_info( + contract_id, + group_contract_position as u16, + None, + platform_version, + )); + + GetGroupInfoResponseV0 { + result: Some(get_group_info_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let group_info = self + .drive + .fetch_group_info( + contract_id, + group_contract_position as u16, + None, + platform_version, + )? + .map(|group| { + let members = group + .members() + .into_iter() + .map(|(member_id, power)| GroupMemberEntry { + member_id: member_id.to_vec(), + power: *power, + }) + .collect(); + GroupInfoEntry { + members, + group_required_power: group.required_power(), + } + }); + + GetGroupInfoResponseV0 { + result: Some(get_group_info_response_v0::Result::GroupInfo(GroupInfo { + group_info, + })), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive-abci/src/query/group_queries/group_infos/mod.rs b/packages/rs-drive-abci/src/query/group_queries/group_infos/mod.rs new file mode 100644 index 0000000000..c21304bb75 --- /dev/null +++ b/packages/rs-drive-abci/src/query/group_queries/group_infos/mod.rs @@ -0,0 +1,53 @@ +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_group_infos_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_group_infos_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{GetGroupInfosRequest, GetGroupInfosResponse}; +use dpp::version::PlatformVersion; +mod v0; + +impl Platform { + /// Querying of group infos + pub fn query_group_infos( + &self, + GetGroupInfosRequest { version }: GetGroupInfosRequest, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let Some(version) = version else { + return Ok(QueryValidationResult::new_with_error( + QueryError::DecodingError("could not decode group infos query".to_string()), + )); + }; + + let feature_version_bounds = &platform_version.drive_abci.query.group_queries.group_infos; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "group_infos".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_group_infos_v0(request_v0, platform_state, platform_version)?; + Ok(result.map(|response_v0| GetGroupInfosResponse { + version: Some(ResponseVersion::V0(response_v0)), + })) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/group_queries/group_infos/v0/mod.rs b/packages/rs-drive-abci/src/query/group_queries/group_infos/v0/mod.rs new file mode 100644 index 0000000000..88787fef92 --- /dev/null +++ b/packages/rs-drive-abci/src/query/group_queries/group_infos/v0/mod.rs @@ -0,0 +1,127 @@ +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_group_infos_request::GetGroupInfosRequestV0; +use dapi_grpc::platform::v0::get_group_infos_response::get_group_infos_response_v0::{ + GroupInfos, GroupMemberEntry, GroupPositionInfoEntry, +}; +use dapi_grpc::platform::v0::get_group_infos_response::{ + get_group_infos_response_v0, GetGroupInfosResponseV0, +}; +use dpp::check_validation_result_with_data; +use dpp::data_contract::group::accessors::v0::GroupV0Getters; +use dpp::identifier::Identifier; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; +use drive::error::query::QuerySyntaxError; + +impl Platform { + pub(super) fn query_group_infos_v0( + &self, + GetGroupInfosRequestV0 { + contract_id, + start_at_group_contract_position, + count, + prove, + }: GetGroupInfosRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let config = &self.config.drive; + let contract_id: Identifier = + check_validation_result_with_data!(contract_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "token_id must be a valid identifier (32 bytes long)".to_string(), + ) + })); + + let limit = count + .map_or(Some(config.default_query_limit), |limit_value| { + if limit_value == 0 + || limit_value > u16::MAX as u32 + || limit_value as u16 > config.default_query_limit + { + None + } else { + Some(limit_value as u16) + } + }) + .ok_or(drive::error::Error::Query(QuerySyntaxError::InvalidLimit( + format!("limit greater than max limit {}", config.max_query_limit), + )))?; + + let start_at_group_contract_position = match start_at_group_contract_position { + None => None, + Some(start_at_group_contract_position) => { + if start_at_group_contract_position.start_group_contract_position > u16::MAX as u32 + { + return Ok(QueryValidationResult::new_with_error(QueryError::Query( + QuerySyntaxError::InvalidParameter(format!( + "start group contract position {} can not be over u16::MAX", + start_at_group_contract_position.start_group_contract_position + )), + ))); + } + Some(( + start_at_group_contract_position.start_group_contract_position as u16, + start_at_group_contract_position.start_group_contract_position_included, + )) + } + }; + + let response = if prove { + let proof = check_validation_result_with_data!(self.drive.prove_group_infos( + contract_id, + start_at_group_contract_position, + Some(limit), + None, + platform_version, + )); + + GetGroupInfosResponseV0 { + result: Some(get_group_infos_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let group_infos = self + .drive + .fetch_group_infos( + contract_id, + start_at_group_contract_position, + Some(limit), + None, + platform_version, + )? + .into_iter() + .map(|(group_contract_position, group)| { + let members = group + .members() + .into_iter() + .map(|(member_id, power)| GroupMemberEntry { + member_id: member_id.to_vec(), + power: *power, + }) + .collect(); + GroupPositionInfoEntry { + group_contract_position: group_contract_position as u32, + members, + group_required_power: group.required_power(), + } + }) + .collect(); + + GetGroupInfosResponseV0 { + result: Some(get_group_infos_response_v0::Result::GroupInfos( + GroupInfos { group_infos }, + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive-abci/src/query/group_queries/mod.rs b/packages/rs-drive-abci/src/query/group_queries/mod.rs new file mode 100644 index 0000000000..b9ae74339a --- /dev/null +++ b/packages/rs-drive-abci/src/query/group_queries/mod.rs @@ -0,0 +1,2 @@ +mod group_info; +mod group_infos; diff --git a/packages/rs-drive-abci/src/query/mod.rs b/packages/rs-drive-abci/src/query/mod.rs index 6be97cc1cf..0e161b1ae1 100644 --- a/packages/rs-drive-abci/src/query/mod.rs +++ b/packages/rs-drive-abci/src/query/mod.rs @@ -1,11 +1,13 @@ mod data_contract_based_queries; mod document_query; +mod group_queries; mod identity_based_queries; mod prefunded_specialized_balances; mod proofs; mod response_metadata; mod service; mod system; +mod token_queries; mod validator_queries; mod voting; diff --git a/packages/rs-drive-abci/src/query/service.rs b/packages/rs-drive-abci/src/query/service.rs index 54e51348c0..9ce866c7cf 100644 --- a/packages/rs-drive-abci/src/query/service.rs +++ b/packages/rs-drive-abci/src/query/service.rs @@ -10,7 +10,8 @@ use crate::utils::spawn_blocking_task_with_name_if_supported; use async_trait::async_trait; use dapi_grpc::platform::v0::platform_server::Platform as PlatformService; use dapi_grpc::platform::v0::{ - BroadcastStateTransitionRequest, BroadcastStateTransitionResponse, GetConsensusParamsRequest, + BroadcastStateTransitionRequest, BroadcastStateTransitionResponse, + GetActiveGroupActionsRequest, GetActiveGroupActionsResponse, GetConsensusParamsRequest, GetConsensusParamsResponse, GetContestedResourceIdentityVotesRequest, GetContestedResourceIdentityVotesResponse, GetContestedResourceVoteStateRequest, GetContestedResourceVoteStateResponse, GetContestedResourceVotersForIdentityRequest, @@ -20,18 +21,22 @@ use dapi_grpc::platform::v0::{ GetDataContractResponse, GetDataContractsRequest, GetDataContractsResponse, GetDocumentsRequest, GetDocumentsResponse, GetEpochsInfoRequest, GetEpochsInfoResponse, GetEvonodesProposedEpochBlocksByIdsRequest, GetEvonodesProposedEpochBlocksByRangeRequest, - GetEvonodesProposedEpochBlocksResponse, GetIdentitiesBalancesRequest, - GetIdentitiesBalancesResponse, GetIdentitiesContractKeysRequest, - GetIdentitiesContractKeysResponse, GetIdentityBalanceAndRevisionRequest, + GetEvonodesProposedEpochBlocksResponse, GetGroupInfoRequest, GetGroupInfoResponse, + GetIdentitiesBalancesRequest, GetIdentitiesBalancesResponse, GetIdentitiesContractKeysRequest, + GetIdentitiesContractKeysResponse, GetIdentitiesTokenBalancesRequest, + GetIdentitiesTokenBalancesResponse, GetIdentitiesTokenInfosRequest, + GetIdentitiesTokenInfosResponse, 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, + GetIdentityResponse, GetIdentityTokenBalancesRequest, GetIdentityTokenBalancesResponse, + GetIdentityTokenInfosRequest, GetIdentityTokenInfosResponse, GetPathElementsRequest, + GetPathElementsResponse, GetPrefundedSpecializedBalanceRequest, + GetPrefundedSpecializedBalanceResponse, GetProofsRequest, GetProofsResponse, + GetProtocolVersionUpgradeStateRequest, GetProtocolVersionUpgradeStateResponse, + GetProtocolVersionUpgradeVoteStatusRequest, GetProtocolVersionUpgradeVoteStatusResponse, + GetStatusRequest, GetStatusResponse, GetTokenStatusesRequest, GetTokenStatusesResponse, GetTotalCreditsInPlatformRequest, GetTotalCreditsInPlatformResponse, GetVotePollsByEndDateRequest, GetVotePollsByEndDateResponse, WaitForStateTransitionResultRequest, WaitForStateTransitionResultResponse, @@ -609,6 +614,90 @@ impl PlatformService for QueryService { ) .await } + + async fn get_identity_token_balances( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_identity_token_balances, + "query_identity_token_balances", + ) + .await + } + + async fn get_identities_token_balances( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_identities_token_balances, + "query_identities_token_balances", + ) + .await + } + + async fn get_identity_token_infos( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_identity_token_infos, + "query_identity_token_infos", + ) + .await + } + + async fn get_identities_token_infos( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_identities_token_infos, + "query_identities_token_infos", + ) + .await + } + + async fn get_token_statuses( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_token_statuses, + "get_token_statuses", + ) + .await + } + + async fn get_group_info( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_group_info, + "get_group_info", + ) + .await + } + + // async fn get_active_group_actions( + // &self, + // request: Request, + // ) -> Result, Status> { + // self.handle_blocking_query( + // request, + // Platform::::query_active_group_actions, + // "get_active_group_actions", + // ) + // .await + // } } fn query_error_into_status(error: QueryError) -> Status { diff --git a/packages/rs-drive-abci/src/query/token_queries/identities_token_balances/mod.rs b/packages/rs-drive-abci/src/query/token_queries/identities_token_balances/mod.rs new file mode 100644 index 0000000000..f600317ce6 --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/identities_token_balances/mod.rs @@ -0,0 +1,66 @@ +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_token_balances_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_identities_token_balances_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{ + GetIdentitiesTokenBalancesRequest, GetIdentitiesTokenBalancesResponse, +}; +use dpp::version::PlatformVersion; +mod v0; + +impl Platform { + /// Querying of an identity's token balances by a public key hash + pub fn query_identities_token_balances( + &self, + GetIdentitiesTokenBalancesRequest { version }: GetIdentitiesTokenBalancesRequest, + 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 token balances query".to_string(), + ), + )); + }; + + let feature_version_bounds = &platform_version + .drive_abci + .query + .token_queries + .identities_token_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_token_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_token_balances_v0( + request_v0, + platform_state, + platform_version, + )?; + Ok( + result.map(|response_v0| GetIdentitiesTokenBalancesResponse { + version: Some(ResponseVersion::V0(response_v0)), + }), + ) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/token_queries/identities_token_balances/v0/mod.rs b/packages/rs-drive-abci/src/query/token_queries/identities_token_balances/v0/mod.rs new file mode 100644 index 0000000000..b655fdd99f --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/identities_token_balances/v0/mod.rs @@ -0,0 +1,88 @@ +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_token_balances_request::GetIdentitiesTokenBalancesRequestV0; +use dapi_grpc::platform::v0::get_identities_token_balances_response::{get_identities_token_balances_response_v0, GetIdentitiesTokenBalancesResponseV0}; +use dapi_grpc::platform::v0::get_identities_token_balances_response::get_identities_token_balances_response_v0::{IdentityTokenBalanceEntry, IdentityTokenBalances}; +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_token_balances_v0( + &self, + GetIdentitiesTokenBalancesRequestV0 { + token_id, + identity_ids, + prove, + }: GetIdentitiesTokenBalancesRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let token_id: Identifier = + check_validation_result_with_data!(token_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "token_id must be a valid identifier (32 bytes long)".to_string(), + ) + })); + + let identity_ids: Vec<[u8; 32]> = check_validation_result_with_data!(identity_ids + .into_iter() + .map(|identity_id| { + identity_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "identity_id must be a valid identifier (32 bytes long)".to_string(), + ) + }) + }) + .collect::, QueryError>>()); + + let response = if prove { + let proof = + check_validation_result_with_data!(self.drive.prove_identities_token_balances( + token_id.into_buffer(), + identity_ids.as_slice(), + None, + platform_version, + )); + + GetIdentitiesTokenBalancesResponseV0 { + result: Some(get_identities_token_balances_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let identity_token_balances = self + .drive + .fetch_identities_token_balances( + token_id.into_buffer(), + identity_ids.as_slice(), + None, + platform_version, + )? + .into_iter() + .map(|(identity_id, amount)| IdentityTokenBalanceEntry { + identity_id: identity_id.to_vec(), + balance: amount, + }) + .collect(); + + GetIdentitiesTokenBalancesResponseV0 { + result: Some( + get_identities_token_balances_response_v0::Result::IdentityTokenBalances( + IdentityTokenBalances { + identity_token_balances, + }, + ), + ), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive-abci/src/query/token_queries/identities_token_infos/mod.rs b/packages/rs-drive-abci/src/query/token_queries/identities_token_infos/mod.rs new file mode 100644 index 0000000000..a1746ff1a0 --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/identities_token_infos/mod.rs @@ -0,0 +1,62 @@ +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_token_infos_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_identities_token_infos_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{GetIdentitiesTokenInfosRequest, GetIdentitiesTokenInfosResponse}; +use dpp::version::PlatformVersion; +mod v0; + +impl Platform { + /// Querying of an identity's token infos by a public key hash + pub fn query_identities_token_infos( + &self, + GetIdentitiesTokenInfosRequest { version }: GetIdentitiesTokenInfosRequest, + 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 token infos query".to_string(), + ), + )); + }; + + let feature_version_bounds = &platform_version + .drive_abci + .query + .token_queries + .identities_token_infos; + + 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_token_infos".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_token_infos_v0( + request_v0, + platform_state, + platform_version, + )?; + Ok(result.map(|response_v0| GetIdentitiesTokenInfosResponse { + version: Some(ResponseVersion::V0(response_v0)), + })) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/token_queries/identities_token_infos/v0/mod.rs b/packages/rs-drive-abci/src/query/token_queries/identities_token_infos/v0/mod.rs new file mode 100644 index 0000000000..e6a0786e78 --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/identities_token_infos/v0/mod.rs @@ -0,0 +1,94 @@ +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_token_infos_request::GetIdentitiesTokenInfosRequestV0; +use dapi_grpc::platform::v0::get_identities_token_infos_response::{get_identities_token_infos_response_v0, GetIdentitiesTokenInfosResponseV0}; +use dapi_grpc::platform::v0::get_identities_token_infos_response::get_identities_token_infos_response_v0::{IdentityTokenInfos, TokenIdentityInfoEntry, TokenInfoEntry}; +use dpp::check_validation_result_with_data; +use dpp::identifier::Identifier; +use dpp::tokens::info::v0::IdentityTokenInfoV0Accessors; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; + +impl Platform { + pub(super) fn query_identities_token_infos_v0( + &self, + GetIdentitiesTokenInfosRequestV0 { + token_id, + identity_ids, + prove, + }: GetIdentitiesTokenInfosRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let token_id: Identifier = + check_validation_result_with_data!(token_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "token_id must be a valid identifier (32 bytes long)".to_string(), + ) + })); + + let identity_ids: Vec<[u8; 32]> = check_validation_result_with_data!(identity_ids + .into_iter() + .map(|identity_id| { + identity_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "identity_id must be a valid identifier (32 bytes long)".to_string(), + ) + }) + }) + .collect::, QueryError>>()); + + let response = if prove { + let proof = + check_validation_result_with_data!(self.drive.prove_identities_token_infos( + token_id.into_buffer(), + identity_ids.as_slice(), + None, + platform_version, + )); + + GetIdentitiesTokenInfosResponseV0 { + result: Some(get_identities_token_infos_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let identity_token_infos = self + .drive + .fetch_identities_token_infos( + token_id.into_buffer(), + identity_ids.as_slice(), + None, + platform_version, + )? + .into_iter() + .map(|(identity_id, info)| { + let info = info.map(|identity_token_info| TokenIdentityInfoEntry { + frozen: identity_token_info.frozen(), + }); + TokenInfoEntry { + identity_id: identity_id.to_vec(), + info, + } + }) + .collect(); + + GetIdentitiesTokenInfosResponseV0 { + result: Some( + get_identities_token_infos_response_v0::Result::IdentityTokenInfos( + IdentityTokenInfos { + token_infos: identity_token_infos, + }, + ), + ), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive-abci/src/query/token_queries/identity_token_balances/mod.rs b/packages/rs-drive-abci/src/query/token_queries/identity_token_balances/mod.rs new file mode 100644 index 0000000000..acc357d809 --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/identity_token_balances/mod.rs @@ -0,0 +1,62 @@ +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_identity_token_balances_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_identity_token_balances_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{GetIdentityTokenBalancesRequest, GetIdentityTokenBalancesResponse}; +use dpp::version::PlatformVersion; +mod v0; + +impl Platform { + /// Querying of an identity's token balances by a public key hash + pub fn query_identity_token_balances( + &self, + GetIdentityTokenBalancesRequest { version }: GetIdentityTokenBalancesRequest, + 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 token balances query".to_string(), + ), + )); + }; + + let feature_version_bounds = &platform_version + .drive_abci + .query + .token_queries + .identity_token_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( + "identity_token_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_identity_token_balances_v0( + request_v0, + platform_state, + platform_version, + )?; + Ok(result.map(|response_v0| GetIdentityTokenBalancesResponse { + version: Some(ResponseVersion::V0(response_v0)), + })) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/token_queries/identity_token_balances/v0/mod.rs b/packages/rs-drive-abci/src/query/token_queries/identity_token_balances/v0/mod.rs new file mode 100644 index 0000000000..45a54c731c --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/identity_token_balances/v0/mod.rs @@ -0,0 +1,86 @@ +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_identity_token_balances_request::GetIdentityTokenBalancesRequestV0; +use dapi_grpc::platform::v0::get_identity_token_balances_response::{get_identity_token_balances_response_v0, GetIdentityTokenBalancesResponseV0}; +use dapi_grpc::platform::v0::get_identity_token_balances_response::get_identity_token_balances_response_v0::{TokenBalanceEntry, TokenBalances}; +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_identity_token_balances_v0( + &self, + GetIdentityTokenBalancesRequestV0 { + identity_id, + token_ids, + prove, + }: GetIdentityTokenBalancesRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let identity_id: Identifier = + check_validation_result_with_data!(identity_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "identity_id must be a valid identifier (32 bytes long)".to_string(), + ) + })); + + let token_ids: Vec<[u8; 32]> = check_validation_result_with_data!(token_ids + .into_iter() + .map(|token_id| { + token_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "token_id must be a valid identifier (32 bytes long)".to_string(), + ) + }) + }) + .collect::, QueryError>>()); + + let response = if prove { + let proof = + check_validation_result_with_data!(self.drive.prove_identity_token_balances( + token_ids.as_slice(), + identity_id.into_buffer(), + None, + platform_version, + )); + + GetIdentityTokenBalancesResponseV0 { + result: Some(get_identity_token_balances_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let token_balances = self + .drive + .fetch_identity_token_balances( + token_ids.as_slice(), + identity_id.into_buffer(), + None, + platform_version, + )? + .into_iter() + .map(|(token_id, amount)| TokenBalanceEntry { + token_id: token_id.to_vec(), + balance: amount, + }) + .collect(); + + GetIdentityTokenBalancesResponseV0 { + result: Some( + get_identity_token_balances_response_v0::Result::TokenBalances(TokenBalances { + token_balances, + }), + ), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive-abci/src/query/token_queries/identity_token_infos/mod.rs b/packages/rs-drive-abci/src/query/token_queries/identity_token_infos/mod.rs new file mode 100644 index 0000000000..c0abc1a21e --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/identity_token_infos/mod.rs @@ -0,0 +1,62 @@ +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_identity_token_infos_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_identity_token_infos_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{GetIdentityTokenInfosRequest, GetIdentityTokenInfosResponse}; +use dpp::version::PlatformVersion; +mod v0; + +impl Platform { + /// Querying of an identity's token infos by a public key hash + pub fn query_identity_token_infos( + &self, + GetIdentityTokenInfosRequest { version }: GetIdentityTokenInfosRequest, + 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 token infos query".to_string(), + ), + )); + }; + + let feature_version_bounds = &platform_version + .drive_abci + .query + .token_queries + .identity_token_infos; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "identity_token_infos".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_identity_token_infos_v0( + request_v0, + platform_state, + platform_version, + )?; + Ok(result.map(|response_v0| GetIdentityTokenInfosResponse { + version: Some(ResponseVersion::V0(response_v0)), + })) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/token_queries/identity_token_infos/v0/mod.rs b/packages/rs-drive-abci/src/query/token_queries/identity_token_infos/v0/mod.rs new file mode 100644 index 0000000000..c013f8e9d9 --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/identity_token_infos/v0/mod.rs @@ -0,0 +1,89 @@ +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_identity_token_infos_request::GetIdentityTokenInfosRequestV0; +use dapi_grpc::platform::v0::get_identity_token_infos_response::{get_identity_token_infos_response_v0, GetIdentityTokenInfosResponseV0}; +use dapi_grpc::platform::v0::get_identity_token_infos_response::get_identity_token_infos_response_v0::{TokenIdentityInfoEntry, TokenInfoEntry, TokenInfos}; +use dpp::check_validation_result_with_data; +use dpp::identifier::Identifier; +use dpp::tokens::info::v0::IdentityTokenInfoV0Accessors; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; + +impl Platform { + pub(super) fn query_identity_token_infos_v0( + &self, + GetIdentityTokenInfosRequestV0 { + identity_id, + token_ids, + prove, + }: GetIdentityTokenInfosRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let identity_id: Identifier = + check_validation_result_with_data!(identity_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "identity_id must be a valid identifier (32 bytes long)".to_string(), + ) + })); + + let token_ids: Vec<[u8; 32]> = check_validation_result_with_data!(token_ids + .into_iter() + .map(|token_id| { + token_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "token_id must be a valid identifier (32 bytes long)".to_string(), + ) + }) + }) + .collect::, QueryError>>()); + + let response = if prove { + let proof = check_validation_result_with_data!(self.drive.prove_identity_token_infos( + token_ids.as_slice(), + identity_id.into_buffer(), + None, + platform_version, + )); + + GetIdentityTokenInfosResponseV0 { + result: Some(get_identity_token_infos_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let token_infos = self + .drive + .fetch_identity_token_infos( + token_ids.as_slice(), + identity_id.into_buffer(), + None, + platform_version, + )? + .into_iter() + .map(|(token_id, info)| { + let info = info.map(|identity_token_info| TokenIdentityInfoEntry { + frozen: identity_token_info.frozen(), + }); + TokenInfoEntry { + token_id: token_id.to_vec(), + info, + } + }) + .collect(); + + GetIdentityTokenInfosResponseV0 { + result: Some(get_identity_token_infos_response_v0::Result::TokenInfos( + TokenInfos { token_infos }, + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive-abci/src/query/token_queries/mod.rs b/packages/rs-drive-abci/src/query/token_queries/mod.rs new file mode 100644 index 0000000000..70f261b383 --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/mod.rs @@ -0,0 +1,5 @@ +mod identities_token_balances; +mod identities_token_infos; +mod identity_token_balances; +mod identity_token_infos; +mod token_status; diff --git a/packages/rs-drive-abci/src/query/token_queries/token_status/mod.rs b/packages/rs-drive-abci/src/query/token_queries/token_status/mod.rs new file mode 100644 index 0000000000..555fce502d --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/token_status/mod.rs @@ -0,0 +1,59 @@ +use crate::error::query::QueryError; +use crate::error::Error; +use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::PlatformState; +use crate::query::QueryValidationResult; +use dapi_grpc::platform::v0::get_token_statuses_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_token_statuses_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{GetTokenStatusesRequest, GetTokenStatusesResponse}; +use dpp::version::PlatformVersion; +mod v0; + +impl Platform { + /// Querying of token statuses + pub fn query_token_statuses( + &self, + GetTokenStatusesRequest { version }: GetTokenStatusesRequest, + 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 token infos query".to_string(), + ), + )); + }; + + let feature_version_bounds = &platform_version + .drive_abci + .query + .token_queries + .token_statuses; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "token_statuses".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_token_statuses_v0(request_v0, platform_state, platform_version)?; + Ok(result.map(|response_v0| GetTokenStatusesResponse { + version: Some(ResponseVersion::V0(response_v0)), + })) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/token_queries/token_status/v0/mod.rs b/packages/rs-drive-abci/src/query/token_queries/token_status/v0/mod.rs new file mode 100644 index 0000000000..8f801b8d57 --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/token_status/v0/mod.rs @@ -0,0 +1,73 @@ +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_token_statuses_request::GetTokenStatusesRequestV0; +use dapi_grpc::platform::v0::get_token_statuses_response::get_token_statuses_response_v0::{ + TokenStatusEntry, TokenStatuses, +}; +use dapi_grpc::platform::v0::get_token_statuses_response::{ + get_token_statuses_response_v0, GetTokenStatusesResponseV0, +}; +use dpp::check_validation_result_with_data; +use dpp::tokens::status::v0::TokenStatusV0Accessors; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; + +impl Platform { + pub(super) fn query_token_statuses_v0( + &self, + GetTokenStatusesRequestV0 { token_ids, prove }: GetTokenStatusesRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let token_ids: Vec<[u8; 32]> = check_validation_result_with_data!(token_ids + .into_iter() + .map(|token_id| { + token_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "token_id must be a valid identifier (32 bytes long)".to_string(), + ) + }) + }) + .collect::, QueryError>>()); + + let response = if prove { + let proof = check_validation_result_with_data!(self.drive.prove_token_statuses( + token_ids.as_slice(), + None, + platform_version, + )); + + GetTokenStatusesResponseV0 { + result: Some(get_token_statuses_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let token_statuses = self + .drive + .fetch_token_statuses(token_ids.as_slice(), None, platform_version)? + .into_iter() + .map(|(token_id, status)| { + let paused = status.map(|token_status| token_status.paused()); + TokenStatusEntry { + token_id: token_id.to_vec(), + paused, + } + }) + .collect(); + + GetTokenStatusesResponseV0 { + result: Some(get_token_statuses_response_v0::Result::TokenStatuses( + TokenStatuses { token_statuses }, + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive-abci/tests/strategy_tests/main.rs b/packages/rs-drive-abci/tests/strategy_tests/main.rs index 4194e30689..9622e72459 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/main.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/main.rs @@ -27,6 +27,7 @@ mod masternodes; mod patch_platform_tests; mod query; mod strategy; +mod token_tests; mod upgrade_fork_tests; mod verify_state_transitions; mod voting_tests; @@ -462,8 +463,8 @@ mod tests { } #[test] - fn run_chain_one_identity_in_solitude() { - let platform_version = PlatformVersion::latest(); + fn run_chain_one_identity_in_solitude_first_protocol_version() { + let platform_version = PlatformVersion::first(); let strategy = NetworkStrategy { strategy: Strategy { start_contracts: vec![], @@ -508,9 +509,10 @@ mod tests { }; let mut platform = TestPlatformBuilder::new() .with_config(config.clone()) + .with_initial_protocol_version(1) .build_with_mock_rpc(); - let outcome = run_chain_for_strategy(&mut platform, 100, strategy, config, 15, &mut None); + let outcome = run_chain_for_strategy(&mut platform, 2, strategy, config, 15, &mut None); let balance = outcome .abci_app @@ -527,6 +529,84 @@ mod tests { assert_eq!(balance, 99864012200) } + #[test] + fn run_chain_one_identity_in_solitude_latest_protocol_version() { + // This is different because in the root tree we added GroupActions + // 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 GroupActions 88 Misc 104 Versions 120 + + // This will cause the costs of insertion of a spent asset lock transition, since group actions now exist we will see a slight difference in processing costs + // This is because WithdrawalTransactions will have a right element in the tree. + + let platform_version = PlatformVersion::latest(); + let strategy = NetworkStrategy { + strategy: Strategy { + start_contracts: vec![], + operations: vec![], + start_identities: StartIdentities::default(), + identity_inserts: IdentityInsertInfo { + frequency: Frequency { + times_per_block_range: 1..2, + chance_per_block: None, + }, + ..Default::default() + }, + + identity_contract_nonce_gaps: None, + signer: None, + }, + total_hpmns: 100, + extra_normal_mns: 0, + validator_quorum_count: 24, + chain_lock_quorum_count: 24, + upgrading_info: None, + + proposer_strategy: Default::default(), + rotate_quorums: false, + failure_testing: None, + query_testing: None, + verify_state_transition_results: true, + ..Default::default() + }; + let config = PlatformConfig { + validator_set: ValidatorSetConfig::default_100_67(), + chain_lock: ChainLockConfig::default_100_67(), + instant_lock: InstantLockConfig::default_100_67(), + execution: ExecutionConfig { + verify_sum_trees: true, + + ..Default::default() + }, + block_spacing_ms: 3000, + testing_configs: PlatformTestConfig::default_minimal_verifications(), + ..Default::default() + }; + let mut platform = TestPlatformBuilder::new() + .with_config(config.clone()) + .build_with_mock_rpc(); + + let outcome = run_chain_for_strategy(&mut platform, 2, strategy, config, 15, &mut None); + + let balance = outcome + .abci_app + .platform + .drive + .fetch_identity_balance( + outcome.identities.first().unwrap().id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch balances") + .expect("expected to have an identity to get balance from"); + + assert_eq!(balance, 99864009940) + } + #[test] fn run_chain_core_height_randomly_increasing() { let strategy = NetworkStrategy { @@ -2270,10 +2350,7 @@ mod tests { for tx_results_per_block in outcome.state_transition_results_per_block.values() { for (state_transition, _unused_result) in tx_results_per_block { // We can't ever get a documents batch transition, because the proposer will remove it from a block - assert!(!matches!( - state_transition, - StateTransition::DocumentsBatch(_) - )); + assert!(!matches!(state_transition, StateTransition::Batch(_))); } } } @@ -2576,28 +2653,22 @@ mod tests { let mut simple_signer = SimpleSigner::default(); - let (identity1, keys1) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity1, keys1) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys1); - let (identity2, keys2) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity2, keys2) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys2); let start_identities = create_state_transitions_for_identities( - vec![identity1, identity2], + vec![&mut identity1, &mut identity2], &(dash_to_duffs!(1)..=dash_to_duffs!(1)), &simple_signer, &mut rng, diff --git a/packages/rs-drive-abci/tests/strategy_tests/strategy.rs b/packages/rs-drive-abci/tests/strategy_tests/strategy.rs index bf3235ea78..b93a8957ba 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/strategy.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/strategy.rs @@ -15,7 +15,7 @@ use strategy_tests::frequency::Frequency; use strategy_tests::operations::FinalizeBlockOperation::IdentityAddKeys; use strategy_tests::operations::{ AmountRange, DocumentAction, DocumentOp, FinalizeBlockOperation, IdentityUpdateOp, - OperationType, + OperationType, TokenOp, }; use dpp::document::DocumentV0Getters; @@ -31,57 +31,72 @@ use drive::drive::identity::key::fetch::{IdentityKeysRequest, KeyRequestType}; use drive::drive::Drive; use drive::util::storage_flags::StorageFlags::SingleEpoch; -use dpp::identity::KeyType::ECDSA_SECP256K1; -use dpp::data_contract::accessors::v0::{DataContractV0Getters, DataContractV0Setters}; -use dpp::state_transition::data_contract_update_transition::methods::DataContractUpdateTransitionMethodsV0; -use drive::query::DriveDocumentQuery; -use drive_abci::mimic::test_quorum::TestQuorumInfo; -use drive_abci::platform_types::platform::Platform; -use drive_abci::rpc::core::MockCoreRPCLike; -use rand::prelude::{IteratorRandom, SliceRandom, StdRng}; -use rand::Rng; -use strategy_tests::Strategy; -use strategy_tests::transitions::{create_state_transitions_for_identities, create_state_transitions_for_identities_and_proofs, instant_asset_lock_proof_fixture_with_dynamic_range}; -use std::borrow::Cow; -use std::collections::{BTreeMap, HashMap, HashSet}; -use std::ops::RangeInclusive; -use std::str::FromStr; -use tenderdash_abci::proto::abci::{ExecTxResult, ValidatorSetUpdate}; +use crate::strategy::CoreHeightIncrease::NoCoreHeightIncrease; use dpp::dashcore::hashes::Hash; +use dpp::data_contract::accessors::v0::{DataContractV0Getters, DataContractV0Setters}; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::data_contract::document_type::v0::DocumentTypeV0; use dpp::identifier::MasternodeIdentifiers; use dpp::identity::accessors::IdentityGettersV0; use dpp::identity::identity_public_key::v0::IdentityPublicKeyV0; use dpp::identity::state_transition::asset_lock_proof::InstantAssetLockProof; +use dpp::identity::KeyType::ECDSA_SECP256K1; use dpp::platform_value::{BinaryData, Value}; use dpp::prelude::{AssetLockProof, Identifier, IdentityNonce}; -use dpp::state_transition::documents_batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; -use dpp::state_transition::documents_batch_transition::document_create_transition::{DocumentCreateTransition, DocumentCreateTransitionV0}; -use dpp::state_transition::documents_batch_transition::document_transition::document_delete_transition::DocumentDeleteTransitionV0; -use dpp::state_transition::documents_batch_transition::document_transition::document_replace_transition::DocumentReplaceTransitionV0; -use dpp::state_transition::documents_batch_transition::{DocumentsBatchTransition, DocumentsBatchTransitionV0}; -use dpp::state_transition::documents_batch_transition::document_transition::{DocumentDeleteTransition, DocumentReplaceTransition, DocumentTransferTransition}; -use drive::drive::document::query::QueryDocumentsOutcomeV0Methods; +use dpp::state_transition::batch_transition::batched_transition::document_delete_transition::DocumentDeleteTransitionV0; +use dpp::state_transition::batch_transition::batched_transition::document_replace_transition::DocumentReplaceTransitionV0; +use dpp::state_transition::batch_transition::batched_transition::document_transfer_transition::DocumentTransferTransitionV0; +use dpp::state_transition::batch_transition::batched_transition::{ + BatchedTransition, DocumentDeleteTransition, DocumentReplaceTransition, + DocumentTransferTransition, +}; +use dpp::state_transition::batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; +use dpp::state_transition::batch_transition::document_create_transition::{ + DocumentCreateTransition, DocumentCreateTransitionV0, +}; +use dpp::state_transition::batch_transition::token_base_transition::v0::TokenBaseTransitionV0; +use dpp::state_transition::batch_transition::token_mint_transition::TokenMintTransitionV0; +use dpp::state_transition::batch_transition::token_transfer_transition::TokenTransferTransitionV0; +use dpp::state_transition::batch_transition::{ + BatchTransition, BatchTransitionV0, BatchTransitionV1, TokenMintTransition, + TokenTransferTransition, +}; use dpp::state_transition::data_contract_create_transition::methods::v0::DataContractCreateTransitionMethodsV0; -use dpp::state_transition::documents_batch_transition::document_transition::document_transfer_transition::DocumentTransferTransitionV0; -use dpp::state_transition::masternode_vote_transition::MasternodeVoteTransition; +use dpp::state_transition::data_contract_update_transition::methods::DataContractUpdateTransitionMethodsV0; use dpp::state_transition::masternode_vote_transition::methods::MasternodeVoteTransitionMethodsV0; +use dpp::state_transition::masternode_vote_transition::MasternodeVoteTransition; +use dpp::tokens::calculate_token_id; +use dpp::tokens::token_event::TokenEvent; use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; use dpp::voting::vote_polls::VotePoll; -use dpp::voting::votes::resource_vote::ResourceVote; use dpp::voting::votes::resource_vote::v0::ResourceVoteV0; +use dpp::voting::votes::resource_vote::ResourceVote; use dpp::voting::votes::Vote; +use drive::drive::document::query::QueryDocumentsOutcomeV0Methods; +use drive::query::DriveDocumentQuery; use drive_abci::abci::app::FullAbciApplication; -use drive_abci::platform_types::platform_state::v0::PlatformStateV0Methods; use drive_abci::config::PlatformConfig; +use drive_abci::mimic::test_quorum::TestQuorumInfo; +use drive_abci::platform_types::platform::Platform; +use drive_abci::platform_types::platform_state::v0::PlatformStateV0Methods; use drive_abci::platform_types::signature_verification_quorum_set::{ QuorumConfig, Quorums, SigningQuorum, }; use drive_abci::platform_types::withdrawal::unsigned_withdrawal_txs::v0::UnsignedWithdrawalTxs; - -use crate::strategy::CoreHeightIncrease::NoCoreHeightIncrease; +use drive_abci::rpc::core::MockCoreRPCLike; +use rand::prelude::{IteratorRandom, SliceRandom, StdRng}; +use rand::Rng; use simple_signer::signer::SimpleSigner; +use std::borrow::Cow; +use std::collections::{BTreeMap, HashMap, HashSet}; +use std::ops::RangeInclusive; +use std::str::FromStr; +use strategy_tests::transitions::{ + create_state_transitions_for_identities, create_state_transitions_for_identities_and_proofs, + instant_asset_lock_proof_fixture_with_dynamic_range, +}; +use strategy_tests::Strategy; +use tenderdash_abci::proto::abci::{ExecTxResult, ValidatorSetUpdate}; #[derive(Clone, Debug, Default)] pub struct MasternodeListChangesStrategy { @@ -483,6 +498,15 @@ impl NetworkStrategy { .expect("document type must exist") .to_owned_document_type(); } + } else if let OperationType::Token(token_op) = &mut operation.op_type { + if token_op.contract.id() == old_id { + token_op.contract.set_id(contract.id()); + token_op.token_id = calculate_token_id( + contract.id_ref().as_bytes(), + token_op.token_pos, + ) + .into(); + } } }); @@ -648,8 +672,8 @@ impl NetworkStrategy { } .into(); - let document_batch_transition: DocumentsBatchTransition = - DocumentsBatchTransitionV0 { + let document_batch_transition: BatchTransition = + BatchTransitionV0 { owner_id: identity.id(), transitions: vec![document_create_transition.into()], user_fee_increase: 0, @@ -778,8 +802,8 @@ impl NetworkStrategy { } .into(); - let document_batch_transition: DocumentsBatchTransition = - DocumentsBatchTransitionV0 { + let document_batch_transition: BatchTransition = + BatchTransitionV0 { owner_id: identity.id(), transitions: vec![document_create_transition.into()], user_fee_increase: 0, @@ -884,15 +908,14 @@ impl NetworkStrategy { } .into(); - let document_batch_transition: DocumentsBatchTransition = - DocumentsBatchTransitionV0 { - owner_id: identity.id, - transitions: vec![document_delete_transition.into()], - user_fee_increase: 0, - signature_public_key_id: 0, - signature: BinaryData::default(), - } - .into(); + let document_batch_transition: BatchTransition = BatchTransitionV0 { + owner_id: identity.id, + transitions: vec![document_delete_transition.into()], + user_fee_increase: 0, + signature_public_key_id: 0, + signature: BinaryData::default(), + } + .into(); let mut document_batch_transition: StateTransition = document_batch_transition.into(); @@ -987,15 +1010,14 @@ impl NetworkStrategy { } .into(); - let document_batch_transition: DocumentsBatchTransition = - DocumentsBatchTransitionV0 { - owner_id: identity.id, - transitions: vec![document_replace_transition.into()], - user_fee_increase: 0, - signature_public_key_id: 0, - signature: BinaryData::default(), - } - .into(); + let document_batch_transition: BatchTransition = BatchTransitionV0 { + owner_id: identity.id, + transitions: vec![document_replace_transition.into()], + user_fee_increase: 0, + signature_public_key_id: 0, + signature: BinaryData::default(), + } + .into(); let mut document_batch_transition: StateTransition = document_batch_transition.into(); @@ -1098,15 +1120,14 @@ impl NetworkStrategy { } .into(); - let document_batch_transition: DocumentsBatchTransition = - DocumentsBatchTransitionV0 { - owner_id: identity.id, - transitions: vec![document_transfer_transition.into()], - user_fee_increase: 0, - signature_public_key_id: 0, - signature: BinaryData::default(), - } - .into(); + let document_batch_transition: BatchTransition = BatchTransitionV0 { + owner_id: identity.id, + transitions: vec![document_transfer_transition.into()], + user_fee_increase: 0, + signature_public_key_id: 0, + signature: BinaryData::default(), + } + .into(); let mut document_batch_transition: StateTransition = document_batch_transition.into(); @@ -1404,6 +1425,166 @@ impl NetworkStrategy { operations.push(state_transition); } } + OperationType::Token(TokenOp { + contract, + token_id, + token_pos, + use_identity_with_id, + action: TokenEvent::Mint(amount, recipient, note), + }) if current_identities.len() > 1 => { + let operation_owner_id = if let Some(identity_id) = use_identity_with_id { + *identity_id + } else { + let random_index = rng.gen_range(0..current_identities.len()); + current_identities[random_index].id() + }; + + let request = IdentityKeysRequest { + identity_id: operation_owner_id.to_buffer(), + request_type: KeyRequestType::SpecificKeys(vec![1]), + limit: Some(1), + offset: None, + }; + let identity = platform + .drive + .fetch_identity_balance_with_keys(request, None, platform_version) + .expect("expected to be able to get identity") + .expect("expected to get an identity for token mint operation"); + let identity_contract_nonce = contract_nonce_counter + .entry((operation_owner_id, contract.id())) + .or_default(); + *identity_contract_nonce += 1; + let token_mint_transition: TokenMintTransition = TokenMintTransitionV0 { + base: TokenBaseTransitionV0 { + identity_contract_nonce: *identity_contract_nonce, + token_contract_position: *token_pos, + data_contract_id: contract.id(), + token_id: *token_id, + using_group_info: None, + } + .into(), + issued_to_identity_id: Some(*recipient), + amount: *amount, + public_note: note.clone(), + } + .into(); + + let batch_transition: BatchTransition = BatchTransitionV1 { + owner_id: identity.id, + transitions: vec![BatchedTransition::Token( + token_mint_transition.into(), + )], + user_fee_increase: 0, + signature_public_key_id: 0, + signature: BinaryData::default(), + } + .into(); + + let mut batch_transition: StateTransition = batch_transition.into(); + + let identity_public_key = identity + .loaded_public_keys + .values() + .next() + .expect("expected a key"); + + batch_transition + .sign_external( + identity_public_key, + signer, + Some(|_data_contract_id, _document_type_name| { + Ok(SecurityLevel::HIGH) + }), + ) + .expect("expected to sign"); + + operations.push(batch_transition); + } + OperationType::Token(TokenOp { + contract, + token_id, + token_pos, + use_identity_with_id, + action: + TokenEvent::Transfer( + recipient, + public_note, + shared_encrypted_note, + private_encrypted_note, + amount, + ), + }) if current_identities.len() > 1 => { + let operation_owner_id = if let Some(identity_id) = use_identity_with_id { + *identity_id + } else { + let random_index = rng.gen_range(0..current_identities.len()); + current_identities[random_index].id() + }; + + let request = IdentityKeysRequest { + identity_id: operation_owner_id.to_buffer(), + request_type: KeyRequestType::SpecificKeys(vec![1]), + limit: Some(1), + offset: None, + }; + let identity = platform + .drive + .fetch_identity_balance_with_keys(request, None, platform_version) + .expect("expected to be able to get identity") + .expect("expected to get an identity for token mint operation"); + let identity_contract_nonce = contract_nonce_counter + .entry((operation_owner_id, contract.id())) + .or_default(); + *identity_contract_nonce += 1; + let token_transfer_transition: TokenTransferTransition = + TokenTransferTransitionV0 { + base: TokenBaseTransitionV0 { + identity_contract_nonce: *identity_contract_nonce, + token_contract_position: *token_pos, + data_contract_id: contract.id(), + token_id: *token_id, + using_group_info: None, + } + .into(), + amount: *amount, + recipient_id: *recipient, + public_note: public_note.clone(), + shared_encrypted_note: shared_encrypted_note.clone(), + private_encrypted_note: private_encrypted_note.clone(), + } + .into(); + + let batch_transition: BatchTransition = BatchTransitionV1 { + owner_id: identity.id, + transitions: vec![BatchedTransition::Token( + token_transfer_transition.into(), + )], + user_fee_increase: 0, + signature_public_key_id: 0, + signature: BinaryData::default(), + } + .into(); + + let mut batch_transition: StateTransition = batch_transition.into(); + + let identity_public_key = identity + .loaded_public_keys + .values() + .next() + .expect("expected a key"); + + batch_transition + .sign_external( + identity_public_key, + signer, + Some(|_data_contract_id, _document_type_name| { + Ok(SecurityLevel::HIGH) + }), + ) + .expect("expected to sign"); + + operations.push(batch_transition); + } _ => {} } } @@ -1553,7 +1734,7 @@ impl NetworkStrategy { ) } else { create_state_transitions_for_identities( - identities, + &mut identities, balance_range, signer, rng, diff --git a/packages/rs-drive-abci/tests/strategy_tests/token_tests.rs b/packages/rs-drive-abci/tests/strategy_tests/token_tests.rs new file mode 100644 index 0000000000..484e517ece --- /dev/null +++ b/packages/rs-drive-abci/tests/strategy_tests/token_tests.rs @@ -0,0 +1,329 @@ +#[cfg(test)] +mod tests { + use crate::execution::run_chain_for_strategy; + use crate::strategy::NetworkStrategy; + use dpp::dash_to_duffs; + use dpp::data_contract::accessors::v0::DataContractV0Setters; + use dpp::data_contract::accessors::v1::DataContractV1Getters; + use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Setters; + use dpp::data_contract::DataContract; + use dpp::identity::accessors::IdentityGettersV0; + use dpp::identity::Identity; + use dpp::state_transition::StateTransition; + use dpp::tests::json_document::json_document_to_created_contract; + use dpp::tokens::token_event::TokenEvent; + use drive::query::PathQuery; + use drive_abci::config::{ + ChainLockConfig, ExecutionConfig, InstantLockConfig, PlatformConfig, PlatformTestConfig, + ValidatorSetConfig, + }; + use drive_abci::test::helpers::setup::TestPlatformBuilder; + use platform_version::version::PlatformVersion; + use rand::prelude::StdRng; + use rand::SeedableRng; + use simple_signer::signer::SimpleSigner; + use strategy_tests::frequency::Frequency; + use strategy_tests::operations::{Operation, OperationType, TokenOp}; + use strategy_tests::transitions::create_state_transitions_for_identities; + use strategy_tests::{IdentityInsertInfo, StartIdentities, Strategy}; + + #[test] + fn run_chain_insert_one_new_identity_per_block_and_a_token_mint() { + let platform_version = PlatformVersion::latest(); + let mut created_contract = json_document_to_created_contract( + "tests/supporting_files/contract/basic-token/basic-token.json", + 1, + true, + platform_version, + ) + .expect("expected to get contract from a json document"); + + let mut rng = StdRng::seed_from_u64(567); + + let mut simple_signer = SimpleSigner::default(); + + let (mut identity1, keys1) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); + + let (mut identity2, keys2) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); + + simple_signer.add_keys(keys1); + simple_signer.add_keys(keys2); + + let start_identities: Vec<(Identity, Option)> = + create_state_transitions_for_identities( + vec![&mut identity1, &mut identity2], + &(dash_to_duffs!(1)..=dash_to_duffs!(1)), + &simple_signer, + &mut rng, + platform_version, + ) + .into_iter() + .map(|(identity, transition)| (identity, Some(transition))) + .collect(); + + let contract = created_contract.data_contract_mut(); + let mut token_configuration = contract + .token_configuration_mut(0) + .expect("expected to get token configuration"); + token_configuration.set_minting_allow_choosing_destination(true); + contract.set_owner_id(identity1.id()); + let new_id = DataContract::generate_data_contract_id_v0(identity1.id(), 1); + contract.set_id(new_id); + let token_id = contract.token_id(0).expect("expected to get token_id"); + + let token_op = TokenOp { + contract: contract.clone(), + token_id, + token_pos: 0, + use_identity_with_id: Some(identity1.id()), + action: TokenEvent::Mint(1000, identity2.id(), None), + }; + + let strategy = NetworkStrategy { + strategy: Strategy { + start_contracts: vec![(created_contract, None)], + operations: vec![Operation { + op_type: OperationType::Token(token_op), + frequency: Frequency { + times_per_block_range: 1..2, + chance_per_block: None, + }, + }], + start_identities: StartIdentities { + hard_coded: start_identities.clone(), + ..Default::default() + }, + identity_inserts: IdentityInsertInfo::default(), + + identity_contract_nonce_gaps: None, + signer: Some(simple_signer), + }, + total_hpmns: 100, + extra_normal_mns: 0, + validator_quorum_count: 24, + chain_lock_quorum_count: 24, + upgrading_info: None, + + proposer_strategy: Default::default(), + rotate_quorums: false, + failure_testing: None, + query_testing: None, + verify_state_transition_results: true, + ..Default::default() + }; + let day_in_ms = 1000 * 60 * 60 * 24; + let config = PlatformConfig { + validator_set: ValidatorSetConfig::default_100_67(), + chain_lock: ChainLockConfig::default_100_67(), + instant_lock: InstantLockConfig::default_100_67(), + execution: ExecutionConfig { + verify_sum_trees: true, + + ..Default::default() + }, + block_spacing_ms: day_in_ms, + testing_configs: PlatformTestConfig::default_minimal_verifications(), + ..Default::default() + }; + let block_count = 12; + let mut platform = TestPlatformBuilder::new() + .with_config(config.clone()) + .build_with_mock_rpc(); + + let outcome = + run_chain_for_strategy(&mut platform, block_count, strategy, config, 15, &mut None); + + let drive = &outcome.abci_app.platform.drive; + let identity_ids = vec![identity1.id().to_buffer(), identity2.id().to_buffer()]; + let balances = drive + .fetch_identities_token_balances( + token_id.to_buffer(), + identity_ids.as_slice(), + None, + platform_version, + ) + .expect("expected to get balances"); + + for (identity_id, token_balance) in balances { + assert!(token_balance.is_some()) + } + + let identity_1_token_balance = drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity1.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch"); + let identity_2_token_balance = drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch"); + + assert_eq!(identity_1_token_balance, Some(100000)); // The initial amount from creating the contract + assert_eq!(identity_2_token_balance, Some(11000)); // 11 blocks of 1000 + } + + #[test] + fn run_chain_insert_one_new_identity_per_block_and_a_token_transfer() { + let platform_version = PlatformVersion::latest(); + let mut created_contract = json_document_to_created_contract( + "tests/supporting_files/contract/basic-token/basic-token.json", + 1, + true, + platform_version, + ) + .expect("expected to get contract from a json document"); + + let mut rng = StdRng::seed_from_u64(567); + + let mut simple_signer = SimpleSigner::default(); + + let (mut identity1, keys1) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); + + let (mut identity2, keys2) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); + + simple_signer.add_keys(keys1); + simple_signer.add_keys(keys2); + + let start_identities: Vec<(Identity, Option)> = + create_state_transitions_for_identities( + vec![&mut identity1, &mut identity2], + &(dash_to_duffs!(1)..=dash_to_duffs!(1)), + &simple_signer, + &mut rng, + platform_version, + ) + .into_iter() + .map(|(identity, transition)| (identity, Some(transition))) + .collect(); + + let contract = created_contract.data_contract_mut(); + let mut token_configuration = contract + .token_configuration_mut(0) + .expect("expected to get token configuration"); + token_configuration.set_minting_allow_choosing_destination(true); + contract.set_owner_id(identity1.id()); + let new_id = DataContract::generate_data_contract_id_v0(identity1.id(), 1); + contract.set_id(new_id); + let token_id = contract.token_id(0).expect("expected to get token_id"); + + let token_op = TokenOp { + contract: contract.clone(), + token_id, + token_pos: 0, + use_identity_with_id: Some(identity1.id()), + action: TokenEvent::Transfer(identity2.id(), None, None, None, 1000), + }; + + let strategy = NetworkStrategy { + strategy: Strategy { + start_contracts: vec![(created_contract, None)], + operations: vec![Operation { + op_type: OperationType::Token(token_op), + frequency: Frequency { + times_per_block_range: 1..2, + chance_per_block: None, + }, + }], + start_identities: StartIdentities { + hard_coded: start_identities.clone(), + ..Default::default() + }, + identity_inserts: IdentityInsertInfo::default(), + + identity_contract_nonce_gaps: None, + signer: Some(simple_signer), + }, + total_hpmns: 100, + extra_normal_mns: 0, + validator_quorum_count: 24, + chain_lock_quorum_count: 24, + upgrading_info: None, + + proposer_strategy: Default::default(), + rotate_quorums: false, + failure_testing: None, + query_testing: None, + verify_state_transition_results: true, + ..Default::default() + }; + let day_in_ms = 1000 * 60 * 60 * 24; + let config = PlatformConfig { + validator_set: ValidatorSetConfig::default_100_67(), + chain_lock: ChainLockConfig::default_100_67(), + instant_lock: InstantLockConfig::default_100_67(), + execution: ExecutionConfig { + verify_sum_trees: true, + + ..Default::default() + }, + block_spacing_ms: day_in_ms, + testing_configs: PlatformTestConfig::default_minimal_verifications(), + ..Default::default() + }; + let block_count = 12; + let mut platform = TestPlatformBuilder::new() + .with_config(config.clone()) + .build_with_mock_rpc(); + + let outcome = + run_chain_for_strategy(&mut platform, block_count, strategy, config, 15, &mut None); + + let drive = &outcome.abci_app.platform.drive; + let identity_ids = vec![identity1.id().to_buffer(), identity2.id().to_buffer()]; + let balances = drive + .fetch_identities_token_balances( + token_id.to_buffer(), + identity_ids.as_slice(), + None, + platform_version, + ) + .expect("expected to get balances"); + + assert_eq!( + balances.get(&identity1.id()).copied(), + Some(Some(100000 - 11000)) + ); + assert_eq!(balances.get(&identity2.id()).copied(), Some(Some(11000))); + + // Let's also try this fetching + + let identity_1_token_balance = drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity1.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch"); + let identity_2_token_balance = drive + .fetch_identity_token_balance( + token_id.to_buffer(), + identity2.id().to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch"); + + assert_eq!(identity_1_token_balance, Some(100000 - 11000)); // The initial amount from creating the contract less 11 times 1000 that we transferred + assert_eq!(identity_2_token_balance, Some(11000)); // 11 blocks of 1000 + } +} diff --git a/packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs b/packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs index 57f347f977..64701edcfa 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs @@ -15,24 +15,29 @@ use dpp::version::PlatformVersion; use drive::drive::identity::key::fetch::IdentityKeysRequest; use drive::drive::Drive; use drive::query::{SingleDocumentDriveQuery, SingleDocumentDriveQueryContestedStatus}; -use drive::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; use drive::state_transition_action::StateTransitionAction; use drive_abci::execution::validation::state_transition::transformer::StateTransitionActionTransformerV0; use drive_abci::platform_types::platform::PlatformRef; use drive_abci::rpc::core::MockCoreRPCLike; use tenderdash_abci::proto::abci::ExecTxResult; - -use dpp::state_transition::documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::data_contracts::SystemDataContract; +use dpp::document::serialization_traits::DocumentPlatformConversionMethodsV0; +use dpp::prelude::Identifier; use dpp::voting::votes::Vote; use drive::drive::votes::resolved::vote_polls::ResolvedVotePoll; use drive::drive::votes::resolved::votes::resolved_resource_vote::accessors::v0::ResolvedResourceVoteGettersV0; use drive::drive::votes::resolved::votes::ResolvedVote; -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::{DocumentCreateTransitionActionAccessorsV0, DocumentFromCreateTransitionAction}; -use drive::state_transition_action::document::documents_batch::document_transition::document_purchase_transition_action::DocumentPurchaseTransitionActionAccessorsV0; -use drive::state_transition_action::document::documents_batch::document_transition::document_replace_transition_action::DocumentFromReplaceTransitionAction; -use drive::state_transition_action::document::documents_batch::document_transition::document_transfer_transition_action::DocumentTransferTransitionActionAccessorsV0; -use drive::state_transition_action::document::documents_batch::document_transition::document_update_price_transition_action::DocumentUpdatePriceTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::{DocumentCreateTransitionActionAccessorsV0, DocumentFromCreateTransitionAction}; +use drive::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::DocumentPurchaseTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_replace_transition_action::DocumentFromReplaceTransitionAction; +use drive::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::DocumentTransferTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::DocumentUpdatePriceTransitionActionAccessorsV0; +use drive::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; use drive_abci::abci::app::FullAbciApplication; use drive_abci::execution::types::state_transition_execution_context::StateTransitionExecutionContext; use drive_abci::execution::validation::state_transition::ValidationMode; @@ -59,11 +64,11 @@ pub(crate) fn verify_state_transitions_were_or_were_not_executed( .iter() .enumerate() .map(|(num, (state_transition, result))| { - if let StateTransition::DocumentsBatch(batch) = state_transition { - let _first = batch.transitions().first().unwrap(); - - // dbg!(batch.transitions().len(), hex::encode(first.base().id()), state.height(), first.to_string()); - } + // if let StateTransition::DocumentsBatch(batch) = state_transition { + // let _first = batch.document_transitions().first().unwrap(); + // + // // dbg!(batch.transitions().len(), hex::encode(first.base().id()), state.height(), first.to_string()); + // } let mut execution_context = StateTransitionExecutionContext::default_for_platform_version(platform_version) @@ -209,59 +214,87 @@ pub(crate) fn verify_state_transitions_were_or_were_not_executed( ); } } - StateTransitionAction::DocumentsBatchAction(documents_batch_transition) => { - documents_batch_transition + StateTransitionAction::BatchAction(batch_transition) => { + batch_transition .transitions() .iter() - .for_each(|transition| { - let document_contested_status = - if let DocumentTransitionAction::CreateAction(create_action) = - transition - { - if create_action.prefunded_voting_balance().is_some() { - SingleDocumentDriveQueryContestedStatus::Contested as u8 + .for_each(|transition| match transition { + BatchedTransitionAction::DocumentAction(document_transition_action) => { + let document_contested_status = + if let DocumentTransitionAction::CreateAction(create_action) = + document_transition_action + { + if create_action.prefunded_voting_balance().is_some() { + SingleDocumentDriveQueryContestedStatus::Contested as u8 + } else { + SingleDocumentDriveQueryContestedStatus::NotContested + as u8 + } } else { SingleDocumentDriveQueryContestedStatus::NotContested as u8 - } - } else { - SingleDocumentDriveQueryContestedStatus::NotContested as u8 - }; - proofs_request - .documents - .push(get_proofs_request_v0::DocumentRequest { - contract_id: transition - .base() - .expect("expected a base for the document transition") - .data_contract_id() - .to_vec(), - document_type: transition - .base() - .expect("expected a base for the document transition") - .document_type_name() - .clone(), - document_type_keeps_history: transition - .base() - .expect("expected a base for the document transition") - .data_contract_fetch_info() - .contract - .document_type_for_name( - transition - .base() - .expect( - "expected a base for the document transition", + }; + proofs_request.documents.push( + get_proofs_request_v0::DocumentRequest { + contract_id: document_transition_action + .base() + .data_contract_id() + .to_vec(), + document_type: document_transition_action + .base() + .document_type_name() + .clone(), + document_type_keeps_history: document_transition_action + .base() + .data_contract_fetch_info() + .contract + .document_type_for_name( + document_transition_action + .base() + .document_type_name() + .as_str(), + ) + .expect("get document type") + .documents_keep_history(), + document_id: document_transition_action + .base() + .id() + .to_vec(), + document_contested_status: document_contested_status as i32, + }, + ); + } + BatchedTransitionAction::TokenAction(token_transition_action) => { + if token_transition_action + .base() + .token_configuration() + .expect("expected token configuration") + .keeps_history() + { + // if we keep history we just need to check the historical document + proofs_request.documents.push( + get_proofs_request_v0::DocumentRequest { + contract_id: SystemDataContract::TokenHistory + .id() + .to_vec(), + document_type: token_transition_action + .historical_document_type_name() + .to_string(), + document_type_keeps_history: false, + document_id: token_transition_action + .historical_document_id( + batch_transition.owner_id(), + token_transition_action + .base() + .identity_contract_nonce(), ) - .document_type_name() - .as_str(), - ) - .expect("get document type") - .documents_keep_history(), - document_id: transition - .base() - .expect("expected a base for the document transition") - .id() - .to_vec(), - document_contested_status: document_contested_status as i32, - }); + .to_vec(), + document_contested_status: 0, + }, + ); + } else { + } + } + BatchedTransitionAction::BumpIdentityDataContractNonce(_) => {} }); let versioned_request = GetProofsRequest { version: Some(get_proofs_request::Version::V0(proofs_request)), @@ -274,211 +307,295 @@ pub(crate) fn verify_state_transitions_were_or_were_not_executed( let response_proof = response.proof_owned().expect("proof should be present"); - for document_transition_action in - documents_batch_transition.transitions().iter() - { - let contract_fetch_info = document_transition_action - .base() - .expect("expected a base for the document transition") - .data_contract_fetch_info(); - - let document_type = contract_fetch_info - .contract - .document_type_for_name( - document_transition_action - .base() - .expect("expected a base for the document transition") - .document_type_name() - .as_str(), - ) - .expect("get document type"); - let contested_status = - if let DocumentTransitionAction::CreateAction(create_action) = - document_transition_action - { - if create_action.prefunded_voting_balance().is_some() { - SingleDocumentDriveQueryContestedStatus::Contested - } else { - SingleDocumentDriveQueryContestedStatus::NotContested - } - } else { - SingleDocumentDriveQueryContestedStatus::NotContested - }; - - let query = SingleDocumentDriveQuery { - contract_id: document_transition_action - .base() - .expect("expected a base for the document transition") - .data_contract_id() - .into_buffer(), - document_type_name: document_transition_action - .base() - .expect("expected a base for the document transition") - .document_type_name() - .clone(), - document_type_keeps_history: document_type.documents_keep_history(), - document_id: document_transition_action - .base() - .expect("expected a base for the document transition") - .id() - .into_buffer(), - block_time_ms: None, //None because we want latest - contested_status, - }; - - // dbg!( - // platform.state.height(), - // document_transition_action.action_type(), - // document_transition_action - // .base() - // .id() - // .to_string(Encoding::Base58) - // ); - - let (root_hash, document) = query - .verify_proof( - false, - &response_proof.grovedb_proof, - document_type, - platform_version, - ) - .expect("expected to verify a document"); + for transition_action in batch_transition.transitions().iter() { + match transition_action { + BatchedTransitionAction::DocumentAction(document_action) => { + let contract_fetch_info = + document_action.base().data_contract_fetch_info(); + + let document_type = contract_fetch_info + .contract + .document_type_for_name( + document_action.base().document_type_name().as_str(), + ) + .expect("get document type"); + let contested_status = + if let DocumentTransitionAction::CreateAction(create_action) = + document_action + { + if create_action.prefunded_voting_balance().is_some() { + SingleDocumentDriveQueryContestedStatus::Contested + } else { + SingleDocumentDriveQueryContestedStatus::NotContested + } + } else { + SingleDocumentDriveQueryContestedStatus::NotContested + }; - assert_eq!( - &root_hash, - expected_root_hash, - "state last block info {:?}", - platform.state.last_committed_block_info() - ); + let query = SingleDocumentDriveQuery { + contract_id: document_action + .base() + .data_contract_id() + .into_buffer(), + document_type_name: document_action + .base() + .document_type_name() + .clone(), + document_type_keeps_history: document_type + .documents_keep_history(), + document_id: document_action.base().id().into_buffer(), + block_time_ms: None, //None because we want latest + contested_status, + }; - match document_transition_action { - DocumentTransitionAction::CreateAction(creation_action) => { - if *was_executed { - let document = document.unwrap_or_else(|| { - panic!( - "expected a document on block {}", - platform.state.last_committed_block_height() - ) - }); - // dbg!( - // &document, - // Document::try_from_create_transition( - // creation_action, - // documents_batch_transition.owner_id(), - // platform_version, - // ) - // .expect("expected to get document") - // ); - assert_eq!( - document, - Document::try_from_create_transition_action( - creation_action, - documents_batch_transition.owner_id(), - platform_version, - ) - .expect("expected to get document") - ); - } else { - //there is the possibility that the state transition was not executed because it already existed, - // we can discount that for now in tests - assert!(document.is_none()); - } - } - DocumentTransitionAction::ReplaceAction(replace_action) => { - if *was_executed { - // it's also possible we deleted something we replaced - if let Some(document) = document { - assert_eq!( - document, - Document::try_from_replace_transition_action( - replace_action, - documents_batch_transition.owner_id(), - platform_version, - ) - .expect("expected to get document") - ); + // dbg!( + // platform.state.height(), + // document_transition_action.action_type(), + // document_transition_action + // .base() + // .id() + // .to_string(Encoding::Base58) + // ); + + let (root_hash, document) = query + .verify_proof( + false, + &response_proof.grovedb_proof, + document_type, + platform_version, + ) + .expect("expected to verify a document"); + + assert_eq!( + &root_hash, + expected_root_hash, + "state last block info {:?}", + platform.state.last_committed_block_info() + ); + + match document_action { + DocumentTransitionAction::CreateAction(creation_action) => { + if *was_executed { + let document = document.unwrap_or_else(|| { + panic!( + "expected a document on block {}", + platform.state.last_committed_block_height() + ) + }); + // dbg!( + // &document, + // Document::try_from_create_transition( + // creation_action, + // documents_batch_transition.owner_id(), + // platform_version, + // ) + // .expect("expected to get document") + // ); + assert_eq!( + document, + Document::try_from_create_transition_action( + creation_action, + batch_transition.owner_id(), + platform_version, + ) + .expect("expected to get document") + ); + } else { + //there is the possibility that the state transition was not executed because it already existed, + // we can discount that for now in tests + assert!(document.is_none()); + } } - } else { - //there is the possibility that the state transition was not executed and the state is equal to the previous - // state, aka there would have been no change anyways, we can discount that for now - if let Some(document) = document { - assert_ne!( - document, - Document::try_from_replace_transition_action( - replace_action, - documents_batch_transition.owner_id(), - platform_version, - ) - .expect("expected to get document") - ); + DocumentTransitionAction::ReplaceAction(replace_action) => { + if *was_executed { + // it's also possible we deleted something we replaced + if let Some(document) = document { + assert_eq!( + document, + Document::try_from_replace_transition_action( + replace_action, + batch_transition.owner_id(), + platform_version, + ) + .expect("expected to get document") + ); + } + } else { + //there is the possibility that the state transition was not executed and the state is equal to the previous + // state, aka there would have been no change anyways, we can discount that for now + if let Some(document) = document { + assert_ne!( + document, + Document::try_from_replace_transition_action( + replace_action, + batch_transition.owner_id(), + platform_version, + ) + .expect("expected to get document") + ); + } + } } - } - } - DocumentTransitionAction::DeleteAction(_) => { - // we expect no document - assert!(document.is_none()); - } - DocumentTransitionAction::BumpIdentityDataContractNonce(_) => { - panic!("we should not have a bump identity data contract nonce"); - } - DocumentTransitionAction::TransferAction(transfer_action) => { - if *was_executed { - // it's also possible we deleted something we replaced - if let Some(document) = document { - assert_eq!( - document.owner_id(), - transfer_action.document().owner_id() - ); + DocumentTransitionAction::DeleteAction(_) => { + // we expect no document + assert!(document.is_none()); } - } else { - //there is the possibility that the state transition was not executed and the state is equal to the previous - // state, aka there would have been no change anyways, we can discount that for now - if let Some(document) = document { - assert_ne!( - document.owner_id(), - transfer_action.document().owner_id() - ); + DocumentTransitionAction::TransferAction(transfer_action) => { + if *was_executed { + // it's also possible we deleted something we replaced + if let Some(document) = document { + assert_eq!( + document.owner_id(), + transfer_action.document().owner_id() + ); + } + } else { + //there is the possibility that the state transition was not executed and the state is equal to the previous + // state, aka there would have been no change anyways, we can discount that for now + if let Some(document) = document { + assert_ne!( + document.owner_id(), + transfer_action.document().owner_id() + ); + } + } } - } - } - DocumentTransitionAction::PurchaseAction(purchase_action) => { - if *was_executed { - if let Some(document) = document { - assert_eq!( - document.owner_id(), - purchase_action.document().owner_id() - ); + DocumentTransitionAction::PurchaseAction(purchase_action) => { + if *was_executed { + if let Some(document) = document { + assert_eq!( + document.owner_id(), + purchase_action.document().owner_id() + ); + } + } else { + //there is the possibility that the state transition was not executed and the state is equal to the previous + // state, aka there would have been no change anyways, we can discount that for now + if let Some(document) = document { + assert_ne!( + document.owner_id(), + purchase_action.document().owner_id() + ); + } + } } - } else { - //there is the possibility that the state transition was not executed and the state is equal to the previous - // state, aka there would have been no change anyways, we can discount that for now - if let Some(document) = document { - assert_ne!( - document.owner_id(), - purchase_action.document().owner_id() - ); + DocumentTransitionAction::UpdatePriceAction( + update_price_action, + ) => { + if *was_executed { + if let Some(document) = document { + assert_eq!( + document.get(PRICE), + update_price_action.document().get(PRICE) + ); + } + } else { + //there is the possibility that the state transition was not executed and the state is equal to the previous + // state, aka there would have been no change anyways, we can discount that for now + if let Some(document) = document { + assert_ne!( + document.get(PRICE), + update_price_action.document().get(PRICE) + ); + } + } } } } - DocumentTransitionAction::UpdatePriceAction(update_price_action) => { - if *was_executed { - if let Some(document) = document { - assert_eq!( - document.get(PRICE), - update_price_action.document().get(PRICE) - ); - } + BatchedTransitionAction::TokenAction(token_transition_action) => { + if token_transition_action + .base() + .token_configuration() + .expect("expected token configuration") + .keeps_history() + { + let token_id = token_transition_action.base().token_id(); + let document_type_name = token_transition_action + .historical_document_type_name() + .to_string(); + + let token_history = platform + .drive + .cache + .system_data_contracts + .load_token_history(); + + let query = SingleDocumentDriveQuery { + contract_id: SystemDataContract::TokenHistory + .id() + .to_buffer(), + document_type_name, + document_type_keeps_history: false, + document_id: token_transition_action + .historical_document_id( + batch_transition.owner_id(), + token_transition_action + .base() + .identity_contract_nonce(), + ) + .to_buffer(), + block_time_ms: None, //None because we want latest + contested_status: + SingleDocumentDriveQueryContestedStatus::NotContested, + }; + + let (root_hash, serialized_document) = query + .verify_proof_keep_serialized( + false, + &response_proof.grovedb_proof, + platform_version, + ) + .expect("expected to verify a document"); + + assert_eq!( + &root_hash, + expected_root_hash, + "state last block info {:?}", + platform.state.last_committed_block_info() + ); + + assert!( + serialized_document.is_some(), + "we expect a token history document" + ); + + let expected_document = token_transition_action + .build_historical_document( + &token_history, + token_id, + batch_transition.owner_id(), + token_transition_action + .base() + .identity_contract_nonce(), + platform + .state + .last_committed_block_info() + .as_ref() + .expect("expected last commited block info") + .basic_info(), + ) + .expect("expected to build historical document"); + + let serialized_expected_document = expected_document + .serialize( + token_transition_action + .historical_document_type(&token_history) + .expect("expected document type"), + platform_version, + ) + .expect("expected to serialize"); + + assert_eq!( + serialized_document.unwrap(), + serialized_expected_document + ); } else { - //there is the possibility that the state transition was not executed and the state is equal to the previous - // state, aka there would have been no change anyways, we can discount that for now - if let Some(document) = document { - assert_ne!( - document.get(PRICE), - update_price_action.document().get(PRICE) - ); - } + todo!(); } } + BatchedTransitionAction::BumpIdentityDataContractNonce(_) => { + panic!("we should not have a bump identity data contract nonce"); + } } } } diff --git a/packages/rs-drive-abci/tests/strategy_tests/voting_tests.rs b/packages/rs-drive-abci/tests/strategy_tests/voting_tests.rs index 3547f94c80..d0e804dfa9 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/voting_tests.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/voting_tests.rs @@ -70,19 +70,16 @@ mod tests { let mut simple_signer = SimpleSigner::default(); - let (identity1, keys1) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity1, keys1) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys1); let start_identities: Vec<(Identity, Option)> = create_state_transitions_for_identities( - vec![identity1], + vec![&mut identity1], &(dash_to_duffs!(1)..=dash_to_duffs!(1)), &simple_signer, &mut rng, @@ -316,7 +313,7 @@ mod tests { .first() .expect("expected a document insert"); - assert_matches!(state_transition, StateTransition::DocumentsBatch(_)); + assert_matches!(state_transition, StateTransition::Batch(_)); assert_eq!(execution_result.code, 0); } @@ -348,29 +345,23 @@ mod tests { let mut simple_signer = SimpleSigner::default(); - let (identity1, keys1) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity1, keys1) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys1); - let (identity2, keys2) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity2, keys2) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys2); let start_identities: Vec<(Identity, Option)> = create_state_transitions_for_identities( - vec![identity1, identity2], + vec![&mut identity1, &mut identity2], &(dash_to_duffs!(1)..=dash_to_duffs!(1)), &simple_signer, &mut rng, @@ -624,29 +615,23 @@ mod tests { let mut simple_signer = SimpleSigner::default(); - let (identity1, keys1) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity1, keys1) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys1); - let (identity2, keys2) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity2, keys2) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys2); let start_identities: Vec<(Identity, Option)> = create_state_transitions_for_identities( - vec![identity1, identity2], + vec![&mut identity1, &mut identity2], &(dash_to_duffs!(1)..=dash_to_duffs!(1)), &simple_signer, &mut rng, @@ -981,29 +966,23 @@ mod tests { let mut simple_signer = SimpleSigner::default(); - let (identity1, keys1) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity1, keys1) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys1); - let (identity2, keys2) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity2, keys2) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys2); let start_identities: Vec<(Identity, Option)> = create_state_transitions_for_identities( - vec![identity1, identity2], + vec![&mut identity1, &mut identity2], &(dash_to_duffs!(1)..=dash_to_duffs!(1)), &simple_signer, &mut rng, @@ -1351,29 +1330,23 @@ mod tests { let mut simple_signer = SimpleSigner::default(); - let (identity1, keys1) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity1, keys1) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys1); - let (identity2, keys2) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity2, keys2) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys2); let start_identities: Vec<(Identity, Option)> = create_state_transitions_for_identities( - vec![identity1, identity2], + vec![&mut identity1, &mut identity2], &(dash_to_duffs!(1)..=dash_to_duffs!(1)), &simple_signer, &mut rng, @@ -1755,29 +1728,23 @@ mod tests { let mut simple_signer = SimpleSigner::default(); - let (identity1, keys1) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity1, keys1) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys1); - let (identity2, keys2) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity2, keys2) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys2); let start_identities: Vec<(Identity, Option)> = create_state_transitions_for_identities( - vec![identity1, identity2], + vec![&mut identity1, &mut identity2], &(dash_to_duffs!(1)..=dash_to_duffs!(1)), &simple_signer, &mut rng, @@ -2168,29 +2135,23 @@ mod tests { let mut simple_signer = SimpleSigner::default(); - let (identity1, keys1) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity1, keys1) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys1); - let (identity2, keys2) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity2, keys2) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys2); let start_identities: Vec<(Identity, Option)> = create_state_transitions_for_identities( - vec![identity1, identity2], + vec![&mut identity1, &mut identity2], &(dash_to_duffs!(1)..=dash_to_duffs!(1)), &simple_signer, &mut rng, diff --git a/packages/rs-drive-abci/tests/supporting_files/contract/basic-token/basic-token.json b/packages/rs-drive-abci/tests/supporting_files/contract/basic-token/basic-token.json new file mode 100644 index 0000000000..7f103653d8 --- /dev/null +++ b/packages/rs-drive-abci/tests/supporting_files/contract/basic-token/basic-token.json @@ -0,0 +1,18 @@ +{ + "$format_version": "1", + "id": "EbL1zYg1JrpPX9rYbASihRsSEgwKbqZAJu6B1Z2SKKU2", + "ownerId": "F1Ue2M5PfDjDX69NqrZdChdEbwF2SYZ8UF4qNjsCQu1d", + "version": 1, + "documentSchemas": {}, + "tokens": { + "0": { + "$format_version": "0", + "conventions": { + "decimals": 8 + }, + "baseSupply": 100000, + "maxSupply": null, + "keepsHistory": true + } + } +} \ No newline at end of file diff --git a/packages/rs-drive-abci/tests/supporting_files/contract/crypto-card-game/crypto-card-game-in-game-currency.json b/packages/rs-drive-abci/tests/supporting_files/contract/crypto-card-game/crypto-card-game-in-game-currency.json new file mode 100644 index 0000000000..3a1c2daecc --- /dev/null +++ b/packages/rs-drive-abci/tests/supporting_files/contract/crypto-card-game/crypto-card-game-in-game-currency.json @@ -0,0 +1,135 @@ +{ + "$format_version": "0", + "id": "86LHvdC1Tqx5P97LQUSibGFqf2vnKFpB6VkqQ7oso86e", + "ownerId": "2QjL594djCH2NyDsn45vd6yQjEDHupMKo7CEGVTHtQxU", + "version": 1, + "documentSchemas": { + "card": { + "type": "object", + "documentsMutable": false, + "canBeDeleted": true, + "transferable": 1, + "tradeMode": 1, + "creationRestrictionMode": 1, + "properties": { + "name": { + "type": "string", + "description": "Name of the card", + "maxLength": 63, + "position": 0 + }, + "description": { + "type": "string", + "description": "Description of the card", + "maxLength": 256, + "position": 1 + }, + "imageUrl": { + "type": "string", + "description": "URL of the image associated with the card", + "maxLength": 2048, + "format": "uri", + "position": 2 + }, + "imageHash": { + "type": "array", + "description": "SHA256 hash of the bytes of the image specified by imageUrl", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "position": 3 + }, + "imageFingerprint": { + "type": "array", + "description": "dHash of the image specified by imageUrl", + "byteArray": true, + "minItems": 8, + "maxItems": 8, + "position": 4 + }, + "attack": { + "type": "integer", + "description": "Attack power of the card", + "minimum": 0, + "position": 5 + }, + "defense": { + "type": "integer", + "description": "Defense level of the card", + "minimum": 0, + "position": 6 + } + }, + "indices": [ + { + "name": "owner", + "properties": [ + { + "$ownerId": "asc" + } + ] + }, + { + "name": "attack", + "properties": [ + { + "attack": "asc" + } + ] + }, + { + "name": "defense", + "properties": [ + { + "defense": "asc" + } + ] + }, + { + "name": "transferredAt", + "properties": [ + { + "$transferredAt": "asc" + } + ] + }, + { + "name": "ownerTransferredAt", + "properties": [ + { + "$ownerId": "asc" + }, + { + "$transferredAt": "asc" + } + ] + }, + { + "name": "transferredAtBlockHeight", + "properties": [ + { + "$transferredAtBlockHeight": "asc" + } + ] + }, + { + "name": "transferredAtCoreBlockHeight", + "properties": [ + { + "$transferredAtCoreBlockHeight": "asc" + } + ] + } + ], + "required": [ + "name", + "$transferredAt", + "$transferredAtBlockHeight", + "$transferredAtCoreBlockHeight", + "attack", + "defense" + ], + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/packages/rs-drive/Cargo.toml b/packages/rs-drive/Cargo.toml index 46e32521d9..9b140c4e55 100644 --- a/packages/rs-drive/Cargo.toml +++ b/packages/rs-drive/Cargo.toml @@ -52,12 +52,12 @@ enum-map = { version = "2.0.3", optional = true } intmap = { version = "3.0.1", features = ["serde"], optional = true } chrono = { version = "0.4.35", optional = true } itertools = { version = "0.13", optional = true } -grovedb = { version = "2.2.1", optional = true, default-features = false } -grovedb-costs = { version = "2.2.1", optional = true } -grovedb-path = { version = "2.2.1" } -grovedb-storage = { version = "2.2.1", optional = true } -grovedb-version = { version = "2.2.1" } -grovedb-epoch-based-storage-flags = { version = "2.2.1" } +grovedb = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7", optional = true, default-features = false } +grovedb-costs = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7", optional = true } +grovedb-path = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" } +grovedb-storage = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7", optional = true } +grovedb-version = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" } +grovedb-epoch-based-storage-flags = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" } [dev-dependencies] criterion = "0.5" @@ -100,6 +100,7 @@ server = [ "parking_lot", "arc-swap", "moka", + "dpp/validation", "dpp/platform-value-json", "dpp/system_contracts", "dpp/state-transitions", diff --git a/packages/rs-drive/src/cache/system_contracts.rs b/packages/rs-drive/src/cache/system_contracts.rs index c1a2785c3c..7de44da36b 100644 --- a/packages/rs-drive/src/cache/system_contracts.rs +++ b/packages/rs-drive/src/cache/system_contracts.rs @@ -15,6 +15,8 @@ pub struct SystemDataContracts { dashpay: ArcSwap, /// Masternode reward shares contract masternode_reward_shares: ArcSwap, + /// Token history contract + token_history: ArcSwap, } impl SystemDataContracts { @@ -39,6 +41,10 @@ impl SystemDataContracts { SystemDataContract::MasternodeRewards, platform_version, )?), + token_history: ArcSwap::from_pointee(load_system_data_contract( + SystemDataContract::TokenHistory, + platform_version, + )?), }) } @@ -47,6 +53,11 @@ impl SystemDataContracts { self.withdrawals.load() } + /// Returns token history contract + pub fn load_token_history(&self) -> Guard> { + self.token_history.load() + } + /// Returns DPNS contract pub fn load_dpns(&self) -> Guard> { self.dpns.load() diff --git a/packages/rs-drive/src/drive/asset_lock/estimation_costs/add_estimation_costs_for_adding_asset_lock/v0/mod.rs b/packages/rs-drive/src/drive/asset_lock/estimation_costs/add_estimation_costs_for_adding_asset_lock/v0/mod.rs index 1110b44844..1d8cb180ee 100644 --- a/packages/rs-drive/src/drive/asset_lock/estimation_costs/add_estimation_costs_for_adding_asset_lock/v0/mod.rs +++ b/packages/rs-drive/src/drive/asset_lock/estimation_costs/add_estimation_costs_for_adding_asset_lock/v0/mod.rs @@ -4,8 +4,8 @@ use crate::drive::Drive; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{EstimatedLevel, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::asset_lock::asset_lock_storage_path; use grovedb::EstimatedSumTrees::SomeSumTrees; @@ -61,12 +61,15 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path([]), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(3, false), estimated_layer_sizes: AllSubtrees( 12, // 32 + 1 + 1 / 3 SomeSumTrees { sum_trees_weight: 1, + big_sum_trees_weight: 0, + count_trees_weight: 0, + count_sum_trees_weight: 0, non_sum_trees_weight: 2, }, None, @@ -77,7 +80,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(asset_lock_storage_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllItems( 36, //The size of an outpoint diff --git a/packages/rs-drive/src/drive/asset_lock/fetch_asset_lock_outpoint_info/v0/mod.rs b/packages/rs-drive/src/drive/asset_lock/fetch_asset_lock_outpoint_info/v0/mod.rs index eb929eda17..c85e0dc84d 100644 --- a/packages/rs-drive/src/drive/asset_lock/fetch_asset_lock_outpoint_info/v0/mod.rs +++ b/packages/rs-drive/src/drive/asset_lock/fetch_asset_lock_outpoint_info/v0/mod.rs @@ -13,7 +13,7 @@ use dpp::asset_lock::reduced_asset_lock_value::AssetLockValue; use dpp::asset_lock::StoredAssetLockInfo; use dpp::platform_value::Bytes36; use dpp::serialization::PlatformDeserializable; -use grovedb::TransactionArg; +use grovedb::{TransactionArg, TreeType}; impl Drive { /// Checks if a given `outpoint` is present as an asset lock in the transaction. @@ -68,7 +68,7 @@ impl Drive { StatefulDirectQuery } else { StatelessDirectQuery { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, query_target: QueryTargetValue(36), } }; diff --git a/packages/rs-drive/src/drive/balances/mod.rs b/packages/rs-drive/src/drive/balances/mod.rs index 39f15f4298..23c74cd12a 100644 --- a/packages/rs-drive/src/drive/balances/mod.rs +++ b/packages/rs-drive/src/drive/balances/mod.rs @@ -22,10 +22,14 @@ use crate::drive::RootTree; use crate::query::Query; use grovedb::{PathQuery, SizedQuery}; -/// Storage fee pool key +/// Total system credits storage #[cfg(any(feature = "server", feature = "verify"))] pub const TOTAL_SYSTEM_CREDITS_STORAGE_KEY: &[u8; 1] = b"D"; +/// Total token supplies storage +#[cfg(any(feature = "server", feature = "verify"))] +pub const TOTAL_TOKEN_SUPPLIES_STORAGE_KEY: &[u8; 1] = b"T"; + /// The path for all the credits in the system #[cfg(any(feature = "server", feature = "verify"))] pub fn total_credits_path() -> [&'static [u8]; 2] { @@ -57,6 +61,60 @@ pub fn total_credits_on_platform_path_query() -> PathQuery { } } +/// The path for the root of all token supplies +#[cfg(any(feature = "server", feature = "verify"))] +pub fn total_tokens_root_supply_path() -> [&'static [u8]; 2] { + [ + Into::<&[u8; 1]>::into(RootTree::Misc), + TOTAL_TOKEN_SUPPLIES_STORAGE_KEY, + ] +} + +/// The path as a vec for the root of all token supplies +#[cfg(any(feature = "server", feature = "verify"))] +pub fn total_tokens_root_supply_path_vec() -> Vec> { + vec![ + vec![RootTree::Misc as u8], + TOTAL_TOKEN_SUPPLIES_STORAGE_KEY.to_vec(), + ] +} + +/// The path for the token supply for a given token +#[cfg(any(feature = "server", feature = "verify"))] +pub fn total_token_supply_path(token_id: &[u8; 32]) -> [&[u8]; 3] { + [ + Into::<&[u8; 1]>::into(RootTree::Misc), + TOTAL_TOKEN_SUPPLIES_STORAGE_KEY, + token_id, + ] +} + +/// The path as a vec for the token supply for a given token +#[cfg(any(feature = "server", feature = "verify"))] +pub fn total_token_supply_path_vec(token_id: [u8; 32]) -> Vec> { + vec![ + vec![RootTree::Misc as u8], + TOTAL_TOKEN_SUPPLIES_STORAGE_KEY.to_vec(), + token_id.to_vec(), + ] +} + +/// A path query helper to get the total token supply for a given token on Platform +#[cfg(any(feature = "server", feature = "verify"))] +pub fn total_supply_for_token_on_platform_path_query(token_id: [u8; 32]) -> PathQuery { + PathQuery { + path: vec![ + vec![RootTree::Misc as u8], + TOTAL_TOKEN_SUPPLIES_STORAGE_KEY.to_vec(), + ], + query: SizedQuery { + query: Query::new_single_key(token_id.to_vec()), + limit: Some(1), + offset: None, + }, + } +} + /// The path for the balances tree #[cfg(any(feature = "server", feature = "verify"))] pub(crate) fn balance_path() -> [&'static [u8]; 1] { diff --git a/packages/rs-drive/src/drive/contract/apply/apply_contract_with_serialization/v0/mod.rs b/packages/rs-drive/src/drive/contract/apply/apply_contract_with_serialization/v0/mod.rs index 816b660e32..8a7289995e 100644 --- a/packages/rs-drive/src/drive/contract/apply/apply_contract_with_serialization/v0/mod.rs +++ b/packages/rs-drive/src/drive/contract/apply/apply_contract_with_serialization/v0/mod.rs @@ -18,7 +18,7 @@ use dpp::serialization::PlatformDeserializableWithPotentialValidationFromVersion use dpp::version::PlatformVersion; use grovedb::batch::KeyInfoPath; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use std::borrow::Cow; use std::collections::HashMap; @@ -99,7 +99,7 @@ impl Drive { DirectQueryType::StatefulDirectQuery } else { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, // we can ignore flags as this is just an approximation // and it's doubtful that contracts will always be inserted at max size query_target: QueryTargetValue( @@ -208,6 +208,7 @@ impl Drive { block_info, estimated_costs_only_with_layer_info, &mut drive_operations, + transaction, platform_version, )?; } diff --git a/packages/rs-drive/src/drive/contract/estimation_costs/add_estimation_costs_for_contract_insertion/v0/mod.rs b/packages/rs-drive/src/drive/contract/estimation_costs/add_estimation_costs_for_contract_insertion/v0/mod.rs index ba04d65bc6..c1acab1802 100644 --- a/packages/rs-drive/src/drive/contract/estimation_costs/add_estimation_costs_for_contract_insertion/v0/mod.rs +++ b/packages/rs-drive/src/drive/contract/estimation_costs/add_estimation_costs_for_contract_insertion/v0/mod.rs @@ -16,9 +16,9 @@ use crate::util::type_constants::{DEFAULT_FLOAT_SIZE, DEFAULT_FLOAT_SIZE_U8}; use dpp::version::PlatformVersion; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, EstimatedLevel}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllSubtrees, Mix}; use grovedb::EstimatedSumTrees::NoSumTrees; +use grovedb::{EstimatedLayerInformation, TreeType}; use std::collections::HashMap; impl Drive { @@ -61,7 +61,7 @@ impl Drive { ), ), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(2), estimated_layer_sizes: AllSubtrees( ESTIMATED_AVERAGE_INDEX_NAME_SIZE, @@ -80,7 +80,7 @@ impl Drive { document_type_name.as_str(), )), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(0, true), estimated_layer_sizes: AllSubtrees( ESTIMATED_AVERAGE_INDEX_NAME_SIZE, @@ -103,7 +103,7 @@ impl Drive { contract.id_ref().as_bytes(), )), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(AVERAGE_NUMBER_OF_UPDATES as u32), estimated_layer_sizes: Mix { subtrees_size: None, diff --git a/packages/rs-drive/src/drive/contract/insert/add_contract_to_storage/v0/mod.rs b/packages/rs-drive/src/drive/contract/insert/add_contract_to_storage/v0/mod.rs index 8844fe39bc..07e33e9be1 100644 --- a/packages/rs-drive/src/drive/contract/insert/add_contract_to_storage/v0/mod.rs +++ b/packages/rs-drive/src/drive/contract/insert/add_contract_to_storage/v0/mod.rs @@ -19,7 +19,7 @@ use dpp::version::drive_versions::DriveVersion; use grovedb::batch::key_info::KeyInfo; use grovedb::batch::KeyInfoPath; use grovedb::reference_path::ReferencePathType::SiblingReference; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; impl Drive { @@ -64,8 +64,8 @@ impl Drive { } else { let apply_type = if estimated_costs_only_with_layer_info.is_some() { BatchInsertTreeApplyType::StatelessBatchInsertTree { - is_sum_tree: false, - in_tree_using_sums: false, + tree_type: TreeType::NormalTree, + in_tree_type: TreeType::NormalTree, flags_len: storage_flags .as_ref() .map(|flags| flags.to_element_flags().len()) @@ -79,7 +79,7 @@ impl Drive { self.batch_insert_empty_tree_if_not_exists( key_info, - false, + TreeType::NormalTree, storage_flags.as_ref().map(|flags| flags.as_ref()), apply_type, transaction, diff --git a/packages/rs-drive/src/drive/contract/insert/insert_contract/mod.rs b/packages/rs-drive/src/drive/contract/insert/insert_contract/mod.rs index 8b39715cbb..9d6eac5437 100644 --- a/packages/rs-drive/src/drive/contract/insert/insert_contract/mod.rs +++ b/packages/rs-drive/src/drive/contract/insert/insert_contract/mod.rs @@ -1,4 +1,5 @@ mod v0; +mod v1; use crate::drive::Drive; use crate::error::drive::DriveError; @@ -51,9 +52,12 @@ impl Drive { 0 => { self.insert_contract_v0(contract, block_info, apply, transaction, platform_version) } + 1 => { + self.insert_contract_v1(contract, block_info, apply, transaction, platform_version) + } version => Err(Error::Drive(DriveError::UnknownVersionMismatch { method: "insert_contract".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, })), } @@ -86,6 +90,7 @@ impl Drive { HashMap, >, drive_operations: &mut Vec, + transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result<(), Error> { match platform_version @@ -103,9 +108,18 @@ impl Drive { drive_operations, platform_version, ), + 1 => self.insert_contract_add_operations_v1( + contract_element, + contract, + block_info, + estimated_costs_only_with_layer_info, + drive_operations, + transaction, + platform_version, + ), version => Err(Error::Drive(DriveError::UnknownVersionMismatch { method: "insert_contract_add_operations".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, })), } diff --git a/packages/rs-drive/src/drive/contract/insert/insert_contract/v0/mod.rs b/packages/rs-drive/src/drive/contract/insert/insert_contract/v0/mod.rs index 207626f064..635e315e86 100644 --- a/packages/rs-drive/src/drive/contract/insert/insert_contract/v0/mod.rs +++ b/packages/rs-drive/src/drive/contract/insert/insert_contract/v0/mod.rs @@ -145,7 +145,7 @@ impl Drive { /// The operations for adding a contract. /// These operations add a contract to storage using `add_contract_to_storage` /// and insert the empty trees which will be necessary to later insert documents. - fn insert_contract_operations_v0( + pub(in crate::drive::contract::insert::insert_contract) fn insert_contract_operations_v0( &self, contract_element: Element, contract: &DataContract, diff --git a/packages/rs-drive/src/drive/contract/insert/insert_contract/v1/mod.rs b/packages/rs-drive/src/drive/contract/insert/insert_contract/v1/mod.rs new file mode 100644 index 0000000000..29c49b6750 --- /dev/null +++ b/packages/rs-drive/src/drive/contract/insert/insert_contract/v1/mod.rs @@ -0,0 +1,278 @@ +use crate::drive::Drive; +use crate::util::storage_flags::StorageFlags; + +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::config::v0::DataContractConfigGettersV0; +use dpp::data_contract::DataContract; +use dpp::fee::fee_result::FeeResult; + +use crate::drive::balances::total_tokens_root_supply_path_vec; +use crate::drive::tokens::paths::{ + token_balances_path_vec, token_balances_root_path, token_identity_infos_root_path, +}; +use crate::error::contract::DataContractError; +use crate::util::object_size_info::DriveKeyInfo; +use crate::util::object_size_info::PathKeyElementInfo::PathKeyElement; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::serialization::PlatformSerializableWithPlatformVersion; +use dpp::version::PlatformVersion; +use dpp::ProtocolError; +use grovedb::batch::KeyInfoPath; +use grovedb::Element::SumItem; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Insert a contract. + #[inline(always)] + pub(super) fn insert_contract_v1( + &self, + contract: &DataContract, + block_info: BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let mut drive_operations: Vec = vec![]; + + let storage_flags = if contract.config().can_be_deleted() || !contract.config().readonly() { + Some(StorageFlags::new_single_epoch( + block_info.epoch.index, + Some(contract.owner_id().to_buffer()), + )) + } else { + None + }; + + let serialized_contract = + contract.serialize_to_bytes_with_platform_version(platform_version)?; + + if serialized_contract.len() as u64 > u32::MAX as u64 + || serialized_contract.len() as u32 + > platform_version.dpp.contract_versions.max_serialized_size + { + // This should normally be caught by DPP, but there is a rare possibility that the + // re-serialized size is bigger than the original serialized data contract. + return Err(Error::DataContract(DataContractError::ContractTooBig(format!("Trying to insert a data contract of size {} that is over the max allowed insertion size {}", serialized_contract.len(), platform_version.dpp.contract_versions.max_serialized_size)))); + } + + let contract_element = Element::Item( + serialized_contract, + StorageFlags::map_to_some_element_flags(storage_flags.as_ref()), + ); + + self.insert_contract_element_v1( + contract_element, + contract, + &block_info, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + + Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + ) + } + + /// Adds a contract to storage using `add_contract_to_storage` + /// and inserts the empty trees which will be necessary to later insert documents. + fn insert_contract_element_v1( + &self, + contract_element: Element, + contract: &DataContract, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = if apply { + None::> + } else { + Some(HashMap::new()) + }; + let batch_operations = self.insert_contract_operations_v1( + contract_element, + contract, + block_info, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + /// The operations for adding a contract. + /// These operations add a contract to storage using `add_contract_to_storage` + /// and insert the empty trees which will be necessary to later insert documents. + #[inline(always)] + pub(super) fn insert_contract_add_operations_v1( + &self, + contract_element: Element, + contract: &DataContract, + block_info: &BlockInfo, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + drive_operations: &mut Vec, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let batch_operations = self.insert_contract_operations_v1( + contract_element, + contract, + block_info, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + drive_operations.extend(batch_operations); + Ok(()) + } + + /// The operations for adding a contract. + /// These operations add a contract to storage using `add_contract_to_storage` + /// and insert the empty trees which will be necessary to later insert documents. + fn insert_contract_operations_v1( + &self, + contract_element: Element, + contract: &DataContract, + block_info: &BlockInfo, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut batch_operations: Vec = self + .insert_contract_operations_v0( + contract_element, + contract, + block_info, + estimated_costs_only_with_layer_info, + platform_version, + )?; + + for (token_pos, token_config) in contract.tokens() { + let token_id = contract.token_id(*token_pos).ok_or(Error::DataContract( + DataContractError::CorruptedDataContract(format!( + "data contract has a token at position {}, but can not find it", + token_pos + )), + ))?; + + let token_id_bytes = token_id.to_buffer(); + + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info + { + Drive::add_estimation_costs_for_token_balances( + token_id_bytes, + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + Drive::add_estimation_costs_for_token_identity_infos( + token_id_bytes, + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + Drive::add_estimation_costs_for_token_total_supply( + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + + self.batch_insert_empty_sum_tree( + token_balances_root_path(), + DriveKeyInfo::KeyRef(token_id_bytes.as_slice()), + None, + &mut batch_operations, + &platform_version.drive, + )?; + + self.batch_insert_empty_tree( + token_identity_infos_root_path(), + DriveKeyInfo::KeyRef(token_id_bytes.as_slice()), + None, + &mut batch_operations, + &platform_version.drive, + )?; + + let path_holding_total_token_supply = total_tokens_root_supply_path_vec(); + + if token_config.base_supply() > 0 { + // We have a base supply that needs to be distributed on contract creation + let destination_identity_id = token_config + .new_tokens_destination_identity() + .unwrap_or(contract.owner_id()); + let token_balance_path = token_balances_path_vec(token_id_bytes); + + if token_config.base_supply() > i64::MAX as u64 { + return Err( + ProtocolError::CriticalCorruptedCreditsCodeExecution(format!( + "Token base supply over i64 max, is {}", + token_config.base_supply() + )) + .into(), + ); + } + self.batch_insert::<0>( + PathKeyElement(( + token_balance_path, + destination_identity_id.to_vec(), + Element::new_sum_item(token_config.base_supply() as i64), + )), + &mut batch_operations, + &platform_version.drive, + )?; + self.batch_insert::<0>( + PathKeyElement(( + path_holding_total_token_supply, + token_id.to_vec(), + Element::new_sum_item(token_config.base_supply() as i64), + )), + &mut batch_operations, + &platform_version.drive, + )?; + } else { + self.batch_insert::<0>( + PathKeyElement(( + path_holding_total_token_supply, + token_id.to_vec(), + SumItem(0, None), + )), + &mut batch_operations, + &platform_version.drive, + )?; + } + } + + if !contract.groups().is_empty() { + batch_operations.extend(self.add_new_groups_operations( + contract.id(), + contract.groups(), + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?); + } + + Ok(batch_operations) + } +} diff --git a/packages/rs-drive/src/drive/contract/update/update_contract/mod.rs b/packages/rs-drive/src/drive/contract/update/update_contract/mod.rs index 8d22fc4043..f9f682d74a 100644 --- a/packages/rs-drive/src/drive/contract/update/update_contract/mod.rs +++ b/packages/rs-drive/src/drive/contract/update/update_contract/mod.rs @@ -1,4 +1,5 @@ mod v0; +mod v1; use crate::drive::Drive; use crate::error::drive::DriveError; @@ -64,9 +65,17 @@ impl Drive { platform_version, previous_fee_versions, ), + 1 => self.update_contract_v1( + contract, + block_info, + apply, + transaction, + platform_version, + previous_fee_versions, + ), version => Err(Error::Drive(DriveError::UnknownVersionMismatch { method: "update_contract".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, })), } @@ -125,9 +134,18 @@ impl Drive { drive_operations, platform_version, ), + 1 => self.update_contract_element_v1( + contract_element, + contract, + original_contract, + block_info, + transaction, + drive_operations, + platform_version, + ), version => Err(Error::Drive(DriveError::UnknownVersionMismatch { method: "update_contract_element".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, })), } @@ -192,9 +210,19 @@ impl Drive { drive_operations, platform_version, ), + 1 => self.update_contract_add_operations_v1( + contract_element, + contract, + original_contract, + block_info, + estimated_costs_only_with_layer_info, + transaction, + drive_operations, + platform_version, + ), version => Err(Error::Drive(DriveError::UnknownVersionMismatch { method: "update_contract_add_operations".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, })), } diff --git a/packages/rs-drive/src/drive/contract/update/update_contract/v0/mod.rs b/packages/rs-drive/src/drive/contract/update/update_contract/v0/mod.rs index d95decc3f9..141749a2ff 100644 --- a/packages/rs-drive/src/drive/contract/update/update_contract/v0/mod.rs +++ b/packages/rs-drive/src/drive/contract/update/update_contract/v0/mod.rs @@ -19,7 +19,7 @@ use dpp::serialization::PlatformSerializableWithPlatformVersion; use dpp::fee::default_costs::CachedEpochIndexFeeVersions; use dpp::version::PlatformVersion; use grovedb::batch::KeyInfoPath; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::{HashMap, HashSet}; impl Drive { @@ -198,7 +198,7 @@ impl Drive { } /// operations for updating a contract. - fn update_contract_operations_v0( + pub(in crate::drive::contract::update::update_contract) fn update_contract_operations_v0( &self, contract_element: Element, contract: &DataContract, @@ -300,8 +300,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, flags_len: element_flags .as_ref() .map(|e| e.len() as u32) @@ -317,7 +317,7 @@ impl Drive { if !index_cache.contains(index_bytes) { self.batch_insert_empty_tree_if_not_exists( PathFixedSizeKeyRef((type_path, index.name.as_bytes())), - false, + TreeType::NormalTree, storage_flags.as_ref().map(|flags| flags.as_ref()), apply_type, transaction, diff --git a/packages/rs-drive/src/drive/contract/update/update_contract/v1/mod.rs b/packages/rs-drive/src/drive/contract/update/update_contract/v1/mod.rs new file mode 100644 index 0000000000..ccd0cde5f1 --- /dev/null +++ b/packages/rs-drive/src/drive/contract/update/update_contract/v1/mod.rs @@ -0,0 +1,253 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::storage_flags::StorageFlags; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::config::v0::DataContractConfigGettersV0; +use dpp::data_contract::DataContract; +use dpp::fee::fee_result::FeeResult; + +use dpp::serialization::PlatformSerializableWithPlatformVersion; + +use crate::error::contract::DataContractError; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::fee::default_costs::CachedEpochIndexFeeVersions; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Updates a data contract. + /// + /// This function updates a given data contract in the storage. The fee for updating + /// the contract is also calculated and returned. + /// + /// # Arguments + /// + /// * `contract` - A reference to the `DataContract` to be updated. + /// * `block_info` - A `BlockInfo` object containing information about the block where + /// the contract is being updated. + /// * `apply` - A boolean indicating whether the contract update should be applied (`true`) or not (`false`). Passing `false` would only tell the fees but won't interact with the state. + /// * `transaction` - A `TransactionArg` object representing the transaction to be used + /// for updating the contract. + /// + /// # Returns + /// + /// * `Result` - If successful, returns a `FeeResult` representing the fee + /// for updating the contract. If an error occurs during the contract update or fee calculation, + /// returns an `Error`. + /// + /// # Errors + /// + /// This function returns an error if the contract update or fee calculation fails. + #[inline(always)] + pub(super) fn update_contract_v1( + &self, + contract: &DataContract, + block_info: BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + previous_fee_versions: Option<&CachedEpochIndexFeeVersions>, + ) -> Result { + if !apply { + return self.insert_contract( + contract, + block_info, + false, + transaction, + platform_version, + ); + } + + let mut drive_operations: Vec = vec![]; + + let contract_bytes = contract.serialize_to_bytes_with_platform_version(platform_version)?; + + // Since we can update the contract by definition it already has storage flags + let storage_flags = Some(StorageFlags::new_single_epoch( + block_info.epoch.index, + Some(contract.owner_id().to_buffer()), + )); + + let contract_element = Element::Item( + contract_bytes, + StorageFlags::map_to_some_element_flags(storage_flags.as_ref()), + ); + + let original_contract_fetch_info = self + .get_contract_with_fetch_info_and_add_to_operations( + contract.id().to_buffer(), + Some(&block_info.epoch), + true, + transaction, + &mut drive_operations, + platform_version, + )? + .ok_or(Error::Drive(DriveError::CorruptedCodeExecution( + "contract should exist", + )))?; + + if original_contract_fetch_info.contract.config().readonly() { + return Err(Error::Drive(DriveError::UpdatingReadOnlyImmutableContract( + "original contract is readonly", + ))); + } + + self.update_contract_element_v1( + contract_element, + contract, + &original_contract_fetch_info.contract, + &block_info, + transaction, + &mut drive_operations, + platform_version, + )?; + + // Update DataContracts cache with the new contract + let updated_contract_fetch_info = self + .fetch_contract_and_add_operations( + contract.id().to_buffer(), + Some(&block_info.epoch), + transaction, + &mut drive_operations, + platform_version, + )? + .ok_or(Error::Drive(DriveError::CorruptedCodeExecution( + "contract should exist", + )))?; + + self.cache + .data_contracts + .insert(updated_contract_fetch_info, transaction.is_some()); + + Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + previous_fee_versions, + ) + } + + /// Updates a contract. + #[inline(always)] + pub(super) fn update_contract_element_v1( + &self, + contract_element: Element, + contract: &DataContract, + original_contract: &DataContract, + block_info: &BlockInfo, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = + None::>; + let batch_operations = self.update_contract_operations_v1( + contract_element, + contract, + original_contract, + block_info, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + /// Updates a contract. + #[inline(always)] + pub(super) fn update_contract_add_operations_v1( + &self, + contract_element: Element, + contract: &DataContract, + original_contract: &DataContract, + block_info: &BlockInfo, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let batch_operations = self.update_contract_operations_v1( + contract_element, + contract, + original_contract, + block_info, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + drive_operations.extend(batch_operations); + Ok(()) + } + + /// operations for updating a contract. + fn update_contract_operations_v1( + &self, + contract_element: Element, + contract: &DataContract, + original_contract: &DataContract, + block_info: &BlockInfo, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut batch_operations: Vec = self + .update_contract_operations_v0( + contract_element, + contract, + original_contract, + block_info, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + for (token_pos, configuration) in contract.tokens() { + let token_id = contract.token_id(*token_pos).ok_or(Error::DataContract( + DataContractError::CorruptedDataContract(format!( + "data contract has a token at position {}, but can not find it", + token_pos + )), + ))?; + + batch_operations.extend(self.create_token_trees_operations( + token_id.to_buffer(), + configuration.start_as_paused(), + true, + &mut None, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?); + } + + if !contract.groups().is_empty() { + batch_operations.extend(self.add_new_groups_operations( + contract.id(), + contract.groups(), + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?); + } + + Ok(batch_operations) + } +} 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 81248a8e5a..b6ea2661ea 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 @@ -20,7 +20,7 @@ use dpp::fee::Credits; use dpp::util::deserializer::ProtocolVersion; use dpp::version::PlatformVersion; use grovedb::batch::QualifiedGroveDbOp; -use grovedb::{Element, TransactionArg}; +use grovedb::{Element, TransactionArg, TreeType}; /// Operations on Epochs pub trait EpochOperations { @@ -288,7 +288,11 @@ impl EpochOperations for Epoch { /// Returns a groveDB op which deletes the epoch proposers tree. fn delete_proposers_tree_operation(&self) -> QualifiedGroveDbOp { - QualifiedGroveDbOp::delete_tree_op(self.get_path_vec(), KEY_PROPOSERS.to_vec(), false) + QualifiedGroveDbOp::delete_tree_op( + self.get_path_vec(), + KEY_PROPOSERS.to_vec(), + TreeType::NormalTree, + ) } /// Adds a groveDB op to the batch which deletes the given epoch proposers from the proposers tree. @@ -421,7 +425,7 @@ mod tests { #[test] fn test_error_if_fee_pools_not_initialized() { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let transaction = drive.grove.start_transaction(); let platform_version = PlatformVersion::first(); @@ -445,10 +449,9 @@ mod tests { #[test] fn test_values_are_set() { - let drive = setup_drive_with_initial_state_structure(None); - let transaction = drive.grove.start_transaction(); - let platform_version = PlatformVersion::first(); + let drive = setup_drive_with_initial_state_structure(Some(platform_version)); + let transaction = drive.grove.start_transaction(); let epoch = Epoch::new(1042).unwrap(); @@ -480,10 +483,9 @@ mod tests { #[test] fn test_values_are_set() { - let drive = setup_drive_with_initial_state_structure(None); - let transaction = drive.grove.start_transaction(); - let platform_version = PlatformVersion::first(); + let drive = setup_drive_with_initial_state_structure(Some(platform_version)); + let transaction = drive.grove.start_transaction(); let epoch = Epoch::new(1042).unwrap(); diff --git a/packages/rs-drive/src/drive/credit_pools/storage_fee_distribution_pool/get_storage_fees_from_distribution_pool/v0/mod.rs b/packages/rs-drive/src/drive/credit_pools/storage_fee_distribution_pool/get_storage_fees_from_distribution_pool/v0/mod.rs index ee90eec06c..bf740821f0 100644 --- a/packages/rs-drive/src/drive/credit_pools/storage_fee_distribution_pool/get_storage_fees_from_distribution_pool/v0/mod.rs +++ b/packages/rs-drive/src/drive/credit_pools/storage_fee_distribution_pool/get_storage_fees_from_distribution_pool/v0/mod.rs @@ -52,7 +52,7 @@ mod tests { #[test] fn test_error_if_epoch_is_not_initiated() { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let transaction = drive.grove.start_transaction(); let platform_version = PlatformVersion::first(); diff --git a/packages/rs-drive/src/drive/credit_pools/unpaid_epoch/get_unpaid_epoch_index/v0/mod.rs b/packages/rs-drive/src/drive/credit_pools/unpaid_epoch/get_unpaid_epoch_index/v0/mod.rs index bcfdaf59b1..def6c7f229 100644 --- a/packages/rs-drive/src/drive/credit_pools/unpaid_epoch/get_unpaid_epoch_index/v0/mod.rs +++ b/packages/rs-drive/src/drive/credit_pools/unpaid_epoch/get_unpaid_epoch_index/v0/mod.rs @@ -57,7 +57,7 @@ mod tests { #[test] fn test_error_if_fee_pools_tree_is_not_initiated() { let platform_version = PlatformVersion::latest(); - let drive = setup_drive(None); + let drive = setup_drive(None, None); let transaction = drive.grove.start_transaction(); let result = drive.get_unpaid_epoch_index_v0(Some(&transaction), platform_version); diff --git a/packages/rs-drive/src/drive/document/delete/delete_document_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/delete/delete_document_for_contract_operations/v0/mod.rs index cec20f624a..3f13cfcc6b 100644 --- a/packages/rs-drive/src/drive/document/delete/delete_document_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/delete/delete_document_for_contract_operations/v0/mod.rs @@ -1,6 +1,6 @@ use grovedb::batch::KeyInfoPath; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use dpp::data_contract::document_type::DocumentTypeRef; @@ -83,7 +83,7 @@ impl Drive { &platform_version.drive, )?; DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, query_target: QueryTargetValue( document_type.estimated_size(platform_version)? as u32 ), diff --git a/packages/rs-drive/src/drive/document/delete/internal/add_estimation_costs_for_remove_document_to_primary_storage/v0/mod.rs b/packages/rs-drive/src/drive/document/delete/internal/add_estimation_costs_for_remove_document_to_primary_storage/v0/mod.rs index 2f2863cd4a..ce3ca4d6e5 100644 --- a/packages/rs-drive/src/drive/document/delete/internal/add_estimation_costs_for_remove_document_to_primary_storage/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/delete/internal/add_estimation_costs_for_remove_document_to_primary_storage/v0/mod.rs @@ -1,8 +1,8 @@ use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::PotentiallyAtMaxElements; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::AllItems; +use grovedb::{EstimatedLayerInformation, TreeType}; use dpp::data_contract::document_type::DocumentTypeRef; @@ -67,7 +67,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(primary_key_path), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllItems( DEFAULT_HASH_SIZE_U8, diff --git a/packages/rs-drive/src/drive/document/delete/mod.rs b/packages/rs-drive/src/drive/document/delete/mod.rs index c2da69240b..5a1d2ebbb2 100644 --- a/packages/rs-drive/src/drive/document/delete/mod.rs +++ b/packages/rs-drive/src/drive/document/delete/mod.rs @@ -69,6 +69,7 @@ mod tests { use crate::query::DriveDocumentQuery; use dpp::block::epoch::Epoch; use dpp::data_contract::accessors::v0::DataContractV0Getters; + use dpp::data_contract::DataContract; use dpp::document::serialization_traits::DocumentPlatformConversionMethodsV0; use dpp::document::Document; use dpp::fee::default_costs::KnownCostItem::StorageDiskUsageCreditPerByte; @@ -86,10 +87,11 @@ mod tests { fn test_add_and_remove_family_one_document_no_transaction() { let tmp_dir = TempDir::new().unwrap(); - let (drive, _) = Drive::open(tmp_dir, None).expect("expected to open Drive successfully"); - let platform_version = PlatformVersion::latest(); + let (drive, _) = Drive::open(tmp_dir, None, Some(platform_version)) + .expect("expected to open Drive successfully"); + drive .create_initial_state_structure(None, platform_version) .expect("expected to create root tree successfully"); @@ -99,6 +101,9 @@ mod tests { "tests/supporting_files/contract/family/family-contract-reduced.json", None, None, + None::, + None, + None, ); let document_type = contract @@ -192,7 +197,10 @@ mod tests { &drive, "tests/supporting_files/contract/family/family-contract-reduced.json", None, + None, + None::, Some(&db_transaction), + None, ); let document_type = contract @@ -333,7 +341,10 @@ mod tests { &drive, "tests/supporting_files/contract/family/family-contract-reduced.json", None, + None, + None::, Some(&db_transaction), + None, ); let document_type = contract @@ -517,7 +528,10 @@ mod tests { &drive, "tests/supporting_files/contract/family/family-contract-reduced.json", None, + None, + None::, Some(&db_transaction), + None, ); let document_type = contract @@ -792,7 +806,10 @@ mod tests { &drive, "tests/supporting_files/contract/dashpay/dashpay-contract.json", None, + None, + None::, Some(&db_transaction), + None, ); let random_owner_id = rand::thread_rng().gen::<[u8; 32]>(); @@ -892,7 +909,10 @@ mod tests { &drive, "tests/supporting_files/contract/dashpay/dashpay-contract.json", None, + None, + None::, Some(&db_transaction), + None, ); let document_type = contract diff --git a/packages/rs-drive/src/drive/document/delete/remove_document_from_primary_storage/v0/mod.rs b/packages/rs-drive/src/drive/document/delete/remove_document_from_primary_storage/v0/mod.rs index b3ea51c398..07d0b4f564 100644 --- a/packages/rs-drive/src/drive/document/delete/remove_document_from_primary_storage/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/delete/remove_document_from_primary_storage/v0/mod.rs @@ -1,6 +1,6 @@ use grovedb::batch::KeyInfoPath; -use grovedb::{EstimatedLayerInformation, TransactionArg}; +use grovedb::{EstimatedLayerInformation, MaybeTree, TransactionArg, TreeType}; use dpp::data_contract::document_type::DocumentTypeRef; @@ -38,14 +38,14 @@ impl Drive { ) -> Result<(), Error> { let apply_type = if estimated_costs_only_with_layer_info.is_some() { StatelessBatchDelete { - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, estimated_key_size: DEFAULT_HASH_SIZE_U32, estimated_value_size: document_type.estimated_size(platform_version)? as u32, } } else { // we know we are not deleting a subtree StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), } }; self.batch_delete( diff --git a/packages/rs-drive/src/drive/document/delete/remove_indices_for_index_level_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/delete/remove_indices_for_index_level_for_contract_operations/v0/mod.rs index 6ad033a0f4..a7e531ebb1 100644 --- a/packages/rs-drive/src/drive/document/delete/remove_indices_for_index_level_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/delete/remove_indices_for_index_level_for_contract_operations/v0/mod.rs @@ -2,7 +2,7 @@ use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, PotentiallyAtMaxElements}; use grovedb::EstimatedLayerSizes::AllSubtrees; -use grovedb::{EstimatedLayerInformation, TransactionArg}; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; use dpp::data_contract::document_type::IndexLevel; @@ -51,7 +51,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( index_path_info.clone().convert_to_key_info_path(), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(sub_level_index_count + 1), estimated_layer_sizes: AllSubtrees( DEFAULT_HASH_SIZE_U8, @@ -116,7 +116,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( sub_level_index_path_info.clone().convert_to_key_info_path(), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees( document_top_field_estimated_size as u8, diff --git a/packages/rs-drive/src/drive/document/delete/remove_indices_for_top_index_level_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/delete/remove_indices_for_top_index_level_for_contract_operations/v0/mod.rs index 332e921451..65f48016dd 100644 --- a/packages/rs-drive/src/drive/document/delete/remove_indices_for_top_index_level_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/delete/remove_indices_for_top_index_level_for_contract_operations/v0/mod.rs @@ -2,7 +2,7 @@ use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, PotentiallyAtMaxElements}; use grovedb::EstimatedLayerSizes::AllSubtrees; -use grovedb::{EstimatedLayerInformation, TransactionArg}; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; use grovedb::EstimatedSumTrees::NoSumTrees; use std::collections::HashMap; @@ -69,7 +69,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(contract_document_type_path.clone()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(sub_level_index_count + 1), estimated_layer_sizes: AllSubtrees( DEFAULT_HASH_SIZE_U8, @@ -119,7 +119,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(index_path.clone()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees( document_top_field_estimated_size as u8, diff --git a/packages/rs-drive/src/drive/document/delete/remove_reference_for_index_level_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/delete/remove_reference_for_index_level_for_contract_operations/v0/mod.rs index 0ee9619ac0..171af54819 100644 --- a/packages/rs-drive/src/drive/document/delete/remove_reference_for_index_level_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/delete/remove_reference_for_index_level_for_contract_operations/v0/mod.rs @@ -3,7 +3,7 @@ use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::PotentiallyAtMaxElements; use grovedb::EstimatedLayerSizes::{AllReference, AllSubtrees}; -use grovedb::{EstimatedLayerInformation, TransactionArg}; +use grovedb::{EstimatedLayerInformation, MaybeTree, TransactionArg, TreeType}; use dpp::data_contract::document_type::IndexLevelTypeInfo; use dpp::data_contract::document_type::IndexType::{ContestedResourceIndex, NonUniqueIndex}; @@ -64,7 +64,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( key_info_path.clone(), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees( DEFAULT_HASH_SIZE_U8, @@ -83,7 +83,7 @@ impl Drive { ), &key_info_path, // we know we are not deleting a tree - Some((false, false)), + Some(MaybeTree::NotTree), estimated_costs_only_with_layer_info, platform_version, )?; @@ -112,7 +112,7 @@ impl Drive { ), &key_info_path, // we know we are not deleting a tree - Some((false, false)), + Some(MaybeTree::NotTree), estimated_costs_only_with_layer_info, platform_version, )?; diff --git a/packages/rs-drive/src/drive/document/estimation_costs/add_estimation_costs_for_add_contested_document_to_primary_storage/v0/mod.rs b/packages/rs-drive/src/drive/document/estimation_costs/add_estimation_costs_for_add_contested_document_to_primary_storage/v0/mod.rs index 3de9414bc0..2bcaf9ccbc 100644 --- a/packages/rs-drive/src/drive/document/estimation_costs/add_estimation_costs_for_add_contested_document_to_primary_storage/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/estimation_costs/add_estimation_costs_for_add_contested_document_to_primary_storage/v0/mod.rs @@ -11,8 +11,8 @@ use dpp::data_contract::document_type::methods::DocumentTypeV0Methods; use dpp::version::PlatformVersion; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::PotentiallyAtMaxElements; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::AllItems; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::util::type_constants::DEFAULT_HASH_SIZE_U8; use std::collections::HashMap; @@ -77,7 +77,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(primary_key_path), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllItems( DEFAULT_HASH_SIZE_U8, diff --git a/packages/rs-drive/src/drive/document/estimation_costs/add_estimation_costs_for_add_document_to_primary_storage/v0/mod.rs b/packages/rs-drive/src/drive/document/estimation_costs/add_estimation_costs_for_add_document_to_primary_storage/v0/mod.rs index a43d53d1bf..9b5bb29ebd 100644 --- a/packages/rs-drive/src/drive/document/estimation_costs/add_estimation_costs_for_add_document_to_primary_storage/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/estimation_costs/add_estimation_costs_for_add_document_to_primary_storage/v0/mod.rs @@ -15,9 +15,9 @@ use dpp::document::DocumentV0Getters; use dpp::version::PlatformVersion; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees, Mix}; use grovedb::EstimatedSumTrees::NoSumTrees; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::util::type_constants::{ DEFAULT_FLOAT_SIZE, DEFAULT_FLOAT_SIZE_U8, DEFAULT_HASH_SIZE_U8, @@ -84,7 +84,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(primary_key_path), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees( DEFAULT_HASH_SIZE_U8, @@ -108,7 +108,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(document_id_in_primary_path), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(AVERAGE_NUMBER_OF_UPDATES as u32), estimated_layer_sizes: Mix { subtrees_size: None, @@ -137,7 +137,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(primary_key_path), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllItems( DEFAULT_HASH_SIZE_U8, diff --git a/packages/rs-drive/src/drive/document/estimation_costs/stateless_delete_of_non_tree_for_costs/mod.rs b/packages/rs-drive/src/drive/document/estimation_costs/stateless_delete_of_non_tree_for_costs/mod.rs index 4d8a852d84..d31bad5cf5 100644 --- a/packages/rs-drive/src/drive/document/estimation_costs/stateless_delete_of_non_tree_for_costs/mod.rs +++ b/packages/rs-drive/src/drive/document/estimation_costs/stateless_delete_of_non_tree_for_costs/mod.rs @@ -1,6 +1,6 @@ mod v0; -use crate::util::grove_operations::{BatchDeleteUpTreeApplyType, IsSubTree, IsSumSubTree}; +use crate::util::grove_operations::BatchDeleteUpTreeApplyType; use crate::drive::Drive; @@ -10,7 +10,7 @@ use crate::error::drive::DriveError; use dpp::version::PlatformVersion; use grovedb::batch::KeyInfoPath; -use grovedb::{EstimatedLayerInformation, EstimatedLayerSizes}; +use grovedb::{EstimatedLayerInformation, EstimatedLayerSizes, MaybeTree}; use std::collections::HashMap; @@ -39,7 +39,7 @@ impl Drive { pub(crate) fn stateless_delete_of_non_tree_for_costs( element_estimated_sizes: EstimatedLayerSizes, key_info_path: &KeyInfoPath, - is_known_to_be_subtree_with_sum: Option<(IsSubTree, IsSumSubTree)>, + is_known_to_be_subtree_with_sum: Option, estimated_costs_only_with_layer_info: &mut Option< HashMap, >, diff --git a/packages/rs-drive/src/drive/document/estimation_costs/stateless_delete_of_non_tree_for_costs/v0/mod.rs b/packages/rs-drive/src/drive/document/estimation_costs/stateless_delete_of_non_tree_for_costs/v0/mod.rs index cf2b79c56d..bcd8ac056f 100644 --- a/packages/rs-drive/src/drive/document/estimation_costs/stateless_delete_of_non_tree_for_costs/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/estimation_costs/stateless_delete_of_non_tree_for_costs/v0/mod.rs @@ -1,6 +1,6 @@ use crate::drive::constants::CONTRACT_DOCUMENTS_PATH_HEIGHT; -use crate::util::grove_operations::{BatchDeleteUpTreeApplyType, IsSubTree, IsSumSubTree}; +use crate::util::grove_operations::BatchDeleteUpTreeApplyType; use crate::drive::Drive; use crate::error::fee::FeeError; @@ -8,7 +8,7 @@ use crate::error::Error; use grovedb::batch::KeyInfoPath; -use grovedb::{EstimatedLayerInformation, EstimatedLayerSizes}; +use grovedb::{EstimatedLayerInformation, EstimatedLayerSizes, MaybeTree}; use intmap::IntMap; use itertools::Itertools; use std::collections::HashMap; @@ -41,7 +41,7 @@ impl Drive { pub(super) fn stateless_delete_of_non_tree_for_costs_v0( element_estimated_sizes: EstimatedLayerSizes, key_info_path: &KeyInfoPath, - is_known_to_be_subtree_with_sum: Option<(IsSubTree, IsSumSubTree)>, + is_known_to_be_subtree_with_sum: Option, estimated_costs_only_with_layer_info: &mut Option< HashMap, >, diff --git a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_create_transition_action_uniqueness/mod.rs b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_create_transition_action_uniqueness/mod.rs index 0af032f910..8ffb92bdcc 100644 --- a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_create_transition_action_uniqueness/mod.rs +++ b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_create_transition_action_uniqueness/mod.rs @@ -13,7 +13,7 @@ use dpp::validation::SimpleConsensusValidationResult; use grovedb::TransactionArg; -use crate::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::DocumentCreateTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::DocumentCreateTransitionAction; use dpp::version::PlatformVersion; impl Drive { diff --git a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_create_transition_action_uniqueness/v0/mod.rs b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_create_transition_action_uniqueness/v0/mod.rs index 5f9c96d1ab..33a1fdcc9d 100644 --- a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_create_transition_action_uniqueness/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_create_transition_action_uniqueness/v0/mod.rs @@ -19,8 +19,8 @@ use dpp::document::property_names::{ }; use grovedb::TransactionArg; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::{DocumentCreateTransitionAction, DocumentCreateTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::{DocumentCreateTransitionAction, DocumentCreateTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; impl Drive { diff --git a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_purchase_transition_action_uniqueness/mod.rs b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_purchase_transition_action_uniqueness/mod.rs index a4e3bc9d05..75baec39ad 100644 --- a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_purchase_transition_action_uniqueness/mod.rs +++ b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_purchase_transition_action_uniqueness/mod.rs @@ -13,7 +13,7 @@ use dpp::validation::SimpleConsensusValidationResult; use grovedb::TransactionArg; -use crate::state_transition_action::document::documents_batch::document_transition::document_purchase_transition_action::DocumentPurchaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::DocumentPurchaseTransitionAction; use dpp::version::PlatformVersion; impl Drive { diff --git a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_purchase_transition_action_uniqueness/v0/mod.rs b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_purchase_transition_action_uniqueness/v0/mod.rs index a9673724cf..05bee3b7e1 100644 --- a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_purchase_transition_action_uniqueness/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_purchase_transition_action_uniqueness/v0/mod.rs @@ -14,8 +14,8 @@ use dpp::validation::SimpleConsensusValidationResult; use dpp::document::DocumentV0Getters; use grovedb::TransactionArg; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_purchase_transition_action::{DocumentPurchaseTransitionAction, DocumentPurchaseTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::{DocumentPurchaseTransitionAction, DocumentPurchaseTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; impl Drive { diff --git a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_replace_transition_action_uniqueness/mod.rs b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_replace_transition_action_uniqueness/mod.rs index 4b16308fd4..05deb0d487 100644 --- a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_replace_transition_action_uniqueness/mod.rs +++ b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_replace_transition_action_uniqueness/mod.rs @@ -13,7 +13,7 @@ use dpp::validation::SimpleConsensusValidationResult; use grovedb::TransactionArg; -use crate::state_transition_action::document::documents_batch::document_transition::document_replace_transition_action::DocumentReplaceTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_replace_transition_action::DocumentReplaceTransitionAction; use dpp::version::PlatformVersion; impl Drive { diff --git a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_replace_transition_action_uniqueness/v0/mod.rs b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_replace_transition_action_uniqueness/v0/mod.rs index 8930e78be5..5dbea70762 100644 --- a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_replace_transition_action_uniqueness/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_replace_transition_action_uniqueness/v0/mod.rs @@ -13,8 +13,8 @@ use dpp::validation::SimpleConsensusValidationResult; use grovedb::TransactionArg; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_replace_transition_action::{DocumentReplaceTransitionAction, DocumentReplaceTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_replace_transition_action::{DocumentReplaceTransitionAction, DocumentReplaceTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; impl Drive { diff --git a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_transfer_transition_action_uniqueness/mod.rs b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_transfer_transition_action_uniqueness/mod.rs index b72f8d55ae..16c272b541 100644 --- a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_transfer_transition_action_uniqueness/mod.rs +++ b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_transfer_transition_action_uniqueness/mod.rs @@ -13,7 +13,7 @@ use dpp::validation::SimpleConsensusValidationResult; use grovedb::TransactionArg; -use crate::state_transition_action::document::documents_batch::document_transition::document_transfer_transition_action::DocumentTransferTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::DocumentTransferTransitionAction; use dpp::version::PlatformVersion; impl Drive { diff --git a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_transfer_transition_action_uniqueness/v0/mod.rs b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_transfer_transition_action_uniqueness/v0/mod.rs index a4a2551716..638fcdd852 100644 --- a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_transfer_transition_action_uniqueness/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_transfer_transition_action_uniqueness/v0/mod.rs @@ -14,8 +14,8 @@ use dpp::validation::SimpleConsensusValidationResult; use dpp::document::DocumentV0Getters; use grovedb::TransactionArg; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_transfer_transition_action::{DocumentTransferTransitionAction, DocumentTransferTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::{DocumentTransferTransitionAction, DocumentTransferTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; impl Drive { diff --git a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_update_price_transition_action_uniqueness/mod.rs b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_update_price_transition_action_uniqueness/mod.rs index 6d412a95ab..f60019f474 100644 --- a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_update_price_transition_action_uniqueness/mod.rs +++ b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_update_price_transition_action_uniqueness/mod.rs @@ -13,7 +13,7 @@ use dpp::validation::SimpleConsensusValidationResult; use grovedb::TransactionArg; -use crate::state_transition_action::document::documents_batch::document_transition::document_update_price_transition_action::DocumentUpdatePriceTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::DocumentUpdatePriceTransitionAction; use dpp::version::PlatformVersion; impl Drive { diff --git a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_update_price_transition_action_uniqueness/v0/mod.rs b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_update_price_transition_action_uniqueness/v0/mod.rs index 21b3d94564..feb615a504 100644 --- a/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_update_price_transition_action_uniqueness/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/index_uniqueness/validate_document_update_price_transition_action_uniqueness/v0/mod.rs @@ -14,8 +14,8 @@ use dpp::validation::SimpleConsensusValidationResult; use dpp::document::DocumentV0Getters; use grovedb::TransactionArg; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_update_price_transition_action::{DocumentUpdatePriceTransitionAction, DocumentUpdatePriceTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::{DocumentUpdatePriceTransitionAction, DocumentUpdatePriceTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; impl Drive { diff --git a/packages/rs-drive/src/drive/document/insert/add_document_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/insert/add_document_for_contract_operations/v0/mod.rs index 1faf95a1dc..f072477da8 100644 --- a/packages/rs-drive/src/drive/document/insert/add_document_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/insert/add_document_for_contract_operations/v0/mod.rs @@ -12,7 +12,7 @@ use dpp::data_contract::document_type::methods::DocumentTypeV0Methods; use dpp::version::PlatformVersion; use grovedb::batch::KeyInfoPath; -use grovedb::{EstimatedLayerInformation, TransactionArg}; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; impl Drive { @@ -41,7 +41,7 @@ impl Drive { StatefulDirectQuery } else { StatelessDirectQuery { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, query_target: QueryTargetValue( document_and_contract_info .document_type diff --git a/packages/rs-drive/src/drive/document/insert/add_document_to_primary_storage/v0/mod.rs b/packages/rs-drive/src/drive/document/insert/add_document_to_primary_storage/v0/mod.rs index f0ecde6e3e..ea1ae0f2a7 100644 --- a/packages/rs-drive/src/drive/document/insert/add_document_to_primary_storage/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/insert/add_document_to_primary_storage/v0/mod.rs @@ -5,7 +5,7 @@ use grovedb::batch::key_info::KeyInfo::KnownKey; use grovedb::batch::KeyInfoPath; use grovedb::reference_path::ReferencePathType::SiblingReference; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; use std::option::Option::None; @@ -125,8 +125,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, flags_len: storage_flags .map(|s| s.serialized_size()) .unwrap_or_default(), @@ -135,7 +135,7 @@ impl Drive { // we first insert an empty tree if the document is new self.batch_insert_empty_tree_if_not_exists( path_key_info, - false, + TreeType::NormalTree, storage_flags, apply_type, transaction, @@ -425,7 +425,7 @@ impl Drive { BatchInsertApplyType::StatefulBatchInsert } else { BatchInsertApplyType::StatelessBatchInsert { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, target: QueryTargetValue(document_type.estimated_size(platform_version)? as u32), } }; diff --git a/packages/rs-drive/src/drive/document/insert/add_indices_for_index_level_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/insert/add_indices_for_index_level_for_contract_operations/v0/mod.rs index 2725cc80b1..0bfcf82e67 100644 --- a/packages/rs-drive/src/drive/document/insert/add_indices_for_index_level_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/insert/add_indices_for_index_level_for_contract_operations/v0/mod.rs @@ -14,7 +14,7 @@ use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, PotentiallyAtMaxElements}; use grovedb::EstimatedLayerSizes::AllSubtrees; use grovedb::EstimatedSumTrees::NoSumTrees; -use grovedb::{EstimatedLayerInformation, TransactionArg}; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; impl Drive { @@ -62,7 +62,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( index_path_info.clone().convert_to_key_info_path(), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(sub_level_index_count + 1), estimated_layer_sizes: AllSubtrees( DEFAULT_HASH_SIZE_U8, @@ -77,8 +77,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, flags_len: storage_flags .map(|s| s.serialized_size()) .unwrap_or_default(), @@ -109,7 +109,7 @@ impl Drive { // here we are inserting an empty tree that will have a subtree of all other index properties self.batch_insert_empty_tree_if_not_exists( path_key_info.clone(), - false, + TreeType::NormalTree, *storage_flags, apply_type, transaction, @@ -136,7 +136,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( sub_level_index_path_info.clone().convert_to_key_info_path(), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees( document_top_field_estimated_size as u8, @@ -157,7 +157,7 @@ impl Drive { // here we are inserting an empty tree that will have a subtree of all other index properties self.batch_insert_empty_tree_if_not_exists( path_key_info.clone(), - false, + TreeType::NormalTree, *storage_flags, apply_type, transaction, diff --git a/packages/rs-drive/src/drive/document/insert/add_indices_for_top_index_level_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/insert/add_indices_for_top_index_level_for_contract_operations/v0/mod.rs index c21146a183..4ca3e7662d 100644 --- a/packages/rs-drive/src/drive/document/insert/add_indices_for_top_index_level_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/insert/add_indices_for_top_index_level_for_contract_operations/v0/mod.rs @@ -20,7 +20,7 @@ use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, PotentiallyAtMaxElements}; use grovedb::EstimatedLayerSizes::AllSubtrees; use grovedb::EstimatedSumTrees::NoSumTrees; -use grovedb::{EstimatedLayerInformation, TransactionArg}; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; impl Drive { @@ -70,7 +70,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(contract_document_type_path.clone()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(sub_level_index_count + 1), estimated_layer_sizes: AllSubtrees( DEFAULT_HASH_SIZE_U8, @@ -85,8 +85,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, flags_len: storage_flags .map(|s| s.serialized_size()) .unwrap_or_default(), @@ -120,7 +120,7 @@ impl Drive { // here we are inserting an empty tree that will have a subtree of all other index properties self.batch_insert_empty_tree_if_not_exists( path_key_info.clone(), - false, + TreeType::NormalTree, storage_flags, apply_type, transaction, @@ -146,7 +146,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(index_path.clone()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees( document_top_field_estimated_size as u8, 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 00d3f872cd..c3744cbcdc 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 @@ -23,7 +23,7 @@ use grovedb::batch::key_info::KeyInfo; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::PotentiallyAtMaxElements; use grovedb::EstimatedLayerSizes::AllReference; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; impl Drive { @@ -61,8 +61,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, flags_len: storage_flags .map(|s| s.serialized_size()) .unwrap_or_default(), @@ -75,7 +75,7 @@ impl Drive { // a contested resource index self.batch_insert_empty_tree_if_not_exists( path_key_info, - false, + TreeType::NormalTree, *storage_flags, apply_type, transaction, @@ -94,7 +94,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( index_path_info.clone().convert_to_key_info_path(), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllReference( DEFAULT_HASH_SIZE_U8, @@ -194,7 +194,7 @@ impl Drive { BatchInsertApplyType::StatefulBatchInsert } else { BatchInsertApplyType::StatelessBatchInsert { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, target: QueryTargetValue( document_reference_size(document_and_contract_info.document_type) + storage_flags diff --git a/packages/rs-drive/src/drive/document/insert/mod.rs b/packages/rs-drive/src/drive/document/insert/mod.rs index d439a05e99..9b430e8a85 100644 --- a/packages/rs-drive/src/drive/document/insert/mod.rs +++ b/packages/rs-drive/src/drive/document/insert/mod.rs @@ -51,11 +51,11 @@ mod tests { use once_cell::sync::Lazy; use std::collections::BTreeMap; - use dpp::block::epoch::Epoch; - use dpp::data_contract::accessors::v0::DataContractV0Getters; - use crate::util::object_size_info::DocumentInfo::DocumentRefInfo; use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::block::epoch::Epoch; + use dpp::data_contract::accessors::v0::DataContractV0Getters; + use dpp::data_contract::DataContract; use dpp::fee::default_costs::KnownCostItem::StorageDiskUsageCreditPerByte; use dpp::fee::default_costs::{CachedEpochIndexFeeVersions, EpochCosts}; use dpp::fee::fee_result::FeeResult; @@ -165,7 +165,10 @@ mod tests { &drive, "tests/supporting_files/contract/dashpay/dashpay-contract-all-mutable.json", None, + None, + None::, Some(&db_transaction), + None, ); let document_type = contract @@ -261,7 +264,10 @@ mod tests { &drive, "tests/supporting_files/contract/dashpay/dashpay-contract.json", None, + None, + None::, Some(&db_transaction), + None, ); let document_type = contract @@ -399,7 +405,10 @@ mod tests { &drive, "tests/supporting_files/contract/dashpay/dashpay-contract.json", None, + None, + None::, Some(&db_transaction), + None, ); let document_type = contract @@ -439,7 +448,6 @@ mod tests { None, ) .expect("expected to insert a document successfully"); - assert_eq!(fee_result, expected_fee_result); } @@ -455,7 +463,10 @@ mod tests { &drive, "tests/supporting_files/contract/dashpay/dashpay-contract-all-mutable.json", None, + None, + None::, Some(&db_transaction), + None, ); let random_owner_id = random::<[u8; 32]>(); @@ -531,7 +542,10 @@ mod tests { &drive, "tests/supporting_files/contract/dashpay/dashpay-contract-all-mutable.json", None, + None, + None::, Some(&db_transaction), + None, ); let random_owner_id = random::<[u8; 32]>(); @@ -624,7 +638,10 @@ mod tests { &drive, "tests/supporting_files/contract/dpns/dpns-contract.json", None, + None, + None::, Some(&db_transaction), + None, ); let random_owner_id = rand::thread_rng().gen::<[u8; 32]>(); diff --git a/packages/rs-drive/src/drive/document/insert_contested/add_contested_document_to_primary_storage/v0/mod.rs b/packages/rs-drive/src/drive/document/insert_contested/add_contested_document_to_primary_storage/v0/mod.rs index 5df447b5ef..5a18464be3 100644 --- a/packages/rs-drive/src/drive/document/insert_contested/add_contested_document_to_primary_storage/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/insert_contested/add_contested_document_to_primary_storage/v0/mod.rs @@ -1,7 +1,7 @@ use grovedb::batch::key_info::KeyInfo; use grovedb::batch::KeyInfoPath; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; @@ -203,7 +203,7 @@ impl Drive { BatchInsertApplyType::StatefulBatchInsert } else { BatchInsertApplyType::StatelessBatchInsert { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, target: QueryTargetValue(document_type.estimated_size(platform_version)? as u32), } }; diff --git a/packages/rs-drive/src/drive/document/insert_contested/add_contested_indices_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/insert_contested/add_contested_indices_for_contract_operations/v0/mod.rs index 1881419fdd..52297150a0 100644 --- a/packages/rs-drive/src/drive/document/insert_contested/add_contested_indices_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/insert_contested/add_contested_indices_for_contract_operations/v0/mod.rs @@ -23,7 +23,7 @@ use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, PotentiallyAtMaxElements}; use grovedb::EstimatedLayerSizes::AllSubtrees; use grovedb::EstimatedSumTrees::NoSumTrees; -use grovedb::{EstimatedLayerInformation, TransactionArg}; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; impl Drive { @@ -74,8 +74,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, flags_len: storage_flags .map(|s| s.serialized_size()) .unwrap_or_default(), @@ -123,7 +123,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( index_path_info.clone().convert_to_key_info_path(), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees( document_top_field_estimated_size as u8, @@ -153,7 +153,7 @@ impl Drive { document_top_field .clone() .add_path_info(index_path_info.clone()), - false, + TreeType::NormalTree, storage_flags, apply_type, transaction, @@ -187,7 +187,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( index_path_info.clone().convert_to_key_info_path(), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(16), // very seldom would more than 16 people want the resource estimated_layer_sizes: AllSubtrees( DEFAULT_HASH_SIZE_U8, @@ -200,7 +200,7 @@ impl Drive { self.batch_insert_empty_tree_if_not_exists( DriveKeyInfo::Key(owner_id.to_vec()).add_path_info(index_path_info.clone()), - false, + TreeType::NormalTree, storage_flags, apply_type, transaction, @@ -212,7 +212,7 @@ impl Drive { let inserted_abstain = self.batch_insert_empty_tree_if_not_exists( DriveKeyInfo::Key(RESOURCE_ABSTAIN_VOTE_TREE_KEY_U8_32.to_vec()) .add_path_info(index_path_info.clone()), - false, + TreeType::NormalTree, storage_flags, apply_type, transaction, @@ -224,7 +224,7 @@ impl Drive { let inserted_lock = self.batch_insert_empty_tree_if_not_exists( DriveKeyInfo::Key(RESOURCE_LOCK_VOTE_TREE_KEY_U8_32.to_vec()) .add_path_info(index_path_info.clone()), - false, + TreeType::NormalTree, storage_flags, apply_type, transaction, diff --git a/packages/rs-drive/src/drive/document/insert_contested/add_contested_indices_for_index_level_for_contract_operations/v0/mod.rs b/packages/rs-drive/src/drive/document/insert_contested/add_contested_indices_for_index_level_for_contract_operations/v0/mod.rs index a989dd3997..a1ecffebb3 100644 --- a/packages/rs-drive/src/drive/document/insert_contested/add_contested_indices_for_index_level_for_contract_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/document/insert_contested/add_contested_indices_for_index_level_for_contract_operations/v0/mod.rs @@ -60,7 +60,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( index_path_info.clone().convert_to_key_info_path(), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(sub_level_index_count + 1), estimated_layer_sizes: AllSubtrees( DEFAULT_HASH_SIZE_U8, @@ -76,7 +76,7 @@ impl Drive { } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { in_tree_using_sums: false, - is_sum_tree: false, + tree_type: TreeType::NormalTree, flags_len: storage_flags .map(|s| s.serialized_size()) .unwrap_or_default(), @@ -134,7 +134,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( sub_level_index_path_info.clone().convert_to_key_info_path(), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees( document_top_field_estimated_size as u8, 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 3bc068d4f1..cd4fa6ecd1 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 @@ -21,7 +21,7 @@ use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, PotentiallyAtMaxElements}; use grovedb::EstimatedLayerSizes::{AllItems, Mix}; use grovedb::EstimatedSumTrees::AllSumTrees; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; impl Drive { @@ -53,7 +53,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( index_path_info.clone().convert_to_key_info_path(), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(2), estimated_layer_sizes: Mix { // The votes don't have storage flags @@ -144,7 +144,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( votes_path_key_info.clone().convert_to_key_info_path()?, EstimatedLayerInformation { - is_sum_tree: true, + tree_type: TreeType::SumTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllItems(DEFAULT_HASH_SIZE_U8, U8_SIZE_U32, None), }, @@ -155,8 +155,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: true, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::SumTree, flags_len: storage_flags .map(|s| s.serialized_size()) .unwrap_or_default(), @@ -166,7 +166,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, - true, + TreeType::SumTree, storage_flags, apply_type, transaction, 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 bb036014bd..c6d8faedcb 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 @@ -12,7 +12,7 @@ use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, PotentiallyAtMaxElements}; use grovedb::EstimatedLayerSizes::{AllItems, Mix}; use grovedb::EstimatedSumTrees::AllSumTrees; -use grovedb::{EstimatedLayerInformation, TransactionArg}; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; impl Drive { @@ -43,7 +43,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( index_path_info.clone().convert_to_key_info_path(), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(1), estimated_layer_sizes: Mix { // The votes don't have storage flags @@ -71,7 +71,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( votes_path_key_info.clone().convert_to_key_info_path()?, EstimatedLayerInformation { - is_sum_tree: true, + tree_type: TreeType::SumTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllItems(DEFAULT_HASH_SIZE_U8, U8_SIZE_U32, None), }, @@ -82,8 +82,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: true, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::SumTree, flags_len: storage_flags .map(|s| s.serialized_size()) .unwrap_or_default(), @@ -93,7 +93,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.clone(), - true, + TreeType::SumTree, storage_flags, apply_type, transaction, 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 0c92a15651..5a6a14e759 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 @@ -34,7 +34,7 @@ use dpp::version::PlatformVersion; use grovedb::batch::key_info::KeyInfo; use grovedb::batch::key_info::KeyInfo::KnownKey; use grovedb::batch::KeyInfoPath; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, MaybeTree, TransactionArg, TreeType}; use std::borrow::Cow; use std::collections::{HashMap, HashSet}; @@ -227,7 +227,7 @@ impl Drive { index_path.clone(), document_top_field.as_slice(), )), - false, + TreeType::NormalTree, storage_flags, BatchInsertTreeApplyType::StatefulBatchInsertTree, transaction, @@ -300,7 +300,7 @@ impl Drive { index_path.clone(), index_property.name.as_bytes(), )), - false, + TreeType::NormalTree, storage_flags, BatchInsertTreeApplyType::StatefulBatchInsertTree, transaction, @@ -332,7 +332,7 @@ impl Drive { index_path.clone(), document_index_field.as_slice(), )), - false, + TreeType::NormalTree, storage_flags, BatchInsertTreeApplyType::StatefulBatchInsertTree, transaction, @@ -380,7 +380,7 @@ impl Drive { document.id().as_slice(), Some(CONTRACT_DOCUMENTS_PATH_HEIGHT), BatchDeleteUpTreeApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, previous_batch_operations, @@ -394,7 +394,7 @@ impl Drive { &[0], Some(CONTRACT_DOCUMENTS_PATH_HEIGHT), BatchDeleteUpTreeApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, previous_batch_operations, @@ -409,7 +409,7 @@ impl Drive { // here we are inserting an empty tree that will have a subtree of all other index properties self.batch_insert_empty_tree_if_not_exists( PathKeyInfo::PathKeyRef::<0>((index_path.clone(), &[0])), - false, + TreeType::NormalTree, storage_flags, BatchInsertTreeApplyType::StatefulBatchInsertTree, transaction, diff --git a/packages/rs-drive/src/drive/document/update/mod.rs b/packages/rs-drive/src/drive/document/update/mod.rs index fccb43e3e8..478921f994 100644 --- a/packages/rs-drive/src/drive/document/update/mod.rs +++ b/packages/rs-drive/src/drive/document/update/mod.rs @@ -684,7 +684,10 @@ mod tests { &drive, "tests/supporting_files/contract/dashpay/dashpay-contract.json", None, + None, + None::, Some(&db_transaction), + None, ); let document_type = contract @@ -773,7 +776,10 @@ mod tests { &drive, "tests/supporting_files/contract/dashpay/dashpay-contract-with-profile-history.json", None, + None, + None::, Some(&db_transaction), + None, ); let document_type = contract @@ -846,7 +852,7 @@ mod tests { let platform_version = PlatformVersion::latest(); - let drive: Drive = setup_drive(Some(config)); + let drive: Drive = setup_drive(Some(config), None); let transaction = if using_transaction { Some(drive.grove.start_transaction()) @@ -865,7 +871,15 @@ mod tests { }; // setup code - let contract = setup_contract(&drive, path, None, transaction.as_ref()); + let contract = setup_contract( + &drive, + path, + None, + None, + None::, + transaction.as_ref(), + None, + ); let id = Identifier::from([1u8; 32]); let owner_id = Identifier::from([2u8; 32]); @@ -1141,7 +1155,7 @@ mod tests { let platform_version = PlatformVersion::latest(); - let drive: Drive = setup_drive(Some(config)); + let drive: Drive = setup_drive(Some(config), None); let transaction = if using_transaction { Some(drive.grove.start_transaction()) @@ -1160,7 +1174,15 @@ mod tests { }; // setup code - let contract = setup_contract(&drive, path, None, transaction.as_ref()); + let contract = setup_contract( + &drive, + path, + None, + None, + None::, + transaction.as_ref(), + None, + ); let id = Identifier::from([1u8; 32]); let owner_id = Identifier::from([2u8; 32]); @@ -1340,7 +1362,7 @@ mod tests { let platform_version = PlatformVersion::latest(); - let drive: Drive = setup_drive(Some(config)); + let drive: Drive = setup_drive(Some(config), None); let transaction = if using_transaction { Some(drive.grove.start_transaction()) @@ -1359,7 +1381,15 @@ mod tests { }; // setup code - let contract = setup_contract(&drive, path, None, transaction.as_ref()); + let contract = setup_contract( + &drive, + path, + None, + None, + None::, + transaction.as_ref(), + None, + ); let id = Identifier::from([1u8; 32]); let owner_id = Identifier::from([2u8; 32]); @@ -1675,7 +1705,7 @@ mod tests { let platform_version = PlatformVersion::latest(); - let drive: Drive = setup_drive(Some(config)); + let drive: Drive = setup_drive(Some(config), None); let transaction = if using_transaction { Some(drive.grove.start_transaction()) @@ -1694,7 +1724,15 @@ mod tests { }; // setup code - let contract = setup_contract(&drive, path, None, transaction.as_ref()); + let contract = setup_contract( + &drive, + path, + None, + None, + None::, + transaction.as_ref(), + None, + ); let person_0_original = Person { id: Identifier::from([0u8; 32]), diff --git a/packages/rs-drive/src/drive/group/estimated_costs/for_add_group_action/mod.rs b/packages/rs-drive/src/drive/group/estimated_costs/for_add_group_action/mod.rs new file mode 100644 index 0000000000..efef30d2df --- /dev/null +++ b/packages/rs-drive/src/drive/group/estimated_costs/for_add_group_action/mod.rs @@ -0,0 +1,79 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use dpp::data_contract::GroupContractPosition; +use dpp::version::drive_versions::DriveVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerInformation; +use std::collections::HashMap; + +impl Drive { + /// Adds estimation costs for adding a group action based on the specified contract and version. + /// + /// This function selects the appropriate version of cost estimation for adding a group action, depending on the + /// `drive_version` provided. It then delegates the cost estimation to the relevant method for that version. + /// + /// Currently, it supports version `0` which uses the `add_estimation_costs_for_add_group_action_v0` method to estimate + /// the computational costs associated with adding a group action. If an unsupported version is passed in the `drive_version`, + /// the function will return an error indicating a version mismatch. + /// + /// # Parameters + /// + /// - `contract_id`: The unique identifier of the contract for which the group action is being added. + /// This is used to form paths and calculate relevant costs. + /// - `group_contract_position`: The position of the group contract within the system, influencing the paths used for cost estimation. + /// - `action_id`: An optional identifier for the specific action being added. If provided, the estimation for this action and its signers is included. + /// - `estimated_costs_only_with_layer_info`: A mutable reference to a `HashMap` where the estimated costs for updating + /// the group action and its associated data will be stored. The keys in the map represent paths to the trees, + /// and the values represent the estimated computational costs for those trees. + /// - `drive_version`: The version of the drive being used. It determines which method to use for cost estimation. + /// This is a versioned API, so different versions may have different cost estimation methods. + /// + /// # Return Value + /// + /// - Returns `Ok(())` if the version of the `drive_version` matches the supported versions and the estimation is successfully added. + /// - Returns an error (`Error::Drive(DriveError::UnknownVersionMismatch)`) if the version is not supported. + /// + /// # Logic Breakdown + /// + /// - **Version Selection**: The function first checks the version provided in `drive_version`. If the version is `0`, + /// it uses the `add_estimation_costs_for_add_group_action_v0` method for cost estimation. + /// - **Version Mismatch**: If the version does not match the supported versions, an error is returned with details + /// about the expected versions and the received version. + /// + /// # Errors + /// + /// - `Error::Drive(DriveError::UnknownVersionMismatch)` will be returned if the `drive_version` does not match the + /// known versions supported for this method (currently only version `0`). + pub(crate) fn add_estimation_costs_for_add_group_action( + contract_id: [u8; 32], + group_contract_position: GroupContractPosition, + action_id: Option<[u8; 32]>, + estimated_costs_only_with_layer_info: &mut HashMap, + drive_version: &DriveVersion, + ) -> Result<(), Error> { + match drive_version + .methods + .group + .cost_estimation + .for_add_group_action + { + 0 => { + Self::add_estimation_costs_for_add_group_action_v0( + contract_id, + group_contract_position, + action_id, + estimated_costs_only_with_layer_info, + ); + Ok(()) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_estimation_costs_for_add_group_action".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/estimated_costs/for_add_group_action/v0/mod.rs b/packages/rs-drive/src/drive/group/estimated_costs/for_add_group_action/v0/mod.rs new file mode 100644 index 0000000000..5923c6a14d --- /dev/null +++ b/packages/rs-drive/src/drive/group/estimated_costs/for_add_group_action/v0/mod.rs @@ -0,0 +1,173 @@ +use crate::drive::Drive; + +use crate::drive::group::paths::{ + group_action_path, group_action_root_path, group_action_signers_path, group_contract_path, + group_path, group_root_path, +}; +use crate::util::type_constants::DEFAULT_HASH_SIZE_U8; +use dpp::data_contract::GroupContractPosition; +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerCount::EstimatedLevel; +use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees, Mix}; +use grovedb::EstimatedSumTrees::{AllSumTrees, NoSumTrees, SomeSumTrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; +use std::collections::HashMap; + +impl Drive { + /// Adds estimated costs for the layer information of group action updates in a contract. + /// + /// This function updates the `estimated_costs_only_with_layer_info` map with the layer information for + /// the trees involved in adding or updating a group action in the context of a contract. The trees are + /// organized hierarchically based on their role in the system, such as "Group Actions", "Withdrawal Transactions", + /// "Balances", and "Contract/Documents". This estimation is used to determine the computational costs associated + /// with updating these trees, considering whether they are sum trees or normal trees and their expected layer counts. + /// + /// The function breaks down the tree layers and their corresponding costs as follows: + /// 1. **Group Actions Tree**: A normal tree that holds information about group actions in the contract. + /// 2. **Withdrawal Transactions Tree**: A normal tree that holds withdrawal transaction data. + /// 3. **Balances Tree**: A sum tree that holds balance information, which is crucial for cost estimation. + /// 4. **Contract/Documents Tree**: A normal tree that holds contract and document-related data. + /// + /// Each tree's cost is estimated based on its depth and whether it's a sum tree or not. The function inserts the + /// estimated layer information for each relevant tree in the `estimated_costs_only_with_layer_info` map, where + /// the key represents the path to the specific tree and the value represents its estimated layer information. + /// + /// # Parameters + /// + /// - `contract_id`: The unique identifier of the contract being updated. Used to construct paths for the trees. + /// - `group_contract_position`: The position of the group contract in the system, used to further specify paths. + /// - `action_id`: An optional identifier for the specific action being added. If provided, additional paths for + /// the action and its associated signers will be included. + /// - `estimated_costs_only_with_layer_info`: A mutable reference to a `HashMap` where the estimated layer information + /// will be inserted. The keys represent paths to the trees, and the values represent their estimated layer information. + /// + /// # Logic Breakdown + /// + /// - **Top Layer (Contract/Documents)**: The contract and documents tree is at the top level, with a weight of 2. + /// - **Balance Tree (Sum Tree)**: The balance tree is a sum tree with a weight of 1. + /// - **Withdrawal Transactions**: This tree is a normal tree, and it is expected to have a weight of 2. + /// - **Group Action Tree**: The group action tree is also a normal tree, with an expected weight of 2. + /// - **Additional Layer Costs**: For specific paths related to actions, signers, etc., further estimations are added with + /// appropriate layer counts and subtree size estimations. + /// + /// The function constructs the paths based on the contract ID, group contract position, and action ID (if provided). + /// It then populates the `estimated_costs_only_with_layer_info` map with the estimated costs for each relevant tree + /// involved in the group action update. + + pub(super) fn add_estimation_costs_for_add_group_action_v0( + contract_id: [u8; 32], + group_contract_position: GroupContractPosition, + action_id: Option<[u8; 32]>, + estimated_costs_only_with_layer_info: &mut HashMap, + ) { + // 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 GroupActions 88 Misc 104 Versions 120 + + // we have constructed the top layer so contract/documents tree are at the top + // since balance will be on layer 3 (level 2 on left then left) + // updating will mean we will update: + // 1 normal tree (group actions) + // 1 normal tree (withdrawal transactions) + // 1 sum tree (balances) + // 1 normal tree (contract/documents) + // hence we should give an equal weight to both + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path([]), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(3, false), + estimated_layer_sizes: AllSubtrees( + 1, + SomeSumTrees { + sum_trees_weight: 1, + big_sum_trees_weight: 0, + count_trees_weight: 0, + count_sum_trees_weight: 0, + non_sum_trees_weight: 2, + }, + None, + ), + }, + ); + + // there is one tree for the root path + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(group_root_path()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(10, false), // We estimate that on average we need to update 10 nodes + estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), + }, + ); + + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(group_contract_path(contract_id.as_slice())), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(1, false), + estimated_layer_sizes: AllSubtrees(2, NoSumTrees, None), + }, + ); + + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(group_path( + contract_id.as_slice(), + &group_contract_position.to_be_bytes(), + )), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(1, false), + estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), + }, + ); + + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(group_action_root_path( + contract_id.as_slice(), + &group_contract_position.to_be_bytes(), + )), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(10, false), + estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), + }, + ); + + if let Some(action_id) = action_id { + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(group_action_path( + contract_id.as_slice(), + &group_contract_position.to_be_bytes(), + action_id.as_slice(), + )), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(1, false), + estimated_layer_sizes: Mix { + subtrees_size: Some((1, AllSumTrees, None, 1)), + items_size: Some((1, 8, Some(36), 1)), + references_size: None, + }, + }, + ); + + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(group_action_signers_path( + contract_id.as_slice(), + &group_contract_position.to_be_bytes(), + action_id.as_slice(), + )), + EstimatedLayerInformation { + tree_type: TreeType::SumTree, + estimated_layer_count: EstimatedLevel(1, false), + estimated_layer_sizes: AllItems(8, 1, None), + }, + ); + } + } +} diff --git a/packages/rs-drive/src/drive/group/estimated_costs/mod.rs b/packages/rs-drive/src/drive/group/estimated_costs/mod.rs new file mode 100644 index 0000000000..ef47daecce --- /dev/null +++ b/packages/rs-drive/src/drive/group/estimated_costs/mod.rs @@ -0,0 +1 @@ +mod for_add_group_action; diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_id_has_signer/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_has_signer/mod.rs new file mode 100644 index 0000000000..1aa5d30a10 --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_has_signer/mod.rs @@ -0,0 +1,118 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::GroupContractPosition; +use dpp::fee::fee_result::FeeResult; +use dpp::identifier::Identifier; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; + +mod v0; + +impl Drive { + /// Fetches if an identity has already signed in an action + pub fn fetch_action_id_has_signer( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + signer_id: Identifier, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_id_has_signer + { + 0 => self.fetch_action_id_has_signer_v0( + contract_id, + group_contract_position, + action_id, + signer_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_id_has_signer".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + /// Fetches if an identity has already signed in an action with costs + + pub fn fetch_action_id_has_signer_with_costs( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + signer_id: Identifier, + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(bool, FeeResult), Error> { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_id_has_signer + { + 0 => self.fetch_action_id_has_signer_with_costs_v0( + contract_id, + group_contract_position, + action_id, + signer_id, + block_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_id_has_signer_with_costs".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + pub(crate) fn fetch_action_id_has_signer_and_add_operations( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + signer_id: Identifier, + estimate_costs_only: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_id_has_signer + { + 0 => self.fetch_action_id_has_signer_and_add_operations_v0( + contract_id, + group_contract_position, + action_id, + signer_id, + estimate_costs_only, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_id_has_signer_and_add_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_id_has_signer/v0/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_has_signer/v0/mod.rs new file mode 100644 index 0000000000..de19a8cc86 --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_has_signer/v0/mod.rs @@ -0,0 +1,165 @@ +use crate::drive::group::paths::group_action_signers_path; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use crate::util::grove_operations::QueryTarget::QueryTargetValue; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::GroupContractPosition; +use dpp::fee::fee_result::FeeResult; +use dpp::identifier::Identifier; +use dpp::version::PlatformVersion; +use grovedb::{TransactionArg, TreeType}; + +impl Drive { + /// v0 implementation of fetching the signers' power for a given action ID within a group contract. + /// + /// This function retrieves the signers' power associated with a specific action ID in a group contract. + /// It constructs the appropriate GroveDB path, fetches the relevant data, deserializes it, and + /// calculates any applicable fees based on the provided epoch. + /// + /// # Parameters + /// * `contract_id` - The identifier of the contract. + /// * `group_contract_position` - The position of the group contract within the data contract. + /// * `action_id` - The identifier of the action whose signers' power is to be fetched. + /// * `apply` - A boolean flag indicating whether to apply certain operations during the fetch. + /// * `transaction` - The GroveDB transaction argument for executing the fetch operation. + /// * `platform_version` - The current platform version, used to ensure compatibility. + /// + /// # Returns + /// * `Ok(Some(Arc))` if the signers' power is successfully fetched. + /// * `Ok(None)` if the signers' power does not exist. + /// * `Err(Error)` if an error occurs during the fetch operation. + /// + /// # Errors + /// * `Error::Drive(DriveError::CorruptedContractPath)` if the fetched path does not refer to a valid sum item. + /// * `Error::Drive(DriveError::CorruptedCodeExecution)` if the element type is unexpected. + /// * `Error::GroveDB` for any underlying GroveDB errors. + pub(super) fn fetch_action_id_has_signer_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + signer_id: Identifier, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let group_contract_position_bytes = group_contract_position.to_be_bytes().to_vec(); + // Construct the GroveDB path for the action signers + let path = group_action_signers_path( + contract_id.as_slice(), + &group_contract_position_bytes, + action_id.as_slice(), + ); + + let value = self.grove_has_raw( + (&path).into(), + signer_id.as_slice(), + DirectQueryType::StatefulDirectQuery, + transaction, + &mut vec![], + &platform_version.drive, + )?; + + Ok(value) + } + + /// Fetches the Identity's balance from the backing store + /// Passing apply as false get the estimated cost instead + pub(super) fn fetch_action_id_has_signer_with_costs_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + signer_id: Identifier, + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(bool, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.fetch_action_id_has_signer_and_add_operations_v0( + contract_id, + group_contract_position, + action_id, + signer_id, + false, + transaction, + &mut drive_operations, + platform_version, + )?; + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + Ok((value, fees)) + } + + /// v0 implementation of fetching the signers' power for a given action ID within a group contract and adding related operations. + /// + /// This function not only fetches the signers' power but also appends necessary low-level drive operations based on the provided epoch. + /// It ensures that fees are calculated and added to the `drive_operations` vector when applicable. + /// + /// # Parameters + /// * `contract_id` - The identifier of the contract. + /// * `group_contract_position` - The position of the group contract within the data contract. + /// * `action_id` - The identifier of the action whose signers' power is to be fetched. + /// * `epoch` - An optional reference to an `Epoch` object. If provided, fees will be calculated based on the epoch. + /// * `transaction` - The GroveDB transaction argument for executing the fetch operation. + /// * `drive_operations` - A mutable reference to a vector where low-level drive operations and fees will be appended. + /// * `platform_version` - The current platform version, used to ensure compatibility. + /// + /// # Returns + /// * `Ok(Some(Arc))` if the signers' power is successfully fetched. + /// * `Ok(None)` if the signers' power does not exist. + /// * `Err(Error)` if an error occurs during the fetch operation. + /// + /// # Errors + /// * `Error::Drive(DriveError::CorruptedContractPath)` if the fetched path does not refer to a valid sum item. + /// * `Error::Drive(DriveError::CorruptedCodeExecution)` if the element type is unexpected. + /// * `Error::Drive(DriveError::NotSupportedPrivate)` if stateful batch insertions are attempted. + /// * `Error::GroveDB` for any underlying GroveDB errors. + pub(super) fn fetch_action_id_has_signer_and_add_operations_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + signer_id: Identifier, + estimate_costs_only: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result { + let group_contract_position_bytes = group_contract_position.to_be_bytes().to_vec(); + // Construct the GroveDB path for the action signers + let path = group_action_signers_path( + contract_id.as_slice(), + &group_contract_position_bytes, + action_id.as_slice(), + ); + + // no estimated_costs_only_with_layer_info, means we want to apply to state + let direct_query_type = if estimate_costs_only { + DirectQueryType::StatelessDirectQuery { + in_tree_type: TreeType::SumTree, + query_target: QueryTargetValue(8), + } + } else { + DirectQueryType::StatefulDirectQuery + }; + + let value = self.grove_has_raw( + (&path).into(), + signer_id.as_slice(), + direct_query_type, + transaction, + drive_operations, + &platform_version.drive, + )?; + + Ok(value) + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/mod.rs new file mode 100644 index 0000000000..99c38f711e --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/mod.rs @@ -0,0 +1,121 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action::GroupAction; +use dpp::identifier::Identifier; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use platform_version::version::PlatformVersion; +use std::collections::HashMap; + +mod v0; + +impl Drive { + /// Fetches the `GroupAction` for the given action ID and group contract position. + /// + /// This function queries the GroveDB to fetch the `GroupAction` associated with a specific + /// group contract position and action ID. The method selects the appropriate version of + /// `fetch_action_id_info` based on the `platform_version` provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `group_contract_position`: The position of the group contract in the data structure. + /// - `action_id`: The identifier of the action whose `GroupAction` is being fetched. + /// - `transaction`: The transaction argument used for the query. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(GroupAction)`: The `GroupAction` for the specified action ID and contract position. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub fn fetch_action_id_info( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_id_info + { + 0 => self.fetch_action_id_info_v0( + contract_id, + group_contract_position, + action_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_id_info".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the `GroupAction` and adds corresponding operations to the drive for the given action ID and group contract position. + /// + /// This function is similar to `fetch_action_id_info` but also adds operations to the drive for state changes or queries. + /// Additionally, it supports cost estimation by interacting with the layer information if provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `group_contract_position`: The position of the group contract in the data structure. + /// - `action_id`: The identifier of the action whose `GroupAction` is being fetched. + /// - `estimated_costs_only_with_layer_info`: A mutable reference to an optional `HashMap` containing + /// layer information used for cost estimation. + /// - `transaction`: The transaction argument used for the query. + /// - `drive_operations`: A mutable reference to a vector that stores low-level drive operations. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(GroupAction)`: The `GroupAction` for the specified action ID and contract position, along with any added operations. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub(crate) fn fetch_action_id_info_and_add_operations( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_id_info + { + 0 => self.fetch_action_id_info_and_add_operations_v0( + contract_id, + group_contract_position, + action_id, + estimated_costs_only_with_layer_info, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_id_signers_and_add_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/v0/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/v0/mod.rs new file mode 100644 index 0000000000..723e7312cd --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/v0/mod.rs @@ -0,0 +1,91 @@ +use std::collections::HashMap; + +use crate::drive::group::paths::{group_action_path, ACTION_INFO_KEY}; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use crate::util::grove_operations::QueryTarget::QueryTargetValue; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action::GroupAction; +use dpp::identifier::Identifier; +use dpp::serialization::PlatformDeserializable; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; + +impl Drive { + pub(super) fn fetch_action_id_info_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let group_contract_position_bytes = group_contract_position.to_be_bytes().to_vec(); + // Construct the GroveDB path for the action signers + let path = group_action_path( + contract_id.as_ref(), + &group_contract_position_bytes, + action_id.as_ref(), + ); + + let value = self.grove_get_raw_item( + (&path).into(), + ACTION_INFO_KEY, + DirectQueryType::StatefulDirectQuery, + transaction, + &mut vec![], + &platform_version.drive, + )?; + + let group_action = GroupAction::deserialize_from_bytes(&value)?; + + Ok(group_action) + } + + pub(super) fn fetch_action_id_info_and_add_operations_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result { + let group_contract_position_bytes = group_contract_position.to_be_bytes().to_vec(); + // Construct the GroveDB path for the action signers + let path = group_action_path( + contract_id.as_ref(), + &group_contract_position_bytes, + action_id.as_ref(), + ); + + // no estimated_costs_only_with_layer_info, means we want to apply to state + let direct_query_type = if estimated_costs_only_with_layer_info.is_none() { + DirectQueryType::StatefulDirectQuery + } else { + DirectQueryType::StatelessDirectQuery { + in_tree_type: TreeType::NormalTree, + query_target: QueryTargetValue(8), + } + }; + + let value = self.grove_get_raw_item( + (&path).into(), + ACTION_INFO_KEY, + direct_query_type, + transaction, + drive_operations, + &platform_version.drive, + )?; + + let group_action = GroupAction::deserialize_from_bytes(&value)?; + + Ok(group_action) + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info_keep_serialized/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info_keep_serialized/mod.rs new file mode 100644 index 0000000000..515c1d0e4a --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info_keep_serialized/mod.rs @@ -0,0 +1,120 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use platform_version::version::PlatformVersion; +use std::collections::HashMap; + +mod v0; + +impl Drive { + /// Fetches the serialized `GroupAction` for the given action ID and group contract position. + /// + /// This function retrieves the serialized bytes of the `GroupAction` associated with a specific + /// action ID and group contract position from the GroveDB. The method selects the appropriate version + /// of `fetch_action_id_info_keep_serialized` based on the `platform_version` provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `group_contract_position`: The position of the group contract in the data structure. + /// - `action_id`: The identifier of the action whose serialized `GroupAction` is being fetched. + /// - `transaction`: The transaction argument used for the query. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(Vec)`: The serialized `GroupAction` for the specified action ID and contract position. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub fn fetch_action_id_info_keep_serialized( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_id_info_keep_serialized + { + 0 => self.fetch_action_id_info_keep_serialized_v0( + contract_id, + group_contract_position, + action_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_id_info_keep_serialized".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the serialized `GroupAction` and adds corresponding operations to the drive for the given action ID and group contract position. + /// + /// This function is similar to `fetch_action_id_info_keep_serialized`, but also adds operations to the drive for state changes + /// or queries. Additionally, it supports cost estimation by interacting with the layer information if provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `group_contract_position`: The position of the group contract in the data structure. + /// - `action_id`: The identifier of the action whose serialized `GroupAction` is being fetched. + /// - `estimated_costs_only_with_layer_info`: A mutable reference to an optional `HashMap` containing + /// layer information used for cost estimation. + /// - `transaction`: The transaction argument used for the query. + /// - `drive_operations`: A mutable reference to a vector that stores low-level drive operations. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(Vec)`: The serialized `GroupAction` for the specified action ID and contract position, along with any added operations. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub(crate) fn fetch_action_id_info_keep_serialized_and_add_operations( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_id_info_keep_serialized + { + 0 => self.fetch_action_id_info_keep_serialized_and_add_operations_v0( + contract_id, + group_contract_position, + action_id, + estimated_costs_only_with_layer_info, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_id_signers_keep_serialized_and_add_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info_keep_serialized/v0/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info_keep_serialized/v0/mod.rs new file mode 100644 index 0000000000..504ade4fa5 --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info_keep_serialized/v0/mod.rs @@ -0,0 +1,132 @@ +use std::collections::HashMap; + +use crate::drive::group::paths::{group_action_path, ACTION_INFO_KEY}; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use crate::util::grove_operations::QueryTarget::QueryTargetValue; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; + +impl Drive { + /// v0 implementation of fetching the signers' power for a given action ID within a group contract. + /// + /// This function retrieves the signers' power associated with a specific action ID in a group contract. + /// It constructs the appropriate GroveDB path, fetches the relevant data, deserializes it, and + /// calculates any applicable fees based on the provided epoch. + /// + /// # Parameters + /// * `contract_id` - The identifier of the contract. + /// * `group_contract_position` - The position of the group contract within the data contract. + /// * `action_id` - The identifier of the action whose signers' power is to be fetched. + /// * `apply` - A boolean flag indicating whether to apply certain operations during the fetch. + /// * `transaction` - The GroveDB transaction argument for executing the fetch operation. + /// * `platform_version` - The current platform version, used to ensure compatibility. + /// + /// # Returns + /// * `Ok(Some(Arc))` if the signers' power is successfully fetched. + /// * `Ok(None)` if the signers' power does not exist. + /// * `Err(Error)` if an error occurs during the fetch operation. + /// + /// # Errors + /// * `Error::Drive(DriveError::CorruptedContractPath)` if the fetched path does not refer to a valid sum item. + /// * `Error::Drive(DriveError::CorruptedCodeExecution)` if the element type is unexpected. + /// * `Error::GroveDB` for any underlying GroveDB errors. + pub(super) fn fetch_action_id_info_keep_serialized_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let group_contract_position_bytes = group_contract_position.to_be_bytes().to_vec(); + // Construct the GroveDB path for the action signers + let path = group_action_path( + contract_id.as_ref(), + &group_contract_position_bytes, + action_id.as_ref(), + ); + + let value = self.grove_get_raw_item( + (&path).into(), + ACTION_INFO_KEY, + DirectQueryType::StatefulDirectQuery, + transaction, + &mut vec![], + &platform_version.drive, + )?; + + Ok(value) + } + + /// v0 implementation of fetching the signers' power for a given action ID within a group contract and adding related operations. + /// + /// This function not only fetches the signers' power but also appends necessary low-level drive operations based on the provided epoch. + /// It ensures that fees are calculated and added to the `drive_operations` vector when applicable. + /// + /// # Parameters + /// * `contract_id` - The identifier of the contract. + /// * `group_contract_position` - The position of the group contract within the data contract. + /// * `action_id` - The identifier of the action whose signers' power is to be fetched. + /// * `epoch` - An optional reference to an `Epoch` object. If provided, fees will be calculated based on the epoch. + /// * `transaction` - The GroveDB transaction argument for executing the fetch operation. + /// * `drive_operations` - A mutable reference to a vector where low-level drive operations and fees will be appended. + /// * `platform_version` - The current platform version, used to ensure compatibility. + /// + /// # Returns + /// * `Ok(Some(Arc))` if the signers' power is successfully fetched. + /// * `Ok(None)` if the signers' power does not exist. + /// * `Err(Error)` if an error occurs during the fetch operation. + /// + /// # Errors + /// * `Error::Drive(DriveError::CorruptedContractPath)` if the fetched path does not refer to a valid sum item. + /// * `Error::Drive(DriveError::CorruptedCodeExecution)` if the element type is unexpected. + /// * `Error::Drive(DriveError::NotSupportedPrivate)` if stateful batch insertions are attempted. + /// * `Error::GroveDB` for any underlying GroveDB errors. + pub(super) fn fetch_action_id_info_keep_serialized_and_add_operations_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let group_contract_position_bytes = group_contract_position.to_be_bytes().to_vec(); + // Construct the GroveDB path for the action signers + let path = group_action_path( + contract_id.as_ref(), + &group_contract_position_bytes, + action_id.as_ref(), + ); + + // no estimated_costs_only_with_layer_info, means we want to apply to state + let direct_query_type = if estimated_costs_only_with_layer_info.is_none() { + DirectQueryType::StatefulDirectQuery + } else { + DirectQueryType::StatelessDirectQuery { + in_tree_type: TreeType::NormalTree, + query_target: QueryTargetValue(8), + } + }; + + let value = self.grove_get_raw_item( + (&path).into(), + ACTION_INFO_KEY, + direct_query_type, + transaction, + drive_operations, + &platform_version.drive, + )?; + + Ok(value) + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_id_signers_power/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_signers_power/mod.rs new file mode 100644 index 0000000000..1268499743 --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_signers_power/mod.rs @@ -0,0 +1,78 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::group::GroupSumPower; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; + +mod v0; + +impl Drive { + /// Fetches the action id signers power + pub fn fetch_action_id_signers_power( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_id_signers_power + { + 0 => self.fetch_action_id_signers_power_v0( + contract_id, + group_contract_position, + action_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_id_signers_power".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + pub(crate) fn fetch_action_id_signers_power_and_add_operations( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + estimate_costs_only: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_id_signers_power + { + 0 => self.fetch_action_id_signers_power_and_add_operations_v0( + contract_id, + group_contract_position, + action_id, + estimate_costs_only, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_id_signers_and_add_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_id_signers_power/v0/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_signers_power/v0/mod.rs new file mode 100644 index 0000000000..dfd611757e --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_id_signers_power/v0/mod.rs @@ -0,0 +1,132 @@ +use crate::drive::group::paths::{group_action_path, ACTION_SIGNERS_KEY}; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use crate::util::grove_operations::QueryTarget::QueryTargetValue; +use dpp::data_contract::group::GroupSumPower; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use dpp::version::PlatformVersion; +use grovedb::{TransactionArg, TreeType}; + +impl Drive { + /// v0 implementation of fetching the signers' power for a given action ID within a group contract. + /// + /// This function retrieves the signers' power associated with a specific action ID in a group contract. + /// It constructs the appropriate GroveDB path, fetches the relevant data, deserializes it, and + /// calculates any applicable fees based on the provided epoch. + /// + /// # Parameters + /// * `contract_id` - The identifier of the contract. + /// * `group_contract_position` - The position of the group contract within the data contract. + /// * `action_id` - The identifier of the action whose signers' power is to be fetched. + /// * `apply` - A boolean flag indicating whether to apply certain operations during the fetch. + /// * `transaction` - The GroveDB transaction argument for executing the fetch operation. + /// * `platform_version` - The current platform version, used to ensure compatibility. + /// + /// # Returns + /// * `Ok(Some(Arc))` if the signers' power is successfully fetched. + /// * `Ok(None)` if the signers' power does not exist. + /// * `Err(Error)` if an error occurs during the fetch operation. + /// + /// # Errors + /// * `Error::Drive(DriveError::CorruptedContractPath)` if the fetched path does not refer to a valid sum item. + /// * `Error::Drive(DriveError::CorruptedCodeExecution)` if the element type is unexpected. + /// * `Error::GroveDB` for any underlying GroveDB errors. + pub(super) fn fetch_action_id_signers_power_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let group_contract_position_bytes = group_contract_position.to_be_bytes().to_vec(); + // Construct the GroveDB path for the action signers + let path = group_action_path( + contract_id.as_ref(), + &group_contract_position_bytes, + action_id.as_ref(), + ); + + let value = self + .grove_get_optional_sum_tree_total_value( + (&path).into(), + ACTION_SIGNERS_KEY, + DirectQueryType::StatefulDirectQuery, + transaction, + &mut vec![], + &platform_version.drive, + )? + .map(|v| v as GroupSumPower); + + Ok(value) + } + + /// v0 implementation of fetching the signers' power for a given action ID within a group contract and adding related operations. + /// + /// This function not only fetches the signers' power but also appends necessary low-level drive operations based on the provided epoch. + /// It ensures that fees are calculated and added to the `drive_operations` vector when applicable. + /// + /// # Parameters + /// * `contract_id` - The identifier of the contract. + /// * `group_contract_position` - The position of the group contract within the data contract. + /// * `action_id` - The identifier of the action whose signers' power is to be fetched. + /// * `epoch` - An optional reference to an `Epoch` object. If provided, fees will be calculated based on the epoch. + /// * `transaction` - The GroveDB transaction argument for executing the fetch operation. + /// * `drive_operations` - A mutable reference to a vector where low-level drive operations and fees will be appended. + /// * `platform_version` - The current platform version, used to ensure compatibility. + /// + /// # Returns + /// * `Ok(Some(Arc))` if the signers' power is successfully fetched. + /// * `Ok(None)` if the signers' power does not exist. + /// * `Err(Error)` if an error occurs during the fetch operation. + /// + /// # Errors + /// * `Error::Drive(DriveError::CorruptedContractPath)` if the fetched path does not refer to a valid sum item. + /// * `Error::Drive(DriveError::CorruptedCodeExecution)` if the element type is unexpected. + /// * `Error::Drive(DriveError::NotSupportedPrivate)` if stateful batch insertions are attempted. + /// * `Error::GroveDB` for any underlying GroveDB errors. + pub(super) fn fetch_action_id_signers_power_and_add_operations_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_id: Identifier, + estimate_costs_only: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let group_contract_position_bytes = group_contract_position.to_be_bytes().to_vec(); + // Construct the GroveDB path for the action signers + let path = group_action_path( + contract_id.as_ref(), + &group_contract_position_bytes, + action_id.as_ref(), + ); + + // no estimated_costs_only_with_layer_info, means we want to apply to state + let direct_query_type = if estimate_costs_only { + DirectQueryType::StatelessDirectQuery { + in_tree_type: TreeType::NormalTree, + query_target: QueryTargetValue(8), + } + } else { + DirectQueryType::StatefulDirectQuery + }; + + let value = self + .grove_get_optional_sum_tree_total_value( + (&path).into(), + ACTION_SIGNERS_KEY, + direct_query_type, + transaction, + drive_operations, + &platform_version.drive, + )? + .map(|v| v as GroupSumPower); + + Ok(value) + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_group_info/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_group_info/mod.rs new file mode 100644 index 0000000000..b67a145b52 --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_group_info/mod.rs @@ -0,0 +1,103 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use platform_version::version::PlatformVersion; +use std::collections::HashMap; + +mod v0; + +impl Drive { + /// Fetches the `Group` for the given contract and group contract position. + /// + /// This function queries the GroveDB to fetch the `Group` associated with a specific contract + /// and group contract position. The method selects the appropriate version of + /// `fetch_group_info` based on the `platform_version` provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `group_contract_position`: The position of the group contract in the data structure. + /// - `transaction`: The transaction argument used for the query. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(Group)`: The `Group` for the specified action ID and contract position. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub fn fetch_group_info( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.group.fetch.fetch_group_info { + 0 => self.fetch_group_info_v0( + contract_id, + group_contract_position, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_group_info".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the `Group` and adds corresponding operations to the drive for the given action ID and group contract position. + /// + /// This function is similar to `fetch_group_info` but also adds operations to the drive for state changes or queries. + /// Additionally, it supports cost estimation by interacting with the layer information if provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `group_contract_position`: The position of the group contract in the data structure. + /// - `estimated_costs_only_with_layer_info`: A mutable reference to an optional `HashMap` containing + /// layer information used for cost estimation. + /// - `transaction`: The transaction argument used for the query. + /// - `drive_operations`: A mutable reference to a vector that stores low-level drive operations. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(Group)`: The `Group` for the specified contract ID and contract position, along with any added operations. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub(crate) fn fetch_group_info_and_add_operations( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.group.fetch.fetch_group_info { + 0 => self.fetch_group_info_and_add_operations_v0( + contract_id, + group_contract_position, + estimated_costs_only_with_layer_info, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_group_info_and_add_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_group_info/v0/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_group_info/v0/mod.rs new file mode 100644 index 0000000000..312a6c4be7 --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_group_info/v0/mod.rs @@ -0,0 +1,83 @@ +use std::collections::HashMap; + +use crate::drive::group::paths::{group_path, GROUP_INFO_KEY}; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use crate::util::grove_operations::QueryTarget::QueryTargetValue; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use dpp::serialization::PlatformDeserializable; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; + +impl Drive { + pub(super) fn fetch_group_info_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let group_contract_position_bytes = group_contract_position.to_be_bytes().to_vec(); + // Construct the GroveDB path for the action signers + let path = group_path(contract_id.as_ref(), &group_contract_position_bytes); + + let maybe_group = self + .grove_get_raw_optional_item( + (&path).into(), + GROUP_INFO_KEY, + DirectQueryType::StatefulDirectQuery, + transaction, + &mut vec![], + &platform_version.drive, + )? + .map(|value| Group::deserialize_from_bytes(&value)) + .transpose()?; + + Ok(maybe_group) + } + + pub(super) fn fetch_group_info_and_add_operations_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let group_contract_position_bytes = group_contract_position.to_be_bytes().to_vec(); + // Construct the GroveDB path for the action signers + let path = group_path(contract_id.as_ref(), &group_contract_position_bytes); + + // no estimated_costs_only_with_layer_info, means we want to apply to state + let direct_query_type = if estimated_costs_only_with_layer_info.is_none() { + DirectQueryType::StatefulDirectQuery + } else { + DirectQueryType::StatelessDirectQuery { + in_tree_type: TreeType::NormalTree, + query_target: QueryTargetValue(8), + } + }; + + let maybe_group = self + .grove_get_raw_optional_item( + (&path).into(), + GROUP_INFO_KEY, + direct_query_type, + transaction, + drive_operations, + &platform_version.drive, + )? + .map(|value| Group::deserialize_from_bytes(&value)) + .transpose()?; + + Ok(maybe_group) + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_group_infos/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_group_infos/mod.rs new file mode 100644 index 0000000000..b05c9a24a3 --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_group_infos/mod.rs @@ -0,0 +1,99 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use dpp::prelude::StartAtIncluded; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +mod v0; +impl Drive { + /// Fetches the `Group` for the given contract. + /// + /// This function queries the GroveDB to fetch the potentially many `Group`s associated with a + /// specific contract. The method selects the appropriate version of + /// `fetch_group_infos` based on the `platform_version` provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `transaction`: The transaction argument used for the query. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(Group)`: The `Group` for the specified action ID and contract position. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub fn fetch_group_infos( + &self, + contract_id: Identifier, + start_group_contract_position: Option<(GroupContractPosition, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.group.fetch.fetch_group_infos { + 0 => self.fetch_group_infos_v0( + contract_id, + start_group_contract_position, + limit, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_group_infos".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the `Group` and adds corresponding operations to the drive for the given action ID and group contract position. + /// + /// This function is similar to `fetch_group_info` but also adds operations to the drive for state changes or queries. + /// Additionally, it supports cost estimation by interacting with the layer information if provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `group_contract_position`: The position of the group contract in the data structure. + /// - `transaction`: The transaction argument used for the query. + /// - `drive_operations`: A mutable reference to a vector that stores low-level drive operations. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(Group)`: The `Group` for the specified contract ID and contract position, along with any added operations. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub(crate) fn fetch_group_infos_operations( + &self, + contract_id: Identifier, + start_group_contract_position: Option<(GroupContractPosition, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.group.fetch.fetch_group_infos { + 0 => self.fetch_group_infos_operations_v0( + contract_id, + start_group_contract_position, + limit, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_group_infos_and_add_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_group_infos/v0/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_group_infos/v0/mod.rs new file mode 100644 index 0000000000..f4b42fded4 --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_group_infos/v0/mod.rs @@ -0,0 +1,79 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use dpp::prelude::StartAtIncluded; +use dpp::serialization::PlatformDeserializable; +use dpp::version::PlatformVersion; +use grovedb::query_result_type::QueryResultType; +use grovedb::Element::Item; +use grovedb::TransactionArg; +use std::collections::BTreeMap; + +impl Drive { + pub(super) fn fetch_group_infos_v0( + &self, + contract_id: Identifier, + start_group_contract_position: Option<(GroupContractPosition, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.fetch_group_infos_operations_v0( + contract_id, + start_group_contract_position, + limit, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn fetch_group_infos_operations_v0( + &self, + contract_id: Identifier, + start_group_contract_position: Option<(GroupContractPosition, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let path_query = Self::group_infos_for_contract_id_query( + contract_id.to_buffer(), + start_group_contract_position, + limit, + ); + + self.grove_get_raw_path_query( + &path_query, + transaction, + QueryResultType::QueryKeyElementPairResultType, + drive_operations, + &platform_version.drive, + )? + .0 + .to_key_elements_btree_map() + .into_iter() + .map(|(key, element)| { + let group_contract_position: GroupContractPosition = + GroupContractPosition::from_be_bytes(key.try_into().map_err(|_| { + Error::Drive(DriveError::CorruptedDriveState( + "group contract position not encoded on 2 bytes as expected".to_string(), + )) + })?); + match element { + Item(value, ..) => Ok(( + group_contract_position, + Group::deserialize_from_bytes(&value)?, + )), + _ => Err(Error::Drive(DriveError::CorruptedDriveState( + "token tree for infos should contain only items".to_string(), + ))), + } + }) + .collect() + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/mod.rs b/packages/rs-drive/src/drive/group/fetch/mod.rs new file mode 100644 index 0000000000..8df377a7a9 --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/mod.rs @@ -0,0 +1,7 @@ +mod fetch_action_id_has_signer; +mod fetch_action_id_info; +mod fetch_action_id_info_keep_serialized; +mod fetch_action_id_signers_power; +mod fetch_group_info; +mod fetch_group_infos; +mod queries; diff --git a/packages/rs-drive/src/drive/group/fetch/queries.rs b/packages/rs-drive/src/drive/group/fetch/queries.rs new file mode 100644 index 0000000000..7dbd1223c5 --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/queries.rs @@ -0,0 +1,47 @@ +use crate::drive::group::paths::group_contract_path_vec; +use crate::drive::Drive; +use crate::query::{Query, QueryItem}; +use dpp::data_contract::GroupContractPosition; +use grovedb::{PathQuery, SizedQuery}; +use std::ops::RangeFull; + +impl Drive { + /// The query for a single group info inside a contract. + pub fn group_info_for_contract_id_and_group_contract_position_query( + contract_id: [u8; 32], + group_contract_position: GroupContractPosition, + ) -> PathQuery { + let group_contract_path = group_contract_path_vec(&contract_id); + PathQuery::new_single_key( + group_contract_path, + group_contract_position.to_be_bytes().to_vec(), + ) + } + + /// The query for the group infos inside a contract. + pub fn group_infos_for_contract_id_query( + contract_id: [u8; 32], + start_at: Option<(GroupContractPosition, bool)>, + limit: Option, + ) -> PathQuery { + let group_contract_path = group_contract_path_vec(&contract_id); + let mut query = Query::new_with_direction(true); + if let Some((start_at, start_at_included)) = start_at { + if start_at_included { + query.insert_item(QueryItem::RangeFrom(start_at.to_be_bytes().to_vec()..)) + } else { + query.insert_item(QueryItem::RangeAfter(start_at.to_be_bytes().to_vec()..)) + } + } else { + query.insert_item(QueryItem::RangeFull(RangeFull)) + } + PathQuery { + path: group_contract_path, + query: SizedQuery { + query, + limit, + offset: None, + }, + } + } +} diff --git a/packages/rs-drive/src/drive/group/insert/add_group_action/mod.rs b/packages/rs-drive/src/drive/group/insert/add_group_action/mod.rs new file mode 100644 index 0000000000..adfbb1c643 --- /dev/null +++ b/packages/rs-drive/src/drive/group/insert/add_group_action/mod.rs @@ -0,0 +1,128 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; + +use dpp::data_contract::group::GroupMemberPower; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action::GroupAction; +use dpp::prelude::Identifier; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +mod v0; + +impl Drive { + /// Adds an action to the state + pub fn add_group_action( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + initialize_with_insert_action_info: Option, + action_id: Identifier, + signer_identity_id: Identifier, + signer_power: GroupMemberPower, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version.drive.methods.group.insert.add_group_action { + 0 => self.add_group_action_v0( + contract_id, + group_contract_position, + initialize_with_insert_action_info, + action_id, + signer_identity_id, + signer_power, + block_info, + apply, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_group_action".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds action creation operations to drive operations + pub fn add_group_action_add_to_operations( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + initialize_with_insert_action_info: Option, + action_id: Identifier, + signer_identity_id: Identifier, + signer_power: GroupMemberPower, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version.drive.methods.group.insert.add_group_action { + 0 => self.add_group_action_add_to_operations_v0( + contract_id, + group_contract_position, + initialize_with_insert_action_info, + action_id, + signer_identity_id, + signer_power, + block_info, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_group_action_add_to_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// The operations needed to create a new group action + pub fn add_group_action_operations( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + initialize_with_insert_action_info: Option, + action_id: Identifier, + signer_identity_id: Identifier, + signer_power: GroupMemberPower, + block_info: &BlockInfo, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.group.insert.add_new_groups { + 0 => self.add_group_action_operations_v0( + contract_id, + group_contract_position, + initialize_with_insert_action_info, + action_id, + signer_identity_id, + signer_power, + block_info, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_new_group_action_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/insert/add_group_action/v0/mod.rs b/packages/rs-drive/src/drive/group/insert/add_group_action/v0/mod.rs new file mode 100644 index 0000000000..f45e9ec03c --- /dev/null +++ b/packages/rs-drive/src/drive/group/insert/add_group_action/v0/mod.rs @@ -0,0 +1,244 @@ +use crate::drive::group::paths::{ + group_action_path, group_action_root_path, group_action_signers_path_vec, ACTION_INFO_KEY, + ACTION_SIGNERS_KEY, +}; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::{BatchInsertApplyType, BatchInsertTreeApplyType, QueryTarget}; +use crate::util::object_size_info::PathKeyInfo::PathFixedSizeKeyRef; +use crate::util::object_size_info::{DriveKeyInfo, PathKeyElementInfo}; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::group::GroupMemberPower; +use dpp::data_contract::GroupContractPosition; +use dpp::fee::fee_result::FeeResult; +use dpp::group::group_action::GroupAction; +use dpp::identifier::Identifier; +use dpp::serialization::PlatformSerializable; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::element::SumValue; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; +use grovedb_epoch_based_storage_flags::StorageFlags; +use std::collections::HashMap; + +impl Drive { + pub(super) fn add_group_action_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + initialize_with_insert_action_info: Option, + action_id: Identifier, + signer_identity_id: Identifier, + signer_power: GroupMemberPower, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let mut drive_operations: Vec = vec![]; + self.add_group_action_add_to_operations_v0( + contract_id, + group_contract_position, + initialize_with_insert_action_info, + action_id, + signer_identity_id, + signer_power, + block_info, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + Ok(fees) + } + + /// Adds group creation operations to drive operations + pub(super) fn add_group_action_add_to_operations_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + initialize_with_insert_action_info: Option, + action_id: Identifier, + signer_identity_id: Identifier, + signer_power: GroupMemberPower, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = if apply { + None::> + } else { + Some(HashMap::new()) + }; + + let batch_operations = self.add_group_action_operations( + contract_id, + group_contract_position, + initialize_with_insert_action_info, + action_id, + signer_identity_id, + signer_power, + block_info, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + /// The operations needed to create a group + pub(super) fn add_group_action_operations_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + initialize_with_insert_action_info: Option, + action_id: Identifier, + signer_identity_id: Identifier, + signer_power: GroupMemberPower, + block_info: &BlockInfo, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut batch_operations: Vec = vec![]; + + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info { + Drive::add_estimation_costs_for_add_group_action( + contract_id.to_buffer(), + group_contract_position, + Some(action_id.to_buffer()), + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + + let group_contract_position_bytes = group_contract_position.to_be_bytes().to_vec(); + let group_action_root_path = group_action_root_path( + contract_id.as_slice(), + group_contract_position_bytes.as_slice(), + ); + let apply_type = if estimated_costs_only_with_layer_info.is_none() { + BatchInsertTreeApplyType::StatefulBatchInsertTree + } else { + BatchInsertTreeApplyType::StatelessBatchInsertTree { + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, + flags_len: 0, + } + }; + + let storage_flags = Some(StorageFlags::new_single_epoch( + block_info.epoch.index, + Some(signer_identity_id.to_buffer()), + )); + + let element_flags = StorageFlags::map_to_some_element_flags(storage_flags.as_ref()); + + let mut inserted_root_action = false; + + if let Some(initialize_with_insert_action_info) = initialize_with_insert_action_info { + // We insert the contract root into the group tree + inserted_root_action = self.batch_insert_empty_tree_if_not_exists( + PathFixedSizeKeyRef((group_action_root_path, action_id.as_slice())), + TreeType::NormalTree, + None, + apply_type, + transaction, + &mut None, + &mut batch_operations, + &platform_version.drive, + )?; + + if inserted_root_action { + let group_action_path = group_action_path( + contract_id.as_slice(), + group_contract_position_bytes.as_slice(), + action_id.as_slice(), + ); + + self.batch_insert_empty_sum_tree( + group_action_path, + DriveKeyInfo::KeyRef(ACTION_SIGNERS_KEY), + None, + &mut batch_operations, + &platform_version.drive, + )?; + + let serialized = initialize_with_insert_action_info.serialize_consume_to_bytes()?; + + self.batch_insert( + PathKeyElementInfo::PathFixedSizeKeyRefElement::<5>(( + group_action_path, + ACTION_INFO_KEY, + Element::Item(serialized, element_flags.clone()), + )), + &mut batch_operations, + &platform_version.drive, + )?; + } + } + + let signers_path = group_action_signers_path_vec( + contract_id.as_slice(), + group_contract_position, + action_id.as_slice(), + ); + + let signer_apply_type = if estimated_costs_only_with_layer_info.is_none() { + BatchInsertApplyType::StatefulBatchInsert + } else { + BatchInsertApplyType::StatelessBatchInsert { + in_tree_type: TreeType::SumTree, + target: QueryTarget::QueryTargetValue(8), + } + }; + + if inserted_root_action { + self.batch_insert( + PathKeyElementInfo::PathKeyElement::<0>(( + signers_path, + signer_identity_id.to_vec(), + Element::SumItem(signer_power as SumValue, element_flags), + )), + &mut batch_operations, + &platform_version.drive, + )?; + } else { + // we should verify it doesn't yet exist + self.batch_insert_sum_item_if_not_exists( + PathKeyElementInfo::PathKeyElement::<0>(( + signers_path, + signer_identity_id.to_vec(), + Element::SumItem(signer_power as SumValue, element_flags), + )), + true, + signer_apply_type, + transaction, + &mut batch_operations, + &platform_version.drive, + )?; + } + + Ok(batch_operations) + } +} diff --git a/packages/rs-drive/src/drive/group/insert/add_new_groups/mod.rs b/packages/rs-drive/src/drive/group/insert/add_new_groups/mod.rs new file mode 100644 index 0000000000..a5fe50e545 --- /dev/null +++ b/packages/rs-drive/src/drive/group/insert/add_new_groups/mod.rs @@ -0,0 +1,99 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; + +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::prelude::Identifier; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use std::collections::{BTreeMap, HashMap}; + +mod v0; + +impl Drive { + /// Adds groups to the state. + pub fn add_new_groups( + &self, + contract_id: Identifier, + groups: &BTreeMap, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version.drive.methods.group.insert.add_new_groups { + 0 => self.add_new_groups_v0( + contract_id, + groups, + block_info, + apply, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_new_groups".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds groups creation operations to drive operations + pub fn add_new_groups_add_to_operations( + &self, + contract_id: Identifier, + groups: &BTreeMap, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version.drive.methods.group.insert.add_new_groups { + 0 => self.add_new_groups_add_to_operations_v0( + contract_id, + groups, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_new_groups_add_to_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// The operations needed to create groups + pub fn add_new_groups_operations( + &self, + contract_id: Identifier, + groups: &BTreeMap, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.group.insert.add_new_groups { + 0 => self.add_new_groups_operations_v0( + contract_id, + groups, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_new_groups_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/insert/add_new_groups/v0/mod.rs b/packages/rs-drive/src/drive/group/insert/add_new_groups/v0/mod.rs new file mode 100644 index 0000000000..2535d64d7a --- /dev/null +++ b/packages/rs-drive/src/drive/group/insert/add_new_groups/v0/mod.rs @@ -0,0 +1,217 @@ +use crate::drive::group::paths::{ + group_contract_path, group_path, group_root_path, GROUP_ACTIVE_ACTIONS_KEY, + GROUP_CLOSED_ACTIONS_KEY, GROUP_INFO_KEY, +}; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::BatchInsertTreeApplyType; +use crate::util::object_size_info::PathKeyInfo::{PathFixedSizeKey, PathFixedSizeKeyRef}; +use crate::util::object_size_info::{DriveKeyInfo, PathKeyElementInfo}; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::fee::fee_result::FeeResult; +use dpp::identifier::Identifier; +use dpp::serialization::PlatformSerializable; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; +use std::collections::{BTreeMap, HashMap}; + +impl Drive { + /// Adds a group by inserting a new group subtree structure to the `Identities` subtree. + pub(super) fn add_new_groups_v0( + &self, + contract_id: Identifier, + groups: &BTreeMap, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let mut drive_operations: Vec = vec![]; + self.add_new_groups_add_to_operations_v0( + contract_id, + groups, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + Ok(fees) + } + + /// Adds group creation operations to drive operations + pub(super) fn add_new_groups_add_to_operations_v0( + &self, + contract_id: Identifier, + groups: &BTreeMap, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = if apply { + None::> + } else { + Some(HashMap::new()) + }; + + let batch_operations = self.add_new_groups_operations( + contract_id, + groups, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + /// The operations needed to create a group + pub(super) fn add_new_groups_operations_v0( + &self, + contract_id: Identifier, + groups: &BTreeMap, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut batch_operations: Vec = vec![]; + + let group_tree_path = group_root_path(); + + let apply_type = if estimated_costs_only_with_layer_info.is_none() { + BatchInsertTreeApplyType::StatefulBatchInsertTree + } else { + BatchInsertTreeApplyType::StatelessBatchInsertTree { + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, + flags_len: 0, + } + }; + + // We insert the contract root into the group tree + let inserted = self.batch_insert_empty_tree_if_not_exists( + PathFixedSizeKey((group_tree_path, contract_id.to_vec())), + TreeType::NormalTree, + None, + apply_type, + transaction, + &mut None, + &mut batch_operations, + &platform_version.drive, + )?; + + if inserted { + for (group_pos, group) in groups { + let group_pos_bytes = group_pos.to_be_bytes().to_vec(); + let path = group_contract_path(contract_id.as_slice()); + self.batch_insert_empty_tree( + path, + DriveKeyInfo::Key(group_pos_bytes.clone()), + None, + &mut batch_operations, + &platform_version.drive, + )?; + let group_path = group_path(contract_id.as_slice(), group_pos_bytes.as_slice()); + + let serialized_group_info = group.serialize_to_bytes()?; + let info_item = Element::Item(serialized_group_info, None); + + self.batch_insert_empty_tree( + group_path, + DriveKeyInfo::KeyRef(GROUP_ACTIVE_ACTIONS_KEY), + None, + &mut batch_operations, + &platform_version.drive, + )?; + + self.batch_insert( + PathKeyElementInfo::PathFixedSizeKeyRefElement::<3>(( + group_path, + GROUP_INFO_KEY, + info_item, + )), + &mut batch_operations, + &platform_version.drive, + )?; + + self.batch_insert_empty_tree( + group_path, + DriveKeyInfo::KeyRef(GROUP_CLOSED_ACTIONS_KEY), + None, + &mut batch_operations, + &platform_version.drive, + )?; + } + } else { + for (group_pos, group) in groups { + let group_pos_bytes = group_pos.to_be_bytes().to_vec(); + let path = group_contract_path(contract_id.as_slice()); + let inserted = self.batch_insert_empty_tree_if_not_exists( + PathFixedSizeKeyRef((path, group_pos_bytes.as_slice())), + TreeType::NormalTree, + None, + apply_type, + transaction, + &mut None, + &mut batch_operations, + &platform_version.drive, + )?; + + if inserted { + let group_path = group_path(contract_id.as_slice(), group_pos_bytes.as_slice()); + + let serialized_group_info = group.serialize_to_bytes()?; + let info_item = Element::Item(serialized_group_info, None); + + self.batch_insert_empty_tree( + group_path, + DriveKeyInfo::KeyRef(GROUP_ACTIVE_ACTIONS_KEY), + None, + &mut batch_operations, + &platform_version.drive, + )?; + + self.batch_insert( + PathKeyElementInfo::PathFixedSizeKeyRefElement::<3>(( + group_path, + GROUP_INFO_KEY, + info_item, + )), + &mut batch_operations, + &platform_version.drive, + )?; + + self.batch_insert_empty_tree( + group_path, + DriveKeyInfo::KeyRef(GROUP_CLOSED_ACTIONS_KEY), + None, + &mut batch_operations, + &platform_version.drive, + )?; + } + } + } + + Ok(batch_operations) + } +} diff --git a/packages/rs-drive/src/drive/group/insert/mod.rs b/packages/rs-drive/src/drive/group/insert/mod.rs new file mode 100644 index 0000000000..344133883d --- /dev/null +++ b/packages/rs-drive/src/drive/group/insert/mod.rs @@ -0,0 +1,2 @@ +mod add_group_action; +mod add_new_groups; diff --git a/packages/rs-drive/src/drive/group/mod.rs b/packages/rs-drive/src/drive/group/mod.rs new file mode 100644 index 0000000000..a5fec1b5de --- /dev/null +++ b/packages/rs-drive/src/drive/group/mod.rs @@ -0,0 +1,10 @@ +#[cfg(feature = "server")] +mod estimated_costs; +#[cfg(feature = "server")] +mod fetch; +#[cfg(feature = "server")] +mod insert; +/// Group paths +pub mod paths; +#[cfg(feature = "server")] +mod prove; diff --git a/packages/rs-drive/src/drive/group/paths.rs b/packages/rs-drive/src/drive/group/paths.rs new file mode 100644 index 0000000000..07449e982f --- /dev/null +++ b/packages/rs-drive/src/drive/group/paths.rs @@ -0,0 +1,256 @@ +use crate::drive::RootTree; +use dpp::data_contract::GroupContractPosition; + +// We should have +// GROUP_ACTIVE_ACTIONS_TREE +// / \ +// GROUP_INFO GROUP_CLOSED_ACTIONS_TREE + +/// The key used to identify the group information in storage. +pub const GROUP_INFO_KEY: &[u8; 1] = b"I"; +/// The key used to identify the group actions in storage. +pub const GROUP_ACTIVE_ACTIONS_KEY: &[u8; 1] = b"M"; +/// The key used to identify the group actions in storage. +pub const GROUP_CLOSED_ACTIONS_KEY: &[u8; 1] = b"X"; +/// The key used to identify the action information in storage. +pub const ACTION_INFO_KEY: &[u8; 1] = b"I"; +/// The key used to identify the action signers in storage. +pub const ACTION_SIGNERS_KEY: &[u8; 1] = b"S"; + +/// Group root path + +pub fn group_root_path() -> [&'static [u8]; 1] { + [Into::<&[u8; 1]>::into(RootTree::GroupActions)] +} + +/// Group root path vector + +pub fn group_root_path_vec() -> Vec> { + vec![vec![RootTree::GroupActions as u8]] +} + +/// Group path + +pub fn group_contract_path(contract_id: &[u8]) -> [&[u8]; 2] { + [Into::<&[u8; 1]>::into(RootTree::GroupActions), contract_id] +} + +/// Group path vector + +pub fn group_contract_path_vec(contract_id: &[u8]) -> Vec> { + vec![vec![RootTree::GroupActions as u8], contract_id.to_vec()] +} + +/// Group path + +pub fn group_path<'a>( + contract_id: &'a [u8], + group_contract_position_bytes: &'a [u8], +) -> [&'a [u8]; 3] { + [ + Into::<&[u8; 1]>::into(RootTree::GroupActions), + contract_id, + group_contract_position_bytes, + ] +} + +/// Group path vector + +pub fn group_path_vec( + contract_id: &[u8], + group_contract_position: GroupContractPosition, +) -> Vec> { + vec![ + vec![RootTree::GroupActions as u8], + contract_id.to_vec(), + group_contract_position.to_be_bytes().to_vec(), + ] +} + +/// Group action path + +pub fn group_action_root_path<'a>( + contract_id: &'a [u8], + group_contract_position_bytes: &'a [u8], +) -> [&'a [u8]; 4] { + [ + Into::<&[u8; 1]>::into(RootTree::GroupActions), + contract_id, + group_contract_position_bytes, + GROUP_ACTIVE_ACTIONS_KEY, + ] +} + +/// Group action path vector + +pub fn group_action_root_path_vec( + contract_id: &[u8], + group_contract_position: GroupContractPosition, +) -> Vec> { + vec![ + vec![RootTree::GroupActions as u8], + contract_id.to_vec(), + group_contract_position.to_be_bytes().to_vec(), + GROUP_ACTIVE_ACTIONS_KEY.to_vec(), + ] +} + +/// Group path + +pub fn group_action_path<'a>( + contract_id: &'a [u8], + group_contract_position_bytes: &'a [u8], + action_id: &'a [u8], +) -> [&'a [u8]; 5] { + [ + Into::<&[u8; 1]>::into(RootTree::GroupActions), + contract_id, + group_contract_position_bytes, + GROUP_ACTIVE_ACTIONS_KEY, + action_id, + ] +} + +/// Group path vector + +pub fn group_action_path_vec( + contract_id: &[u8], + group_contract_position: GroupContractPosition, + action_id: &[u8], +) -> Vec> { + vec![ + vec![RootTree::GroupActions as u8], + contract_id.to_vec(), + group_contract_position.to_be_bytes().to_vec(), + GROUP_ACTIVE_ACTIONS_KEY.to_vec(), + action_id.to_vec(), + ] +} + +/// Group path + +pub fn group_action_signers_path<'a>( + contract_id: &'a [u8], + group_contract_position_bytes: &'a [u8], + action_id: &'a [u8], +) -> [&'a [u8]; 6] { + [ + Into::<&[u8; 1]>::into(RootTree::GroupActions), + contract_id, + group_contract_position_bytes, + GROUP_ACTIVE_ACTIONS_KEY, + action_id, + ACTION_SIGNERS_KEY, + ] +} + +/// Group path vector + +pub fn group_action_signers_path_vec( + contract_id: &[u8], + group_contract_position: GroupContractPosition, + action_id: &[u8], +) -> Vec> { + vec![ + vec![RootTree::GroupActions as u8], + contract_id.to_vec(), + group_contract_position.to_be_bytes().to_vec(), + GROUP_ACTIVE_ACTIONS_KEY.to_vec(), + action_id.to_vec(), + ACTION_SIGNERS_KEY.to_vec(), + ] +} + +/// Group action path + +pub fn group_closed_action_root_path<'a>( + contract_id: &'a [u8], + group_contract_position_bytes: &'a [u8], +) -> [&'a [u8]; 4] { + [ + Into::<&[u8; 1]>::into(RootTree::GroupActions), + contract_id, + group_contract_position_bytes, + GROUP_CLOSED_ACTIONS_KEY, + ] +} + +/// Group action path vector + +pub fn group_closed_action_root_path_vec( + contract_id: &[u8], + group_contract_position: GroupContractPosition, +) -> Vec> { + vec![ + vec![RootTree::GroupActions as u8], + contract_id.to_vec(), + group_contract_position.to_be_bytes().to_vec(), + GROUP_CLOSED_ACTIONS_KEY.to_vec(), + ] +} + +/// Group path + +pub fn group_closed_action_path<'a>( + contract_id: &'a [u8], + group_contract_position_bytes: &'a [u8], + action_id: &'a [u8], +) -> [&'a [u8]; 5] { + [ + Into::<&[u8; 1]>::into(RootTree::GroupActions), + contract_id, + group_contract_position_bytes, + GROUP_CLOSED_ACTIONS_KEY, + action_id, + ] +} + +/// Group path vector + +pub fn group_closed_action_path_vec( + contract_id: &[u8], + group_contract_position: GroupContractPosition, + action_id: &[u8], +) -> Vec> { + vec![ + vec![RootTree::GroupActions as u8], + contract_id.to_vec(), + group_contract_position.to_be_bytes().to_vec(), + GROUP_CLOSED_ACTIONS_KEY.to_vec(), + action_id.to_vec(), + ] +} + +/// Group path + +pub fn group_closed_action_signers_path<'a>( + contract_id: &'a [u8], + group_contract_position_bytes: &'a [u8], + action_id: &'a [u8], +) -> [&'a [u8]; 6] { + [ + Into::<&[u8; 1]>::into(RootTree::GroupActions), + contract_id, + group_contract_position_bytes, + GROUP_CLOSED_ACTIONS_KEY, + action_id, + ACTION_SIGNERS_KEY, + ] +} + +/// Group path vector + +pub fn group_closed_action_signers_path_vec( + contract_id: &[u8], + group_contract_position: GroupContractPosition, + action_id: &[u8], +) -> Vec> { + vec![ + vec![RootTree::GroupActions as u8], + contract_id.to_vec(), + group_contract_position.to_be_bytes().to_vec(), + GROUP_CLOSED_ACTIONS_KEY.to_vec(), + action_id.to_vec(), + ACTION_SIGNERS_KEY.to_vec(), + ] +} diff --git a/packages/rs-drive/src/drive/group/prove/mod.rs b/packages/rs-drive/src/drive/group/prove/mod.rs new file mode 100644 index 0000000000..c6fa82c789 --- /dev/null +++ b/packages/rs-drive/src/drive/group/prove/mod.rs @@ -0,0 +1,2 @@ +mod prove_group_info; +mod prove_group_infos; diff --git a/packages/rs-drive/src/drive/group/prove/prove_group_info/mod.rs b/packages/rs-drive/src/drive/group/prove/prove_group_info/mod.rs new file mode 100644 index 0000000000..5fd307c25e --- /dev/null +++ b/packages/rs-drive/src/drive/group/prove/prove_group_info/mod.rs @@ -0,0 +1,99 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use platform_version::version::PlatformVersion; +use std::collections::HashMap; + +mod v0; + +impl Drive { + /// Proves the `Group` for the given contract and group contract position. + /// + /// This function queries the GroveDB to prove the `Group` associated with a specific contract + /// and group contract position. The method selects the appropriate version of + /// `prove_group_info` based on the `platform_version` provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `group_contract_position`: The position of the group contract in the data structure. + /// - `transaction`: The transaction argument used for the query. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(Group)`: The `Group` for the specified action ID and contract position. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub fn prove_group_info( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.group.prove.prove_group_info { + 0 => self.prove_group_info_v0( + contract_id, + group_contract_position, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_group_info".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Proves the `Group` and adds corresponding operations to the drive for the given action ID and group contract position. + /// + /// This function is similar to `prove_group_info` but also adds operations to the drive for state changes or queries. + /// Additionally, it supports cost estimation by interacting with the layer information if provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `group_contract_position`: The position of the group contract in the data structure. + /// - `estimated_costs_only_with_layer_info`: A mutable reference to an optional `HashMap` containing + /// layer information used for cost estimation. + /// - `transaction`: The transaction argument used for the query. + /// - `drive_operations`: A mutable reference to a vector that stores low-level drive operations. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(Group)`: The `Group` for the specified contract ID and contract position, along with any added operations. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub(crate) fn prove_group_info_operations( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.group.prove.prove_group_info { + 0 => self.prove_group_info_operations_v0( + contract_id, + group_contract_position, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_group_info_and_add_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/prove/prove_group_info/v0/mod.rs b/packages/rs-drive/src/drive/group/prove/prove_group_info/v0/mod.rs new file mode 100644 index 0000000000..0dd20e36e0 --- /dev/null +++ b/packages/rs-drive/src/drive/group/prove/prove_group_info/v0/mod.rs @@ -0,0 +1,45 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + pub(super) fn prove_group_info_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.prove_group_info_operations_v0( + contract_id, + group_contract_position, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn prove_group_info_operations_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let path_query = Drive::group_info_for_contract_id_and_group_contract_position_query( + contract_id.to_buffer(), + group_contract_position, + ); + self.grove_get_proved_path_query( + &path_query, + transaction, + drive_operations, + &platform_version.drive, + ) + } +} diff --git a/packages/rs-drive/src/drive/group/prove/prove_group_infos/mod.rs b/packages/rs-drive/src/drive/group/prove/prove_group_infos/mod.rs new file mode 100644 index 0000000000..27b153c2b1 --- /dev/null +++ b/packages/rs-drive/src/drive/group/prove/prove_group_infos/mod.rs @@ -0,0 +1,99 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use dpp::prelude::StartAtIncluded; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +mod v0; +impl Drive { + /// Proves the `Group` for the given contract. + /// + /// This function queries the GroveDB to prove the potentially many `Group`s associated with a + /// specific contract. The method selects the appropriate version of + /// `prove_group_infos` based on the `platform_version` provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `transaction`: The transaction argument used for the query. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(Group)`: The `Group` for the specified action ID and contract position. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub fn prove_group_infos( + &self, + contract_id: Identifier, + start_group_contract_position: Option<(GroupContractPosition, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.group.prove.prove_group_infos { + 0 => self.prove_group_infos_v0( + contract_id, + start_group_contract_position, + limit, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_group_infos".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Proves the `Group` and adds corresponding operations to the drive for the given action ID and group contract position. + /// + /// This function is similar to `prove_group_info` but also adds operations to the drive for state changes or queries. + /// Additionally, it supports cost estimation by interacting with the layer information if provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `group_contract_position`: The position of the group contract in the data structure. + /// - `transaction`: The transaction argument used for the query. + /// - `drive_operations`: A mutable reference to a vector that stores low-level drive operations. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(Group)`: The `Group` for the specified contract ID and contract position, along with any added operations. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub(crate) fn prove_group_infos_operations( + &self, + contract_id: Identifier, + start_group_contract_position: Option<(GroupContractPosition, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.group.prove.prove_group_infos { + 0 => self.prove_group_infos_operations_v0( + contract_id, + start_group_contract_position, + limit, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_group_infos_and_add_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/prove/prove_group_infos/v0/mod.rs b/packages/rs-drive/src/drive/group/prove/prove_group_infos/v0/mod.rs new file mode 100644 index 0000000000..d1260102bd --- /dev/null +++ b/packages/rs-drive/src/drive/group/prove/prove_group_infos/v0/mod.rs @@ -0,0 +1,50 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use dpp::prelude::StartAtIncluded; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + pub(super) fn prove_group_infos_v0( + &self, + contract_id: Identifier, + start_group_contract_position: Option<(GroupContractPosition, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.prove_group_infos_operations_v0( + contract_id, + start_group_contract_position, + limit, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn prove_group_infos_operations_v0( + &self, + contract_id: Identifier, + start_group_contract_position: Option<(GroupContractPosition, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let path_query = Self::group_infos_for_contract_id_query( + contract_id.to_buffer(), + start_group_contract_position, + limit, + ); + self.grove_get_proved_path_query( + &path_query, + transaction, + drive_operations, + &platform_version.drive, + ) + } +} diff --git a/packages/rs-drive/src/drive/identity/contract_info/identity_contract_nonce/fetch_identity_contract_nonce/v0/mod.rs b/packages/rs-drive/src/drive/identity/contract_info/identity_contract_nonce/fetch_identity_contract_nonce/v0/mod.rs index 14a8e3e05e..bfbf1c2f4f 100644 --- a/packages/rs-drive/src/drive/identity/contract_info/identity_contract_nonce/fetch_identity_contract_nonce/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/contract_info/identity_contract_nonce/fetch_identity_contract_nonce/v0/mod.rs @@ -12,7 +12,7 @@ use dpp::prelude::IdentityNonce; use crate::drive::identity::contract_info::ContractInfoStructure::IdentityContractNonceKey; use dpp::version::PlatformVersion; use grovedb::Element::Item; -use grovedb::TransactionArg; +use grovedb::{TransactionArg, TreeType}; impl Drive { /// Fetches the Identity's contract revision from the backing store @@ -51,7 +51,7 @@ impl Drive { DirectQueryType::StatefulDirectQuery } else { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, query_target: QueryTargetValue(1), } }; diff --git a/packages/rs-drive/src/drive/identity/contract_info/identity_contract_nonce/merge_identity_contract_nonce/v0/mod.rs b/packages/rs-drive/src/drive/identity/contract_info/identity_contract_nonce/merge_identity_contract_nonce/v0/mod.rs index aaa805ca54..9585f029fe 100644 --- a/packages/rs-drive/src/drive/identity/contract_info/identity_contract_nonce/merge_identity_contract_nonce/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/contract_info/identity_contract_nonce/merge_identity_contract_nonce/v0/mod.rs @@ -11,7 +11,7 @@ use crate::util::object_size_info::{PathKeyElementInfo, PathKeyInfo}; use dpp::version::PlatformVersion; use grovedb::batch::KeyInfoPath; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; use dpp::block::block_info::BlockInfo; use dpp::fee::fee_result::FeeResult; @@ -98,8 +98,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, flags_len: 0, } }; @@ -119,7 +119,7 @@ impl Drive { // we insert the contract root tree if it doesn't exist already self.batch_insert_empty_tree_if_not_exists( PathKeyInfo::<0>::PathKey((identity_path, vec![IdentityContractInfo as u8])), - false, + TreeType::NormalTree, None, apply_type, transaction, @@ -134,7 +134,7 @@ impl Drive { identity_contract_info_root_path_vec(&identity_id), contract_id.to_vec(), )), - false, + TreeType::NormalTree, None, apply_type, transaction, @@ -302,7 +302,7 @@ mod tests { use platform_version::version::PlatformVersion; fn setup_base_test(contract_id: [u8; 32]) -> (Drive, Identity) { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let transaction = drive.grove.start_transaction(); let platform_version = PlatformVersion::first(); diff --git a/packages/rs-drive/src/drive/identity/contract_info/keys/add_potential_contract_info_for_contract_bounded_key/v0/mod.rs b/packages/rs-drive/src/drive/identity/contract_info/keys/add_potential_contract_info_for_contract_bounded_key/v0/mod.rs index 745bd2daff..a2177bd069 100644 --- a/packages/rs-drive/src/drive/identity/contract_info/keys/add_potential_contract_info_for_contract_bounded_key/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/contract_info/keys/add_potential_contract_info_for_contract_bounded_key/v0/mod.rs @@ -24,7 +24,7 @@ use dpp::identity::{IdentityPublicKey, Purpose}; use dpp::version::PlatformVersion; use grovedb::batch::KeyInfoPath; use grovedb::reference_path::ReferencePathType::{SiblingReference, UpstreamRootHeightReference}; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use grovedb_costs::OperationCost; use integer_encoding::VarInt; use std::collections::HashMap; @@ -95,8 +95,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, flags_len: 0, } }; @@ -233,7 +233,7 @@ impl Drive { BatchInsertApplyType::StatefulBatchInsert } else { BatchInsertApplyType::StatelessBatchInsert { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, target: QueryTargetValue(reference_type_path.serialized_size() as u32), } }; @@ -419,7 +419,7 @@ impl Drive { BatchInsertApplyType::StatefulBatchInsert } else { BatchInsertApplyType::StatelessBatchInsert { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, target: QueryTargetValue(reference.serialized_size() as u32), } }; diff --git a/packages/rs-drive/src/drive/identity/estimation_costs/for_authentication_keys_security_level_in_key_reference_tree/v0/mod.rs b/packages/rs-drive/src/drive/identity/estimation_costs/for_authentication_keys_security_level_in_key_reference_tree/v0/mod.rs index 28d254ead1..529b56477f 100644 --- a/packages/rs-drive/src/drive/identity/estimation_costs/for_authentication_keys_security_level_in_key_reference_tree/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/estimation_costs/for_authentication_keys_security_level_in_key_reference_tree/v0/mod.rs @@ -2,8 +2,8 @@ use crate::drive::Drive; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::ApproximateElements; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::AllItems; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::identity::identity_query_keys_security_level_tree_path_vec; @@ -45,7 +45,7 @@ impl Drive { )), //todo: revisit EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(4), //we can estimate that each security level will only have 4 keys //We can mark these as all subtrees, because the revision will be under estimated_layer_sizes: AllItems(1, KEY_REFERENCE_SIZE, None), diff --git a/packages/rs-drive/src/drive/identity/estimation_costs/for_balances/v0/mod.rs b/packages/rs-drive/src/drive/identity/estimation_costs/for_balances/v0/mod.rs index fd7be5dcdb..db78d1fff3 100644 --- a/packages/rs-drive/src/drive/identity/estimation_costs/for_balances/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/estimation_costs/for_balances/v0/mod.rs @@ -4,8 +4,8 @@ use crate::drive::Drive; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{EstimatedLevel, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::balances::balance_path_vec; @@ -56,12 +56,15 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path([]), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(1, false), estimated_layer_sizes: AllSubtrees( 1, SomeSumTrees { sum_trees_weight: 1, + big_sum_trees_weight: 0, + count_trees_weight: 0, + count_sum_trees_weight: 0, non_sum_trees_weight: 1, }, None, @@ -73,7 +76,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(balance_path_vec()), EstimatedLayerInformation { - is_sum_tree: true, + tree_type: TreeType::SumTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllItems(DEFAULT_HASH_SIZE_U8, AVERAGE_BALANCE_SIZE, None), }, diff --git a/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info/v0/mod.rs b/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info/v0/mod.rs index 79a3a2c57b..77a184dab7 100644 --- a/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info/v0/mod.rs @@ -3,9 +3,9 @@ use crate::drive::{identity_tree_path, Drive}; use crate::util::type_constants::DEFAULT_HASH_SIZE_U8; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{EstimatedLevel, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllSubtrees, Mix}; use grovedb::EstimatedSumTrees::NoSumTrees; +use grovedb::{EstimatedLayerInformation, TreeType}; use std::collections::HashMap; impl Drive { @@ -19,7 +19,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path([]), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(1, false), estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), }, @@ -29,7 +29,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(identity_tree_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), }, @@ -46,7 +46,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(identity_path_vec(identity_id.as_slice())), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(2, false), estimated_layer_sizes: Mix { subtrees_size: Some((1, NoSumTrees, None, 2)), // weight of 2 because 1 for keys and 1 for data contract info @@ -59,7 +59,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(identity_contract_info_root_path_vec(identity_id)), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), }, diff --git a/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info_group/v0/mod.rs b/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info_group/v0/mod.rs index 9fc0347ab8..563dedebf6 100644 --- a/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info_group/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info_group/v0/mod.rs @@ -2,9 +2,9 @@ use crate::drive::identity::identity_contract_info_group_path_vec; use crate::drive::Drive; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::ApproximateElements; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::Mix; use grovedb::EstimatedSumTrees::NoSumTrees; +use grovedb::{EstimatedLayerInformation, TreeType}; use std::collections::HashMap; impl Drive { @@ -20,7 +20,7 @@ impl Drive { group_id, )), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(2), estimated_layer_sizes: Mix { subtrees_size: Some((1, NoSumTrees, None, 1)), diff --git a/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info_group_key_purpose/v0/mod.rs b/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info_group_key_purpose/v0/mod.rs index 2a2d2405d7..195a04d3c7 100644 --- a/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info_group_key_purpose/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info_group_key_purpose/v0/mod.rs @@ -2,8 +2,8 @@ use crate::drive::Drive; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::ApproximateElements; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::AllReference; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::identity::estimation_costs::KEY_REFERENCE_SIZE; use crate::drive::identity::identity_contract_info_group_path_key_purpose_vec; @@ -25,7 +25,7 @@ impl Drive { key_purpose, )), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(5), estimated_layer_sizes: AllReference(1, KEY_REFERENCE_SIZE, None), }, diff --git a/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info_group_keys/v0/mod.rs b/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info_group_keys/v0/mod.rs index efa3892a36..069fc57bcb 100644 --- a/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info_group_keys/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/estimation_costs/for_identity_contract_info_group_keys/v0/mod.rs @@ -2,9 +2,9 @@ use crate::drive::identity::identity_contract_info_group_keys_path_vec; use crate::drive::Drive; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::ApproximateElements; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::AllSubtrees; use grovedb::EstimatedSumTrees::NoSumTrees; +use grovedb::{EstimatedLayerInformation, TreeType}; use std::collections::HashMap; impl Drive { @@ -20,7 +20,7 @@ impl Drive { group_id, )), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(2), estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), }, diff --git a/packages/rs-drive/src/drive/identity/estimation_costs/for_keys_for_identity_id/v0/mod.rs b/packages/rs-drive/src/drive/identity/estimation_costs/for_keys_for_identity_id/v0/mod.rs index 3721c5cad3..ac776f1ab2 100644 --- a/packages/rs-drive/src/drive/identity/estimation_costs/for_keys_for_identity_id/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/estimation_costs/for_keys_for_identity_id/v0/mod.rs @@ -4,8 +4,8 @@ use crate::drive::{identity_tree_path, Drive}; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, EstimatedLevel, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::identity::{identity_key_tree_path_vec, identity_path_vec}; @@ -58,7 +58,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path([]), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(1, false), estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), }, @@ -68,7 +68,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(identity_tree_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), }, @@ -78,7 +78,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(identity_path_vec(identity_id.as_slice())), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(1, false), //We can mark these as all subtrees, because the revision will be under estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), @@ -89,7 +89,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(identity_key_tree_path_vec(identity_id.as_slice())), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(50), //we can estimate that an identity will have amount 50 keys //We can mark these as all subtrees, because the revision will be under estimated_layer_sizes: AllItems(1, 42, Some(3)), diff --git a/packages/rs-drive/src/drive/identity/estimation_costs/for_negative_credit/v0/mod.rs b/packages/rs-drive/src/drive/identity/estimation_costs/for_negative_credit/v0/mod.rs index 34a7a6d214..c4102f56b7 100644 --- a/packages/rs-drive/src/drive/identity/estimation_costs/for_negative_credit/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/estimation_costs/for_negative_credit/v0/mod.rs @@ -4,8 +4,8 @@ use crate::drive::{identity_tree_path, Drive}; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{EstimatedLevel, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllSubtrees, Mix}; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::identity::identity_path_vec; @@ -36,7 +36,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(identity_tree_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), }, @@ -53,7 +53,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(identity_path_vec(identity_id.as_slice())), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(2, false), //We can mark these as all subtrees, because the revision will be under estimated_layer_sizes: Mix { diff --git a/packages/rs-drive/src/drive/identity/estimation_costs/for_purpose_in_key_reference_tree/v0/mod.rs b/packages/rs-drive/src/drive/identity/estimation_costs/for_purpose_in_key_reference_tree/v0/mod.rs index 68d4852ad3..6951d86eda 100644 --- a/packages/rs-drive/src/drive/identity/estimation_costs/for_purpose_in_key_reference_tree/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/estimation_costs/for_purpose_in_key_reference_tree/v0/mod.rs @@ -2,8 +2,8 @@ use crate::drive::Drive; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::ApproximateElements; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllReference, AllSubtrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::identity::identity_query_keys_purpose_tree_path_vec; @@ -68,7 +68,7 @@ impl Drive { purpose, )), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count, // there are //We can mark these as all subtrees, because the revision will be under estimated_layer_sizes, diff --git a/packages/rs-drive/src/drive/identity/estimation_costs/for_root_key_reference_tree/v0/mod.rs b/packages/rs-drive/src/drive/identity/estimation_costs/for_root_key_reference_tree/v0/mod.rs index ca2672fa5a..7d312f98fd 100644 --- a/packages/rs-drive/src/drive/identity/estimation_costs/for_root_key_reference_tree/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/estimation_costs/for_root_key_reference_tree/v0/mod.rs @@ -2,8 +2,8 @@ use crate::drive::Drive; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::ApproximateElements; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::AllSubtrees; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::identity::identity_query_keys_tree_path_vec; @@ -34,7 +34,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(identity_query_keys_tree_path_vec(identity_id)), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(4), //we can estimate that an identity will have amount 50 keys //We can mark these as all subtrees, because the revision will be under estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), diff --git a/packages/rs-drive/src/drive/identity/estimation_costs/for_update_nonce/v0/mod.rs b/packages/rs-drive/src/drive/identity/estimation_costs/for_update_nonce/v0/mod.rs index bbd73f99ed..0f12965492 100644 --- a/packages/rs-drive/src/drive/identity/estimation_costs/for_update_nonce/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/estimation_costs/for_update_nonce/v0/mod.rs @@ -4,8 +4,8 @@ use crate::drive::{identity_tree_path, Drive}; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{EstimatedLevel, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllSubtrees, Mix}; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::identity::identity_path_vec; @@ -40,7 +40,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path([]), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(0, false), estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), }, @@ -50,7 +50,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(identity_tree_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), }, @@ -67,7 +67,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(identity_path_vec(identity_id.as_slice())), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(1, false), //We can mark these as all subtrees, because the revision will be under estimated_layer_sizes: Mix { diff --git a/packages/rs-drive/src/drive/identity/estimation_costs/for_update_revision/v0/mod.rs b/packages/rs-drive/src/drive/identity/estimation_costs/for_update_revision/v0/mod.rs index f5fe620cc6..659ffc2616 100644 --- a/packages/rs-drive/src/drive/identity/estimation_costs/for_update_revision/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/estimation_costs/for_update_revision/v0/mod.rs @@ -4,8 +4,8 @@ use crate::drive::{identity_tree_path, Drive}; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{EstimatedLevel, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllSubtrees, Mix}; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::identity::identity_path_vec; @@ -40,7 +40,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path([]), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(0, false), estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), }, @@ -50,7 +50,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(identity_tree_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), }, @@ -67,7 +67,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(identity_path_vec(identity_id.as_slice())), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(1, false), //We can mark these as all subtrees, because the revision will be under estimated_layer_sizes: Mix { diff --git a/packages/rs-drive/src/drive/identity/fetch/balance/fetch_identity_balance/v0/mod.rs b/packages/rs-drive/src/drive/identity/fetch/balance/fetch_identity_balance/v0/mod.rs index 2c5c98f7db..31c0eb6b9c 100644 --- a/packages/rs-drive/src/drive/identity/fetch/balance/fetch_identity_balance/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/fetch/balance/fetch_identity_balance/v0/mod.rs @@ -12,7 +12,7 @@ use dpp::fee::Credits; use dpp::version::PlatformVersion; use grovedb::Element::SumItem; -use grovedb::TransactionArg; +use grovedb::{TransactionArg, TreeType}; impl Drive { /// Fetches the Identity's balance from the backing store @@ -77,7 +77,7 @@ impl Drive { } else { // 8 is the size of a i64 used in sum trees DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: true, + in_tree_type: TreeType::SumTree, query_target: QueryTargetValue(8), } }; diff --git a/packages/rs-drive/src/drive/identity/fetch/balance/fetch_identity_negative_balance/v0/mod.rs b/packages/rs-drive/src/drive/identity/fetch/balance/fetch_identity_negative_balance/v0/mod.rs index ba32dca874..8bc4ccb63b 100644 --- a/packages/rs-drive/src/drive/identity/fetch/balance/fetch_identity_negative_balance/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/fetch/balance/fetch_identity_negative_balance/v0/mod.rs @@ -9,7 +9,7 @@ use dpp::fee::Credits; use dpp::version::PlatformVersion; use grovedb::Element::Item; -use grovedb::TransactionArg; +use grovedb::{TransactionArg, TreeType}; impl Drive { /// Fetches the Identity's negative balance operations from the backing store. @@ -26,7 +26,7 @@ impl Drive { } else { // 8 is the size of a encoded u64 DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: true, + in_tree_type: TreeType::SumTree, query_target: QueryTargetValue(8), } }; diff --git a/packages/rs-drive/src/drive/identity/fetch/fetch_by_public_key_hashes/mod.rs b/packages/rs-drive/src/drive/identity/fetch/fetch_by_public_key_hashes/mod.rs index 9a928d7b27..859982396a 100644 --- a/packages/rs-drive/src/drive/identity/fetch/fetch_by_public_key_hashes/mod.rs +++ b/packages/rs-drive/src/drive/identity/fetch/fetch_by_public_key_hashes/mod.rs @@ -21,7 +21,7 @@ mod tests { #[test] fn test_fetch_all_keys_on_identity() { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let platform_version = PlatformVersion::latest(); let drive_version = &platform_version.drive; diff --git a/packages/rs-drive/src/drive/identity/fetch/nonce/fetch_identity_nonce/v0/mod.rs b/packages/rs-drive/src/drive/identity/fetch/nonce/fetch_identity_nonce/v0/mod.rs index 14a7c3f705..8aa7fbe80d 100644 --- a/packages/rs-drive/src/drive/identity/fetch/nonce/fetch_identity_nonce/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/fetch/nonce/fetch_identity_nonce/v0/mod.rs @@ -12,7 +12,7 @@ use dpp::prelude::IdentityNonce; use dpp::version::PlatformVersion; use grovedb::Element::Item; -use grovedb::TransactionArg; +use grovedb::{TransactionArg, TreeType}; impl Drive { /// Fetches the Identity's nonce from the backing store @@ -48,7 +48,7 @@ impl Drive { DirectQueryType::StatefulDirectQuery } else { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, query_target: QueryTargetValue(1), } }; diff --git a/packages/rs-drive/src/drive/identity/fetch/revision/fetch_identity_revision/v0/mod.rs b/packages/rs-drive/src/drive/identity/fetch/revision/fetch_identity_revision/v0/mod.rs index bc58f65524..5257b2f432 100644 --- a/packages/rs-drive/src/drive/identity/fetch/revision/fetch_identity_revision/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/fetch/revision/fetch_identity_revision/v0/mod.rs @@ -12,7 +12,7 @@ use dpp::prelude::Revision; use dpp::version::PlatformVersion; use grovedb::Element::Item; -use grovedb::TransactionArg; +use grovedb::{TransactionArg, TreeType}; impl Drive { /// Fetches the Identity's revision from the backing store @@ -48,7 +48,7 @@ impl Drive { DirectQueryType::StatefulDirectQuery } else { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, query_target: QueryTargetValue(1), } }; diff --git a/packages/rs-drive/src/drive/identity/insert/add_new_identity/mod.rs b/packages/rs-drive/src/drive/identity/insert/add_new_identity/mod.rs index 3494ceb37c..16f9767ef3 100644 --- a/packages/rs-drive/src/drive/identity/insert/add_new_identity/mod.rs +++ b/packages/rs-drive/src/drive/identity/insert/add_new_identity/mod.rs @@ -150,7 +150,9 @@ mod tests { let platform_version = PlatformVersion::latest(); let expected_fee_result = FeeResult { storage_fee: 128871000, - processing_fee: 2330320, + // 2 extra loaded bytes because the token tree is no longer empty + // these 2 loaded bytes cost 20 credits each + processing_fee: 2330360, ..Default::default() }; @@ -186,7 +188,7 @@ mod tests { platform_version: &PlatformVersion, expected_fee_result: FeeResult, ) { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let transaction = drive.grove.start_transaction(); diff --git a/packages/rs-drive/src/drive/identity/insert/add_new_identity/v0/mod.rs b/packages/rs-drive/src/drive/identity/insert/add_new_identity/v0/mod.rs index 536d680821..9345a21a5b 100644 --- a/packages/rs-drive/src/drive/identity/insert/add_new_identity/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/insert/add_new_identity/v0/mod.rs @@ -19,7 +19,7 @@ use dpp::identity::identity_public_key::accessors::v0::{ }; use dpp::version::PlatformVersion; use grovedb::batch::KeyInfoPath; -use grovedb::{EstimatedLayerInformation, TransactionArg}; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; use itertools::Itertools; use std::collections::{BTreeSet, HashMap}; @@ -122,8 +122,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, flags_len: storage_flags.serialized_size(), } }; @@ -131,7 +131,7 @@ impl Drive { // We insert the identity tree let inserted = self.batch_insert_empty_tree_if_not_exists( PathFixedSizeKey((identity_tree_path, id.to_vec())), - false, + TreeType::NormalTree, Some(&storage_flags), apply_type, transaction, @@ -257,7 +257,7 @@ impl Drive { let mut create_tree_keys_operations = self.create_key_tree_with_keys_operations( id.to_buffer(), public_keys.into_values().collect(), - // if we are a masternode identity, we want to register all keys as non unique + // if we are a masternode identity, we want to register all keys as non-unique is_masternode_identity, &block_info.epoch, estimated_costs_only_with_layer_info, diff --git a/packages/rs-drive/src/drive/identity/key/fetch/mod.rs b/packages/rs-drive/src/drive/identity/key/fetch/mod.rs index 75466736bd..44d104288a 100644 --- a/packages/rs-drive/src/drive/identity/key/fetch/mod.rs +++ b/packages/rs-drive/src/drive/identity/key/fetch/mod.rs @@ -1027,7 +1027,7 @@ mod tests { #[test] fn test_fetch_all_keys_on_identity() { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let platform_version = PlatformVersion::latest(); let transaction = drive.grove.start_transaction(); @@ -1063,7 +1063,7 @@ mod tests { #[test] fn test_fetch_single_identity_key() { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let transaction = drive.grove.start_transaction(); @@ -1103,7 +1103,7 @@ mod tests { #[test] fn test_fetch_multiple_identity_key() { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let transaction = drive.grove.start_transaction(); @@ -1143,7 +1143,7 @@ mod tests { #[test] fn test_fetch_unknown_identity_key_returns_not_found() { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let transaction = drive.grove.start_transaction(); diff --git a/packages/rs-drive/src/drive/identity/key/insert/insert_key_searchable_references/v0/mod.rs b/packages/rs-drive/src/drive/identity/key/insert/insert_key_searchable_references/v0/mod.rs index 8ae39f8b34..91fd7fbe21 100644 --- a/packages/rs-drive/src/drive/identity/key/insert/insert_key_searchable_references/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/key/insert/insert_key_searchable_references/v0/mod.rs @@ -16,7 +16,7 @@ use dpp::identity::{IdentityPublicKey, Purpose, SecurityLevel}; use dpp::version::drive_versions::DriveVersion; use grovedb::batch::KeyInfoPath; use grovedb::reference_path::ReferencePathType; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; impl Drive { @@ -79,8 +79,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, flags_len: SINGLE_EPOCH_FLAGS_SIZE, } }; diff --git a/packages/rs-drive/src/drive/identity/key/insert_key_hash_identity_reference/estimation_costs/add_estimation_costs_for_insert_non_unique_public_key_hash_reference/v0/mod.rs b/packages/rs-drive/src/drive/identity/key/insert_key_hash_identity_reference/estimation_costs/add_estimation_costs_for_insert_non_unique_public_key_hash_reference/v0/mod.rs index 355d05f34b..a24e1eea04 100644 --- a/packages/rs-drive/src/drive/identity/key/insert_key_hash_identity_reference/estimation_costs/add_estimation_costs_for_insert_non_unique_public_key_hash_reference/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/key/insert_key_hash_identity_reference/estimation_costs/add_estimation_costs_for_insert_non_unique_public_key_hash_reference/v0/mod.rs @@ -7,9 +7,9 @@ use crate::drive::{ use crate::util::type_constants::{DEFAULT_HASH_160_SIZE_U8, DEFAULT_HASH_SIZE_U8}; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees}; use grovedb::EstimatedSumTrees::NoSumTrees; +use grovedb::{EstimatedLayerInformation, TreeType}; use std::collections::HashMap; impl Drive { @@ -24,7 +24,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(non_unique_key_hashes_path), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_160_SIZE_U8, NoSumTrees, None), }, @@ -36,7 +36,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(non_unique_key_hashes_sub_path), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(ESTIMATED_NON_UNIQUE_KEY_DUPLICATES), estimated_layer_sizes: AllItems(DEFAULT_HASH_SIZE_U8, 0, None), }, diff --git a/packages/rs-drive/src/drive/identity/key/insert_key_hash_identity_reference/estimation_costs/add_estimation_costs_for_insert_unique_public_key_hash_reference/v0/mod.rs b/packages/rs-drive/src/drive/identity/key/insert_key_hash_identity_reference/estimation_costs/add_estimation_costs_for_insert_unique_public_key_hash_reference/v0/mod.rs index 80a35c46de..db8a337fa4 100644 --- a/packages/rs-drive/src/drive/identity/key/insert_key_hash_identity_reference/estimation_costs/add_estimation_costs_for_insert_unique_public_key_hash_reference/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/key/insert_key_hash_identity_reference/estimation_costs/add_estimation_costs_for_insert_unique_public_key_hash_reference/v0/mod.rs @@ -5,7 +5,7 @@ use grovedb::EstimatedLayerCount::PotentiallyAtMaxElements; use grovedb::EstimatedLayerSizes::AllItems; use crate::util::type_constants::{DEFAULT_HASH_160_SIZE_U8, DEFAULT_HASH_SIZE_U32}; -use grovedb::EstimatedLayerInformation; +use grovedb::{EstimatedLayerInformation, TreeType}; use std::collections::HashMap; impl Drive { @@ -18,7 +18,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(unique_key_hashes_path), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllItems( DEFAULT_HASH_160_SIZE_U8, diff --git a/packages/rs-drive/src/drive/identity/update/mod.rs b/packages/rs-drive/src/drive/identity/update/mod.rs index bae2413245..bffc73961e 100644 --- a/packages/rs-drive/src/drive/identity/update/mod.rs +++ b/packages/rs-drive/src/drive/identity/update/mod.rs @@ -57,7 +57,9 @@ mod tests { let platform_version = PlatformVersion::latest(); let expected_fee_result = FeeResult { storage_fee: 14202000, - processing_fee: 1098260, + // 2 extra loaded bytes because the token tree is no longer empty + // these 2 loaded bytes cost 20 credits each + processing_fee: 1098300, ..Default::default() }; @@ -81,7 +83,7 @@ mod tests { platform_version: &PlatformVersion, expected_fee_result: FeeResult, ) { - let drive = setup_drive_with_initial_state_structure(None); + let drive = setup_drive_with_initial_state_structure(Some(&platform_version)); let identity = Identity::random_identity(5, Some(12345), platform_version) .expect("expected a random identity"); @@ -143,6 +145,9 @@ mod tests { // ------------------------------------------------- // check_reference_below_tokens_cost (4 tests) + // This test exists to make sure the update cost that goes through the tokens tree + // (as key hash references are below the token tree) + // stay the same cost. // ------------------------------------------------- #[test] fn check_reference_below_tokens_cost_first_version_apply() { @@ -171,7 +176,9 @@ mod tests { let platform_version = PlatformVersion::latest(); let expected_fee_result = FeeResult { storage_fee: 9423000, - processing_fee: 406100, + // 2 extra loaded bytes because the token tree is no longer empty + // these 2 loaded bytes cost 20 credits each + processing_fee: 406140, ..Default::default() }; do_check_reference_below_tokens_cost(true, platform_version, expected_fee_result); @@ -182,7 +189,9 @@ mod tests { let platform_version = PlatformVersion::latest(); let expected_fee_result = FeeResult { storage_fee: 9423000, - processing_fee: 314560, + // 2 extra loaded bytes because the token tree is no longer empty + // these 2 loaded bytes cost 20 credits each + processing_fee: 314600, ..Default::default() }; do_check_reference_below_tokens_cost(false, platform_version, expected_fee_result); @@ -193,7 +202,7 @@ mod tests { platform_version: &PlatformVersion, expected_fee_result: FeeResult, ) { - let drive = setup_drive_with_initial_state_structure(None); + let drive = setup_drive_with_initial_state_structure(Some(platform_version)); let identity = Identity::random_identity(5, Some(12345), platform_version) .expect("expected a random identity"); @@ -302,7 +311,7 @@ mod tests { let platform_version = PlatformVersion::latest(); let expected_fee_result = FeeResult { storage_fee: 347382000, - processing_fee: 6819220, + processing_fee: 6819260, ..Default::default() }; @@ -334,7 +343,7 @@ mod tests { platform_version: &PlatformVersion, expected_fee_result: FeeResult, ) { - let drive = setup_drive_with_initial_state_structure(None); + let drive = setup_drive_with_initial_state_structure(Some(&platform_version)); let identity = Identity::random_identity(5, Some(12345), platform_version) .expect("expected a random identity"); @@ -449,7 +458,7 @@ mod tests { platform_version: &PlatformVersion, expected_fee_result: FeeResult, ) { - let drive = setup_drive_with_initial_state_structure(None); + let drive = setup_drive_with_initial_state_structure(Some(&platform_version)); let identity = Identity::random_identity(5, Some(12345), platform_version) .expect("expected a random identity"); @@ -563,7 +572,7 @@ mod tests { expected_estimated_fee_result: FeeResult, expected_fee_result: FeeResult, ) { - let drive = setup_drive_with_initial_state_structure(None); + let drive = setup_drive_with_initial_state_structure(Some(&platform_version)); let identity = Identity::random_identity(5, Some(12345), platform_version) .expect("expected a random identity"); @@ -682,7 +691,7 @@ mod tests { platform_version: &PlatformVersion, expected_fee_result: FeeResult, ) { - let drive = setup_drive_with_initial_state_structure(None); + let drive = setup_drive_with_initial_state_structure(Some(&platform_version)); let identity = Identity::random_identity(5, Some(12345), platform_version) .expect("expected a random identity"); diff --git a/packages/rs-drive/src/drive/identity/update/operations/merge_identity_nonce_operations/v0/mod.rs b/packages/rs-drive/src/drive/identity/update/operations/merge_identity_nonce_operations/v0/mod.rs index dcca501abd..5bc218428d 100644 --- a/packages/rs-drive/src/drive/identity/update/operations/merge_identity_nonce_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/identity/update/operations/merge_identity_nonce_operations/v0/mod.rs @@ -177,7 +177,7 @@ mod tests { use platform_version::version::PlatformVersion; fn setup_base_test() -> (Drive, Identity) { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let transaction = drive.grove.start_transaction(); let platform_version = PlatformVersion::first(); diff --git a/packages/rs-drive/src/drive/initialization/mod.rs b/packages/rs-drive/src/drive/initialization/mod.rs index 97159a53ba..2c673b9024 100644 --- a/packages/rs-drive/src/drive/initialization/mod.rs +++ b/packages/rs-drive/src/drive/initialization/mod.rs @@ -2,6 +2,7 @@ mod genesis_core_height; mod v0; +mod v1; use crate::drive::Drive; use crate::error::drive::DriveError; @@ -24,9 +25,10 @@ impl Drive { .create_initial_state_structure { 0 => self.create_initial_state_structure_0(transaction, platform_version), + 1 => self.create_initial_state_structure_1(transaction, platform_version), version => Err(Error::Drive(DriveError::UnknownVersionMismatch { method: "create_initial_state_structure".to_string(), - known_versions: vec![0], + known_versions: vec![0, 1], received: version, })), } diff --git a/packages/rs-drive/src/drive/initialization/v0/mod.rs b/packages/rs-drive/src/drive/initialization/v0/mod.rs index ff30075d68..681a9f45d1 100644 --- a/packages/rs-drive/src/drive/initialization/v0/mod.rs +++ b/packages/rs-drive/src/drive/initialization/v0/mod.rs @@ -20,6 +20,25 @@ impl Drive { &self, transaction: TransactionArg, platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let drive_version = &platform_version.drive; + self.create_initial_state_structure_top_level_0(transaction, platform_version)?; + + // On lower layers we can use batching + + let batch = + self.create_initial_state_structure_lower_layers_operations_0(platform_version)?; + + self.grove_apply_batch(batch, false, transaction, drive_version)?; + + Ok(()) + } + + /// Creates the initial state structure. + pub(in crate::drive::initialization) fn create_initial_state_structure_top_level_0( + &self, + transaction: TransactionArg, + platform_version: &PlatformVersion, ) -> Result<(), Error> { let drive_version = &platform_version.drive; // We can not use batching to insert the root tree structure @@ -61,7 +80,7 @@ impl Drive { self.grove_insert_empty_tree( SubtreePath::empty(), - &[RootTree::TokenBalances as u8], + &[RootTree::Tokens as u8], transaction, None, &mut drive_operations, @@ -151,6 +170,14 @@ impl Drive { drive_version, )?; + Ok(()) + } + + /// Creates the initial state structure. + pub(in crate::drive::initialization) fn create_initial_state_structure_lower_layers_operations_0( + &self, + platform_version: &PlatformVersion, + ) -> Result { // On lower layers we can use batching let mut batch = GroveDbOpBatch::new(); @@ -181,9 +208,7 @@ impl Drive { // For the votes tree structure Drive::add_initial_vote_tree_main_structure_operations(&mut batch, platform_version)?; - self.grove_apply_batch(batch, false, transaction, drive_version)?; - - Ok(()) + Ok(batch) } } @@ -198,10 +223,9 @@ mod tests { use grovedb::{PathQuery, Query, SizedQuery}; #[test] - fn test_create_initial_state_structure() { - let drive = setup_drive_with_initial_state_structure(None); - - let platform_version = PlatformVersion::latest(); + fn test_create_initial_state_structure_in_first_protocol_version() { + let platform_version = PlatformVersion::first(); + let drive = setup_drive_with_initial_state_structure(Some(platform_version)); let mut query = Query::new(); query.insert_all(); @@ -227,12 +251,40 @@ mod tests { } #[test] - fn test_initial_state_structure_proper_heights() { + fn test_create_initial_state_structure_in_latest_protocol_version() { let drive = setup_drive_with_initial_state_structure(None); - let _db_transaction = drive.grove.start_transaction(); - let platform_version = PlatformVersion::latest(); + + let mut query = Query::new(); + query.insert_all(); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let (elements, _) = drive + .grove_get_raw_path_query( + &root_path_query, + None, + QueryElementResultType, + &mut drive_operations, + &platform_version.drive, + ) + .expect("expected to get root elements"); + assert_eq!(elements.len(), 14); + } + + #[test] + fn test_initial_state_structure_proper_heights_in_first_protocol_version() { + let platform_version = PlatformVersion::first(); + let drive = setup_drive_with_initial_state_structure(Some(platform_version)); + + let platform_version = PlatformVersion::first(); let drive_version = &platform_version.drive; // Merk Level 0 @@ -302,7 +354,7 @@ mod tests { // Merk Level 2 let mut query = Query::new(); - query.insert_key(vec![RootTree::TokenBalances as u8]); + query.insert_key(vec![RootTree::Tokens as u8]); let root_path_query = PathQuery::new( vec![], SizedQuery { @@ -515,4 +567,313 @@ mod tests { .expect("expected to get root elements"); assert_eq!(proof.len(), 250); //it + parent + sibling + parent sibling + grandparent + grandparent sibling + great-grandparent } + + #[test] + fn test_initial_state_structure_proper_heights_in_latest_protocol_version() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + let drive_version = &platform_version.drive; + + // Merk Level 0 + let mut query = Query::new(); + query.insert_key(vec![RootTree::DataContractDocuments as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 112); //it + left + right + + // Merk Level 1 + let mut query = Query::new(); + query.insert_key(vec![RootTree::Identities as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 180); //it + left + right + parent + parent other + + let mut query = Query::new(); + query.insert_key(vec![RootTree::Balances as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 181); //it + left + right + parent + parent other + + // Merk Level 2 + let mut query = Query::new(); + query.insert_key(vec![RootTree::Tokens as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 250); //it + left + right + parent + sibling + parent sibling + grandparent + + let mut query = Query::new(); + query.insert_key(vec![RootTree::Pools as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 218); //it + left + parent + sibling + parent sibling + grandparent + + let mut query = Query::new(); + query.insert_key(vec![RootTree::WithdrawalTransactions as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 250); //it + left + right + parent + sibling + parent sibling + grandparent + + let mut query = Query::new(); + query.insert_key(vec![RootTree::Votes as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 250); //it + left + right + parent + sibling + parent sibling + grandparent + + // Merk Level 3 + + let mut query = Query::new(); + query.insert_key(vec![RootTree::UniquePublicKeyHashesToIdentities as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 248); //it + parent + sibling + parent sibling + grandparent + grandparent sibling + great-grandparent + + let mut query = Query::new(); + query.insert_key(vec![ + RootTree::NonUniquePublicKeyKeyHashesToIdentities as u8, + ]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 248); //it + parent + sibling + parent sibling + grandparent + grandparent sibling + great-grandparent + + let mut query = Query::new(); + query.insert_key(vec![RootTree::PreFundedSpecializedBalances as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 217); //it + parent + parent sibling + grandparent + grandparent sibling + great-grandparent + + let mut query = Query::new(); + query.insert_key(vec![RootTree::SpentAssetLockTransactions as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 248); //it + parent + sibling + parent sibling + grandparent + grandparent sibling + great-grandparent + + let mut query = Query::new(); + query.insert_key(vec![RootTree::GroupActions as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 248); //it + parent + sibling + parent sibling + grandparent + grandparent sibling + great-grandparent + + let mut query = Query::new(); + query.insert_key(vec![RootTree::Misc as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 250); //it + parent + sibling + parent sibling + grandparent + grandparent sibling + great-grandparent + + let mut query = Query::new(); + query.insert_key(vec![RootTree::Versions as u8]); + let root_path_query = PathQuery::new( + vec![], + SizedQuery { + query, + limit: None, + offset: None, + }, + ); + let mut drive_operations = vec![]; + let proof = drive + .grove_get_proved_path_query( + &root_path_query, + None, + &mut drive_operations, + drive_version, + ) + .expect("expected to get root elements"); + assert_eq!(proof.len(), 250); //it + parent + sibling + parent sibling + grandparent + grandparent sibling + great-grandparent + } } diff --git a/packages/rs-drive/src/drive/initialization/v1/mod.rs b/packages/rs-drive/src/drive/initialization/v1/mod.rs new file mode 100644 index 0000000000..fe70af42b2 --- /dev/null +++ b/packages/rs-drive/src/drive/initialization/v1/mod.rs @@ -0,0 +1,81 @@ +//! Drive Initialization + +use crate::drive::balances::TOTAL_TOKEN_SUPPLIES_STORAGE_KEY; +use crate::util::batch::GroveDbOpBatch; + +use crate::drive::system::misc_path_vec; +use crate::drive::tokens::paths::{ + tokens_root_path_vec, TOKEN_BALANCES_KEY, TOKEN_IDENTITY_INFO_KEY, TOKEN_STATUS_INFO_KEY, +}; +use crate::drive::{Drive, RootTree}; +use crate::error::Error; +use crate::util::batch::grovedb_op_batch::GroveDbOpBatchV0Methods; +use dpp::version::PlatformVersion; +use grovedb::{Element, TransactionArg}; +use grovedb_path::SubtreePath; + +impl Drive { + /// Creates the initial state structure. + pub(super) fn create_initial_state_structure_1( + &self, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let drive_version = &platform_version.drive; + self.create_initial_state_structure_top_level_0(transaction, platform_version)?; + + self.grove_insert_empty_tree( + SubtreePath::empty(), + &[RootTree::GroupActions as u8], + transaction, + None, + &mut vec![], + drive_version, + )?; + + // On lower layers we can use batching + + let mut batch = + self.create_initial_state_structure_lower_layers_operations_0(platform_version)?; + + self.initial_state_structure_lower_layers_add_operations_1(&mut batch, platform_version)?; + + self.grove_apply_batch(batch, false, transaction, drive_version)?; + + Ok(()) + } + + /// Creates the initial state structure. + pub(in crate::drive::initialization) fn initial_state_structure_lower_layers_add_operations_1( + &self, + batch: &mut GroveDbOpBatch, + _platform_version: &PlatformVersion, + ) -> Result<(), Error> { + // In Misc + batch.add_insert( + misc_path_vec(), + TOTAL_TOKEN_SUPPLIES_STORAGE_KEY.to_vec(), + Element::empty_big_sum_tree(), + ); + + batch.add_insert( + tokens_root_path_vec(), + vec![TOKEN_BALANCES_KEY], + Element::empty_big_sum_tree(), + ); + + batch.add_insert( + tokens_root_path_vec(), + vec![TOKEN_IDENTITY_INFO_KEY], + Element::empty_tree(), + ); + + batch.add_insert( + tokens_root_path_vec(), + vec![TOKEN_STATUS_INFO_KEY], + Element::empty_tree(), + ); + + Ok(()) + } +} diff --git a/packages/rs-drive/src/drive/mod.rs b/packages/rs-drive/src/drive/mod.rs index e54d5445a2..ce1fb9a74e 100644 --- a/packages/rs-drive/src/drive/mod.rs +++ b/packages/rs-drive/src/drive/mod.rs @@ -51,9 +51,16 @@ pub mod prefunded_specialized_balances; #[cfg(any(feature = "server", feature = "verify"))] pub mod votes; +/// Group module +#[cfg(any(feature = "server", feature = "verify"))] +pub mod group; #[cfg(feature = "server")] mod shared; +/// Token module +#[cfg(any(feature = "server", feature = "verify"))] +pub mod tokens; + #[cfg(feature = "server")] use crate::cache::DriveCache; use crate::error::drive::DriveError; @@ -81,10 +88,10 @@ pub struct Drive { // 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 +// / \ / \ +// Token_Balances 16 Pools 48 WithdrawalTransactions 80 Votes 112 +// / \ / \ / \ / \ +// NUPKH->I 8 UPKH->I 24 PreFundedSpecializedBalances 40 Masternode Lists 56 (reserved) SpentAssetLockTransactions 72 GroupActions 88 Misc 104 Versions 120 /// Keys for the root tree. #[cfg(any(feature = "server", feature = "verify"))] @@ -115,12 +122,14 @@ pub enum RootTree { WithdrawalTransactions = 80, /// Balances (For identities) Balances = 96, - /// Token Balances - TokenBalances = 16, + /// Token Balances and Info + Tokens = 16, /// Versions desired by proposers Versions = 120, /// Registered votes Votes = 112, + /// Group actions + GroupActions = 88, } #[cfg(any(feature = "server", feature = "verify"))] @@ -140,9 +149,10 @@ impl fmt::Display for RootTree { RootTree::Misc => "Misc", RootTree::WithdrawalTransactions => "WithdrawalTransactions", RootTree::Balances => "Balances", - RootTree::TokenBalances => "TokenBalances", + RootTree::Tokens => "TokenBalances", RootTree::Versions => "Versions", RootTree::Votes => "Votes", + RootTree::GroupActions => "GroupActions", }; write!(f, "{}", variant_name) } @@ -183,7 +193,7 @@ impl TryFrom for RootTree { 104 => Ok(RootTree::Misc), 80 => Ok(RootTree::WithdrawalTransactions), 96 => Ok(RootTree::Balances), - 16 => Ok(RootTree::TokenBalances), + 16 => Ok(RootTree::Tokens), 120 => Ok(RootTree::Versions), 112 => Ok(RootTree::Votes), _ => Err(Error::Drive(DriveError::NotSupported( @@ -207,10 +217,11 @@ impl From for &'static [u8; 1] { RootTree::Misc => &[104], RootTree::WithdrawalTransactions => &[80], RootTree::Balances => &[96], - RootTree::TokenBalances => &[16], + RootTree::Tokens => &[16], RootTree::NonUniquePublicKeyKeyHashesToIdentities => &[8], RootTree::Versions => &[120], RootTree::Votes => &[112], + RootTree::GroupActions => &[88], } } } diff --git a/packages/rs-drive/src/drive/prefunded_specialized_balances/add_prefunded_specialized_balance_operations/v1/mod.rs b/packages/rs-drive/src/drive/prefunded_specialized_balances/add_prefunded_specialized_balance_operations/v1/mod.rs index 6a46264949..e691b12efe 100644 --- a/packages/rs-drive/src/drive/prefunded_specialized_balances/add_prefunded_specialized_balance_operations/v1/mod.rs +++ b/packages/rs-drive/src/drive/prefunded_specialized_balances/add_prefunded_specialized_balance_operations/v1/mod.rs @@ -15,7 +15,7 @@ use dpp::balances::credits::MAX_CREDITS; use dpp::identifier::Identifier; use dpp::version::PlatformVersion; use grovedb::batch::{KeyInfoPath, QualifiedGroveDbOp}; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; impl Drive { @@ -43,7 +43,7 @@ impl Drive { DirectQueryType::StatefulDirectQuery } else { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: true, + in_tree_type: TreeType::SumTree, query_target: QueryTargetValue(8), } }; diff --git a/packages/rs-drive/src/drive/prefunded_specialized_balances/deduct_from_prefunded_specialized_balance_operations/v1/mod.rs b/packages/rs-drive/src/drive/prefunded_specialized_balances/deduct_from_prefunded_specialized_balance_operations/v1/mod.rs index 4bf03c848f..e059985c0f 100644 --- a/packages/rs-drive/src/drive/prefunded_specialized_balances/deduct_from_prefunded_specialized_balance_operations/v1/mod.rs +++ b/packages/rs-drive/src/drive/prefunded_specialized_balances/deduct_from_prefunded_specialized_balance_operations/v1/mod.rs @@ -13,7 +13,7 @@ use crate::util::grove_operations::QueryTarget::QueryTargetValue; use dpp::identifier::Identifier; use dpp::version::PlatformVersion; use grovedb::batch::{KeyInfoPath, QualifiedGroveDbOp}; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; impl Drive { @@ -41,7 +41,7 @@ impl Drive { DirectQueryType::StatefulDirectQuery } else { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: true, + in_tree_type: TreeType::SumTree, query_target: QueryTargetValue(8), } }; diff --git a/packages/rs-drive/src/drive/prefunded_specialized_balances/empty_prefunded_specialized_balance_operations/v0/mod.rs b/packages/rs-drive/src/drive/prefunded_specialized_balances/empty_prefunded_specialized_balance_operations/v0/mod.rs index c7f6b2049d..d0959b4071 100644 --- a/packages/rs-drive/src/drive/prefunded_specialized_balances/empty_prefunded_specialized_balance_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/prefunded_specialized_balances/empty_prefunded_specialized_balance_operations/v0/mod.rs @@ -14,7 +14,7 @@ use dpp::fee::Credits; use dpp::identifier::Identifier; use dpp::version::PlatformVersion; use grovedb::batch::{KeyInfoPath, QualifiedGroveDbOp}; -use grovedb::{EstimatedLayerInformation, TransactionArg}; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; use std::collections::HashMap; impl Drive { @@ -41,7 +41,7 @@ impl Drive { DirectQueryType::StatefulDirectQuery } else { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: true, + in_tree_type: TreeType::SumTree, query_target: QueryTargetValue(8), } }; diff --git a/packages/rs-drive/src/drive/prefunded_specialized_balances/estimation_costs/for_prefunded_specialized_balance_update/v0/mod.rs b/packages/rs-drive/src/drive/prefunded_specialized_balances/estimation_costs/for_prefunded_specialized_balance_update/v0/mod.rs index 3400c9e6a4..5e7925cf1d 100644 --- a/packages/rs-drive/src/drive/prefunded_specialized_balances/estimation_costs/for_prefunded_specialized_balance_update/v0/mod.rs +++ b/packages/rs-drive/src/drive/prefunded_specialized_balances/estimation_costs/for_prefunded_specialized_balance_update/v0/mod.rs @@ -2,8 +2,8 @@ use crate::drive::Drive; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{EstimatedLevel, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::constants::AVERAGE_BALANCE_SIZE; use crate::drive::prefunded_specialized_balances::{ @@ -28,13 +28,16 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path([]), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, // We are on the 3rd level estimated_layer_count: EstimatedLevel(3, false), estimated_layer_sizes: AllSubtrees( 1, SomeSumTrees { sum_trees_weight: 1, + big_sum_trees_weight: 0, + count_trees_weight: 0, + count_sum_trees_weight: 0, non_sum_trees_weight: 1, }, None, @@ -45,7 +48,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(prefunded_specialized_balances_path()), EstimatedLayerInformation { - is_sum_tree: true, + tree_type: TreeType::SumTree, estimated_layer_count: EstimatedLevel(0, false), estimated_layer_sizes: AllSubtrees(1, AllSumTrees, None), }, @@ -54,7 +57,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(prefunded_specialized_balances_for_voting_path_vec()), EstimatedLayerInformation { - is_sum_tree: true, + tree_type: TreeType::SumTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllItems(DEFAULT_HASH_SIZE_U8, AVERAGE_BALANCE_SIZE, None), }, diff --git a/packages/rs-drive/src/drive/prefunded_specialized_balances/fetch/single_balance/v0/mod.rs b/packages/rs-drive/src/drive/prefunded_specialized_balances/fetch/single_balance/v0/mod.rs index 54c2fd9690..134a05f582 100644 --- a/packages/rs-drive/src/drive/prefunded_specialized_balances/fetch/single_balance/v0/mod.rs +++ b/packages/rs-drive/src/drive/prefunded_specialized_balances/fetch/single_balance/v0/mod.rs @@ -11,7 +11,7 @@ use dpp::fee::Credits; use crate::drive::prefunded_specialized_balances::prefunded_specialized_balances_for_voting_path; use dpp::version::PlatformVersion; use grovedb::Element::SumItem; -use grovedb::TransactionArg; +use grovedb::{TransactionArg, TreeType}; impl Drive { /// Fetches the Prefunded specialized balance from the backing store @@ -76,7 +76,7 @@ impl Drive { } else { // 8 is the size of a i64 used in sum trees DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: true, + in_tree_type: TreeType::SumTree, query_target: QueryTargetValue(8), } }; diff --git a/packages/rs-drive/src/drive/protocol_upgrade/remove_validators_proposed_app_versions/v0/mod.rs b/packages/rs-drive/src/drive/protocol_upgrade/remove_validators_proposed_app_versions/v0/mod.rs index 6db3de7a09..871e5d7bce 100644 --- a/packages/rs-drive/src/drive/protocol_upgrade/remove_validators_proposed_app_versions/v0/mod.rs +++ b/packages/rs-drive/src/drive/protocol_upgrade/remove_validators_proposed_app_versions/v0/mod.rs @@ -14,7 +14,7 @@ use crate::util::batch::grovedb_op_batch::GroveDbOpBatchV0Methods; use dpp::util::deserializer::ProtocolVersion; use dpp::version::drive_versions::DriveVersion; -use grovedb::{Element, TransactionArg}; +use grovedb::{Element, MaybeTree, TransactionArg}; use integer_encoding::VarInt; impl Drive { @@ -121,7 +121,7 @@ impl Drive { (&path).into(), validator_pro_tx_hash.as_slice(), StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, drive_operations, diff --git a/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_contested_document_tree_levels_up_to_contract/v0/mod.rs b/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_contested_document_tree_levels_up_to_contract/v0/mod.rs index 2257bfae60..32d25eae45 100644 --- a/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_contested_document_tree_levels_up_to_contract/v0/mod.rs +++ b/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_contested_document_tree_levels_up_to_contract/v0/mod.rs @@ -6,8 +6,8 @@ use crate::drive::Drive; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, EstimatedLevel, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::AllSubtrees; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::votes::paths::{ vote_contested_resource_active_polls_contract_document_tree_path, @@ -58,13 +58,16 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path([]), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(2, false), //voting is on level 2 // We have balances in the middle which is a sum tree estimated_layer_sizes: AllSubtrees( 1, SomeSumTrees { sum_trees_weight: 1, + big_sum_trees_weight: 0, + count_trees_weight: 0, + count_sum_trees_weight: 0, non_sum_trees_weight: 2, }, None, @@ -76,7 +79,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(vote_root_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, // contested resource tree is a key of "c" so it should be on the top layer of the merk estimated_layer_count: EstimatedLevel(0, false), estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), @@ -87,7 +90,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(vote_contested_resource_tree_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, // active poll "p", with "e" and "i" first so it should be on the second layer of the merk estimated_layer_count: EstimatedLevel(1, false), estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), @@ -98,7 +101,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(vote_contested_resource_active_polls_tree_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), }, @@ -111,7 +114,7 @@ impl Drive { contract.id_ref().as_bytes(), )), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(document_type_count), estimated_layer_sizes: AllSubtrees( ESTIMATED_AVERAGE_DOCUMENT_TYPE_NAME_SIZE, @@ -130,7 +133,7 @@ impl Drive { ), ), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(2), estimated_layer_sizes: AllSubtrees( ESTIMATED_AVERAGE_INDEX_NAME_SIZE, @@ -148,7 +151,7 @@ impl Drive { ), ), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(1024), //Just a guess estimated_layer_sizes: AllSubtrees( ESTIMATED_AVERAGE_INDEX_NAME_SIZE, diff --git a/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded/v0/mod.rs b/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded/v0/mod.rs index 83f8c8dbc5..aff3c4d5fc 100644 --- a/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded/v0/mod.rs +++ b/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded/v0/mod.rs @@ -4,8 +4,8 @@ use crate::drive::Drive; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, EstimatedLevel, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::AllSubtrees; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::votes::paths::{ vote_contested_resource_active_polls_contract_tree_path, @@ -49,13 +49,16 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path([]), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(2, false), //voting is on level 2 // We have balances in the middle which is a sum tree estimated_layer_sizes: AllSubtrees( 1, SomeSumTrees { sum_trees_weight: 1, + big_sum_trees_weight: 0, + count_trees_weight: 0, + count_sum_trees_weight: 0, non_sum_trees_weight: 2, }, None, @@ -67,7 +70,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(vote_root_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, // contested resource tree is a key of "c" so it should be on the top layer of the merk estimated_layer_count: EstimatedLevel(0, false), estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), @@ -78,7 +81,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(vote_contested_resource_tree_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, // active poll "p", with "e" and "i" first so it should be on the second layer of the merk estimated_layer_count: EstimatedLevel(1, false), estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), @@ -89,7 +92,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(vote_contested_resource_active_polls_tree_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), }, @@ -102,7 +105,7 @@ impl Drive { contract.id_ref().as_bytes(), )), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(document_type_count), estimated_layer_sizes: AllSubtrees( ESTIMATED_AVERAGE_DOCUMENT_TYPE_NAME_SIZE, diff --git a/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_levels_up_to_contract/v0/mod.rs b/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_levels_up_to_contract/v0/mod.rs index 8bae767c7b..0e6e463037 100644 --- a/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_levels_up_to_contract/v0/mod.rs +++ b/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_levels_up_to_contract/v0/mod.rs @@ -5,8 +5,8 @@ use crate::util::storage_flags::StorageFlags; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{EstimatedLevel, PotentiallyAtMaxElements}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::AllSubtrees; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::contract::paths::all_contracts_global_root_path; @@ -43,7 +43,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path([]), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(0, false), estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), }, @@ -53,7 +53,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(all_contracts_global_root_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: PotentiallyAtMaxElements, estimated_layer_sizes: AllSubtrees( DEFAULT_HASH_SIZE_U8, diff --git a/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_levels_up_to_contract_document_type_excluded/v0/mod.rs b/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_levels_up_to_contract_document_type_excluded/v0/mod.rs index e9376cc385..443349d04a 100644 --- a/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_levels_up_to_contract_document_type_excluded/v0/mod.rs +++ b/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_levels_up_to_contract_document_type_excluded/v0/mod.rs @@ -6,8 +6,8 @@ use crate::util::storage_flags::StorageFlags; use dpp::data_contract::DataContract; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, EstimatedLevel}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::AllSubtrees; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::contract::paths::contract_root_path; use crate::error::Error; @@ -62,7 +62,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(contract_root_path(contract.id_ref().as_bytes())), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(1, false), estimated_layer_sizes: AllSubtrees(1, NoSumTrees, storage_flags), }, @@ -71,7 +71,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(contract_documents_path(contract.id_ref().as_bytes())), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(document_type_count), estimated_layer_sizes: AllSubtrees( ESTIMATED_AVERAGE_DOCUMENT_TYPE_NAME_SIZE, diff --git a/packages/rs-drive/src/drive/system/estimation_costs/for_total_system_credits_update/v0/mod.rs b/packages/rs-drive/src/drive/system/estimation_costs/for_total_system_credits_update/v0/mod.rs index 2d8a9d33bc..40f013d010 100644 --- a/packages/rs-drive/src/drive/system/estimation_costs/for_total_system_credits_update/v0/mod.rs +++ b/packages/rs-drive/src/drive/system/estimation_costs/for_total_system_credits_update/v0/mod.rs @@ -2,8 +2,8 @@ use crate::drive::Drive; use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::{ApproximateElements, EstimatedLevel}; -use grovedb::EstimatedLayerInformation; use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; use crate::drive::system::misc_path_vec; @@ -33,12 +33,15 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path([]), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: EstimatedLevel(3, false), estimated_layer_sizes: AllSubtrees( 12, // about 32 + 1 + 1 / 3 SomeSumTrees { sum_trees_weight: 1, + big_sum_trees_weight: 0, + count_trees_weight: 0, + count_sum_trees_weight: 0, non_sum_trees_weight: 2, }, None, @@ -50,7 +53,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_owned_path(misc_path_vec()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, estimated_layer_count: ApproximateElements(1), estimated_layer_sizes: AllItems(1, 8, None), }, diff --git a/packages/rs-drive/src/drive/system/genesis_time/mod.rs b/packages/rs-drive/src/drive/system/genesis_time/mod.rs index 9eee51529b..93addd701d 100644 --- a/packages/rs-drive/src/drive/system/genesis_time/mod.rs +++ b/packages/rs-drive/src/drive/system/genesis_time/mod.rs @@ -64,7 +64,7 @@ mod tests { #[test] fn should_return_none_if_cache_is_empty_and_start_time_is_not_persisted() { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let result = drive .get_genesis_time(None) @@ -75,7 +75,7 @@ mod tests { #[test] fn should_return_some_if_cache_is_set() { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let mut genesis_time_ms_cache = drive.cache.genesis_time_ms.write(); @@ -141,7 +141,7 @@ mod tests { #[test] fn should_set_genesis_time_to_cache() { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let genesis_time_ms: u64 = 100; diff --git a/packages/rs-drive/src/drive/tokens/add_transaction_history_operations/mod.rs b/packages/rs-drive/src/drive/tokens/add_transaction_history_operations/mod.rs new file mode 100644 index 0000000000..53acbd6185 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/add_transaction_history_operations/mod.rs @@ -0,0 +1,55 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::prelude::IdentityNonce; +use dpp::tokens::token_event::TokenEvent; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use platform_version::version::PlatformVersion; +use std::collections::HashMap; + +mod v0; + +impl Drive { + /// Adds token transaction history + pub fn add_token_transaction_history_operations( + &self, + token_id: Identifier, + owner_id: Identifier, + owner_nonce: IdentityNonce, + event: TokenEvent, + block_info: &BlockInfo, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .update + .add_transaction_history_operations + { + 0 => self.add_token_transaction_history_operations_v0( + token_id, + owner_id, + owner_nonce, + event, + block_info, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_token_transaction_history_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/add_transaction_history_operations/v0/mod.rs b/packages/rs-drive/src/drive/tokens/add_transaction_history_operations/v0/mod.rs new file mode 100644 index 0000000000..4f7a8e24c6 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/add_transaction_history_operations/v0/mod.rs @@ -0,0 +1,61 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::object_size_info::DocumentInfo::DocumentOwnedInfo; +use crate::util::object_size_info::{DocumentAndContractInfo, OwnedDocumentInfo}; +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::prelude::IdentityNonce; +use dpp::tokens::token_event::TokenEvent; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use platform_version::version::PlatformVersion; +use std::collections::HashMap; + +impl Drive { + /// Adds token transaction history + pub(super) fn add_token_transaction_history_operations_v0( + &self, + token_id: Identifier, + owner_id: Identifier, + owner_nonce: IdentityNonce, + event: TokenEvent, + block_info: &BlockInfo, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let contract = self.cache.system_data_contracts.load_token_history(); + + let document_type = event.associated_document_type(&contract)?; + + let document = event.build_historical_document_owned( + &contract, + token_id, + owner_id, + owner_nonce, + block_info, + )?; + + let operations = self.add_document_for_contract_operations( + DocumentAndContractInfo { + owned_document_info: OwnedDocumentInfo { + document_info: DocumentOwnedInfo((document, None)), + owner_id: Some(owner_id.to_buffer()), + }, + contract: &contract, + document_type, + }, + true, + block_info, + &mut None, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + Ok(operations) + } +} diff --git a/packages/rs-drive/src/drive/tokens/apply_status/mod.rs b/packages/rs-drive/src/drive/tokens/apply_status/mod.rs new file mode 100644 index 0000000000..f6c88f0b68 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/apply_status/mod.rs @@ -0,0 +1,93 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::tokens::status::TokenStatus; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Sets a token status + pub fn token_apply_status( + &self, + token_id: [u8; 32], + status: TokenStatus, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version.drive.methods.token.update.apply_status { + 0 => self.token_apply_status_v0( + token_id, + status, + block_info, + apply, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_apply_status".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds the operations to apply_status tokens without calculating fees and optionally applying. + pub fn token_apply_status_add_to_operations( + &self, + token_id: [u8; 32], + status: TokenStatus, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version.drive.methods.token.update.apply_status { + 0 => self.token_apply_status_add_to_operations_v0( + token_id, + status, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_apply_status_add_to_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Gathers the operations needed to apply_status tokens. + pub fn token_apply_status_operations( + &self, + token_id: [u8; 32], + status: TokenStatus, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.token.update.apply_status { + 0 => self.token_apply_status_operations_v0( + token_id, + status, + estimated_costs_only_with_layer_info, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_apply_status_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/apply_status/v0/mod.rs b/packages/rs-drive/src/drive/tokens/apply_status/v0/mod.rs new file mode 100644 index 0000000000..3fe3526aa8 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/apply_status/v0/mod.rs @@ -0,0 +1,107 @@ +use crate::drive::tokens::paths::token_statuses_root_path; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::object_size_info::PathKeyElementInfo; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::serialization::PlatformSerializable; +use dpp::tokens::status::TokenStatus; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, Element, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + pub(super) fn token_apply_status_v0( + &self, + token_id: [u8; 32], + status: TokenStatus, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let mut drive_operations = vec![]; + + self.token_apply_status_add_to_operations_v0( + token_id, + status, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok(fees) + } + + pub(super) fn token_apply_status_add_to_operations_v0( + &self, + token_id: [u8; 32], + status: TokenStatus, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = + if apply { None } else { Some(HashMap::new()) }; + + let batch_operations = self.token_apply_status_operations_v0( + token_id, + status, + &mut estimated_costs_only_with_layer_info, + platform_version, + )?; + + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + pub(super) fn token_apply_status_operations_v0( + &self, + token_id: [u8; 32], + status: TokenStatus, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut drive_operations = vec![]; + + let token_status_bytes = status.serialize_consume_to_bytes()?; + + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info { + Self::add_estimation_costs_for_token_status_infos( + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + + self.batch_insert( + PathKeyElementInfo::PathFixedSizeKeyRefElement::<2>(( + token_statuses_root_path(), + token_id.as_slice(), + Element::Item(token_status_bytes, None), + )), + &mut drive_operations, + &platform_version.drive, + )?; + + Ok(drive_operations) + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/add_to_previous_token_balance/mod.rs b/packages/rs-drive/src/drive/tokens/balance/add_to_previous_token_balance/mod.rs new file mode 100644 index 0000000000..ba521297a2 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/add_to_previous_token_balance/mod.rs @@ -0,0 +1,119 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::fee::Credits; + +use dpp::balances::credits::TokenAmount; +use dpp::fee::default_costs::CachedEpochIndexFeeVersions; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// The operations for adding a certain amount of credits to an identity's balance. This function is version controlled. + /// + /// # Arguments + /// + /// * `token_id` - The ID of the Token. + /// * `identity_id` - The ID of the Identity to which credits are to be added. + /// * `balance_to_add` - The amount of credits to be added to the identity's balance. + /// * `block_info` - Information about the current block. + /// * `apply` - A boolean indicating whether the operation should be applied or not. + /// * `transaction` - The transaction information related to the operation. + /// * `platform_version` - The platform version. + /// * `previous_fee_versions` - Cached fee versions, if any. + /// + /// # Returns + /// + /// * `Result` - The resulting fee result if successful, or an error. + pub fn add_to_identity_token_balance( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + balance_to_add: Credits, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + previous_fee_versions: Option<&CachedEpochIndexFeeVersions>, + ) -> Result { + match platform_version + .drive + .methods + .token + .update + .add_to_identity_token_balance + { + 0 => self.add_to_identity_token_balance_v0( + token_id, + identity_id, + balance_to_add, + block_info, + apply, + transaction, + platform_version, + previous_fee_versions, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_to_identity_token_balance".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds a specified amount of credits to an identity balance. This function checks for overflows and ensures the balance does not exceed `MAX_CREDITS`. + /// Balances are stored under the identity's ID in the token balance tree. + /// + /// # Arguments + /// + /// * `token_id` - The ID of the Token. + /// * `identity_id` - The ID of the Identity to which credits are to be added. + /// * `balance_to_add` - The amount of credits to be added to the identity's balance. + /// * `estimated_costs_only_with_layer_info` - Estimated costs with layer information, if any. + /// * `transaction` - The transaction information related to the operation. + /// * `platform_version` - The platform version. + /// + /// # Returns + /// + /// * `Result, Error>` - The resulting low level drive operations if successful, or an error. + pub(crate) fn add_to_identity_token_balance_operations( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + balance_to_add: TokenAmount, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .update + .add_to_identity_token_balance + { + 0 => self.add_to_identity_token_balance_operations_v0( + token_id, + identity_id, + balance_to_add, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_to_identity_token_balance_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/add_to_previous_token_balance/v0/mod.rs b/packages/rs-drive/src/drive/tokens/balance/add_to_previous_token_balance/v0/mod.rs new file mode 100644 index 0000000000..87fd0c9c37 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/add_to_previous_token_balance/v0/mod.rs @@ -0,0 +1,141 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::balances::credits::TokenAmount; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::fee::Credits; + +use crate::drive::tokens::paths::token_balances_path_vec; +use dpp::fee::default_costs::CachedEpochIndexFeeVersions; +use dpp::version::PlatformVersion; +use dpp::ProtocolError; +use grovedb::batch::KeyInfoPath; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Adds specified amount of credits to identity balance + /// This function checks for overflows and does not exceed MAX_CREDITS + /// + /// Balances are stored in the balance tree under the identity's id + pub(in crate::drive::tokens) fn add_to_identity_token_balance_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + balance_to_add: Credits, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + previous_fee_versions: Option<&CachedEpochIndexFeeVersions>, + ) -> Result { + let mut estimated_costs_only_with_layer_info = if apply { + None::> + } else { + Some(HashMap::new()) + }; + + let batch_operations = self.add_to_identity_token_balance_operations_v0( + token_id, + identity_id, + balance_to_add, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + let mut drive_operations: Vec = vec![]; + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + &mut drive_operations, + &platform_version.drive, + )?; + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + previous_fee_versions, + )?; + Ok(fees) + } + + /// Adds specified amount of credits to identity balance + /// This function checks for overflows and does not exceed MAX_CREDITS + /// + /// Balances are stored in the identity under key 0 + /// This gets operations based on apply flag (stateful vs stateless) + pub(in crate::drive::tokens) fn add_to_identity_token_balance_operations_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + balance_to_add: TokenAmount, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut drive_operations = vec![]; + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info { + Self::add_estimation_costs_for_token_balances( + token_id, + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + + let apply = estimated_costs_only_with_layer_info.is_none(); + + let previous_balance = if apply { + self.fetch_identity_token_balance_operations( + token_id, + identity_id, + apply, + transaction, + &mut drive_operations, + platform_version, + )? + } else { + None // worse case is that we insert + }; + + let balance_path = token_balances_path_vec(token_id); + + if let Some(previous_balance) = previous_balance { + // Check for overflow + let new_balance = (previous_balance as i64) + .checked_add(balance_to_add as i64) + .ok_or(ProtocolError::CriticalCorruptedCreditsCodeExecution( + "Overflow of total token balance".to_string(), + ))?; + + drive_operations.push(LowLevelDriveOperation::replace_for_known_path_key_element( + balance_path, + identity_id.to_vec(), + Element::new_sum_item(new_balance), + )); + } else { + if balance_to_add > i64::MAX as u64 { + return Err( + ProtocolError::CriticalCorruptedCreditsCodeExecution(format!( + "Token balance to add over i64 max, is {}", + balance_to_add + )) + .into(), + ); + } + drive_operations.push(LowLevelDriveOperation::insert_for_known_path_key_element( + balance_path, + identity_id.to_vec(), + Element::new_sum_item(balance_to_add as i64), + )); + } + + Ok(drive_operations) + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/fetch_identities_token_balances/mod.rs b/packages/rs-drive/src/drive/tokens/balance/fetch_identities_token_balances/mod.rs new file mode 100644 index 0000000000..9e45812091 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/fetch_identities_token_balances/mod.rs @@ -0,0 +1,152 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::balances::credits::TokenAmount; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::Identifier; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; +use std::collections::BTreeMap; + +impl Drive { + /// Fetches the token balances of an identity from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs whose balances are to be fetched. + /// * `identity_id` - The ID of the identity whose token balances are being queried. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The version of the platform to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result>, Error>` - A map of token IDs to their corresponding balances, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_identities_token_balances( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .token + .fetch + .identities_token_balances + { + 0 => self.fetch_identities_token_balances_v0( + token_id, + identity_ids, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_identity_token_balances".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the identity's token balances with associated costs. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to fetch the balances for. + /// * `identity_id` - The identity's ID whose balances are being queried. + /// * `block_info` - Information about the current block for fee calculation. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result<((BTreeMap<[u8; 32], Option>), FeeResult), Error>` - A tuple containing a map of token balances and the associated fee result. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_identities_token_balances_with_costs( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(BTreeMap>, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.fetch_identities_token_balances_operations( + token_id, + identity_ids, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the low-level operations needed to fetch the identity's token balances from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to query the balances for. + /// * `identity_id` - The ID of the identity whose token balances are being queried. + /// * `transaction` - The current transaction context. + /// * `drive_operations` - A vector to store the created low-level drive operations. + /// * `platform_version` - The platform version to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result>, Error>` - A map of token IDs to their corresponding balances, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_identities_token_balances_operations( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .token + .fetch + .identities_token_balances + { + 0 => self.fetch_identities_token_balances_operations_v0( + token_id, + identity_ids, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_identities_token_balances_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/fetch_identities_token_balances/v0/mod.rs b/packages/rs-drive/src/drive/tokens/balance/fetch_identities_token_balances/v0/mod.rs new file mode 100644 index 0000000000..b9dddc6e8c --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/fetch_identities_token_balances/v0/mod.rs @@ -0,0 +1,63 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::balances::credits::TokenAmount; +use dpp::identifier::Identifier; +use dpp::version::PlatformVersion; +use grovedb::Element::SumItem; +use grovedb::TransactionArg; +use std::collections::BTreeMap; + +impl Drive { + pub(super) fn fetch_identities_token_balances_v0( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + self.fetch_identities_token_balances_operations_v0( + token_id, + identity_ids, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn fetch_identities_token_balances_operations_v0( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + let path_query = Self::token_balances_for_identity_ids_query(token_id, identity_ids); + + self.grove_get_raw_path_query_with_optional( + &path_query, + false, + transaction, + drive_operations, + &platform_version.drive, + )? + .into_iter() + .map(|(_, key, element)| { + let identity_id: Identifier = key.try_into().map_err(|_| { + Error::Drive(DriveError::CorruptedDriveState( + "identity id not 32 bytes".to_string(), + )) + })?; + match element { + Some(SumItem(value, ..)) => Ok((identity_id, Some(value as TokenAmount))), + None => Ok((identity_id, None)), + _ => Err(Error::Drive(DriveError::CorruptedDriveState( + "token tree for balances should contain only sum items".to_string(), + ))), + } + }) + .collect() + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balance/mod.rs b/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balance/mod.rs new file mode 100644 index 0000000000..8b563ae97b --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balance/mod.rs @@ -0,0 +1,135 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::balances::credits::TokenAmount; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::fee::Credits; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + /// Fetches the Identity's token balance from the backing store. + /// Passing `apply = false` will return estimated costs (0 or Some(0) in place of actual values). + /// + /// # Arguments + /// + /// * `token_id` - The ID of the token. + /// * `identity_id` - The ID of the Identity whose token balance is to be fetched. + /// * `apply` - Whether to actually fetch from state (true) or estimate costs (false). + /// * `transaction` - The current transaction. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result, Error>` - The token balance of the Identity if successful, or an error. + pub fn fetch_identity_token_balance( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .fetch + .identity_token_balance + { + 0 => self.fetch_identity_token_balance_v0( + token_id, + identity_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_identity_token_balance".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the Identity's token balance with costs (if `apply = true`) and returns associated fee result. + pub fn fetch_identity_token_balance_with_costs( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(Option, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.fetch_identity_token_balance_operations( + token_id, + identity_id, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the operations to get Identity's token balance from the backing store. + /// If `apply` is false, the operations are stateless and only used for cost estimation. + /// + /// # Arguments + /// + /// * `token_id` - The ID of the token. + /// * `identity_id` - The ID of the Identity whose token balance is to be fetched. + /// * `apply` - Whether to fetch actual stateful data (true) or just estimate costs (false). + /// * `transaction` - The current transaction. + /// * `drive_operations` - The drive operations vector to populate. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result, Error>` - The token balance of the Identity if successful, or an error. + pub fn fetch_identity_token_balance_operations( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .fetch + .identity_token_balance + { + 0 => self.fetch_identity_token_balance_operations_v0( + token_id, + identity_id, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_identity_token_balance_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balance/v0/mod.rs b/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balance/v0/mod.rs new file mode 100644 index 0000000000..3a85fb330a --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balance/v0/mod.rs @@ -0,0 +1,83 @@ +use crate::drive::tokens::paths::token_balances_path; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use crate::util::grove_operations::QueryTarget::QueryTargetValue; +use dpp::balances::credits::TokenAmount; +use dpp::version::PlatformVersion; +use grovedb::Element::SumItem; +use grovedb::{TransactionArg, TreeType}; + +impl Drive { + pub(super) fn fetch_identity_token_balance_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.fetch_identity_token_balance_operations_v0( + token_id, + identity_id, + true, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn fetch_identity_token_balance_operations_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let direct_query_type = if apply { + DirectQueryType::StatefulDirectQuery + } else { + // 8 is the size of an i64 used in sum trees + DirectQueryType::StatelessDirectQuery { + in_tree_type: TreeType::SumTree, + query_target: QueryTargetValue(8), + } + }; + + let balance_path = token_balances_path(&token_id); + + match self.grove_get_raw_optional( + (&balance_path).into(), + identity_id.as_slice(), + direct_query_type, + transaction, + drive_operations, + &platform_version.drive, + ) { + Ok(Some(SumItem(balance, _))) if balance >= 0 => Ok(Some(balance as TokenAmount)), + + Ok(None) | Err(Error::GroveDB(grovedb::Error::PathKeyNotFound(_))) => { + // If we are applying (stateful), no balance means None. + // If we are estimating (stateless), return Some(0) to indicate no cost or minimal cost scenario. + if apply { + Ok(None) + } else { + Ok(Some(0)) + } + } + + Ok(Some(SumItem(..))) => Err(Error::Drive(DriveError::CorruptedElementType( + "identity token balance was present but was negative", + ))), + + Ok(Some(_)) => Err(Error::Drive(DriveError::CorruptedElementType( + "identity token balance was present but was not a sum item", + ))), + + Err(e) => Err(e), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balances/mod.rs b/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balances/mod.rs new file mode 100644 index 0000000000..fbe2b3aa43 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balances/mod.rs @@ -0,0 +1,151 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::balances::credits::TokenAmount; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; +use std::collections::BTreeMap; + +impl Drive { + /// Fetches the token balances of an identity from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs whose balances are to be fetched. + /// * `identity_id` - The ID of the identity whose token balances are being queried. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The version of the platform to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result>, Error>` - A map of token IDs to their corresponding balances, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_identity_token_balances( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .token + .fetch + .identity_token_balances + { + 0 => self.fetch_identity_token_balances_v0( + token_ids, + identity_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_identity_token_balances".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the identity's token balances with associated costs. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to fetch the balances for. + /// * `identity_id` - The identity's ID whose balances are being queried. + /// * `block_info` - Information about the current block for fee calculation. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result<((BTreeMap<[u8; 32], Option>), FeeResult), Error>` - A tuple containing a map of token balances and the associated fee result. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_identity_token_balances_with_costs( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(BTreeMap<[u8; 32], Option>, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.fetch_identity_token_balances_operations( + token_ids, + identity_id, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the low-level operations needed to fetch the identity's token balances from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to query the balances for. + /// * `identity_id` - The ID of the identity whose token balances are being queried. + /// * `transaction` - The current transaction context. + /// * `drive_operations` - A vector to store the created low-level drive operations. + /// * `platform_version` - The platform version to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result>, Error>` - A map of token IDs to their corresponding balances, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_identity_token_balances_operations( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .token + .fetch + .identity_token_balances + { + 0 => self.fetch_identity_token_balances_operations_v0( + token_ids, + identity_id, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_identity_token_balances_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balances/v0/mod.rs b/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balances/v0/mod.rs new file mode 100644 index 0000000000..8084608b81 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balances/v0/mod.rs @@ -0,0 +1,83 @@ +use crate::drive::tokens::paths::{tokens_root_path_vec, TOKEN_BALANCES_KEY}; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::balances::credits::TokenAmount; +use dpp::version::PlatformVersion; +use grovedb::Element::SumItem; +use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; +use std::collections::BTreeMap; + +impl Drive { + pub(super) fn fetch_identity_token_balances_v0( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + self.fetch_identity_token_balances_operations_v0( + token_ids, + identity_id, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn fetch_identity_token_balances_operations_v0( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + let tokens_root = tokens_root_path_vec(); + + let mut query = Query::new(); + + for token_id in token_ids { + query.insert_key(token_id.to_vec()); + } + + query.set_subquery_path(vec![vec![TOKEN_BALANCES_KEY], identity_id.to_vec()]); + + let path_query = PathQuery::new( + tokens_root, + SizedQuery::new(query, Some(token_ids.len() as u16), None), + ); + + self.grove_get_raw_path_query_with_optional( + &path_query, + false, + transaction, + drive_operations, + &platform_version.drive, + )? + .into_iter() + .map(|(path, _, element)| { + let token_id: [u8; 32] = path + .get(1) + .ok_or(Error::Drive(DriveError::CorruptedDriveState( + "returned path item should always have a second part at index 1".to_string(), + )))? + .clone() + .try_into() + .map_err(|_| { + Error::Drive(DriveError::CorruptedDriveState( + "token id not 32 bytes".to_string(), + )) + })?; + match element { + Some(SumItem(value, ..)) => Ok((token_id, Some(value as TokenAmount))), + None => Ok((token_id, None)), + _ => Err(Error::Drive(DriveError::CorruptedDriveState( + "token tree for balances should contain only sum items".to_string(), + ))), + } + }) + .collect() + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/mod.rs b/packages/rs-drive/src/drive/tokens/balance/mod.rs new file mode 100644 index 0000000000..33d22088c3 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/mod.rs @@ -0,0 +1,17 @@ +#[cfg(feature = "server")] +mod add_to_previous_token_balance; +#[cfg(feature = "server")] +mod fetch_identities_token_balances; +#[cfg(feature = "server")] +mod fetch_identity_token_balance; +#[cfg(feature = "server")] +mod fetch_identity_token_balances; +#[cfg(feature = "server")] +mod prove_identities_token_balances; +#[cfg(feature = "server")] +mod prove_identity_token_balances; +mod queries; +#[cfg(feature = "server")] +mod remove_from_identity_token_balance; +#[cfg(feature = "server")] +mod update; diff --git a/packages/rs-drive/src/drive/tokens/balance/prove_identities_token_balances/mod.rs b/packages/rs-drive/src/drive/tokens/balance/prove_identities_token_balances/mod.rs new file mode 100644 index 0000000000..4549f680a0 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/prove_identities_token_balances/mod.rs @@ -0,0 +1,149 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + /// Proves the token balances of an identity from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs whose balances are to be proveed. + /// * `identity_id` - The ID of the identity whose token balances are being queried. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The version of the platform to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_identities_token_balances( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .prove + .identities_token_balances + { + 0 => self.prove_identities_token_balances_v0( + token_id, + identity_ids, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_identity_token_balances".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Proves the identity's token balances with associated costs. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to prove the balances for. + /// * `identity_id` - The identity's ID whose balances are being queried. + /// * `block_info` - Information about the current block for fee calculation. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_identities_token_balances_with_costs( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(Vec, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.prove_identities_token_balances_operations( + token_id, + identity_ids, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the low-level operations needed to prove the identity's token balances from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to query the balances for. + /// * `identity_id` - The ID of the identity whose token balances are being queried. + /// * `transaction` - The current transaction context. + /// * `drive_operations` - A vector to store the created low-level drive operations. + /// * `platform_version` - The platform version to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_identities_token_balances_operations( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .prove + .identities_token_balances + { + 0 => self.prove_identities_token_balances_operations_v0( + token_id, + identity_ids, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_identities_token_balances_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/prove_identities_token_balances/v0/mod.rs b/packages/rs-drive/src/drive/tokens/balance/prove_identities_token_balances/v0/mod.rs new file mode 100644 index 0000000000..d25dc8fe16 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/prove_identities_token_balances/v0/mod.rs @@ -0,0 +1,359 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + pub(super) fn prove_identities_token_balances_v0( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.prove_identities_token_balances_operations_v0( + token_id, + identity_ids, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn prove_identities_token_balances_operations_v0( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let path_query = Self::token_balances_for_identity_ids_query(token_id, identity_ids); + + self.grove_get_proved_path_query( + &path_query, + transaction, + drive_operations, + &platform_version.drive, + ) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::balances::credits::TokenAmount; + use dpp::block::block_info::BlockInfo; + use dpp::data_contract::accessors::v1::DataContractV1Getters; + use dpp::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; + use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; + use dpp::data_contract::config::v0::DataContractConfigV0; + use dpp::data_contract::config::DataContractConfig; + use dpp::data_contract::v1::DataContractV1; + use dpp::identity::Identity; + use std::collections::BTreeMap; + + use dpp::identity::accessors::IdentityGettersV0; + use dpp::prelude::DataContract; + use dpp::version::PlatformVersion; + + #[test] + fn should_prove_a_single_identity_token_balance() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_id = identity.id().to_buffer(); + + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + let token_id = contract.token_id(0).expect("expected token at position 0"); + drive + .add_new_identity( + identity.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add an identity"); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + drive + .token_mint( + token_id.to_buffer(), + identity.id().to_buffer(), + 10000, + true, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to mint token"); + let proof = drive + .prove_identities_token_balances_v0( + token_id.to_buffer(), + &vec![identity.id().to_buffer()], + None, + platform_version, + ) + .expect("should not error when proving an identity"); + + let proved_identity_balance: BTreeMap<[u8; 32], Option> = + Drive::verify_token_balances_for_identity_ids( + proof.as_slice(), + token_id.to_buffer(), + &vec![identity.id().to_buffer()], + false, + platform_version, + ) + .expect("expect that this be verified") + .1; + + assert_eq!( + proved_identity_balance, + BTreeMap::from([(identity_id, Some(10000))]) + ); + } + + #[test] + fn should_prove_a_single_identity_token_balance_does_not_exist() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_id = identity.id().to_buffer(); + + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + let token_id = contract.token_id(0).expect("expected token at position 0"); + drive + .add_new_identity( + identity.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add an identity"); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + let proof = drive + .prove_identities_token_balances_v0( + token_id.to_buffer(), + &vec![identity.id().to_buffer()], + None, + platform_version, + ) + .expect("should not error when proving an identity"); + + let proved_identity_balance: BTreeMap<[u8; 32], Option> = + Drive::verify_token_balances_for_identity_ids( + proof.as_slice(), + token_id.to_buffer(), + &vec![identity.id().to_buffer()], + false, + platform_version, + ) + .expect("expect that this be verified") + .1; + + assert_eq!( + proved_identity_balance, + BTreeMap::from([(identity_id, None)]) + ); + } + + #[test] + fn should_prove_multiple_identity_single_token_balances_after_transfer() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity_1 = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_1_id = identity_1.id().to_buffer(); + + let identity_2 = Identity::random_identity(3, Some(15), platform_version) + .expect("expected a platform identity"); + + let identity_2_id = identity_2.id().to_buffer(); + + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + let token_id = contract.token_id(0).expect("expected token at position 0"); + drive + .add_new_identity( + identity_1.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add an identity"); + + drive + .add_new_identity( + identity_2.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add an identity"); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + drive + .token_mint( + token_id.to_buffer(), + identity_1.id().to_buffer(), + 100000, + true, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to mint token"); + + drive + .token_transfer( + token_id.to_buffer(), + identity_1.id().to_buffer(), + identity_2.id().to_buffer(), + 30000, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to transfer token"); + let proof = drive + .prove_identities_token_balances_v0( + token_id.to_buffer(), + &vec![identity_1.id().to_buffer(), identity_2.id().to_buffer()], + None, + platform_version, + ) + .expect("should not error when proving an identity"); + + let proved_identity_balance: BTreeMap<[u8; 32], Option> = + Drive::verify_token_balances_for_identity_ids( + proof.as_slice(), + token_id.to_buffer(), + &vec![identity_1.id().to_buffer(), identity_2.id().to_buffer()], + false, + platform_version, + ) + .expect("expect that this be verified") + .1; + + assert_eq!( + proved_identity_balance, + BTreeMap::from([(identity_1_id, Some(70000)), (identity_2_id, Some(30000))]) + ); + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/prove_identity_token_balances/mod.rs b/packages/rs-drive/src/drive/tokens/balance/prove_identity_token_balances/mod.rs new file mode 100644 index 0000000000..429bb59949 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/prove_identity_token_balances/mod.rs @@ -0,0 +1,149 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + /// Fetches the token balances of an identity from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs whose balances are to be proveed. + /// * `identity_id` - The ID of the identity whose token balances are being queried. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The version of the platform to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_identity_token_balances( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .prove + .identity_token_balances + { + 0 => self.prove_identity_token_balances_v0( + token_ids, + identity_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_identity_token_balances".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the identity's token balances with associated costs. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to prove the balances for. + /// * `identity_id` - The identity's ID whose balances are being queried. + /// * `block_info` - Information about the current block for fee calculation. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_identity_token_balances_with_costs( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(Vec, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.prove_identity_token_balances_operations( + token_ids, + identity_id, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the low-level operations needed to prove the identity's token balances from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to query the balances for. + /// * `identity_id` - The ID of the identity whose token balances are being queried. + /// * `transaction` - The current transaction context. + /// * `drive_operations` - A vector to store the created low-level drive operations. + /// * `platform_version` - The platform version to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_identity_token_balances_operations( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .prove + .identity_token_balances + { + 0 => self.prove_identity_token_balances_operations_v0( + token_ids, + identity_id, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_identity_token_balances_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/prove_identity_token_balances/v0/mod.rs b/packages/rs-drive/src/drive/tokens/balance/prove_identity_token_balances/v0/mod.rs new file mode 100644 index 0000000000..621e42c370 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/prove_identity_token_balances/v0/mod.rs @@ -0,0 +1,55 @@ +use crate::drive::tokens::paths::{tokens_root_path_vec, TOKEN_BALANCES_KEY}; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::version::PlatformVersion; +use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; + +impl Drive { + pub(super) fn prove_identity_token_balances_v0( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.prove_identity_token_balances_operations_v0( + token_ids, + identity_id, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn prove_identity_token_balances_operations_v0( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let tokens_root = tokens_root_path_vec(); + + let mut query = Query::new(); + + for token_id in token_ids { + query.insert_key(token_id.to_vec()); + } + + query.set_subquery_path(vec![vec![TOKEN_BALANCES_KEY], identity_id.to_vec()]); + + let path_query = PathQuery::new( + tokens_root, + SizedQuery::new(query, Some(token_ids.len() as u16), None), + ); + + self.grove_get_proved_path_query( + &path_query, + transaction, + drive_operations, + &platform_version.drive, + ) + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/queries.rs b/packages/rs-drive/src/drive/tokens/balance/queries.rs new file mode 100644 index 0000000000..d15202311a --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/queries.rs @@ -0,0 +1,72 @@ +use crate::drive::tokens::paths::token_balances_path_vec; +use crate::drive::Drive; +use crate::query::{Query, QueryItem}; +use grovedb::{PathQuery, SizedQuery}; +use std::ops::RangeFull; + +impl Drive { + /// The query for proving the identities balance of a token from an identity id. + pub fn token_balance_for_identity_id_query( + token_id: [u8; 32], + identity_id: [u8; 32], + ) -> PathQuery { + let balance_path = token_balances_path_vec(token_id); + PathQuery::new_single_key(balance_path, identity_id.to_vec()) + } + + /// The query getting a token balance for many identities + pub fn token_balances_for_identity_ids_query( + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + ) -> PathQuery { + let balance_path = token_balances_path_vec(token_id); + 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: Some(identity_ids.len() as u16), + offset: None, + }, + } + } + + /// The query getting token balances for identities in a range + pub fn token_balances_for_range_query( + token_id: [u8; 32], + start_at: Option<([u8; 32], bool)>, + ascending: bool, + limit: u16, + ) -> PathQuery { + let balance_path = token_balances_path_vec(token_id); + 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, + }, + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/remove_from_identity_token_balance/mod.rs b/packages/rs-drive/src/drive/tokens/balance/remove_from_identity_token_balance/mod.rs new file mode 100644 index 0000000000..c80eb72789 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/remove_from_identity_token_balance/mod.rs @@ -0,0 +1,117 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::fee::Credits; + +use dpp::fee::default_costs::CachedEpochIndexFeeVersions; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// The operations for removing a certain amount of credits from an identity's balance. This function is version controlled. + /// + /// # Arguments + /// + /// * `token_id` - The ID of the Token. + /// * `identity_id` - The ID of the Identity from whose balance credits are to be removed. + /// * `balance_to_remove` - The amount of credits to be removed from the identity's balance. + /// * `block_info` - Information about the current block. + /// * `apply` - A boolean indicating whether the operation should be applied or not. + /// * `transaction` - The transaction information related to the operation. + /// * `drive_version` - The drive version. + /// + /// # Returns + /// + /// * `Result` - The resulting fee result if successful, or an error. + pub fn remove_from_identity_token_balance( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + balance_to_remove: Credits, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + previous_fee_versions: Option<&CachedEpochIndexFeeVersions>, + ) -> Result { + match platform_version + .drive + .methods + .token + .update + .remove_from_identity_token_balance + { + 0 => self.remove_from_identity_token_balance_v0( + token_id, + identity_id, + balance_to_remove, + block_info, + apply, + transaction, + platform_version, + previous_fee_versions, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "remove_from_identity_balance".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Removes a specified amount of credits from an identity balance. This function doesn't allow the balance to go below zero. + /// Balances are stored under key 0 in the identity. Operations are determined based on the `apply` flag (stateful vs stateless). + /// + /// # Arguments + /// + /// * `token_id` - The ID of the Token. + /// * `identity_id` - The ID of the Identity from which credits are to be removed. + /// * `balance_to_remove` - The amount of credits to be removed from the identity's balance. + /// * `estimated_costs_only_with_layer_info` - Estimated costs with layer information, if any. + /// * `transaction` - The transaction information related to the operation. + /// * `drive_version` - The drive version. + /// + /// # Returns + /// + /// * `Result, Error>` - The resulting low level drive operations if successful, or an error. + pub(crate) fn remove_from_identity_token_balance_operations( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + balance_to_remove: Credits, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .update + .remove_from_identity_token_balance + { + 0 => self.remove_from_identity_token_balance_operations_v0( + token_id, + identity_id, + balance_to_remove, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "remove_from_identity_token_balance_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/remove_from_identity_token_balance/v0/mod.rs b/packages/rs-drive/src/drive/tokens/balance/remove_from_identity_token_balance/v0/mod.rs new file mode 100644 index 0000000000..6d09ae621d --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/remove_from_identity_token_balance/v0/mod.rs @@ -0,0 +1,129 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::identity::IdentityError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::balances::credits::MAX_CREDITS; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::fee::Credits; + +use crate::drive::tokens::paths::token_balances_path_vec; +use dpp::fee::default_costs::CachedEpochIndexFeeVersions; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Balances are stored in the balance tree under the identity's id + pub(in crate::drive::tokens) fn remove_from_identity_token_balance_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + balance_to_remove: Credits, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + previous_fee_versions: Option<&CachedEpochIndexFeeVersions>, + ) -> Result { + let mut estimated_costs_only_with_layer_info = if apply { + None::> + } else { + Some(HashMap::new()) + }; + + let batch_operations = self.remove_from_identity_token_balance_operations_v0( + token_id, + identity_id, + balance_to_remove, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + let mut drive_operations: Vec = vec![]; + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + &mut drive_operations, + &platform_version.drive, + )?; + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + previous_fee_versions, + )?; + Ok(fees) + } + + /// Removes specified amount of credits from identity balance + /// This function doesn't go below nil balance (negative balance) + /// + /// Balances are stored in the identity under key 0 + /// This gets operations based on apply flag (stateful vs stateless) + pub(in crate::drive::tokens) fn remove_from_identity_token_balance_operations_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + balance_to_remove: Credits, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut drive_operations = vec![]; + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info { + Self::add_estimation_costs_for_token_balances( + token_id, + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + + let apply = estimated_costs_only_with_layer_info.is_none(); + + let previous_balance = if apply { + self.fetch_identity_token_balance_operations( + token_id, + identity_id, + apply, + transaction, + &mut drive_operations, + platform_version, + )? + .ok_or(Error::Drive(DriveError::CorruptedCodeExecution( + "there should always be a balance if apply is set to true", + )))? + } else { + MAX_CREDITS + }; + + // we do not have enough balance + // there is a part we absolutely need to pay for + if balance_to_remove > previous_balance { + return Err(Error::Identity(IdentityError::IdentityInsufficientBalance( + format!( + "identity with token balance {} does not have the required balance to remove {}", + previous_balance, balance_to_remove + ), + ))); + } + + let balance_path = token_balances_path_vec(token_id); + + drive_operations.push(LowLevelDriveOperation::replace_for_known_path_key_element( + balance_path, + identity_id.to_vec(), + Element::new_sum_item((previous_balance - balance_to_remove) as i64), + )); + + Ok(drive_operations) + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/update.rs b/packages/rs-drive/src/drive/tokens/balance/update.rs new file mode 100644 index 0000000000..dc7c94e3e7 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/balance/update.rs @@ -0,0 +1,896 @@ +#[cfg(test)] +mod tests { + + use dpp::prelude::*; + + use crate::error::drive::DriveError; + use crate::error::Error; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use crate::util::test_helpers::test_utils::identities::create_test_identity; + use dpp::block::epoch::Epoch; + use dpp::identity::accessors::IdentityGettersV0; + + mod add_to_identity_balance { + use dpp::block::block_info::BlockInfo; + use dpp::fee::fee_result::FeeResult; + use dpp::identity::accessors::IdentityGettersV0; + use dpp::version::PlatformVersion; + + use crate::fees::op::LowLevelDriveOperation; + + use super::*; + + #[test] + fn should_add_to_balance() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = Identity::random_identity(5, Some(12345), platform_version) + .expect("expected a random identity"); + + let old_balance = identity.balance(); + + let block_info = BlockInfo::default_with_epoch(Epoch::new(0).unwrap()); + + drive + .add_new_identity( + identity.clone(), + false, + &block_info, + true, + None, + platform_version, + ) + .expect("expected to insert identity"); + + let db_transaction = drive.grove.start_transaction(); + + let amount = 300; + + let fee_result = drive + .add_to_identity_balance( + identity.id().to_buffer(), + amount, + &block_info, + true, + Some(&db_transaction), + platform_version, + ) + .expect("expected to add to identity balance"); + + assert_eq!( + fee_result, + FeeResult { + processing_fee: 174660, + removed_bytes_from_system: 0, + ..Default::default() + } + ); + + drive + .grove + .commit_transaction(db_transaction) + .unwrap() + .expect("expected to be able to commit a transaction"); + + let (balance, _fee_cost) = drive + .fetch_identity_balance_with_costs( + identity.id().to_buffer(), + &block_info, + true, + None, + platform_version, + ) + .expect("expected to get balance"); + + assert_eq!(balance.unwrap(), old_balance + amount); + } + + #[test] + fn should_fail_if_balance_is_not_persisted() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let block_info = BlockInfo::default_with_epoch(Epoch::new(0).unwrap()); + + let result = drive.add_to_identity_balance( + [0; 32], + 300, + &block_info, + true, + None, + platform_version, + ); + + assert!( + matches!(result, Err(Error::Drive(DriveError::CorruptedCodeExecution(m))) if m == "there should always be a balance") + ); + } + + #[test] + fn should_deduct_from_debt_if_balance_is_nil() { + let drive = setup_drive_with_initial_state_structure(None); + let platform_version = PlatformVersion::latest(); + + let identity = create_test_identity(&drive, [0; 32], Some(1), None, platform_version) + .expect("expected an identity"); + + let added_balance = 300; + let negative_amount = 100; + + // Persist negative balance + let batch = vec![drive + .update_identity_negative_credit_operation( + identity.id().to_buffer(), + negative_amount, + platform_version, + ) + .expect("expected to get an update_identity_negative_credit_operation")]; + + let mut drive_operations: Vec = vec![]; + drive + .apply_batch_low_level_drive_operations( + None, + None, + batch, + &mut drive_operations, + &platform_version.drive, + ) + .expect("should apply batch"); + + let block_info = BlockInfo::default(); + + let fee_result = drive + .add_to_identity_balance( + identity.id().to_buffer(), + added_balance, + &block_info, + true, + None, + platform_version, + ) + .expect("expected to add to identity balance"); + + assert_eq!( + fee_result, + FeeResult { + storage_fee: 0, + processing_fee: 385160, + removed_bytes_from_system: 0, + ..Default::default() + } + ); + + let (updated_balance, _fee_cost) = drive + .fetch_identity_balance_with_costs( + identity.id().to_buffer(), + &block_info, + true, + None, + platform_version, + ) + .expect("expected to get balance"); + + assert_eq!( + updated_balance.expect("balance should present"), + added_balance - negative_amount + ); + + let updated_negative_balance = drive + .fetch_identity_negative_balance_operations( + identity.id().to_buffer(), + true, + None, + &mut drive_operations, + platform_version, + ) + .expect("expected to get balance") + .expect("balance should present"); + + assert_eq!(updated_negative_balance, 0) + } + + #[test] + fn should_keep_nil_balance_and_reduce_debt_if_added_balance_is_lower() { + let drive = setup_drive_with_initial_state_structure(None); + let platform_version = PlatformVersion::latest(); + let identity = create_test_identity(&drive, [0; 32], Some(1), None, platform_version) + .expect("expected an identity"); + + let added_balance = 50; + let negative_amount = 100; + + // Persist negative balance + let batch = vec![drive + .update_identity_negative_credit_operation( + identity.id().to_buffer(), + negative_amount, + platform_version, + ) + .expect("expected to get an update_identity_negative_credit_operation")]; + + let mut drive_operations: Vec = vec![]; + drive + .apply_batch_low_level_drive_operations( + None, + None, + batch, + &mut drive_operations, + &platform_version.drive, + ) + .expect("should apply batch"); + + let block_info = BlockInfo::default(); + + let fee_result = drive + .add_to_identity_balance( + identity.id().to_buffer(), + added_balance, + &block_info, + true, + None, + platform_version, + ) + .expect("expected to add to identity balance"); + + assert_eq!( + fee_result, + FeeResult { + storage_fee: 0, + processing_fee: 260540, + removed_bytes_from_system: 0, + ..Default::default() + } + ); + + let (updated_balance, _fee_cost) = drive + .fetch_identity_balance_with_costs( + identity.id().to_buffer(), + &block_info, + true, + None, + platform_version, + ) + .expect("expected to get balance"); + + assert_eq!(updated_balance.expect("balance should present"), 0); + + let updated_negative_balance = drive + .fetch_identity_negative_balance_operations( + identity.id().to_buffer(), + true, + None, + &mut drive_operations, + platform_version, + ) + .expect("expected to get balance") + .expect("balance should present"); + + assert_eq!(updated_negative_balance, negative_amount - added_balance) + } + + #[test] + fn should_estimate_costs_without_state() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = Identity::random_identity(5, Some(12345), platform_version) + .expect("expected a random identity"); + + let block = BlockInfo::default_with_epoch(Epoch::new(0).unwrap()); + + let app_hash_before = drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .expect("should return app hash"); + + let fee_result = drive + .add_to_identity_balance( + identity.id().to_buffer(), + 300, + &block, + false, + None, + platform_version, + ) + .expect("expected to get estimated costs to update an identity balance"); + + assert_eq!( + fee_result, + FeeResult { + processing_fee: 4278840, + ..Default::default() + } + ); + + let app_hash_after = drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .expect("should return app hash"); + + assert_eq!(app_hash_after, app_hash_before); + + let (balance, _fee_cost) = drive + .fetch_identity_balance_with_costs( + identity.id().to_buffer(), + &block, + true, + None, + platform_version, + ) + .expect("expected to get balance"); + + assert!(balance.is_none()); //shouldn't have changed + } + } + + mod remove_from_identity_balance { + use super::*; + use dpp::block::block_info::BlockInfo; + use dpp::fee::fee_result::FeeResult; + use dpp::version::PlatformVersion; + + #[test] + fn should_remove_from_balance() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = Identity::random_identity(5, Some(12345), platform_version) + .expect("expected a random identity"); + + let old_balance = identity.balance(); + + let block = BlockInfo::default_with_epoch(Epoch::new(0).unwrap()); + + drive + .add_new_identity( + identity.clone(), + false, + &block, + true, + None, + platform_version, + ) + .expect("expected to insert identity"); + + let db_transaction = drive.grove.start_transaction(); + + let amount = 10; + + let fee_result = drive + .remove_from_identity_balance( + identity.id().to_buffer(), + amount, + &block, + true, + Some(&db_transaction), + platform_version, + None, + ) + .expect("expected to add to identity balance"); + + assert_eq!( + fee_result, + FeeResult { + processing_fee: 174660, + removed_bytes_from_system: 0, + ..Default::default() + } + ); + + drive + .grove + .commit_transaction(db_transaction) + .unwrap() + .expect("expected to be able to commit a transaction"); + + let (balance, _fee_cost) = drive + .fetch_identity_balance_with_costs( + identity.id().to_buffer(), + &block, + true, + None, + platform_version, + ) + .expect("expected to get balance"); + + assert_eq!(balance.unwrap(), old_balance - amount); + } + + #[test] + fn should_estimated_costs_without_state() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = Identity::random_identity(5, Some(12345), platform_version) + .expect("expected a random identity"); + + let block = BlockInfo::default_with_epoch(Epoch::new(0).unwrap()); + + let app_hash_before = drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .expect("should return app hash"); + + let amount = 10; + + let fee_result = drive + .remove_from_identity_balance( + identity.id().to_buffer(), + amount, + &block, + false, + None, + platform_version, + None, + ) + .expect("expected to add to identity balance"); + + let app_hash_after = drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .expect("should return app hash"); + + assert_eq!(app_hash_after, app_hash_before); + + assert_eq!( + fee_result, + FeeResult { + processing_fee: 2476860, + ..Default::default() + } + ); + + let (balance, _fee_cost) = drive + .fetch_identity_balance_with_costs( + identity.id().to_buffer(), + &block, + true, + None, + platform_version, + ) + .expect("expected to get balance"); + + assert!(balance.is_none()); //shouldn't have changed + } + } + + mod apply_balance_change_from_fee_to_identity_operations { + use super::*; + use crate::error::identity::IdentityError; + use crate::fees::op::LowLevelDriveOperation; + use dpp::block::block_info::BlockInfo; + use dpp::fee::epoch::{CreditsPerEpoch, GENESIS_EPOCH_INDEX}; + use dpp::fee::fee_result::refunds::{CreditsPerEpochByIdentifier, FeeRefunds}; + use dpp::fee::fee_result::FeeResult; + use dpp::fee::{Credits, SignedCredits}; + use dpp::version::PlatformVersion; + use grovedb::batch::GroveOp; + use grovedb::Element; + use nohash_hasher::IntMap; + use std::collections::BTreeMap; + + #[test] + fn should_do_nothing_if_there_is_no_balance_change() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = create_test_identity(&drive, [0; 32], Some(15), None, platform_version) + .expect("expected to create an identity"); + + let fee_result = FeeResult::default_with_fees(0, 0); + let fee_change = fee_result.clone().into_balance_change(identity.id()); + + let (drive_operations, fee_result_outcome) = drive + .apply_balance_change_from_fee_to_identity_operations( + fee_change, + None, + platform_version, + ) + .expect("should apply fee change"); + + assert_eq!(drive_operations.len(), 0); + assert_eq!(fee_result_outcome, fee_result); + } + + #[test] + fn should_add_to_balance() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = create_test_identity(&drive, [0; 32], Some(15), None, platform_version) + .expect("expected to create an identity"); + let other_identity = + create_test_identity(&drive, [1; 32], Some(16), None, platform_version) + .expect("expected to create an identity"); + + let removed_credits = 100000; + let other_removed_credits = 200000; + + let credits_per_epoch: CreditsPerEpoch = + IntMap::from_iter([(GENESIS_EPOCH_INDEX, removed_credits)]); + + let other_credits_per_epoch: CreditsPerEpoch = + IntMap::from_iter([(GENESIS_EPOCH_INDEX, other_removed_credits)]); + + let refunds_per_epoch_by_identifier: CreditsPerEpochByIdentifier = + BTreeMap::from_iter([ + (identity.id().to_buffer(), credits_per_epoch), + (other_identity.id().to_buffer(), other_credits_per_epoch), + ]); + + let fee_result = FeeResult { + fee_refunds: FeeRefunds(refunds_per_epoch_by_identifier), + ..Default::default() + }; + let fee_change = fee_result.clone().into_balance_change(identity.id()); + + let (drive_operations, fee_result_outcome) = drive + .apply_balance_change_from_fee_to_identity_operations( + fee_change, + None, + platform_version, + ) + .expect("should apply fee change"); + + assert!(matches!( + drive_operations[..], + [ + _, + _, + LowLevelDriveOperation::GroveOperation(grovedb::batch::QualifiedGroveDbOp { + op: GroveOp::Replace { + element: Element::SumItem(refund_amount, None), + }, + .. + }), + .., + LowLevelDriveOperation::GroveOperation(grovedb::batch::QualifiedGroveDbOp { + op: GroveOp::Replace { + element: Element::SumItem(other_refund_amount, None), + }, + .. + }) + ] if refund_amount as Credits == removed_credits && other_refund_amount as Credits == other_removed_credits + )); + + assert_eq!(fee_result_outcome, fee_result); + } + + #[test] + fn should_fail_if_balance_is_not_persisted() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let fee_result = FeeResult::default_with_fees(100000, 100); + let fee_change = fee_result.into_balance_change([0; 32].into()); + + let result = drive.apply_balance_change_from_fee_to_identity_operations( + fee_change, + None, + platform_version, + ); + + assert!( + matches!(result, Err(Error::Drive(DriveError::CorruptedCodeExecution(m))) if m == "there should always be a balance if apply is set to true") + ); + } + + #[test] + fn should_deduct_from_debt_if_balance_is_nil() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let removed_credits = 10000; + let negative_amount = 1000; + + let identity = create_test_identity(&drive, [0; 32], Some(15), None, platform_version) + .expect("expected to create an identity"); + + // Persist negative balance + let batch = vec![drive + .update_identity_negative_credit_operation( + identity.id().to_buffer(), + negative_amount, + platform_version, + ) + .expect("expected to get an update_identity_negative_credit_operation")]; + + let mut drive_operations: Vec = vec![]; + drive + .apply_batch_low_level_drive_operations( + None, + None, + batch, + &mut drive_operations, + &platform_version.drive, + ) + .expect("should apply batch"); + + let credits_per_epoch: CreditsPerEpoch = + IntMap::from_iter([(GENESIS_EPOCH_INDEX, removed_credits)]); + + let refunds_per_epoch_by_identifier: CreditsPerEpochByIdentifier = + BTreeMap::from_iter([(identity.id().to_buffer(), credits_per_epoch)]); + + let fee_result = FeeResult { + fee_refunds: FeeRefunds(refunds_per_epoch_by_identifier), + ..Default::default() + }; + let fee_change = fee_result.clone().into_balance_change(identity.id()); + + let (drive_operations, fee_result_outcome) = drive + .apply_balance_change_from_fee_to_identity_operations( + fee_change, + None, + platform_version, + ) + .expect("should apply fee change"); + + assert!(matches!( + &drive_operations[..], + [ + _, + _, + LowLevelDriveOperation::GroveOperation(grovedb::batch::QualifiedGroveDbOp { + op: GroveOp::Replace { + element: Element::SumItem(refund_amount, None), + }, + .. + }), + LowLevelDriveOperation::GroveOperation(grovedb::batch::QualifiedGroveDbOp { + op: GroveOp::Replace { + element: Element::Item(debt_bytes, None), + }, + .. + }) + ] if *refund_amount as Credits == removed_credits - negative_amount && debt_bytes == &0u64.to_be_bytes() + )); + + assert_eq!(fee_result_outcome, fee_result); + } + + #[test] + fn should_keep_nil_balance_and_reduce_debt_if_added_balance_is_lower() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let removed_credits = 1000; + let negative_amount = 3000; + + let identity = create_test_identity(&drive, [0; 32], Some(15), None, platform_version) + .expect("expected to create an identity"); + + // Persist negative balance + let batch = vec![drive + .update_identity_negative_credit_operation( + identity.id().to_buffer(), + negative_amount, + platform_version, + ) + .expect("expected to get an update_identity_negative_credit_operation")]; + + let mut drive_operations: Vec = vec![]; + drive + .apply_batch_low_level_drive_operations( + None, + None, + batch, + &mut drive_operations, + &platform_version.drive, + ) + .expect("should apply batch"); + + let credits_per_epoch: CreditsPerEpoch = + IntMap::from_iter([(GENESIS_EPOCH_INDEX, removed_credits)]); + + let refunds_per_epoch_by_identifier: CreditsPerEpochByIdentifier = + BTreeMap::from_iter([(identity.id().to_buffer(), credits_per_epoch)]); + + let fee_result = FeeResult { + fee_refunds: FeeRefunds(refunds_per_epoch_by_identifier), + ..Default::default() + }; + let fee_change = fee_result.clone().into_balance_change(identity.id()); + + let (drive_operations, fee_result_outcome) = drive + .apply_balance_change_from_fee_to_identity_operations( + fee_change, + None, + platform_version, + ) + .expect("should apply fee change"); + + assert!(matches!( + &drive_operations[..], + [ + _, + _, + LowLevelDriveOperation::GroveOperation(grovedb::batch::QualifiedGroveDbOp { + op: GroveOp::Replace { + element: Element::Item(debt_bytes, None), + }, + .. + }) + ] if debt_bytes == &2000u64.to_be_bytes() + )); + + assert_eq!(fee_result_outcome, fee_result); + } + + #[test] + fn should_remove_from_balance_less_amount() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = create_test_identity(&drive, [0; 32], Some(15), None, platform_version) + .expect("expected to create an identity"); + + let initial_balance = 100; + + drive + .add_to_identity_balance( + identity.id().to_buffer(), + initial_balance, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("should set initial balance"); + + let processing_fee = 20; + let storage_fee = 10; + + let fee_result = FeeResult { + processing_fee, + storage_fee, + ..Default::default() + }; + + let fee_change = fee_result.clone().into_balance_change(identity.id()); + + let (drive_operations, fee_result_outcome) = drive + .apply_balance_change_from_fee_to_identity_operations( + fee_change, + None, + platform_version, + ) + .expect("should apply fee change"); + + assert!(matches!( + drive_operations[..], + [_, LowLevelDriveOperation::GroveOperation(grovedb::batch::QualifiedGroveDbOp { + op: GroveOp::Replace { + element: Element::SumItem(balance, None), + }, + .. + })] if balance == (initial_balance - storage_fee - processing_fee) as SignedCredits + )); + + assert_eq!(fee_result_outcome, fee_result); + } + + #[test] + fn should_remove_from_balance_bigger_amount_and_get_into_debt() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = create_test_identity(&drive, [0; 32], Some(15), None, platform_version) + .expect("expected to create an identity"); + + let initial_balance = 100; + + drive + .add_to_identity_balance( + identity.id().to_buffer(), + initial_balance, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("should set initial balance"); + + let processing_fee = 110; + let storage_fee = 80; + + let fee_result = FeeResult { + processing_fee, + storage_fee, + ..Default::default() + }; + + let fee_change = fee_result.into_balance_change(identity.id()); + + let (drive_operations, fee_result_outcome) = drive + .apply_balance_change_from_fee_to_identity_operations( + fee_change, + None, + platform_version, + ) + .expect("should apply fee change"); + + let expected_debt_bytes = + (storage_fee + processing_fee - initial_balance).to_be_bytes(); + + assert!(matches!( + &drive_operations[..], + [ + _, + LowLevelDriveOperation::GroveOperation(grovedb::batch::QualifiedGroveDbOp { + op: GroveOp::Replace { + element: Element::SumItem(balance, None), + }, + .. + }), + LowLevelDriveOperation::GroveOperation(grovedb::batch::QualifiedGroveDbOp { + op: GroveOp::Replace { + element: Element::Item(debt_bytes, None), + }, + .. + }) + ] if balance == &(0 as SignedCredits) && debt_bytes == &expected_debt_bytes + )); + + assert_eq!( + fee_result_outcome, + FeeResult { + storage_fee, + processing_fee: initial_balance - storage_fee, + ..Default::default() + } + ); + } + + #[test] + fn should_return_error_if_required_amount_bigger_than_balance() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = create_test_identity(&drive, [0; 32], Some(15), None, platform_version) + .expect("expected to create an identity"); + + let processing_fee = 110; + let storage_fee = 80; + + let fee_result = FeeResult { + processing_fee, + storage_fee, + ..Default::default() + }; + + let fee_change = fee_result.into_balance_change(identity.id()); + + let result = drive.apply_balance_change_from_fee_to_identity_operations( + fee_change, + None, + platform_version, + ); + + assert!(matches!( + result, + Err(Error::Identity(IdentityError::IdentityInsufficientBalance( + _ + ))) + )); + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/burn/mod.rs b/packages/rs-drive/src/drive/tokens/burn/mod.rs new file mode 100644 index 0000000000..e7c733df77 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/burn/mod.rs @@ -0,0 +1,100 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Burns tokens by reducing the total supply and removing them from an identity's balance. + pub fn token_burn( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + burn_amount: u64, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version.drive.methods.token.update.burn { + 0 => self.token_burn_v0( + token_id, + identity_id, + burn_amount, + block_info, + apply, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_burn".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds the operations to burn tokens without calculating fees and optionally applying. + pub fn token_burn_add_to_operations( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + burn_amount: u64, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version.drive.methods.token.update.burn { + 0 => self.token_burn_add_to_operations_v0( + token_id, + identity_id, + burn_amount, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_burn_add_to_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Gathers the operations needed to burn tokens. + pub fn token_burn_operations( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + burn_amount: u64, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.token.update.burn { + 0 => self.token_burn_operations_v0( + token_id, + identity_id, + burn_amount, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_burn_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/burn/v0/mod.rs b/packages/rs-drive/src/drive/tokens/burn/v0/mod.rs new file mode 100644 index 0000000000..3beb0c5e06 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/burn/v0/mod.rs @@ -0,0 +1,108 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + pub(super) fn token_burn_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + burn_amount: u64, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let mut drive_operations = vec![]; + + self.token_burn_add_to_operations_v0( + token_id, + identity_id, + burn_amount, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok(fees) + } + + pub(super) fn token_burn_add_to_operations_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + burn_amount: u64, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = + if apply { None } else { Some(HashMap::new()) }; + + let batch_operations = self.token_burn_operations_v0( + token_id, + identity_id, + burn_amount, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + pub(super) fn token_burn_operations_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + burn_amount: u64, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut drive_operations = vec![]; + + drive_operations.extend(self.remove_from_identity_token_balance_operations( + token_id, + identity_id, + burn_amount, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?); + + drive_operations.extend(self.remove_from_token_total_supply_operations( + token_id, + burn_amount, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?); + + Ok(drive_operations) + } +} diff --git a/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/mod.rs b/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/mod.rs new file mode 100644 index 0000000000..8799421a9d --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/mod.rs @@ -0,0 +1,42 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use dpp::balances::total_tokens_balance::TotalTokensBalance; +use dpp::version::drive_versions::DriveVersion; +use grovedb::TransactionArg; + +impl Drive { + /// Calculates the total credits balance. + /// + /// This function verifies that the sum tree identity credits + pool credits + refunds are equal to the total credits in the system. + /// + /// # Arguments + /// + /// * `transaction` - A `TransactionArg` object representing the transaction to be used for calculating the total credits balance. + /// * `drive_version` - A `DriveVersion` object specifying the version of the Drive. + /// + /// # Returns + /// + /// * `Result` - If successful, returns a `TotalTokensBalance` object representing the total tokens balance. + /// If an error occurs during the calculation, returns an `Error`. + /// + /// # Errors + /// + /// This function will return an error if the version of the Drive is unknown. + pub fn calculate_total_tokens_balance( + &self, + transaction: TransactionArg, + drive_version: &DriveVersion, + ) -> Result { + match drive_version.methods.token.calculate_total_tokens_balance { + 0 => self.calculate_total_tokens_balance_v0(transaction, drive_version), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "calculate_total_tokens_balance".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/v0/mod.rs b/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/v0/mod.rs new file mode 100644 index 0000000000..6cefd4ce28 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/v0/mod.rs @@ -0,0 +1,47 @@ +use crate::drive::balances::TOTAL_TOKEN_SUPPLIES_STORAGE_KEY; +use crate::drive::system::misc_path; +use crate::drive::tokens::paths::{tokens_root_path, TOKEN_BALANCES_KEY}; +use crate::drive::Drive; +use crate::error::Error; +use crate::util::grove_operations::DirectQueryType; +use dpp::balances::total_tokens_balance::TotalTokensBalance; +use dpp::version::drive_versions::DriveVersion; +use grovedb::TransactionArg; + +impl Drive { + /// Verify that the sum tree identity credits + pool credits + refunds are equal to the + /// Total credits in the system + #[inline(always)] + pub(super) fn calculate_total_tokens_balance_v0( + &self, + transaction: TransactionArg, + drive_version: &DriveVersion, + ) -> Result { + let mut drive_operations = vec![]; + let path_holding_total_credits = misc_path(); + let total_tokens_in_platform = self.grove_get_big_sum_tree_total_value( + (&path_holding_total_credits).into(), + TOTAL_TOKEN_SUPPLIES_STORAGE_KEY, + DirectQueryType::StatefulDirectQuery, + transaction, + &mut drive_operations, + drive_version, + )?; + + let tokens_root_path = tokens_root_path(); + + let total_identity_token_balances = self.grove_get_big_sum_tree_total_value( + (&tokens_root_path).into(), + &[TOKEN_BALANCES_KEY], + DirectQueryType::StatefulDirectQuery, + transaction, + &mut drive_operations, + drive_version, + )?; + + Ok(TotalTokensBalance { + total_tokens_in_platform, + total_identity_token_balances, + }) + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_balances/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_balances/mod.rs new file mode 100644 index 0000000000..fcce3e3dff --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_balances/mod.rs @@ -0,0 +1,57 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use dpp::version::drive_versions::DriveVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerInformation; +use std::collections::HashMap; + +impl Drive { + /// Adds estimation costs for token balance changes based on the provided drive version. + /// + /// This method updates the `estimated_costs_only_with_layer_info` HashMap with entries + /// representing the estimated costs for different layers of the balance tree. The method + /// adjusts its behavior depending on the provided `drive_version`, allowing it to support + /// different versioned implementations for cost estimation. + /// + /// # Parameters + /// - `token_id`: A 32-byte identifier for the token whose balance changes are being estimated. + /// - `estimated_costs_only_with_layer_info`: A mutable reference to a HashMap that holds + /// `KeyInfoPath` and `EstimatedLayerInformation` for each token balance layer. + /// - `drive_version`: The version of the drive to determine which estimation logic to apply. + /// + /// # Returns + /// - `Ok(())` if the operation is successful. + /// - `Err(DriveError::UnknownVersionMismatch)` if the provided `drive_version` does not match + /// any known supported versions. + /// + /// # Errors + /// This function will return an error if the provided `drive_version` does not match a known version. + pub(crate) fn add_estimation_costs_for_token_balances( + token_id: [u8; 32], + estimated_costs_only_with_layer_info: &mut HashMap, + drive_version: &DriveVersion, + ) -> Result<(), Error> { + match drive_version + .methods + .identity + .cost_estimation + .for_token_balances + { + 0 => { + Self::add_estimation_costs_for_token_balances_v0( + token_id, + estimated_costs_only_with_layer_info, + ); + Ok(()) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_estimation_costs_for_token_balances".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_balances/v0/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_balances/v0/mod.rs new file mode 100644 index 0000000000..6a466b9d94 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_balances/v0/mod.rs @@ -0,0 +1,102 @@ +use crate::drive::constants::AVERAGE_BALANCE_SIZE; + +use crate::drive::Drive; + +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerCount::{EstimatedLevel, PotentiallyAtMaxElements}; +use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; + +use crate::drive::tokens::paths::{ + token_balances_path, token_balances_root_path, tokens_root_path, +}; +use crate::util::type_constants::DEFAULT_HASH_SIZE_U8; +use grovedb::EstimatedSumTrees::{AllBigSumTrees, AllSumTrees, NoSumTrees}; +use std::collections::HashMap; + +pub const ESTIMATED_TOKEN_INFO_SIZE_BYTES: u32 = 256; + +impl Drive { + /// Adds estimation costs for token balances in Drive for version 0. + /// + /// This function provides a mechanism to estimate the costs of token balances + /// in the drive by updating the provided `HashMap` with layer information + /// relevant to balances. + /// + /// # Parameters + /// + /// * `estimated_costs_only_with_layer_info`: A mutable reference to a `HashMap` + /// that stores estimated layer information based on the key information path. + /// + /// # Notes + /// + /// The function estimates costs for three layers: + /// + /// 1. **Top Layer**: + /// - Contains general balance information and is assumed to be located on + /// layer 3 (third level in the hierarchy). The update will involve modifying: + /// - 1 normal tree for token balances. + /// - 1 normal tree for identities. + /// - 1 normal tree for contract/documents. + /// + /// 2. **Token Balances or Info Layer**: + /// - This layer contains two nodes, either for representing the token balances or info. + /// + /// 3. **All Token Balances Layer**: + /// - This layer contains the token balance root path and is considered to be + /// a normal tree that will require updates to an average of 10 nodes. + /// + /// 3. **Token Layer**: + /// - This layer contains the contract-specific token balance information, which + /// is a sum tree structure with all token amounts for all identities that have a balance. + /// ``` + pub(super) fn add_estimation_costs_for_token_balances_v0( + token_id: [u8; 32], + estimated_costs_only_with_layer_info: &mut HashMap, + ) { + // we have constructed the top layer so contract/documents tree are at the top + // since balance will be on layer 3 (level 2 on left then left) + // updating will mean we will update: + // 1 normal tree (token balances) + // 1 normal tree (identities) + // 1 normal tree (contract/documents) + // hence we should give an equal weight to both + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path([]), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(2, false), + estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), + }, + ); + + // there is one tree for the root path + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(tokens_root_path()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(0, false), // this should be at the top + estimated_layer_sizes: AllSubtrees(1, AllBigSumTrees, None), + }, + ); + + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(token_balances_root_path()), + EstimatedLayerInformation { + tree_type: TreeType::BigSumTree, + estimated_layer_count: EstimatedLevel(10, false), // we can estimate 10 levels deep + estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, AllSumTrees, None), + }, + ); + + // this is where the balances are + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(token_balances_path(&token_id)), + EstimatedLayerInformation { + tree_type: TreeType::SumTree, + estimated_layer_count: PotentiallyAtMaxElements, + estimated_layer_sizes: AllItems(DEFAULT_HASH_SIZE_U8, AVERAGE_BALANCE_SIZE, None), + }, + ); + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_identity_infos/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_identity_infos/mod.rs new file mode 100644 index 0000000000..a5225fa37b --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_identity_infos/mod.rs @@ -0,0 +1,57 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use dpp::version::drive_versions::DriveVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerInformation; +use std::collections::HashMap; + +impl Drive { + /// Adds estimation costs for token identity infos changes based on the provided drive version. + /// + /// This method updates the `estimated_costs_only_with_layer_info` HashMap with entries + /// representing the estimated costs for different layers of the balance tree. The method + /// adjusts its behavior depending on the provided `drive_version`, allowing it to support + /// different versioned implementations for cost estimation. + /// + /// # Parameters + /// - `token_id`: A 32-byte identifier for the token whose balance changes are being estimated. + /// - `estimated_costs_only_with_layer_info`: A mutable reference to a HashMap that holds + /// `KeyInfoPath` and `EstimatedLayerInformation` for each token balance layer. + /// - `drive_version`: The version of the drive to determine which estimation logic to apply. + /// + /// # Returns + /// - `Ok(())` if the operation is successful. + /// - `Err(DriveError::UnknownVersionMismatch)` if the provided `drive_version` does not match + /// any known supported versions. + /// + /// # Errors + /// This function will return an error if the provided `drive_version` does not match a known version. + pub(crate) fn add_estimation_costs_for_token_identity_infos( + token_id: [u8; 32], + estimated_costs_only_with_layer_info: &mut HashMap, + drive_version: &DriveVersion, + ) -> Result<(), Error> { + match drive_version + .methods + .identity + .cost_estimation + .for_token_identity_infos + { + 0 => { + Self::add_estimation_costs_for_token_identity_infos_v0( + token_id, + estimated_costs_only_with_layer_info, + ); + Ok(()) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_estimation_costs_for_token_identity_infos".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_identity_infos/v0/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_identity_infos/v0/mod.rs new file mode 100644 index 0000000000..087fa60b8f --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_identity_infos/v0/mod.rs @@ -0,0 +1,81 @@ +use crate::drive::Drive; + +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerCount::{EstimatedLevel, PotentiallyAtMaxElements}; +use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; + +use crate::drive::tokens::paths::{ + token_identity_infos_path, token_identity_infos_root_path, tokens_root_path, +}; +use crate::util::type_constants::DEFAULT_HASH_SIZE_U8; +use grovedb::EstimatedSumTrees::{NoSumTrees, SomeSumTrees}; +use std::collections::HashMap; + +pub const ESTIMATED_TOKEN_INFO_SIZE_BYTES: u32 = 32; + +impl Drive { + pub(super) fn add_estimation_costs_for_token_identity_infos_v0( + token_id: [u8; 32], + estimated_costs_only_with_layer_info: &mut HashMap, + ) { + // we have constructed the top layer so contract/documents tree are at the top + // since balance will be on layer 3 (level 2 on left then left) + // updating will mean we will update: + // 1 normal tree (token balances) + // 1 normal tree (identities) + // 1 normal tree (contract/documents) + // hence we should give an equal weight to both + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path([]), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(2, false), + estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), + }, + ); + + // there is one tree for the root path + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(tokens_root_path()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(1, false), // this should be at the top + estimated_layer_sizes: AllSubtrees( + 1, + SomeSumTrees { + sum_trees_weight: 0, + big_sum_trees_weight: 1, + count_trees_weight: 0, + count_sum_trees_weight: 0, + non_sum_trees_weight: 1, + }, + None, + ), + }, + ); + + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(token_identity_infos_root_path()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(10, false), // we can estimate 10 levels deep + estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), + }, + ); + + // this is where the balances are + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(token_identity_infos_path(&token_id)), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: PotentiallyAtMaxElements, + estimated_layer_sizes: AllItems( + DEFAULT_HASH_SIZE_U8, + ESTIMATED_TOKEN_INFO_SIZE_BYTES, + None, + ), + }, + ); + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_status_infos/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_status_infos/mod.rs new file mode 100644 index 0000000000..59cb58e546 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_status_infos/mod.rs @@ -0,0 +1,55 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use dpp::version::drive_versions::DriveVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerInformation; +use std::collections::HashMap; + +impl Drive { + /// Adds estimation costs for token status infos changes based on the provided drive version. + /// + /// This method updates the `estimated_costs_only_with_layer_info` HashMap with entries + /// representing the estimated costs for different layers of the balance tree. The method + /// adjusts its behavior depending on the provided `drive_version`, allowing it to support + /// different versioned implementations for cost estimation. + /// + /// # Parameters + /// - `token_id`: A 32-byte identifier for the token whose balance changes are being estimated. + /// - `estimated_costs_only_with_layer_info`: A mutable reference to a HashMap that holds + /// `KeyInfoPath` and `EstimatedLayerInformation` for each token balance layer. + /// - `drive_version`: The version of the drive to determine which estimation logic to apply. + /// + /// # Returns + /// - `Ok(())` if the operation is successful. + /// - `Err(DriveError::UnknownVersionMismatch)` if the provided `drive_version` does not match + /// any known supported versions. + /// + /// # Errors + /// This function will return an error if the provided `drive_version` does not match a known version. + pub(crate) fn add_estimation_costs_for_token_status_infos( + estimated_costs_only_with_layer_info: &mut HashMap, + drive_version: &DriveVersion, + ) -> Result<(), Error> { + match drive_version + .methods + .identity + .cost_estimation + .for_token_identity_infos + { + 0 => { + Self::add_estimation_costs_for_token_status_infos_v0( + estimated_costs_only_with_layer_info, + ); + Ok(()) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_estimation_costs_for_token_status_infos".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_status_infos/v0/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_status_infos/v0/mod.rs new file mode 100644 index 0000000000..58aa341787 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_status_infos/v0/mod.rs @@ -0,0 +1,68 @@ +use crate::drive::Drive; + +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerCount::EstimatedLevel; +use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; + +use crate::drive::tokens::paths::{token_statuses_root_path, tokens_root_path}; +use crate::util::type_constants::DEFAULT_HASH_SIZE_U8; +use grovedb::EstimatedSumTrees::{NoSumTrees, SomeSumTrees}; +use std::collections::HashMap; + +pub const ESTIMATED_TOKEN_STATUS_INFO_SIZE_BYTES: u32 = 32; + +impl Drive { + pub(super) fn add_estimation_costs_for_token_status_infos_v0( + estimated_costs_only_with_layer_info: &mut HashMap, + ) { + // we have constructed the top layer so contract/documents tree are at the top + // since balance will be on layer 3 (level 2 on left then left) + // updating will mean we will update: + // 1 normal tree (token balances) + // 1 normal tree (identities) + // 1 normal tree (contract/documents) + // hence we should give an equal weight to both + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path([]), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(2, false), + estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), + }, + ); + + // there is one tree for the root path + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(tokens_root_path()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(1, false), // this should be at the top + estimated_layer_sizes: AllSubtrees( + 1, + SomeSumTrees { + sum_trees_weight: 0, + big_sum_trees_weight: 1, + count_trees_weight: 0, + count_sum_trees_weight: 0, + non_sum_trees_weight: 1, + }, + None, + ), + }, + ); + + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(token_statuses_root_path()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(10, false), // we can estimate 10 levels deep + estimated_layer_sizes: AllItems( + DEFAULT_HASH_SIZE_U8, + ESTIMATED_TOKEN_STATUS_INFO_SIZE_BYTES, + None, + ), + }, + ); + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_total_supply/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_total_supply/mod.rs new file mode 100644 index 0000000000..51e3fc30f2 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_total_supply/mod.rs @@ -0,0 +1,50 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use dpp::version::drive_versions::DriveVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerInformation; +use std::collections::HashMap; + +impl Drive { + /// Adds estimation costs for token total supply changes. + /// + /// It operates on the provided HashMap, `estimated_costs_only_with_layer_info`, and adds + /// new entries to it, representing the estimated costs for different layers of the balance tree. + /// + /// # Parameters + /// - `estimated_costs_only_with_layer_info`: A mutable reference to a HashMap storing + /// the `KeyInfoPath` and `EstimatedLayerInformation`. + /// + /// # Returns + /// - `Ok(())` if successful. + /// - `Err(DriveError::UnknownVersionMismatch)` if the method version doesn't match any known versions. + /// + /// # Errors + /// This function will return an error if the method version doesn't match any known versions. + pub(crate) fn add_estimation_costs_for_token_total_supply( + estimated_costs_only_with_layer_info: &mut HashMap, + drive_version: &DriveVersion, + ) -> Result<(), Error> { + match drive_version + .methods + .identity + .cost_estimation + .for_token_total_supply + { + 0 => { + Self::add_estimation_costs_for_token_total_supply_v0( + estimated_costs_only_with_layer_info, + ); + Ok(()) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_estimation_costs_for_token_total_supply".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_total_supply/v0/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_total_supply/v0/mod.rs new file mode 100644 index 0000000000..7f022ceec8 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/for_token_total_supply/v0/mod.rs @@ -0,0 +1,101 @@ +use crate::drive::Drive; + +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerCount::EstimatedLevel; +use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; + +use crate::drive::balances::total_tokens_root_supply_path; +use crate::drive::system::misc_path; +use crate::util::type_constants::{DEFAULT_HASH_SIZE_U8, U64_SIZE_U32}; +use grovedb::EstimatedSumTrees::{NoSumTrees, SomeSumTrees}; +use std::collections::HashMap; + +impl Drive { + /// Adds estimation costs for token total supply in Drive for version 0. + /// + /// This function estimates the storage and update costs associated with token total supply + /// in Drive, providing detailed information about the layer structure and required updates + /// for each relevant path. The provided `HashMap` will be updated with the estimated costs + /// for each layer involved in the process. + /// + /// # Parameters + /// + /// * `estimated_costs_only_with_layer_info`: A mutable reference to a `HashMap` + /// that stores the estimated layer information for each key information path. + /// This map will be populated with the relevant layer information for the token supply + /// data and other associated trees. + /// + /// # Notes + /// + /// The function estimates costs for the following layers: + /// + /// 1. **Top Layer**: + /// - Contains general balance information and is assumed to be located on + /// level 3 of the hierarchy. It involves updating: + /// - 1 normal tree for contract/documents. + /// - 1 sum tree for balances. + /// - 1 normal for votes. + /// - 1 normal tree for misc. + /// - This layer has an equal weight distribution between normal and sum trees. + /// + /// 2. **Misc Layer**: + /// - A normal tree that contains miscellaneous data relevant to the total supply + /// process. + /// + /// 3. **Total Tokens Root Supply Path**: + /// - This path represents the root for the total tokens supply and is updated + /// with the corresponding token supply information. It is estimated to update + /// an average of 10 nodes in a normal tree structure. + pub(super) fn add_estimation_costs_for_token_total_supply_v0( + estimated_costs_only_with_layer_info: &mut HashMap, + ) { + // we have constructed the top layer so contract/documents tree are at the top + // since balance will be on layer 4 (level 3 on right, then right, then left) + // updating will mean we will update: + // 1 normal tree (misc) + // 1 normal tree (votes) + // 1 sum tree (balances) + // 1 normal tree (contract/documents) + // hence we should give an equal weight to both + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path([]), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(3, false), + // 17 because we have 2 layers at 32 and two layers at 2 + estimated_layer_sizes: AllSubtrees( + 17, + SomeSumTrees { + sum_trees_weight: 1, + big_sum_trees_weight: 0, + count_trees_weight: 0, + count_sum_trees_weight: 0, + non_sum_trees_weight: 3, + }, + None, + ), + }, + ); + + // in the misc tree + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(misc_path()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(2, false), + estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), + }, + ); + + // in the total tokens root supply path + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(total_tokens_root_supply_path()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(10, false), + estimated_layer_sizes: AllItems(DEFAULT_HASH_SIZE_U8, U64_SIZE_U32, None), + }, + ); + } +} diff --git a/packages/rs-drive/src/drive/tokens/estimated_costs/mod.rs b/packages/rs-drive/src/drive/tokens/estimated_costs/mod.rs new file mode 100644 index 0000000000..8028de5375 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/estimated_costs/mod.rs @@ -0,0 +1,11 @@ +/// Module for handling operations related to token balances. +pub mod for_token_balances; + +/// Module for handling operations related to token total supply. +pub mod for_token_total_supply; + +/// Module for handling operations related to token identity information. +pub mod for_token_identity_infos; + +/// Module for handling operations related to token status information. +pub mod for_token_status_infos; diff --git a/packages/rs-drive/src/drive/tokens/freeze/mod.rs b/packages/rs-drive/src/drive/tokens/freeze/mod.rs new file mode 100644 index 0000000000..d2339bd4c8 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/freeze/mod.rs @@ -0,0 +1,95 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::Identifier; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Burns tokens by reducing the total supply and removing them from an identity's balance. + pub fn token_freeze( + &self, + token_id: Identifier, + frozen_identity_id: Identifier, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version.drive.methods.token.update.freeze { + 0 => self.token_freeze_v0( + token_id, + frozen_identity_id, + block_info, + apply, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_freeze".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds the operations to freeze tokens without calculating fees and optionally applying. + pub fn token_freeze_add_to_operations( + &self, + token_id: Identifier, + frozen_identity_id: Identifier, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version.drive.methods.token.update.freeze { + 0 => self.token_freeze_add_to_operations_v0( + token_id, + frozen_identity_id, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_freeze_add_to_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Gathers the operations needed to freeze tokens. + pub fn token_freeze_operations( + &self, + token_id: Identifier, + frozen_identity_id: Identifier, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.token.update.freeze { + 0 => self.token_freeze_operations_v0( + token_id, + frozen_identity_id, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_freeze_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/freeze/v0/mod.rs b/packages/rs-drive/src/drive/tokens/freeze/v0/mod.rs new file mode 100644 index 0000000000..e36c612077 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/freeze/v0/mod.rs @@ -0,0 +1,147 @@ +use crate::drive::tokens::paths::token_identity_infos_path; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use crate::util::grove_operations::QueryTarget::QueryTargetValue; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::identifier::Identifier; +use dpp::serialization::{PlatformDeserializable, PlatformSerializable}; +use dpp::tokens::info::v0::IdentityTokenInfoV0Accessors; +use dpp::tokens::info::IdentityTokenInfo; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, Element, EstimatedLayerInformation, TransactionArg, TreeType}; +use std::collections::HashMap; + +impl Drive { + pub(super) fn token_freeze_v0( + &self, + token_id: Identifier, + frozen_identity_id: Identifier, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let mut drive_operations = vec![]; + + self.token_freeze_add_to_operations_v0( + token_id, + frozen_identity_id, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok(fees) + } + + pub(super) fn token_freeze_add_to_operations_v0( + &self, + token_id: Identifier, + frozen_identity_id: Identifier, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = + if apply { None } else { Some(HashMap::new()) }; + + let batch_operations = self.token_freeze_operations_v0( + token_id, + frozen_identity_id, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + pub(super) fn token_freeze_operations_v0( + &self, + token_id: Identifier, + frozen_identity_id: Identifier, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut drive_operations = vec![]; + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info { + Self::add_estimation_costs_for_token_identity_infos( + token_id.to_buffer(), + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + + // no estimated_costs_only_with_layer_info, means we want to apply to state + let direct_query_type = if estimated_costs_only_with_layer_info.is_none() { + DirectQueryType::StatefulDirectQuery + } else { + DirectQueryType::StatelessDirectQuery { + in_tree_type: TreeType::NormalTree, + query_target: QueryTargetValue(8), + } + }; + + let token_info_path = token_identity_infos_path(token_id.as_bytes()); + match self + .grove_get_raw_optional_item( + (&token_info_path).into(), + frozen_identity_id.as_slice(), + direct_query_type, + transaction, + &mut drive_operations, + &platform_version.drive, + )? + .map(|bytes| IdentityTokenInfo::deserialize_from_bytes(&bytes)) + .transpose()? + { + None => { + let identity_token_info_bytes = + IdentityTokenInfo::new(true, platform_version)?.serialize_consume_to_bytes()?; + drive_operations.push(LowLevelDriveOperation::insert_for_known_path_key_element( + token_info_path.iter().map(|a| a.to_vec()).collect(), + frozen_identity_id.to_vec(), + Element::new_item(identity_token_info_bytes), + )); + } + Some(mut token_info) => { + if !token_info.frozen() { + token_info.set_frozen(true); + let identity_token_info_bytes = token_info.serialize_consume_to_bytes()?; + drive_operations.push( + LowLevelDriveOperation::replace_for_known_path_key_element( + token_info_path.iter().map(|a| a.to_vec()).collect(), + frozen_identity_id.to_vec(), + Element::new_item(identity_token_info_bytes), + ), + ); + } + } + }; + + Ok(drive_operations) + } +} diff --git a/packages/rs-drive/src/drive/tokens/info/fetch_identities_token_infos/mod.rs b/packages/rs-drive/src/drive/tokens/info/fetch_identities_token_infos/mod.rs new file mode 100644 index 0000000000..33fac51df9 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/info/fetch_identities_token_infos/mod.rs @@ -0,0 +1,151 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::tokens::info::IdentityTokenInfo; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; +use std::collections::BTreeMap; + +impl Drive { + /// Fetches the token infos of an identity from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs whose infos are to be fetched. + /// * `identity_id` - The ID of the identity whose token infos are being queried. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The version of the platform to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result>, Error>` - A map of token IDs to their corresponding infos, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_identities_token_infos( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .token + .fetch + .identities_token_infos + { + 0 => self.fetch_identities_token_infos_v0( + token_id, + identity_ids, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_identity_token_infos".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the identity's token infos with associated costs. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to fetch the infos for. + /// * `identity_id` - The identity's ID whose infos are being queried. + /// * `block_info` - Information about the current block for fee calculation. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result<((BTreeMap<[u8; 32], Option>), FeeResult), Error>` - A tuple containing a map of token infos and the associated fee result. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_identities_token_infos_with_costs( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(BTreeMap<[u8; 32], Option>, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.fetch_identities_token_infos_operations( + token_id, + identity_ids, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the low-level operations needed to fetch the identity's token infos from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to query the infos for. + /// * `identity_id` - The ID of the identity whose token infos are being queried. + /// * `transaction` - The current transaction context. + /// * `drive_operations` - A vector to store the created low-level drive operations. + /// * `platform_version` - The platform version to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result>, Error>` - A map of token IDs to their corresponding infos, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_identities_token_infos_operations( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .token + .fetch + .identities_token_infos + { + 0 => self.fetch_identities_token_infos_operations_v0( + token_id, + identity_ids, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_identities_token_infos_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/info/fetch_identities_token_infos/v0/mod.rs b/packages/rs-drive/src/drive/tokens/info/fetch_identities_token_infos/v0/mod.rs new file mode 100644 index 0000000000..e892dcd7aa --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/info/fetch_identities_token_infos/v0/mod.rs @@ -0,0 +1,66 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::serialization::PlatformDeserializable; +use dpp::tokens::info::IdentityTokenInfo; +use dpp::version::PlatformVersion; +use grovedb::Element::Item; +use grovedb::TransactionArg; +use std::collections::BTreeMap; + +impl Drive { + pub(super) fn fetch_identities_token_infos_v0( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + self.fetch_identities_token_infos_operations_v0( + token_id, + identity_ids, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn fetch_identities_token_infos_operations_v0( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + let path_query = Self::token_infos_for_identity_ids_query(token_id, identity_ids); + + self.grove_get_raw_path_query_with_optional( + &path_query, + false, + transaction, + drive_operations, + &platform_version.drive, + )? + .into_iter() + .map(|(_, key, element)| { + let identity_id: [u8; 32] = key.try_into().map_err(|_| { + Error::Drive(DriveError::CorruptedDriveState( + "identity id not 32 bytes".to_string(), + )) + })?; + match element { + Some(Item(value, ..)) => Ok(( + identity_id, + Some(IdentityTokenInfo::deserialize_from_bytes(&value)?), + )), + None => Ok((identity_id, None)), + _ => Err(Error::Drive(DriveError::CorruptedDriveState( + "token tree for infos should contain only items".to_string(), + ))), + } + }) + .collect() + } +} diff --git a/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_info/mod.rs b/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_info/mod.rs new file mode 100644 index 0000000000..3fa1a5dad0 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_info/mod.rs @@ -0,0 +1,134 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::tokens::info::IdentityTokenInfo; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + /// Fetches the Identity's token info from the backing store. + /// Passing `apply = false` will return estimated costs (0 or Some(0) in place of actual values). + /// + /// # Arguments + /// + /// * `token_id` - The ID of the token. + /// * `identity_id` - The ID of the Identity whose token info is to be fetched. + /// * `apply` - Whether to actually fetch from state (true) or estimate costs (false). + /// * `transaction` - The current transaction. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result, Error>` - The token info of the Identity if successful, or an error. + pub fn fetch_identity_token_info( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .fetch + .identity_token_info + { + 0 => self.fetch_identity_token_info_v0( + token_id, + identity_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_identity_token_info".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the Identity's token info with costs (if `apply = true`) and returns associated fee result. + pub fn fetch_identity_token_info_with_costs( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(Option, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.fetch_identity_token_info_operations( + token_id, + identity_id, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the operations to get Identity's token info from the backing store. + /// If `apply` is false, the operations are stateless and only used for cost estimation. + /// + /// # Arguments + /// + /// * `token_id` - The ID of the token. + /// * `identity_id` - The ID of the Identity whose token info is to be fetched. + /// * `apply` - Whether to fetch actual stateful data (true) or just estimate costs (false). + /// * `transaction` - The current transaction. + /// * `drive_operations` - The drive operations vector to populate. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result, Error>` - The token info of the Identity if successful, or an error. + pub fn fetch_identity_token_info_operations( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .fetch + .identity_token_info + { + 0 => self.fetch_identity_token_info_operations_v0( + token_id, + identity_id, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_identity_token_info_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_info/v0/mod.rs b/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_info/v0/mod.rs new file mode 100644 index 0000000000..e923a435d9 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_info/v0/mod.rs @@ -0,0 +1,73 @@ +use crate::drive::tokens::paths::token_identity_infos_path; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use crate::util::grove_operations::QueryTarget::QueryTargetValue; +use dpp::serialization::PlatformDeserializable; +use dpp::tokens::info::IdentityTokenInfo; +use dpp::version::PlatformVersion; +use grovedb::Element::Item; +use grovedb::{TransactionArg, TreeType}; + +impl Drive { + pub(super) fn fetch_identity_token_info_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.fetch_identity_token_info_operations_v0( + token_id, + identity_id, + true, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn fetch_identity_token_info_operations_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let direct_query_type = if apply { + DirectQueryType::StatefulDirectQuery + } else { + DirectQueryType::StatelessDirectQuery { + in_tree_type: TreeType::NormalTree, + query_target: QueryTargetValue(8), + } + }; + + let info_path = token_identity_infos_path(&token_id); + + match self.grove_get_raw_optional( + (&info_path).into(), + identity_id.as_slice(), + direct_query_type, + transaction, + drive_operations, + &platform_version.drive, + ) { + Ok(Some(Item(info, _))) => Ok(Some(IdentityTokenInfo::deserialize_from_bytes( + info.as_slice(), + )?)), + + Ok(None) | Err(Error::GroveDB(grovedb::Error::PathKeyNotFound(_))) => Ok(None), + + Ok(Some(_)) => Err(Error::Drive(DriveError::CorruptedElementType( + "identity token info was present but was not an item", + ))), + + Err(e) => Err(e), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/mod.rs b/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/mod.rs new file mode 100644 index 0000000000..a8335427f8 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/mod.rs @@ -0,0 +1,151 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::tokens::info::IdentityTokenInfo; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; +use std::collections::BTreeMap; + +impl Drive { + /// Fetches the token infos of an identity from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs whose infos are to be fetched. + /// * `identity_id` - The ID of the identity whose token infos are being queried. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The version of the platform to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result>, Error>` - A map of token IDs to their corresponding infos, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_identity_token_infos( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .token + .fetch + .identity_token_infos + { + 0 => self.fetch_identity_token_infos_v0( + token_ids, + identity_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_identity_token_infos".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the identity's token infos with associated costs. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to fetch the infos for. + /// * `identity_id` - The identity's ID whose infos are being queried. + /// * `block_info` - Information about the current block for fee calculation. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result<((BTreeMap<[u8; 32], Option>), FeeResult), Error>` - A tuple containing a map of token infos and the associated fee result. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_identity_token_infos_with_costs( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(BTreeMap<[u8; 32], Option>, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.fetch_identity_token_infos_operations( + token_ids, + identity_id, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the low-level operations needed to fetch the identity's token infos from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to query the infos for. + /// * `identity_id` - The ID of the identity whose token infos are being queried. + /// * `transaction` - The current transaction context. + /// * `drive_operations` - A vector to store the created low-level drive operations. + /// * `platform_version` - The platform version to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result>, Error>` - A map of token IDs to their corresponding infos, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_identity_token_infos_operations( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .token + .fetch + .identity_token_infos + { + 0 => self.fetch_identity_token_infos_operations_v0( + token_ids, + identity_id, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_identity_token_infos_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/v0/mod.rs b/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/v0/mod.rs new file mode 100644 index 0000000000..6779f88038 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/v0/mod.rs @@ -0,0 +1,87 @@ +use crate::drive::tokens::paths::{tokens_root_path_vec, TOKEN_IDENTITY_INFO_KEY}; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::serialization::PlatformDeserializable; +use dpp::tokens::info::IdentityTokenInfo; +use dpp::version::PlatformVersion; +use grovedb::Element::Item; +use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; +use std::collections::BTreeMap; + +impl Drive { + pub(super) fn fetch_identity_token_infos_v0( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + self.fetch_identity_token_infos_operations_v0( + token_ids, + identity_id, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn fetch_identity_token_infos_operations_v0( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + let tokens_root = tokens_root_path_vec(); + + let mut query = Query::new(); + + for token_id in token_ids { + query.insert_key(token_id.to_vec()); + } + + query.set_subquery_path(vec![vec![TOKEN_IDENTITY_INFO_KEY], identity_id.to_vec()]); + + let path_query = PathQuery::new( + tokens_root, + SizedQuery::new(query, Some(token_ids.len() as u16), None), + ); + + self.grove_get_raw_path_query_with_optional( + &path_query, + false, + transaction, + drive_operations, + &platform_version.drive, + )? + .into_iter() + .map(|(path, _, element)| { + let token_id: [u8; 32] = path + .get(1) + .ok_or(Error::Drive(DriveError::CorruptedDriveState( + "returned path item should always have a second part at index 1".to_string(), + )))? + .clone() + .try_into() + .map_err(|_| { + Error::Drive(DriveError::CorruptedDriveState( + "token id not 32 bytes".to_string(), + )) + })?; + match element { + Some(Item(value, ..)) => Ok(( + token_id, + Some(IdentityTokenInfo::deserialize_from_bytes(&value)?), + )), + None => Ok((token_id, None)), + _ => Err(Error::Drive(DriveError::CorruptedDriveState( + "token tree for infos should contain only items".to_string(), + ))), + } + }) + .collect() + } +} diff --git a/packages/rs-drive/src/drive/tokens/info/mod.rs b/packages/rs-drive/src/drive/tokens/info/mod.rs new file mode 100644 index 0000000000..f446d8668d --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/info/mod.rs @@ -0,0 +1,12 @@ +#[cfg(feature = "server")] +mod fetch_identities_token_infos; +#[cfg(feature = "server")] +mod fetch_identity_token_infos; +#[cfg(feature = "server")] +mod prove_identities_token_infos; +#[cfg(feature = "server")] +mod prove_identity_token_infos; +mod queries; + +#[cfg(feature = "server")] +mod fetch_identity_token_info; diff --git a/packages/rs-drive/src/drive/tokens/info/prove_identities_token_infos/mod.rs b/packages/rs-drive/src/drive/tokens/info/prove_identities_token_infos/mod.rs new file mode 100644 index 0000000000..918eeafe94 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/info/prove_identities_token_infos/mod.rs @@ -0,0 +1,149 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + /// Proves the token infos of an identity from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs whose infos are to be proveed. + /// * `identity_id` - The ID of the identity whose token infos are being queried. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The version of the platform to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_identities_token_infos( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .prove + .identity_token_infos + { + 0 => self.prove_identities_token_infos_v0( + token_id, + identity_ids, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_identity_token_infos".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Proves the identity's token infos with associated costs. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to prove the infos for. + /// * `identity_id` - The identity's ID whose infos are being queried. + /// * `block_info` - Information about the current block for fee calculation. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_identities_token_infos_with_costs( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(Vec, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.prove_identities_token_infos_operations( + token_id, + identity_ids, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the low-level operations needed to prove the identity's token infos from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to query the infos for. + /// * `identity_id` - The ID of the identity whose token infos are being queried. + /// * `transaction` - The current transaction context. + /// * `drive_operations` - A vector to store the created low-level drive operations. + /// * `platform_version` - The platform version to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_identities_token_infos_operations( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .prove + .identity_token_infos + { + 0 => self.prove_identities_token_infos_operations_v0( + token_id, + identity_ids, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_identities_token_infos_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/info/prove_identities_token_infos/v0/mod.rs b/packages/rs-drive/src/drive/tokens/info/prove_identities_token_infos/v0/mod.rs new file mode 100644 index 0000000000..d74ae92a50 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/info/prove_identities_token_infos/v0/mod.rs @@ -0,0 +1,353 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + pub(super) fn prove_identities_token_infos_v0( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.prove_identities_token_infos_operations_v0( + token_id, + identity_ids, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn prove_identities_token_infos_operations_v0( + &self, + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let path_query = Self::token_infos_for_identity_ids_query(token_id, identity_ids); + + self.grove_get_proved_path_query( + &path_query, + transaction, + drive_operations, + &platform_version.drive, + ) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::block::block_info::BlockInfo; + use dpp::data_contract::accessors::v1::DataContractV1Getters; + use dpp::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; + use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; + use dpp::data_contract::config::v0::DataContractConfigV0; + use dpp::data_contract::config::DataContractConfig; + use dpp::data_contract::v1::DataContractV1; + use dpp::identity::Identity; + use std::collections::BTreeMap; + + use dpp::identity::accessors::IdentityGettersV0; + use dpp::prelude::DataContract; + use dpp::tokens::info::IdentityTokenInfo; + use dpp::version::PlatformVersion; + + #[test] + fn should_prove_a_single_identity_token_info() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_id = identity.id().to_buffer(); + + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + let token_id = contract.token_id(0).expect("expected token at position 0"); + drive + .add_new_identity( + identity.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add an identity"); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + drive + .token_freeze( + token_id, + identity.id(), + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to mint token"); + let proof = drive + .prove_identities_token_infos_v0( + token_id.to_buffer(), + &vec![identity.id().to_buffer()], + None, + platform_version, + ) + .expect("should not error when proving an identity"); + + let proved_identity_info: BTreeMap<[u8; 32], Option> = + Drive::verify_token_infos_for_identity_ids( + proof.as_slice(), + token_id.to_buffer(), + &vec![identity.id().to_buffer()], + false, + platform_version, + ) + .expect("expect that this be verified") + .1; + + assert_eq!( + proved_identity_info, + BTreeMap::from([( + identity_id, + Some(IdentityTokenInfo::new(true, platform_version).expect("expected token info")) + )]) + ); + } + + #[test] + fn should_prove_a_single_identity_token_info_does_not_exist() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_id = identity.id().to_buffer(); + + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + let token_id = contract.token_id(0).expect("expected token at position 0"); + drive + .add_new_identity( + identity.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add an identity"); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + let proof = drive + .prove_identities_token_infos_v0( + token_id.to_buffer(), + &vec![identity.id().to_buffer()], + None, + platform_version, + ) + .expect("should not error when proving an identity"); + + let proved_identity_info: BTreeMap<[u8; 32], Option> = + Drive::verify_token_infos_for_identity_ids( + proof.as_slice(), + token_id.to_buffer(), + &vec![identity.id().to_buffer()], + false, + platform_version, + ) + .expect("expect that this be verified") + .1; + + assert_eq!(proved_identity_info, BTreeMap::from([(identity_id, None)])); + } + + #[test] + fn should_prove_multiple_identity_single_token_infos() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity_1 = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_1_id = identity_1.id().to_buffer(); + + let identity_2 = Identity::random_identity(3, Some(15), platform_version) + .expect("expected a platform identity"); + + let identity_2_id = identity_2.id().to_buffer(); + + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + let token_id = contract.token_id(0).expect("expected token at position 0"); + drive + .add_new_identity( + identity_1.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add an identity"); + + drive + .add_new_identity( + identity_2.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add an identity"); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + drive + .token_freeze( + token_id, + identity_1.id(), + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to mint token"); + + let proof = drive + .prove_identities_token_infos_v0( + token_id.to_buffer(), + &vec![identity_1.id().to_buffer(), identity_2.id().to_buffer()], + None, + platform_version, + ) + .expect("should not error when proving an identity"); + + let proved_identity_info: BTreeMap<[u8; 32], Option> = + Drive::verify_token_infos_for_identity_ids( + proof.as_slice(), + token_id.to_buffer(), + &vec![identity_1.id().to_buffer(), identity_2.id().to_buffer()], + false, + platform_version, + ) + .expect("expect that this be verified") + .1; + + assert_eq!( + proved_identity_info, + BTreeMap::from([ + ( + identity_1_id, + Some( + IdentityTokenInfo::new(true, platform_version) + .expect("expected token info") + ) + ), + (identity_2_id, None) + ]) + ); + } +} diff --git a/packages/rs-drive/src/drive/tokens/info/prove_identity_token_infos/mod.rs b/packages/rs-drive/src/drive/tokens/info/prove_identity_token_infos/mod.rs new file mode 100644 index 0000000000..a43d6083ac --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/info/prove_identity_token_infos/mod.rs @@ -0,0 +1,149 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + /// Fetches the token infos of an identity from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs whose infos are to be proveed. + /// * `identity_id` - The ID of the identity whose token infos are being queried. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The version of the platform to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_identity_token_infos( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .prove + .identity_token_infos + { + 0 => self.prove_identity_token_infos_v0( + token_ids, + identity_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_identity_token_infos".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the identity's token infos with associated costs. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to prove the infos for. + /// * `identity_id` - The identity's ID whose infos are being queried. + /// * `block_info` - Information about the current block for fee calculation. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_identity_token_infos_with_costs( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(Vec, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.prove_identity_token_infos_operations( + token_ids, + identity_id, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the low-level operations needed to prove the identity's token infos from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to query the infos for. + /// * `identity_id` - The ID of the identity whose token infos are being queried. + /// * `transaction` - The current transaction context. + /// * `drive_operations` - A vector to store the created low-level drive operations. + /// * `platform_version` - The platform version to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_identity_token_infos_operations( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .prove + .identity_token_infos + { + 0 => self.prove_identity_token_infos_operations_v0( + token_ids, + identity_id, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_identity_token_infos_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/info/prove_identity_token_infos/v0/mod.rs b/packages/rs-drive/src/drive/tokens/info/prove_identity_token_infos/v0/mod.rs new file mode 100644 index 0000000000..a0e4e71ac9 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/info/prove_identity_token_infos/v0/mod.rs @@ -0,0 +1,55 @@ +use crate::drive::tokens::paths::{tokens_root_path_vec, TOKEN_IDENTITY_INFO_KEY}; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::version::PlatformVersion; +use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; + +impl Drive { + pub(super) fn prove_identity_token_infos_v0( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.prove_identity_token_infos_operations_v0( + token_ids, + identity_id, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn prove_identity_token_infos_operations_v0( + &self, + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let tokens_root = tokens_root_path_vec(); + + let mut query = Query::new(); + + for token_id in token_ids { + query.insert_key(token_id.to_vec()); + } + + query.set_subquery_path(vec![vec![TOKEN_IDENTITY_INFO_KEY], identity_id.to_vec()]); + + let path_query = PathQuery::new( + tokens_root, + SizedQuery::new(query, Some(token_ids.len() as u16), None), + ); + + self.grove_get_proved_path_query( + &path_query, + transaction, + drive_operations, + &platform_version.drive, + ) + } +} diff --git a/packages/rs-drive/src/drive/tokens/info/queries.rs b/packages/rs-drive/src/drive/tokens/info/queries.rs new file mode 100644 index 0000000000..3b2303932d --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/info/queries.rs @@ -0,0 +1,72 @@ +use crate::drive::tokens::paths::token_identity_infos_path_vec; +use crate::drive::Drive; +use crate::query::{Query, QueryItem}; +use grovedb::{PathQuery, SizedQuery}; +use std::ops::RangeFull; + +impl Drive { + /// The query for proving the identities info of a token from an identity id. + pub fn token_info_for_identity_id_query( + token_id: [u8; 32], + identity_id: [u8; 32], + ) -> PathQuery { + let info_path = token_identity_infos_path_vec(token_id); + PathQuery::new_single_key(info_path, identity_id.to_vec()) + } + + /// The query getting a token info for many identities + pub fn token_infos_for_identity_ids_query( + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + ) -> PathQuery { + let info_path = token_identity_infos_path_vec(token_id); + let mut query = Query::new(); + query.insert_keys(identity_ids.iter().map(|key| key.to_vec()).collect()); + PathQuery { + path: info_path, + query: SizedQuery { + query, + limit: Some(identity_ids.len() as u16), + offset: None, + }, + } + } + + /// The query getting token infos for identities in a range + pub fn token_infos_for_range_query( + token_id: [u8; 32], + start_at: Option<([u8; 32], bool)>, + ascending: bool, + limit: u16, + ) -> PathQuery { + let info_path = token_identity_infos_path_vec(token_id); + 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: info_path, + query: SizedQuery { + query, + limit: Some(limit), + offset: None, + }, + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/mint/mod.rs b/packages/rs-drive/src/drive/tokens/mint/mod.rs new file mode 100644 index 0000000000..ddcab0a856 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/mint/mod.rs @@ -0,0 +1,106 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Mints (issues) new tokens by increasing the total supply and adding them to an identity's balance. + pub fn token_mint( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + issuance_amount: u64, + allow_first_mint: bool, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version.drive.methods.token.update.mint { + 0 => self.token_mint_v0( + token_id, + identity_id, + issuance_amount, + allow_first_mint, + block_info, + apply, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_mint".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds the operations to mint tokens without calculating fees and optionally applying. + pub fn token_mint_add_to_operations( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + issuance_amount: u64, + allow_first_mint: bool, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version.drive.methods.token.update.mint { + 0 => self.token_mint_add_to_operations_v0( + token_id, + identity_id, + issuance_amount, + allow_first_mint, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_mint_add_to_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Gathers the operations needed to mint tokens. + pub fn token_mint_operations( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + issuance_amount: u64, + allow_first_mint: bool, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.token.update.mint { + 0 => self.token_mint_operations_v0( + token_id, + identity_id, + issuance_amount, + allow_first_mint, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_mint_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/mint/v0/mod.rs b/packages/rs-drive/src/drive/tokens/mint/v0/mod.rs new file mode 100644 index 0000000000..f0d737455a --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/mint/v0/mod.rs @@ -0,0 +1,115 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + pub(super) fn token_mint_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + issuance_amount: u64, + allow_first_mint: bool, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let mut drive_operations = vec![]; + + self.token_mint_add_to_operations_v0( + token_id, + identity_id, + issuance_amount, + allow_first_mint, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok(fees) + } + + pub(super) fn token_mint_add_to_operations_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + issuance_amount: u64, + allow_first_mint: bool, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = + if apply { None } else { Some(HashMap::new()) }; + + let batch_operations = self.token_mint_operations_v0( + token_id, + identity_id, + issuance_amount, + allow_first_mint, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + pub(super) fn token_mint_operations_v0( + &self, + token_id: [u8; 32], + identity_id: [u8; 32], + issuance_amount: u64, + allow_first_mint: bool, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut drive_operations = vec![]; + + // Update identity balance + drive_operations.extend(self.add_to_identity_token_balance_operations( + token_id, + identity_id, + issuance_amount, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?); + + drive_operations.extend(self.add_to_token_total_supply_operations( + token_id, + issuance_amount, + allow_first_mint, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?); + + Ok(drive_operations) + } +} diff --git a/packages/rs-drive/src/drive/tokens/mod.rs b/packages/rs-drive/src/drive/tokens/mod.rs new file mode 100644 index 0000000000..c1f8f4fa90 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/mod.rs @@ -0,0 +1,54 @@ +/// Handles operations related to adding transaction history. +#[cfg(feature = "server")] +mod add_transaction_history_operations; + +/// Defines logic for applying status updates within the system. +#[cfg(feature = "server")] +pub mod apply_status; + +/// Manages operations related to balance handling. +#[cfg(any(feature = "server", feature = "verify"))] +pub mod balance; + +/// Implements functionality for burning tokens. +#[cfg(feature = "server")] +pub mod burn; + +/// Computes estimated costs for various operations. +#[cfg(feature = "server")] +pub mod estimated_costs; + +/// Manages freezing operations in the system. +#[cfg(feature = "server")] +pub mod freeze; + +/// Identity token info module, like if someone is frozen +#[cfg(any(feature = "server", feature = "verify"))] +pub mod info; + +/// Implements minting operations for creating new tokens. +#[cfg(feature = "server")] +pub mod mint; + +/// Manages system-level operations and utilities. +#[cfg(feature = "server")] +pub mod system; + +/// Handles transfer operations, including token movement. +#[cfg(feature = "server")] +pub mod transfer; + +/// Manages unfreezing operations within the system. +#[cfg(feature = "server")] +pub mod unfreeze; + +/// Calculates the total token balance across all accounts. +#[cfg(feature = "server")] +pub mod calculate_total_tokens_balance; + +/// Token status module, like if the token is paused +#[cfg(feature = "server")] +pub mod status; + +/// Token paths +pub mod paths; diff --git a/packages/rs-drive/src/drive/tokens/paths.rs b/packages/rs-drive/src/drive/tokens/paths.rs new file mode 100644 index 0000000000..ce5b8ef89c --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/paths.rs @@ -0,0 +1,105 @@ +use crate::drive::RootTree; + +/// Key for accessing token status information. +pub const TOKEN_STATUS_INFO_KEY: u8 = 96; +/// Key for accessing token identity information tree. +pub const TOKEN_IDENTITY_INFO_KEY: u8 = 160; +/// Key for accessing token balances tree. +pub const TOKEN_BALANCES_KEY: u8 = 128; + +/// The path for the balances tree + +pub fn tokens_root_path() -> [&'static [u8]; 1] { + [Into::<&[u8; 1]>::into(RootTree::Tokens)] +} + +/// The path for the balances tree + +pub fn tokens_root_path_vec() -> Vec> { + vec![Into::<&[u8; 1]>::into(RootTree::Tokens).to_vec()] +} + +/// The root path of token balances tree, this refers to a big sum tree + +pub fn token_balances_root_path() -> [&'static [u8]; 2] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_BALANCES_KEY], + ] +} + +/// The root path of token balances tree, this refers to a big sum tree + +pub fn token_balances_root_path_vec() -> Vec> { + vec![vec![RootTree::Tokens as u8], vec![TOKEN_BALANCES_KEY]] +} + +/// Returns the root path for token identity information as a fixed-size array of byte slices. + +pub fn token_identity_infos_root_path() -> [&'static [u8]; 2] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_IDENTITY_INFO_KEY], + ] +} + +/// Returns the root path for token identity information as a vector of byte vectors. + +pub fn token_identity_infos_root_path_vec() -> Vec> { + vec![vec![RootTree::Tokens as u8], vec![TOKEN_IDENTITY_INFO_KEY]] +} + +/// Returns the root path for token statuses as a fixed-size array of byte slices. + +pub fn token_statuses_root_path() -> [&'static [u8]; 2] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_STATUS_INFO_KEY], + ] +} + +/// Returns the root path for token statuses as a vector of byte vectors. + +pub fn token_statuses_root_path_vec() -> Vec> { + vec![vec![RootTree::Tokens as u8], vec![TOKEN_STATUS_INFO_KEY]] +} + +/// The path for the token balances tree + +pub fn token_balances_path(token_id: &[u8; 32]) -> [&[u8]; 3] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_BALANCES_KEY], + token_id, + ] +} + +/// The path for the token balances tree + +pub fn token_balances_path_vec(token_id: [u8; 32]) -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_BALANCES_KEY], + token_id.to_vec(), + ] +} + +/// The path for the token info tree + +pub fn token_identity_infos_path(token_id: &[u8; 32]) -> [&[u8]; 3] { + [ + Into::<&[u8; 1]>::into(RootTree::Tokens), + &[TOKEN_IDENTITY_INFO_KEY], + token_id, + ] +} + +/// The path for the token info tree + +pub fn token_identity_infos_path_vec(token_id: [u8; 32]) -> Vec> { + vec![ + vec![RootTree::Tokens as u8], + vec![TOKEN_IDENTITY_INFO_KEY], + token_id.to_vec(), + ] +} diff --git a/packages/rs-drive/src/drive/tokens/status/fetch_token_status/mod.rs b/packages/rs-drive/src/drive/tokens/status/fetch_token_status/mod.rs new file mode 100644 index 0000000000..f8b590441b --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/status/fetch_token_status/mod.rs @@ -0,0 +1,110 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::tokens::status::TokenStatus; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + /// Fetches the Token status from the backing store. + /// Passing `apply = false` will return estimated costs (0 or Some(0) in place of actual values). + /// + /// # Arguments + /// + /// * `token_id` - The ID of the token. + /// * `apply` - Whether to actually fetch from state (true) or estimate costs (false). + /// * `transaction` - The current transaction. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result, Error>` - The token info of the Identity if successful, or an error. + pub fn fetch_token_status( + &self, + token_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.token.fetch.token_status { + 0 => self.fetch_token_status_v0(token_id, transaction, platform_version), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_token_status".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the Token status with costs (if `apply = true`) and returns associated fee result. + pub fn fetch_token_status_with_costs( + &self, + token_id: [u8; 32], + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(Option, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.fetch_token_status_operations( + token_id, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the operations to get Token's status from the backing store. + /// If `apply` is false, the operations are stateless and only used for cost estimation. + /// + /// # Arguments + /// + /// * `token_id` - The ID of the token. + /// * `apply` - Whether to fetch actual stateful data (true) or just estimate costs (false). + /// * `transaction` - The current transaction. + /// * `drive_operations` - The drive operations vector to populate. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result, Error>` - The token info of the Identity if successful, or an error. + pub fn fetch_token_status_operations( + &self, + token_id: [u8; 32], + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.token.fetch.token_status { + 0 => self.fetch_token_status_operations_v0( + token_id, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_token_status_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/status/fetch_token_status/v0/mod.rs b/packages/rs-drive/src/drive/tokens/status/fetch_token_status/v0/mod.rs new file mode 100644 index 0000000000..db71c1cd7e --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/status/fetch_token_status/v0/mod.rs @@ -0,0 +1,70 @@ +use crate::drive::tokens::paths::token_statuses_root_path; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use crate::util::grove_operations::QueryTarget::QueryTargetValue; +use dpp::serialization::PlatformDeserializable; +use dpp::tokens::status::TokenStatus; +use dpp::version::PlatformVersion; +use grovedb::Element::Item; +use grovedb::{TransactionArg, TreeType}; + +impl Drive { + pub(super) fn fetch_token_status_v0( + &self, + token_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.fetch_token_status_operations_v0( + token_id, + true, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn fetch_token_status_operations_v0( + &self, + token_id: [u8; 32], + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let direct_query_type = if apply { + DirectQueryType::StatefulDirectQuery + } else { + DirectQueryType::StatelessDirectQuery { + in_tree_type: TreeType::NormalTree, + query_target: QueryTargetValue(8), + } + }; + + let token_statuses_root_path = token_statuses_root_path(); + + match self.grove_get_raw_optional( + (&token_statuses_root_path).into(), + &token_id, + direct_query_type, + transaction, + drive_operations, + &platform_version.drive, + ) { + Ok(Some(Item(info, _))) => { + Ok(Some(TokenStatus::deserialize_from_bytes(info.as_slice())?)) + } + + Ok(None) | Err(Error::GroveDB(grovedb::Error::PathKeyNotFound(_))) => Ok(None), + + Ok(Some(_)) => Err(Error::Drive(DriveError::CorruptedElementType( + "token status was present but was not an item", + ))), + + Err(e) => Err(e), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/status/fetch_token_statuses/mod.rs b/packages/rs-drive/src/drive/tokens/status/fetch_token_statuses/mod.rs new file mode 100644 index 0000000000..9f81e5ab2e --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/status/fetch_token_statuses/mod.rs @@ -0,0 +1,126 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::tokens::status::TokenStatus; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; +use std::collections::BTreeMap; + +impl Drive { + /// Fetches token statuses from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs whose infos are to be fetched. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The version of the platform to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result>, Error>` - A map of token IDs to their corresponding infos, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_token_statuses( + &self, + token_ids: &[[u8; 32]], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version.drive.methods.token.fetch.token_statuses { + 0 => self.fetch_token_statuses_v0(token_ids, transaction, platform_version), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_token_statuses".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the identity's token infos with associated costs. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to fetch the infos for. + /// * `block_info` - Information about the current block for fee calculation. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result<((BTreeMap<[u8; 32], Option>), FeeResult), Error>` - A tuple containing a map of token infos and the associated fee result. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_token_statuses_with_costs( + &self, + token_ids: &[[u8; 32]], + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(BTreeMap<[u8; 32], Option>, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.fetch_token_statuses_operations( + token_ids, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the low-level operations needed to fetch the identity's token infos from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to query the infos for. + /// * `transaction` - The current transaction context. + /// * `drive_operations` - A vector to store the created low-level drive operations. + /// * `platform_version` - The platform version to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result>, Error>` - A map of token IDs to their corresponding statuses. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn fetch_token_statuses_operations( + &self, + token_ids: &[[u8; 32]], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version.drive.methods.token.fetch.token_statuses { + 0 => self.fetch_token_statuses_operations_v0( + token_ids, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_token_statuses_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/status/fetch_token_statuses/v0/mod.rs b/packages/rs-drive/src/drive/tokens/status/fetch_token_statuses/v0/mod.rs new file mode 100644 index 0000000000..486ebde128 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/status/fetch_token_statuses/v0/mod.rs @@ -0,0 +1,76 @@ +use crate::drive::tokens::paths::{tokens_root_path_vec, TOKEN_STATUS_INFO_KEY}; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::serialization::PlatformDeserializable; +use dpp::tokens::status::TokenStatus; +use dpp::version::PlatformVersion; +use grovedb::Element::Item; +use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; +use std::collections::BTreeMap; + +impl Drive { + pub(super) fn fetch_token_statuses_v0( + &self, + token_ids: &[[u8; 32]], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + self.fetch_token_statuses_operations_v0( + token_ids, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn fetch_token_statuses_operations_v0( + &self, + token_ids: &[[u8; 32]], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + let tokens_root = tokens_root_path_vec(); + + let mut query = Query::new(); + + for token_id in token_ids { + query.insert_key(token_id.to_vec()); + } + + query.set_subquery_path(vec![vec![TOKEN_STATUS_INFO_KEY]]); + + let path_query = PathQuery::new( + tokens_root, + SizedQuery::new(query, Some(token_ids.len() as u16), None), + ); + + self.grove_get_raw_path_query_with_optional( + &path_query, + false, + transaction, + drive_operations, + &platform_version.drive, + )? + .into_iter() + .map(|(_, key, element)| { + let token_id: [u8; 32] = key.try_into().map_err(|_| { + Error::Drive(DriveError::CorruptedDriveState( + "token id not 32 bytes".to_string(), + )) + })?; + match element { + Some(Item(value, ..)) => { + Ok((token_id, Some(TokenStatus::deserialize_from_bytes(&value)?))) + } + None => Ok((token_id, None)), + _ => Err(Error::Drive(DriveError::CorruptedDriveState( + "token tree for statuses should contain only items".to_string(), + ))), + } + }) + .collect() + } +} diff --git a/packages/rs-drive/src/drive/tokens/status/mod.rs b/packages/rs-drive/src/drive/tokens/status/mod.rs new file mode 100644 index 0000000000..57d88f594e --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/status/mod.rs @@ -0,0 +1,7 @@ +#[cfg(feature = "server")] +mod fetch_token_statuses; + +#[cfg(feature = "server")] +mod fetch_token_status; +#[cfg(feature = "server")] +mod prove_token_statuses; diff --git a/packages/rs-drive/src/drive/tokens/status/prove_token_statuses/mod.rs b/packages/rs-drive/src/drive/tokens/status/prove_token_statuses/mod.rs new file mode 100644 index 0000000000..29e31ef594 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/status/prove_token_statuses/mod.rs @@ -0,0 +1,124 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + /// Proves the token statuses from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs whose statuses are to be proved. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The version of the platform to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_token_statuses( + &self, + token_ids: &[[u8; 32]], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.token.prove.token_statuses { + 0 => self.prove_token_statuses_v0(token_ids, transaction, platform_version), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_token_statuses".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Proves the token statuses with associated costs. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to prove the infos for. + /// * `block_info` - Information about the current block for fee calculation. + /// * `transaction` - The current transaction context. + /// * `platform_version` - The platform version to use. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_token_statuses_with_costs( + &self, + token_ids: &[[u8; 32]], + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result<(Vec, FeeResult), Error> { + let mut drive_operations: Vec = vec![]; + let value = self.prove_token_statuses_operations( + token_ids, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok((value, fees)) + } + + /// Creates the low-level operations needed to prove the Token statuses from the backing store. + /// + /// # Arguments + /// + /// * `token_ids` - A list of token IDs to query the statuses for. + /// * `transaction` - The current transaction context. + /// * `drive_operations` - A vector to store the created low-level drive operations. + /// * `platform_version` - The platform version to use for compatibility checks. + /// + /// # Returns + /// + /// * `Result, Error>` - A grovedb proof, or an error. + /// + /// # Errors + /// + /// * `DriveError::UnknownVersionMismatch` - If the platform version does not support the requested operation. + pub fn prove_token_statuses_operations( + &self, + token_ids: &[[u8; 32]], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.token.prove.token_statuses { + 0 => self.prove_token_statuses_operations_v0( + token_ids, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_token_statuses_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/status/prove_token_statuses/v0/mod.rs b/packages/rs-drive/src/drive/tokens/status/prove_token_statuses/v0/mod.rs new file mode 100644 index 0000000000..baae7936be --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/status/prove_token_statuses/v0/mod.rs @@ -0,0 +1,52 @@ +use crate::drive::tokens::paths::{tokens_root_path_vec, TOKEN_IDENTITY_INFO_KEY}; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::version::PlatformVersion; +use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; + +impl Drive { + pub(super) fn prove_token_statuses_v0( + &self, + token_ids: &[[u8; 32]], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.prove_token_statuses_operations_v0( + token_ids, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn prove_token_statuses_operations_v0( + &self, + token_ids: &[[u8; 32]], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let tokens_root = tokens_root_path_vec(); + + let mut query = Query::new(); + + for token_id in token_ids { + query.insert_key(token_id.to_vec()); + } + + query.set_subquery_path(vec![vec![TOKEN_IDENTITY_INFO_KEY]]); + + let path_query = PathQuery::new( + tokens_root, + SizedQuery::new(query, Some(token_ids.len() as u16), None), + ); + + self.grove_get_proved_path_query( + &path_query, + transaction, + drive_operations, + &platform_version.drive, + ) + } +} diff --git a/packages/rs-drive/src/drive/tokens/system/add_to_token_total_supply/mod.rs b/packages/rs-drive/src/drive/tokens/system/add_to_token_total_supply/mod.rs new file mode 100644 index 0000000000..4daa069ec8 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/add_to_token_total_supply/mod.rs @@ -0,0 +1,119 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Adds to the token's total supply + pub fn add_to_token_total_supply( + &self, + token_id: [u8; 32], + amount: u64, + allow_first_mint: bool, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive + .methods + .token + .update + .add_to_token_total_supply + { + 0 => self.add_to_token_total_supply_v0( + token_id, + amount, + allow_first_mint, + block_info, + apply, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_to_token_total_supply".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds the operations of adding to the token total supply + pub fn add_to_token_total_supply_add_to_operations( + &self, + token_id: [u8; 32], + amount: u64, + allow_first_mint: bool, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version + .drive + .methods + .token + .update + .add_to_token_total_supply + { + 0 => self.add_to_token_total_supply_add_to_operations_v0( + token_id, + amount, + allow_first_mint, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_to_token_total_supply_add_to_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// The operations needed to add to the token total supply + pub fn add_to_token_total_supply_operations( + &self, + token_id: [u8; 32], + amount: u64, + allow_first_mint: bool, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .update + .add_to_token_total_supply + { + 0 => self.add_to_token_total_supply_operations_v0( + token_id, + amount, + allow_first_mint, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_to_token_total_supply_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/system/add_to_token_total_supply/v0/mod.rs b/packages/rs-drive/src/drive/tokens/system/add_to_token_total_supply/v0/mod.rs new file mode 100644 index 0000000000..686591211a --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/add_to_token_total_supply/v0/mod.rs @@ -0,0 +1,148 @@ +use crate::drive::balances::{total_tokens_root_supply_path, total_tokens_root_supply_path_vec}; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::fees::op::LowLevelDriveOperation::GroveOperation; +use crate::util::grove_operations::DirectQueryType; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::batch::{KeyInfoPath, QualifiedGroveDbOp}; +use grovedb::Element::SumItem; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + pub(super) fn add_to_token_total_supply_v0( + &self, + token_id: [u8; 32], + amount: u64, + allow_first_mint: bool, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let mut drive_operations = vec![]; + + self.add_to_token_total_supply_add_to_operations_v0( + token_id, + amount, + apply, + allow_first_mint, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok(fees) + } + + pub(super) fn add_to_token_total_supply_add_to_operations_v0( + &self, + token_id: [u8; 32], + amount: u64, + allow_first_mint: bool, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = + if apply { None } else { Some(HashMap::new()) }; + + let batch_operations = self.add_to_token_total_supply_operations_v0( + token_id, + amount, + allow_first_mint, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + pub(super) fn add_to_token_total_supply_operations_v0( + &self, + token_id: [u8; 32], + amount: u64, + allow_first_mint: bool, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut drive_operations = vec![]; + + // If we only estimate, add estimation costs + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info { + // Add your estimation logic similar to add_to_system_credits_operations_v0 + // For example: + Self::add_estimation_costs_for_token_total_supply( + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + + let path_holding_total_token_supply = total_tokens_root_supply_path(); + let path_holding_total_token_supply_vec = total_tokens_root_supply_path_vec(); + let total_token_supply_in_platform = self.grove_get_raw_value_u64_from_encoded_var_vec( + (&path_holding_total_token_supply).into(), + &token_id, + DirectQueryType::StatefulDirectQuery, + transaction, + &mut drive_operations, + &platform_version.drive, + )?; + + if let Some(total_token_supply_in_platform) = total_token_supply_in_platform { + let new_total = (total_token_supply_in_platform as i64) + .checked_add(amount as i64) + .ok_or(Error::Drive(DriveError::CriticalCorruptedState( + "trying to add an amount that would underflow total supply", + )))?; + let replace_op = QualifiedGroveDbOp::replace_op( + path_holding_total_token_supply_vec, + token_id.to_vec(), + SumItem(new_total, None), + ); + drive_operations.push(GroveOperation(replace_op)); + } else if allow_first_mint { + if amount > i64::MAX as u64 { + return Err(Error::Drive(DriveError::CriticalCorruptedState( + "amount is over max allowed in Sum Item (i64::Max)", + ))); + } + let insert_op = QualifiedGroveDbOp::insert_only_op( + path_holding_total_token_supply_vec, + token_id.to_vec(), + SumItem(amount as i64, None), + ); + drive_operations.push(GroveOperation(insert_op)); + } else { + return Err(Error::Drive(DriveError::CriticalCorruptedState( + "Total supply for token not found in Platform", + ))); + } + + Ok(drive_operations) + } +} diff --git a/packages/rs-drive/src/drive/tokens/system/create_token_trees/mod.rs b/packages/rs-drive/src/drive/tokens/system/create_token_trees/mod.rs new file mode 100644 index 0000000000..49656bb930 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/create_token_trees/mod.rs @@ -0,0 +1,124 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; + +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Adds an identity by inserting a new identity subtree structure to the `Identities` subtree. + pub fn create_token_trees( + &self, + token_id: [u8; 32], + start_as_paused: bool, + allow_already_exists: bool, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive + .methods + .token + .update + .create_token_trees + { + 0 => self.create_token_trees_v0( + token_id, + start_as_paused, + allow_already_exists, + block_info, + apply, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "create_token_trees".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds identity creation operations to drive operations + pub fn create_token_trees_add_to_operations( + &self, + token_id: [u8; 32], + start_as_paused: bool, + allow_already_exists: bool, + apply: bool, + previous_batch_operations: &mut Option<&mut Vec>, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version + .drive + .methods + .token + .update + .create_token_trees + { + 0 => self.create_token_trees_add_to_operations_v0( + token_id, + start_as_paused, + allow_already_exists, + apply, + previous_batch_operations, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "create_token_trees_add_to_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// The operations needed to create an identity + pub fn create_token_trees_operations( + &self, + token_id: [u8; 32], + start_as_paused: bool, + allow_already_exists: bool, + previous_batch_operations: &mut Option<&mut Vec>, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .update + .create_token_trees + { + 0 => self.create_token_trees_operations_v0( + token_id, + start_as_paused, + allow_already_exists, + previous_batch_operations, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "create_token_trees_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/system/create_token_trees/v0/mod.rs b/packages/rs-drive/src/drive/tokens/system/create_token_trees/v0/mod.rs new file mode 100644 index 0000000000..71224f1328 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/create_token_trees/v0/mod.rs @@ -0,0 +1,220 @@ +use crate::drive::balances::total_tokens_root_supply_path; +use crate::drive::tokens::paths::{ + token_balances_root_path, token_identity_infos_root_path, token_statuses_root_path, +}; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::{BatchInsertApplyType, BatchInsertTreeApplyType, QueryTarget}; +use crate::util::object_size_info::PathKeyElementInfo; +use crate::util::object_size_info::PathKeyInfo::PathFixedSizeKeyRef; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::serialization::PlatformSerializable; +use dpp::tokens::status::TokenStatus; +use grovedb::batch::KeyInfoPath; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; +use platform_version::version::PlatformVersion; +use std::collections::HashMap; + +impl Drive { + /// Creates a new token root subtree at `TokenBalances` keyed by `token_id`. + /// This function applies the operations directly, calculates fees, and returns the fee result. + pub(super) fn create_token_trees_v0( + &self, + token_id: [u8; 32], + start_as_paused: bool, + allow_already_exists: bool, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let mut drive_operations: Vec = vec![]; + + // Add operations to create the token root tree + self.create_token_trees_add_to_operations_v0( + token_id, + start_as_paused, + allow_already_exists, + apply, + &mut None, + transaction, + &mut drive_operations, + platform_version, + )?; + + // If applying, calculate fees + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok(fees) + } + + /// Adds the token root creation operations to the provided `drive_operations` vector without + /// calculating or returning fees. If `apply` is false, it will only estimate costs. + pub(super) fn create_token_trees_add_to_operations_v0( + &self, + token_id: [u8; 32], + start_as_paused: bool, + allow_already_exists: bool, + apply: bool, + previous_batch_operations: &mut Option<&mut Vec>, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = if apply { + None::> + } else { + Some(HashMap::new()) + }; + + // Get the operations required to create the token tree + let batch_operations = self.create_token_trees_operations_v0( + token_id, + start_as_paused, + allow_already_exists, + previous_batch_operations, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + // Apply or estimate the operations + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + /// Gathers the operations needed to create the token root subtree. If `apply` is false, it + /// populates `estimated_costs_only_with_layer_info` instead of applying. + pub(super) fn create_token_trees_operations_v0( + &self, + token_id: [u8; 32], + start_as_paused: bool, + allow_already_exists: bool, + previous_batch_operations: &mut Option<&mut Vec>, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut batch_operations: Vec = vec![]; + + let non_sum_tree_apply_type = if estimated_costs_only_with_layer_info.is_none() { + BatchInsertTreeApplyType::StatefulBatchInsertTree + } else { + BatchInsertTreeApplyType::StatelessBatchInsertTree { + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, + flags_len: 0, + } + }; + + let item_apply_type = if estimated_costs_only_with_layer_info.is_none() { + BatchInsertApplyType::StatefulBatchInsert + } else { + BatchInsertApplyType::StatelessBatchInsert { + in_tree_type: TreeType::NormalTree, + target: QueryTarget::QueryTargetValue(8), + } + }; + + let token_balance_tree_apply_type = if estimated_costs_only_with_layer_info.is_none() { + BatchInsertTreeApplyType::StatefulBatchInsertTree + } else { + BatchInsertTreeApplyType::StatelessBatchInsertTree { + in_tree_type: TreeType::BigSumTree, + tree_type: TreeType::SumTree, + flags_len: 0, + } + }; + + // Insert an empty tree for this token if it doesn't exist + let inserted = self.batch_insert_empty_tree_if_not_exists( + PathFixedSizeKeyRef::<2>((token_balances_root_path(), token_id.as_slice())), + TreeType::SumTree, + None, + token_balance_tree_apply_type, + transaction, + previous_batch_operations, + &mut batch_operations, + &platform_version.drive, + )?; + + if !inserted && !allow_already_exists { + // The token root already exists. Depending on your logic, this might be allowed or should be treated as an error. + return Err(Error::Drive(DriveError::CorruptedDriveState( + "token balance root tree already exists".to_string(), + ))); + } + + let inserted = self.batch_insert_empty_tree_if_not_exists( + PathFixedSizeKeyRef::<2>((token_identity_infos_root_path(), token_id.as_slice())), + TreeType::NormalTree, + None, + non_sum_tree_apply_type, + transaction, + &mut None, + &mut batch_operations, + &platform_version.drive, + )?; + + if !inserted && !allow_already_exists { + // The token root already exists. Depending on your logic, this might be allowed or should be treated as an error. + return Err(Error::Drive(DriveError::CorruptedDriveState( + "token balance tree already exists".to_string(), + ))); + } + + let starting_status = TokenStatus::new(start_as_paused, platform_version)?; + let token_status_bytes = starting_status.serialize_consume_to_bytes()?; + + let inserted = self.batch_insert_if_not_exists( + PathKeyElementInfo::PathFixedSizeKeyRefElement::<2>(( + token_statuses_root_path(), + token_id.as_slice(), + Element::Item(token_status_bytes, None), + )), + item_apply_type, + transaction, + &mut batch_operations, + &platform_version.drive, + )?; + + if !inserted && !allow_already_exists { + // The token root already exists. Depending on your logic, this might be allowed or should be treated as an error. + return Err(Error::Drive(DriveError::CorruptedDriveState( + "token info tree already exists".to_string(), + ))); + } + + self.batch_insert_sum_item_if_not_exists( + PathKeyElementInfo::PathFixedSizeKeyRefElement::<2>(( + total_tokens_root_supply_path(), + token_id.as_slice(), + Element::SumItem(0, None), + )), + !allow_already_exists, + item_apply_type, + transaction, + &mut batch_operations, + &platform_version.drive, + )?; + + Ok(batch_operations) + } +} diff --git a/packages/rs-drive/src/drive/tokens/system/mod.rs b/packages/rs-drive/src/drive/tokens/system/mod.rs new file mode 100644 index 0000000000..8d0f456d61 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/mod.rs @@ -0,0 +1,3 @@ +mod add_to_token_total_supply; +mod create_token_trees; +mod remove_from_token_total_supply; diff --git a/packages/rs-drive/src/drive/tokens/system/remove_from_token_total_supply/mod.rs b/packages/rs-drive/src/drive/tokens/system/remove_from_token_total_supply/mod.rs new file mode 100644 index 0000000000..4ede94b632 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/remove_from_token_total_supply/mod.rs @@ -0,0 +1,112 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Removes from the token's total supply + pub fn remove_from_token_total_supply( + &self, + token_id: [u8; 32], + amount: u64, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive + .methods + .token + .update + .remove_from_token_total_supply + { + 0 => self.remove_from_token_total_supply_v0( + token_id, + amount, + block_info, + apply, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "remove_from_token_total_supply".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds the operations of removing from the token total supply + pub fn remove_from_token_total_supply_add_to_operations( + &self, + token_id: [u8; 32], + amount: u64, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version + .drive + .methods + .token + .update + .remove_from_token_total_supply + { + 0 => self.remove_from_token_total_supply_add_to_operations_v0( + token_id, + amount, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "remove_from_token_total_supply_add_to_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// The operations needed to remove from the token total supply + pub fn remove_from_token_total_supply_operations( + &self, + token_id: [u8; 32], + amount: u64, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .update + .remove_from_token_total_supply + { + 0 => self.remove_from_token_total_supply_operations_v0( + token_id, + amount, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "remove_from_token_total_supply_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/system/remove_from_token_total_supply/v0/mod.rs b/packages/rs-drive/src/drive/tokens/system/remove_from_token_total_supply/v0/mod.rs new file mode 100644 index 0000000000..1bdbe38ebb --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/remove_from_token_total_supply/v0/mod.rs @@ -0,0 +1,128 @@ +use crate::drive::balances::{total_tokens_root_supply_path, total_tokens_root_supply_path_vec}; +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::fees::op::LowLevelDriveOperation::GroveOperation; +use crate::util::grove_operations::DirectQueryType; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::batch::QualifiedGroveDbOp; +use grovedb::Element::SumItem; +use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + pub(super) fn remove_from_token_total_supply_v0( + &self, + token_id: [u8; 32], + amount: u64, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let mut drive_operations = vec![]; + + self.remove_from_token_total_supply_add_to_operations_v0( + token_id, + amount, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok(fees) + } + + pub(super) fn remove_from_token_total_supply_add_to_operations_v0( + &self, + token_id: [u8; 32], + amount: u64, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = + if apply { None } else { Some(HashMap::new()) }; + + let batch_operations = self.remove_from_token_total_supply_operations_v0( + token_id, + amount, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + pub(super) fn remove_from_token_total_supply_operations_v0( + &self, + token_id: [u8; 32], + amount: u64, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut drive_operations = vec![]; + + // If we only estimate, add estimation costs + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info { + // Add your estimation logic similar to add_to_token_total_supply if needed + // For example (this is a placeholder method, you must implement similarly as others): + Self::add_estimation_costs_for_token_total_supply( + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + + let path_holding_total_token_supply = total_tokens_root_supply_path(); + let total_token_supply_in_platform = self + .grove_get_raw_value_u64_from_encoded_var_vec( + (&path_holding_total_token_supply).into(), + &token_id, + DirectQueryType::StatefulDirectQuery, + transaction, + &mut drive_operations, + &platform_version.drive, + )? + .ok_or(Error::Drive(DriveError::CriticalCorruptedState( + "Total supply for Token not found in Platform", + )))?; + let new_total = total_token_supply_in_platform + .checked_sub(amount) + .ok_or(Error::Drive(DriveError::CriticalCorruptedState( + "trying to subtract an amount that would underflow total supply", + )))?; + let path_holding_total_token_supply_vec = total_tokens_root_supply_path_vec(); + let replace_op = QualifiedGroveDbOp::replace_op( + path_holding_total_token_supply_vec, + token_id.to_vec(), + SumItem(new_total as i64, None), + ); + drive_operations.push(GroveOperation(replace_op)); + + Ok(drive_operations) + } +} diff --git a/packages/rs-drive/src/drive/tokens/transfer/mod.rs b/packages/rs-drive/src/drive/tokens/transfer/mod.rs new file mode 100644 index 0000000000..bb18a9220b --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/transfer/mod.rs @@ -0,0 +1,106 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Transfers tokens from one identity to another without changing total supply. + pub fn token_transfer( + &self, + token_id: [u8; 32], + from_identity_id: [u8; 32], + to_identity_id: [u8; 32], + amount: u64, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version.drive.methods.token.update.transfer { + 0 => self.token_transfer_v0( + token_id, + from_identity_id, + to_identity_id, + amount, + block_info, + apply, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_transfer".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds operations to transfer tokens without calculating fees. + pub fn token_transfer_add_to_operations( + &self, + token_id: [u8; 32], + from_identity_id: [u8; 32], + to_identity_id: [u8; 32], + amount: u64, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version.drive.methods.token.update.transfer { + 0 => self.token_transfer_add_to_operations_v0( + token_id, + from_identity_id, + to_identity_id, + amount, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_transfer_add_to_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Gathers the operations needed to transfer tokens. + pub fn token_transfer_operations( + &self, + token_id: [u8; 32], + from_identity_id: [u8; 32], + to_identity_id: [u8; 32], + amount: u64, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.token.update.transfer { + 0 => self.token_transfer_operations_v0( + token_id, + from_identity_id, + to_identity_id, + amount, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_transfer_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/transfer/v0/mod.rs b/packages/rs-drive/src/drive/tokens/transfer/v0/mod.rs new file mode 100644 index 0000000000..6e1f95689b --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/transfer/v0/mod.rs @@ -0,0 +1,114 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + pub(super) fn token_transfer_v0( + &self, + token_id: [u8; 32], + from_identity_id: [u8; 32], + to_identity_id: [u8; 32], + amount: u64, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let mut drive_operations = vec![]; + + self.token_transfer_add_to_operations_v0( + token_id, + from_identity_id, + to_identity_id, + amount, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok(fees) + } + + pub(super) fn token_transfer_add_to_operations_v0( + &self, + token_id: [u8; 32], + from_identity_id: [u8; 32], + to_identity_id: [u8; 32], + amount: u64, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = + if apply { None } else { Some(HashMap::new()) }; + + let batch_operations = self.token_transfer_operations_v0( + token_id, + from_identity_id, + to_identity_id, + amount, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + pub(super) fn token_transfer_operations_v0( + &self, + token_id: [u8; 32], + from_identity_id: [u8; 32], + to_identity_id: [u8; 32], + amount: u64, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut drive_operations = vec![]; + + drive_operations.extend(self.remove_from_identity_token_balance_operations( + token_id, + from_identity_id, + amount, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?); + drive_operations.extend(self.add_to_identity_token_balance_operations( + token_id, + to_identity_id, + amount, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?); + + // Total supply remains the same. + Ok(drive_operations) + } +} diff --git a/packages/rs-drive/src/drive/tokens/unfreeze/mod.rs b/packages/rs-drive/src/drive/tokens/unfreeze/mod.rs new file mode 100644 index 0000000000..0e483c0c24 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/unfreeze/mod.rs @@ -0,0 +1,95 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::Identifier; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Burns tokens by reducing the total supply and removing them from an identity's balance. + pub fn token_unfreeze( + &self, + token_id: Identifier, + frozen_identity_id: Identifier, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version.drive.methods.token.update.unfreeze { + 0 => self.token_unfreeze_v0( + token_id, + frozen_identity_id, + block_info, + apply, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_unfreeze".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds the operations to unfreeze tokens without calculating fees and optionally applying. + pub fn token_unfreeze_add_to_operations( + &self, + token_id: Identifier, + frozen_identity_id: Identifier, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + match platform_version.drive.methods.token.update.unfreeze { + 0 => self.token_unfreeze_add_to_operations_v0( + token_id, + frozen_identity_id, + apply, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_unfreeze_add_to_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Gathers the operations needed to unfreeze tokens. + pub fn token_unfreeze_operations( + &self, + token_id: Identifier, + frozen_identity_id: Identifier, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version.drive.methods.token.update.unfreeze { + 0 => self.token_unfreeze_operations_v0( + token_id, + frozen_identity_id, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "token_unfreeze_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/unfreeze/v0/mod.rs b/packages/rs-drive/src/drive/tokens/unfreeze/v0/mod.rs new file mode 100644 index 0000000000..f9f0339a82 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/unfreeze/v0/mod.rs @@ -0,0 +1,147 @@ +use crate::drive::tokens::paths::token_identity_infos_path; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use crate::util::grove_operations::QueryTarget::QueryTargetValue; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::identifier::Identifier; +use dpp::serialization::{PlatformDeserializable, PlatformSerializable}; +use dpp::tokens::info::v0::IdentityTokenInfoV0Accessors; +use dpp::tokens::info::IdentityTokenInfo; +use dpp::version::PlatformVersion; +use grovedb::{batch::KeyInfoPath, Element, EstimatedLayerInformation, TransactionArg, TreeType}; +use std::collections::HashMap; + +impl Drive { + pub(super) fn token_unfreeze_v0( + &self, + token_id: Identifier, + frozen_identity_id: Identifier, + block_info: &BlockInfo, + apply: bool, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let mut drive_operations = vec![]; + + self.token_unfreeze_add_to_operations_v0( + token_id, + frozen_identity_id, + apply, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fees = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + self.config.epochs_per_era, + platform_version, + None, + )?; + + Ok(fees) + } + + pub(super) fn token_unfreeze_add_to_operations_v0( + &self, + token_id: Identifier, + frozen_identity_id: Identifier, + apply: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result<(), Error> { + let mut estimated_costs_only_with_layer_info = + if apply { None } else { Some(HashMap::new()) }; + + let batch_operations = self.token_unfreeze_operations_v0( + token_id, + frozen_identity_id, + &mut estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + + self.apply_batch_low_level_drive_operations( + estimated_costs_only_with_layer_info, + transaction, + batch_operations, + drive_operations, + &platform_version.drive, + ) + } + + pub(super) fn token_unfreeze_operations_v0( + &self, + token_id: Identifier, + frozen_identity_id: Identifier, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut drive_operations = vec![]; + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info { + Self::add_estimation_costs_for_token_identity_infos( + token_id.to_buffer(), + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + + // no estimated_costs_only_with_layer_info, means we want to apply to state + let direct_query_type = if estimated_costs_only_with_layer_info.is_none() { + DirectQueryType::StatefulDirectQuery + } else { + DirectQueryType::StatelessDirectQuery { + in_tree_type: TreeType::NormalTree, + query_target: QueryTargetValue(8), + } + }; + + let token_info_path = token_identity_infos_path(token_id.as_bytes()); + match self + .grove_get_raw_optional_item( + (&token_info_path).into(), + frozen_identity_id.as_slice(), + direct_query_type, + transaction, + &mut drive_operations, + &platform_version.drive, + )? + .map(|bytes| IdentityTokenInfo::deserialize_from_bytes(&bytes)) + .transpose()? + { + None => { + let identity_token_info_bytes = IdentityTokenInfo::new(false, platform_version)? + .serialize_consume_to_bytes()?; + drive_operations.push(LowLevelDriveOperation::insert_for_known_path_key_element( + token_info_path.iter().map(|a| a.to_vec()).collect(), + frozen_identity_id.to_vec(), + Element::new_item(identity_token_info_bytes), + )); + } + Some(mut token_info) => { + if token_info.frozen() { + token_info.set_frozen(false); + let identity_token_info_bytes = token_info.serialize_consume_to_bytes()?; + drive_operations.push( + LowLevelDriveOperation::replace_for_known_path_key_element( + token_info_path.iter().map(|a| a.to_vec()).collect(), + frozen_identity_id.to_vec(), + Element::new_item(identity_token_info_bytes), + ), + ); + } + } + }; + + Ok(drive_operations) + } +} diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_all_votes_given_by_identities/v0/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_all_votes_given_by_identities/v0/mod.rs index 81b3d0fab7..2f2346d88b 100644 --- a/packages/rs-drive/src/drive/votes/cleanup/remove_all_votes_given_by_identities/v0/mod.rs +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_all_votes_given_by_identities/v0/mod.rs @@ -15,7 +15,7 @@ use dpp::dashcore::Network; use dpp::prelude::{BlockHeight, Identifier}; use dpp::version::PlatformVersion; use grovedb::query_result_type::QueryResultType::QueryPathKeyElementTrioResultType; -use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; +use grovedb::{MaybeTree, PathQuery, Query, SizedQuery, TransactionArg}; impl Drive { /// We remove votes for an identity when that identity is somehow disabled. Currently there is @@ -70,7 +70,7 @@ impl Drive { vote_path_ref.as_slice().into(), vote_id.as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, &mut deletion_batch, @@ -106,7 +106,7 @@ impl Drive { absolute_path_ref.as_slice().into(), identifier_bytes.as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, &mut deletion_batch, diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_contenders_operations/v0/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_contenders_operations/v0/mod.rs index 5e9127abf6..3598e7b061 100644 --- a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_contenders_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_contenders_operations/v0/mod.rs @@ -8,7 +8,7 @@ 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 grovedb::{MaybeTree, TransactionArg}; use platform_version::version::PlatformVersion; use std::collections::BTreeMap; @@ -33,7 +33,7 @@ impl Drive { path.as_slice().into(), resource_vote_choice.to_key().as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, 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 index 7440aaadce..4a2542b390 100644 --- 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 @@ -10,7 +10,7 @@ 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 grovedb::{MaybeTree, TransactionArg}; use platform_version::version::PlatformVersion; use std::collections::BTreeMap; @@ -35,7 +35,7 @@ impl Drive { path.as_slice().into(), resource_vote_choice.to_key().as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, @@ -47,7 +47,7 @@ impl Drive { path.as_slice().into(), &RESOURCE_ABSTAIN_VOTE_TREE_KEY_U8_32, BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, @@ -58,7 +58,7 @@ impl Drive { path.as_slice().into(), &RESOURCE_LOCK_VOTE_TREE_KEY_U8_32, BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, 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 cb25558a38..c417c36cfb 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 @@ -9,7 +9,7 @@ use dpp::identifier::Identifier; use dpp::identity::TimestampMillis; use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; use grovedb::query_result_type::QueryResultType; -use grovedb::{PathQuery, TransactionArg}; +use grovedb::{MaybeTree, PathQuery, TransactionArg}; use platform_version::version::PlatformVersion; use std::collections::BTreeMap; use std::ops::RangeFull; @@ -54,7 +54,7 @@ impl Drive { documents_storage_path.as_slice().into(), document_key.as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, @@ -72,7 +72,7 @@ impl Drive { contender_path.as_slice().into(), vec![0].as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, 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 index f672267034..b21d9584fa 100644 --- 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 @@ -11,7 +11,7 @@ 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 grovedb::{MaybeTree, TransactionArg}; use platform_version::version::PlatformVersion; use std::collections::BTreeMap; @@ -70,7 +70,7 @@ impl Drive { documents_storage_path.as_slice().into(), document_key.as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, @@ -89,7 +89,7 @@ impl Drive { contender_path.as_slice().into(), vec![0].as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_end_date_query_operations/v0/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_end_date_query_operations/v0/mod.rs index 1f2a36d353..4a0e7c0a4b 100644 --- a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_end_date_query_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_end_date_query_operations/v0/mod.rs @@ -8,7 +8,7 @@ use dpp::identifier::Identifier; use dpp::identity::TimestampMillis; use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; use grovedb::batch::KeyInfoPath; -use grovedb::TransactionArg; +use grovedb::{MaybeTree, TransactionArg}; use platform_version::version::PlatformVersion; use std::collections::BTreeMap; @@ -34,7 +34,7 @@ impl Drive { // VotePoll Info 1 VotePoll Info 2 VotePoll Info 3 let delete_apply_type = BatchDeleteUpTreeApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }; for (vote_poll, end_date, _) in vote_polls { 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 index b47e5feb60..ef35e8a2db 100644 --- 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 @@ -12,7 +12,7 @@ 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 grovedb::{MaybeTree, TransactionArg}; use platform_version::version::PlatformVersion; use std::collections::BTreeMap; @@ -38,7 +38,7 @@ impl Drive { // 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)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }; let mut by_end_date: BTreeMap> = BTreeMap::new(); 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 index 141fd3c766..0f30733b0a 100644 --- 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 @@ -7,7 +7,7 @@ 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 grovedb::{MaybeTree, TransactionArg}; use platform_version::version::PlatformVersion; use std::collections::BTreeMap; @@ -29,7 +29,7 @@ impl Drive { path.as_slice().into(), &RESOURCE_STORED_INFO_KEY_U8_32, BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, 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 index 13d3832592..d1a3583bf0 100644 --- 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 @@ -7,7 +7,7 @@ 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 grovedb::{MaybeTree, TransactionArg}; use platform_version::version::PlatformVersion; use std::collections::BTreeMap; @@ -30,7 +30,7 @@ impl Drive { path.as_slice().into(), last_index_path.as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_votes_operations/v0/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_votes_operations/v0/mod.rs index 4bd8edcff9..44ee761e56 100644 --- a/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_votes_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_contested_resource_vote_poll_votes_operations/v0/mod.rs @@ -7,7 +7,7 @@ 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 grovedb::{MaybeTree, TransactionArg}; use platform_version::version::PlatformVersion; use std::collections::BTreeMap; @@ -36,7 +36,7 @@ impl Drive { path.as_slice().into(), vote.as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, @@ -51,7 +51,7 @@ impl Drive { path.as_slice().into(), vec![VOTING_STORAGE_TREE_KEY].as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, diff --git a/packages/rs-drive/src/drive/votes/cleanup/remove_specific_votes_given_by_identity/v0/mod.rs b/packages/rs-drive/src/drive/votes/cleanup/remove_specific_votes_given_by_identity/v0/mod.rs index bc8b467985..1802e9ab24 100644 --- a/packages/rs-drive/src/drive/votes/cleanup/remove_specific_votes_given_by_identity/v0/mod.rs +++ b/packages/rs-drive/src/drive/votes/cleanup/remove_specific_votes_given_by_identity/v0/mod.rs @@ -6,7 +6,7 @@ use crate::fees::op::LowLevelDriveOperation; use crate::util::grove_operations::BatchDeleteApplyType; use dpp::prelude::Identifier; use dpp::version::PlatformVersion; -use grovedb::TransactionArg; +use grovedb::{MaybeTree, TransactionArg}; impl Drive { /// We remove votes for an identity when that identity is somehow disabled. Currently there is @@ -29,7 +29,7 @@ impl Drive { vote_path_ref.as_slice().into(), vote_identifier_to_remove.as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, batch_operations, diff --git a/packages/rs-drive/src/drive/votes/insert/contested_resource/individual_vote/register_contested_resource_identity_vote/v0/mod.rs b/packages/rs-drive/src/drive/votes/insert/contested_resource/individual_vote/register_contested_resource_identity_vote/v0/mod.rs index c7b284b845..2a1ddacfdd 100644 --- a/packages/rs-drive/src/drive/votes/insert/contested_resource/individual_vote/register_contested_resource_identity_vote/v0/mod.rs +++ b/packages/rs-drive/src/drive/votes/insert/contested_resource/individual_vote/register_contested_resource_identity_vote/v0/mod.rs @@ -16,7 +16,7 @@ use dpp::fee::fee_result::FeeResult; use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; use dpp::{bincode, ProtocolError}; use grovedb::reference_path::ReferencePathType; -use grovedb::{Element, TransactionArg}; +use grovedb::{Element, MaybeTree, TransactionArg, TreeType}; use platform_version::version::PlatformVersion; impl Drive { @@ -104,7 +104,7 @@ impl Drive { previous_voting_path.as_slice().into(), voter_pro_tx_hash.as_slice(), BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, true)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, &mut drive_operations, @@ -118,7 +118,7 @@ impl Drive { self.batch_insert_empty_tree_if_not_exists( PathKeyInfo::PathKey::<0>((votes_identities_path, voter_pro_tx_hash.to_vec())), - false, + TreeType::NormalTree, None, BatchInsertTreeApplyType::StatefulBatchInsertTree, //todo this shouldn't always be stateful transaction, 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 1c5fb593e9..e3ac582a48 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 @@ -22,7 +22,7 @@ use grovedb::batch::KeyInfoPath; use grovedb::EstimatedLayerCount::ApproximateElements; use grovedb::EstimatedLayerSizes::{AllItems, AllSubtrees}; use grovedb::EstimatedSumTrees::NoSumTrees; -use grovedb::{Element, EstimatedLayerInformation, TransactionArg}; +use grovedb::{Element, EstimatedLayerInformation, TransactionArg, TreeType}; use platform_version::version::PlatformVersion; use std::collections::HashMap; @@ -51,7 +51,7 @@ impl Drive { estimated_costs_only_with_layer_info.insert( KeyInfoPath::from_known_path(vote_end_date_queries_tree_path()), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, // We can estimate that there is at least a vote concluding every block, and we put blocks at 6 seconds. estimated_layer_count: ApproximateElements(201_600), estimated_layer_sizes: AllSubtrees( @@ -67,7 +67,7 @@ impl Drive { vote_contested_resource_end_date_queries_at_time_tree_path_vec(end_date), ), EstimatedLayerInformation { - is_sum_tree: false, + tree_type: TreeType::NormalTree, // We can estimate that there is 2 votes ending per block. estimated_layer_count: ApproximateElements(2), estimated_layer_sizes: AllItems( @@ -100,8 +100,8 @@ impl Drive { BatchInsertTreeApplyType::StatefulBatchInsertTree } else { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums: false, - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, + tree_type: TreeType::NormalTree, flags_len: storage_flags .as_ref() .map(|s| s.serialized_size()) @@ -113,7 +113,7 @@ impl Drive { // end data in the documents batch transition self.batch_insert_empty_tree_if_not_exists( path_key_info.clone(), - false, + TreeType::NormalTree, storage_flags.as_ref(), apply_type, transaction, @@ -133,7 +133,7 @@ impl Drive { BatchInsertApplyType::StatefulBatchInsert } else { BatchInsertApplyType::StatelessBatchInsert { - in_tree_using_sums: false, + in_tree_type: TreeType::NormalTree, // todo: figure out a default serialized size to make this faster target: QueryTargetValue( item.serialized_size(&platform_version.drive.grove_version)? as u32, diff --git a/packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs b/packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs index 2ca742ff8f..07006e2c19 100644 --- a/packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs +++ b/packages/rs-drive/src/drive/votes/resolved/vote_polls/contested_document_resource_vote_poll/resolve.rs @@ -1,8 +1,10 @@ #[cfg(feature = "server")] use crate::drive::contract::DataContractFetchInfo; +#[cfg(feature = "server")] use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo; #[cfg(any(feature = "server", feature = "verify"))] use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfoAllowBorrowed; +#[cfg(feature = "server")] use crate::drive::Drive; use crate::error::contract::DataContractError; use crate::error::Error; diff --git a/packages/rs-drive/src/fees/op.rs b/packages/rs-drive/src/fees/op.rs index c28ea60caa..f98c05096d 100644 --- a/packages/rs-drive/src/fees/op.rs +++ b/packages/rs-drive/src/fees/op.rs @@ -9,7 +9,7 @@ use grovedb::batch::key_info::KeyInfo; use grovedb::batch::KeyInfoPath; use grovedb::element::MaxReferenceHop; use grovedb::reference_path::ReferencePathType; -use grovedb::{batch::QualifiedGroveDbOp, Element, ElementFlags}; +use grovedb::{batch::QualifiedGroveDbOp, Element, ElementFlags, TreeType}; use grovedb_costs::OperationCost; use itertools::Itertools; @@ -382,6 +382,54 @@ impl LowLevelDriveOperation { LowLevelDriveOperation::insert_for_known_path_key_element(path, key, tree) } + /// Sets `GroveOperation` for inserting an empty sum tree at the given path and key + pub fn for_known_path_key_empty_big_sum_tree( + path: Vec>, + key: Vec, + storage_flags: Option<&StorageFlags>, + ) -> Self { + let tree = match storage_flags { + Some(storage_flags) => { + Element::new_big_sum_tree_with_flags(None, storage_flags.to_some_element_flags()) + } + None => Element::empty_big_sum_tree(), + }; + + LowLevelDriveOperation::insert_for_known_path_key_element(path, key, tree) + } + + /// Sets `GroveOperation` for inserting an empty count tree at the given path and key + pub fn for_known_path_key_empty_count_tree( + path: Vec>, + key: Vec, + storage_flags: Option<&StorageFlags>, + ) -> Self { + let tree = match storage_flags { + Some(storage_flags) => { + Element::new_count_tree_with_flags(None, storage_flags.to_some_element_flags()) + } + None => Element::empty_count_tree(), + }; + + LowLevelDriveOperation::insert_for_known_path_key_element(path, key, tree) + } + + /// Sets `GroveOperation` for inserting an empty count tree at the given path and key + pub fn for_known_path_key_empty_count_sum_tree( + path: Vec>, + key: Vec, + storage_flags: Option<&StorageFlags>, + ) -> Self { + let tree = match storage_flags { + Some(storage_flags) => { + Element::new_count_sum_tree_with_flags(None, storage_flags.to_some_element_flags()) + } + None => Element::new_count_sum_tree(None), + }; + + LowLevelDriveOperation::insert_for_known_path_key_element(path, key, tree) + } + /// Sets `GroveOperation` for inserting an empty tree at the given path and key pub fn for_estimated_path_key_empty_tree( path: KeyInfoPath, @@ -398,6 +446,22 @@ impl LowLevelDriveOperation { LowLevelDriveOperation::insert_for_estimated_path_key_element(path, key, tree) } + /// Sets `GroveOperation` for inserting an empty sum tree at the given path and key + pub fn for_estimated_path_key_empty_sum_tree( + path: KeyInfoPath, + key: KeyInfo, + storage_flags: Option<&StorageFlags>, + ) -> Self { + let tree = match storage_flags { + Some(storage_flags) => { + Element::empty_sum_tree_with_flags(storage_flags.to_some_element_flags()) + } + None => Element::empty_sum_tree(), + }; + + LowLevelDriveOperation::insert_for_estimated_path_key_element(path, key, tree) + } + /// Sets `GroveOperation` for inserting an element at the given path and key pub fn insert_for_known_path_key_element( path: Vec>, @@ -470,6 +534,38 @@ impl LowLevelDriveOperation { } } +/// A trait for getting an empty tree operation based on the tree type +pub trait LowLevelDriveOperationTreeTypeConverter { + /// Sets `GroveOperation` for inserting an empty tree at the given path and key + fn empty_tree_operation_for_known_path_key( + &self, + path: Vec>, + key: Vec, + storage_flags: Option<&StorageFlags>, + ) -> LowLevelDriveOperation; +} + +impl LowLevelDriveOperationTreeTypeConverter for TreeType { + /// Sets `GroveOperation` for inserting an empty tree at the given path and key + fn empty_tree_operation_for_known_path_key( + &self, + path: Vec>, + key: Vec, + storage_flags: Option<&StorageFlags>, + ) -> LowLevelDriveOperation { + let element_flags = storage_flags.map(|storage_flags| storage_flags.to_element_flags()); + let element = match self { + TreeType::NormalTree => Element::empty_tree_with_flags(element_flags), + TreeType::SumTree => Element::empty_sum_tree_with_flags(element_flags), + TreeType::BigSumTree => Element::empty_big_sum_tree_with_flags(element_flags), + TreeType::CountTree => Element::empty_count_tree_with_flags(element_flags), + TreeType::CountSumTree => Element::empty_count_sum_tree_with_flags(element_flags), + }; + + LowLevelDriveOperation::insert_for_known_path_key_element(path, key, element) + } +} + /// Drive cost trait pub trait DriveCost { /// Ephemeral cost diff --git a/packages/rs-drive/src/open/mod.rs b/packages/rs-drive/src/open/mod.rs index 8e2c599264..82e9a6c65c 100644 --- a/packages/rs-drive/src/open/mod.rs +++ b/packages/rs-drive/src/open/mod.rs @@ -4,9 +4,8 @@ use crate::config::DriveConfig; use crate::drive::Drive; use crate::error::Error; use dpp::errors::ProtocolError; -use dpp::util::deserializer::ProtocolVersion; use grovedb::GroveDb; -use platform_version::version::{PlatformVersion, INITIAL_PROTOCOL_VERSION}; +use platform_version::version::PlatformVersion; use std::path::Path; use std::sync::Arc; @@ -29,7 +28,8 @@ impl Drive { pub fn open>( path: P, config: Option, - ) -> Result<(Self, Option), Error> { + default_platform_version: Option<&PlatformVersion>, + ) -> Result<(Self, Option<&'static PlatformVersion>), Error> { let config = config.unwrap_or_default(); let grove = Arc::new(GroveDb::open(path)?); @@ -42,13 +42,18 @@ impl Drive { let data_contracts_global_cache_size = config.data_contracts_global_cache_size; let data_contracts_block_cache_size = config.data_contracts_block_cache_size; - let protocol_version = Drive::fetch_current_protocol_version_with_grovedb(&grove, None)?; + let maybe_protocol_version = + Drive::fetch_current_protocol_version_with_grovedb(&grove, None)?; + let maybe_platform_version = maybe_protocol_version + .map(|protocol_version| { + PlatformVersion::get(protocol_version).map_err(ProtocolError::PlatformVersionError) + }) + .transpose()?; // At this point we don't know the version what we need to process next block or initialize the chain // so version related data should be updated on init chain or on block execution - let platform_version = - PlatformVersion::get(protocol_version.unwrap_or(INITIAL_PROTOCOL_VERSION)) - .map_err(ProtocolError::PlatformVersionError)?; + let platform_version = maybe_platform_version + .unwrap_or_else(|| default_platform_version.unwrap_or(PlatformVersion::latest())); let drive = Drive { grove, @@ -66,6 +71,6 @@ impl Drive { }, }; - Ok((drive, protocol_version)) + Ok((drive, maybe_platform_version)) } } diff --git a/packages/rs-drive/src/query/contested_resource_votes_given_by_identity_query.rs b/packages/rs-drive/src/query/contested_resource_votes_given_by_identity_query.rs index b5b6938358..05c5ad8cfe 100644 --- a/packages/rs-drive/src/query/contested_resource_votes_given_by_identity_query.rs +++ b/packages/rs-drive/src/query/contested_resource_votes_given_by_identity_query.rs @@ -1,9 +1,13 @@ use crate::drive::votes::paths::vote_contested_resource_identity_votes_tree_path_for_identity_vec; +#[cfg(feature = "server")] use crate::drive::votes::storage_form::contested_document_resource_reference_storage_form::ContestedDocumentResourceVoteReferenceStorageForm; +#[cfg(feature = "server")] use crate::drive::votes::storage_form::contested_document_resource_storage_form::ContestedDocumentResourceVoteStorageForm; +#[cfg(feature = "server")] use crate::drive::votes::tree_path_storage_form::TreePathStorageForm; #[cfg(feature = "server")] use crate::drive::Drive; +#[cfg(feature = "server")] use crate::error::drive::DriveError; use crate::error::Error; #[cfg(feature = "server")] @@ -11,6 +15,7 @@ use crate::fees::op::LowLevelDriveOperation; #[cfg(feature = "server")] use crate::query::GroveError; use crate::query::Query; +#[cfg(feature = "server")] use dpp::bincode; #[cfg(feature = "server")] use dpp::block::block_info::BlockInfo; @@ -20,6 +25,7 @@ use grovedb::query_result_type::{QueryResultElements, QueryResultType}; #[cfg(feature = "server")] use grovedb::TransactionArg; use grovedb::{PathQuery, SizedQuery}; +#[cfg(feature = "server")] use platform_version::version::PlatformVersion; #[cfg(feature = "server")] use std::collections::BTreeMap; diff --git a/packages/rs-drive/src/query/drive_contested_document_query.rs b/packages/rs-drive/src/query/drive_contested_document_query.rs index e83950d6e0..375429edbc 100644 --- a/packages/rs-drive/src/query/drive_contested_document_query.rs +++ b/packages/rs-drive/src/query/drive_contested_document_query.rs @@ -1,4 +1,5 @@ use crate::drive::contract::paths::DataContractPaths; +#[cfg(feature = "server")] use crate::drive::Drive; use crate::error::Error; #[cfg(feature = "server")] @@ -6,6 +7,7 @@ use crate::fees::op::LowLevelDriveOperation; #[cfg(feature = "server")] use crate::query::GroveError; use crate::query::Query; +#[cfg(feature = "server")] use dpp::block::block_info::BlockInfo; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::data_contract::document_type::DocumentTypeRef; diff --git a/packages/rs-drive/src/query/mod.rs b/packages/rs-drive/src/query/mod.rs index f6aa81deb2..5cdc6dcca6 100644 --- a/packages/rs-drive/src/query/mod.rs +++ b/packages/rs-drive/src/query/mod.rs @@ -2292,9 +2292,7 @@ mod tests { use serde_json::Value::Null; use crate::config::DriveConfig; - use crate::util::test_helpers::setup::{ - setup_drive_with_initial_state_structure, setup_system_data_contract, - }; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; use dpp::block::block_info::BlockInfo; use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contracts::SystemDataContract; @@ -2310,10 +2308,11 @@ mod tests { fn setup_family_contract() -> (Drive, DataContract) { let tmp_dir = TempDir::new().unwrap(); - let (drive, _) = Drive::open(tmp_dir, None).expect("expected to open Drive successfully"); - let platform_version = PlatformVersion::latest(); + let (drive, _) = Drive::open(tmp_dir, None, Some(platform_version)) + .expect("expected to open Drive successfully"); + drive .create_initial_state_structure(None, platform_version) .expect("expected to create root tree successfully"); @@ -2342,10 +2341,11 @@ mod tests { fn setup_withdrawal_contract() -> (Drive, DataContract) { let tmp_dir = TempDir::new().unwrap(); - let (drive, _) = Drive::open(tmp_dir, None).expect("expected to open Drive successfully"); - let platform_version = PlatformVersion::latest(); + let (drive, _) = Drive::open(tmp_dir, None, Some(platform_version)) + .expect("expected to open Drive successfully"); + drive .create_initial_state_structure(None, platform_version) .expect("expected to create root tree successfully"); 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 1d2398918d..cf1f7ce4e9 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 @@ -4,6 +4,7 @@ use crate::drive::votes::paths::{ }; use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::resolve::ContestedDocumentResourceVotePollResolver; use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfoAllowBorrowed; +#[cfg(feature = "server")] use crate::drive::Drive; use crate::error::drive::DriveError; use crate::error::query::QuerySyntaxError; @@ -16,6 +17,7 @@ use bincode::{Decode, Encode}; use dpp::block::block_info::BlockInfo; use dpp::data_contract::DataContract; use dpp::identifier::Identifier; +#[cfg(feature = "server")] use dpp::serialization::PlatformDeserializable; use dpp::voting::contender_structs::{ ContenderWithSerializedDocument, ContenderWithSerializedDocumentV0, diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/batch_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/batch_transition.rs new file mode 100644 index 0000000000..31a9202237 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/batch_transition.rs @@ -0,0 +1,28 @@ +use crate::error::Error; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; +use crate::state_transition_action::action_convert_to_operations::DriveHighLevelOperationConverter; +use crate::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use crate::util::batch::DriveOperation; +use dpp::block::epoch::Epoch; +use dpp::prelude::Identifier; +use dpp::version::PlatformVersion; + +impl DriveHighLevelBatchOperationConverter for BatchedTransitionAction { + fn into_high_level_batch_drive_operations<'b>( + self, + epoch: &Epoch, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match self { + BatchedTransitionAction::DocumentAction(document_action) => document_action + .into_high_level_batch_drive_operations(epoch, owner_id, platform_version), + BatchedTransitionAction::TokenAction(token_action) => token_action + .into_high_level_batch_drive_operations(epoch, owner_id, platform_version), + BatchedTransitionAction::BumpIdentityDataContractNonce( + bump_identity_contract_nonce_action, + ) => bump_identity_contract_nonce_action + .into_high_level_drive_operations(epoch, platform_version), + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_create_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_create_transition.rs similarity index 95% rename from packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_create_transition.rs rename to packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_create_transition.rs index 96c16ed9e3..7a40ab8b47 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_create_transition.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_create_transition.rs @@ -1,5 +1,5 @@ use crate::error::Error; -use crate::state_transition_action::action_convert_to_operations::document::DriveHighLevelDocumentOperationConverter; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; use crate::util::batch::DriveOperation::{ DocumentOperation, IdentityOperation, PrefundedSpecializedBalanceOperation, }; @@ -12,15 +12,15 @@ use dpp::block::epoch::Epoch; use dpp::document::Document; use dpp::prelude::Identifier; use std::borrow::Cow; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::{DocumentCreateTransitionAction, DocumentCreateTransitionActionAccessorsV0, DocumentFromCreateTransitionAction}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::{DocumentCreateTransitionAction, DocumentCreateTransitionActionAccessorsV0, DocumentFromCreateTransitionAction}; use dpp::version::PlatformVersion; use crate::util::batch::drive_op_batch::PrefundedSpecializedBalanceOperationType; use crate::util::object_size_info::DataContractInfo::DataContractFetchInfo; use crate::error::drive::DriveError; -impl DriveHighLevelDocumentOperationConverter for DocumentCreateTransitionAction { - fn into_high_level_document_drive_operations<'b>( +impl DriveHighLevelBatchOperationConverter for DocumentCreateTransitionAction { + fn into_high_level_batch_drive_operations<'b>( mut self, epoch: &Epoch, owner_id: Identifier, diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_delete_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_delete_transition.rs similarity index 86% rename from packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_delete_transition.rs rename to packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_delete_transition.rs index 799f585778..b1622ca4d2 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_delete_transition.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_delete_transition.rs @@ -1,4 +1,4 @@ -use crate::state_transition_action::action_convert_to_operations::document::DriveHighLevelDocumentOperationConverter; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; use crate::util::batch::DriveOperation::{DocumentOperation, IdentityOperation}; use crate::util::batch::{DocumentOperationType, DriveOperation, IdentityOperationType}; @@ -7,15 +7,15 @@ use crate::error::Error; use dpp::block::epoch::Epoch; use dpp::identifier::Identifier; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; -use crate::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionAccessorsV0; use dpp::version::PlatformVersion; use crate::util::object_size_info::{DataContractInfo, DocumentTypeInfo}; use crate::error::drive::DriveError; -impl DriveHighLevelDocumentOperationConverter for DocumentDeleteTransitionAction { - fn into_high_level_document_drive_operations<'b>( +impl DriveHighLevelBatchOperationConverter for DocumentDeleteTransitionAction { + fn into_high_level_batch_drive_operations<'b>( self, _epoch: &Epoch, owner_id: Identifier, diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_purchase_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_purchase_transition.rs similarity index 92% rename from packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_purchase_transition.rs rename to packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_purchase_transition.rs index 3634442c28..63e6f118aa 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_purchase_transition.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_purchase_transition.rs @@ -1,5 +1,5 @@ use crate::error::Error; -use crate::state_transition_action::action_convert_to_operations::document::DriveHighLevelDocumentOperationConverter; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; use crate::util::batch::DriveOperation::{DocumentOperation, IdentityOperation}; use crate::util::batch::{DocumentOperationType, DriveOperation, IdentityOperationType}; use crate::util::object_size_info::DocumentInfo::DocumentOwnedInfo; @@ -9,13 +9,13 @@ use dpp::block::epoch::Epoch; use dpp::prelude::Identifier; use std::borrow::Cow; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_purchase_transition_action::{DocumentPurchaseTransitionAction, DocumentPurchaseTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::{DocumentPurchaseTransitionAction, DocumentPurchaseTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::drive::DriveError; -impl DriveHighLevelDocumentOperationConverter for DocumentPurchaseTransitionAction { - fn into_high_level_document_drive_operations<'b>( +impl DriveHighLevelBatchOperationConverter for DocumentPurchaseTransitionAction { + fn into_high_level_batch_drive_operations<'b>( self, epoch: &Epoch, owner_id: Identifier, diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_replace_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_replace_transition.rs similarity index 91% rename from packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_replace_transition.rs rename to packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_replace_transition.rs index 19fb9febac..8cfaafa60e 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_replace_transition.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_replace_transition.rs @@ -1,5 +1,5 @@ use crate::error::Error; -use crate::state_transition_action::action_convert_to_operations::document::DriveHighLevelDocumentOperationConverter; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; use crate::util::batch::DriveOperation::{DocumentOperation, IdentityOperation}; use crate::util::batch::{DocumentOperationType, DriveOperation, IdentityOperationType}; use crate::util::object_size_info::DocumentInfo::DocumentOwnedInfo; @@ -10,13 +10,13 @@ use dpp::block::epoch::Epoch; use dpp::document::Document; use dpp::prelude::Identifier; use std::borrow::Cow; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_replace_transition_action::{DocumentFromReplaceTransitionAction, DocumentReplaceTransitionAction, DocumentReplaceTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_replace_transition_action::{DocumentFromReplaceTransitionAction, DocumentReplaceTransitionAction, DocumentReplaceTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::drive::DriveError; -impl DriveHighLevelDocumentOperationConverter for DocumentReplaceTransitionAction { - fn into_high_level_document_drive_operations<'b>( +impl DriveHighLevelBatchOperationConverter for DocumentReplaceTransitionAction { + fn into_high_level_batch_drive_operations<'b>( self, epoch: &Epoch, owner_id: Identifier, diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_transfer_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_transfer_transition.rs similarity index 91% rename from packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_transfer_transition.rs rename to packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_transfer_transition.rs index 67ea0f3bd1..65521399f8 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_transfer_transition.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_transfer_transition.rs @@ -1,5 +1,5 @@ use crate::error::Error; -use crate::state_transition_action::action_convert_to_operations::document::DriveHighLevelDocumentOperationConverter; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; use crate::util::batch::DriveOperation::{DocumentOperation, IdentityOperation}; use crate::util::batch::{DocumentOperationType, DriveOperation, IdentityOperationType}; use crate::util::object_size_info::DocumentInfo::DocumentOwnedInfo; @@ -10,13 +10,13 @@ use dpp::block::epoch::Epoch; use dpp::document::DocumentV0Getters; use dpp::prelude::Identifier; use std::borrow::Cow; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_transfer_transition_action::{DocumentTransferTransitionAction, DocumentTransferTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::{DocumentTransferTransitionAction, DocumentTransferTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::drive::DriveError; -impl DriveHighLevelDocumentOperationConverter for DocumentTransferTransitionAction { - fn into_high_level_document_drive_operations<'b>( +impl DriveHighLevelBatchOperationConverter for DocumentTransferTransitionAction { + fn into_high_level_batch_drive_operations<'b>( self, epoch: &Epoch, owner_id: Identifier, diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_transition.rs similarity index 63% rename from packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_transition.rs rename to packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_transition.rs index 38d4baf3ca..15e0a62f2e 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_transition.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_transition.rs @@ -1,14 +1,13 @@ use crate::error::Error; -use crate::state_transition_action::action_convert_to_operations::document::DriveHighLevelDocumentOperationConverter; -use crate::state_transition_action::action_convert_to_operations::DriveHighLevelOperationConverter; -use crate::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; +use crate::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; use crate::util::batch::DriveOperation; use dpp::block::epoch::Epoch; use dpp::prelude::Identifier; use dpp::version::PlatformVersion; -impl DriveHighLevelDocumentOperationConverter for DocumentTransitionAction { - fn into_high_level_document_drive_operations<'b>( +impl DriveHighLevelBatchOperationConverter for DocumentTransitionAction { + fn into_high_level_batch_drive_operations<'b>( self, epoch: &Epoch, owner_id: Identifier, @@ -16,51 +15,47 @@ impl DriveHighLevelDocumentOperationConverter for DocumentTransitionAction { ) -> Result>, Error> { match self { DocumentTransitionAction::CreateAction(document_create_transition) => { - document_create_transition.into_high_level_document_drive_operations( + document_create_transition.into_high_level_batch_drive_operations( epoch, owner_id, platform_version, ) } DocumentTransitionAction::ReplaceAction(document_replace_transition) => { - document_replace_transition.into_high_level_document_drive_operations( + document_replace_transition.into_high_level_batch_drive_operations( epoch, owner_id, platform_version, ) } DocumentTransitionAction::DeleteAction(document_delete_transition) => { - document_delete_transition.into_high_level_document_drive_operations( + document_delete_transition.into_high_level_batch_drive_operations( epoch, owner_id, platform_version, ) } DocumentTransitionAction::TransferAction(document_transfer_transition) => { - document_transfer_transition.into_high_level_document_drive_operations( + document_transfer_transition.into_high_level_batch_drive_operations( epoch, owner_id, platform_version, ) } DocumentTransitionAction::PurchaseAction(document_purchase_transition) => { - document_purchase_transition.into_high_level_document_drive_operations( + document_purchase_transition.into_high_level_batch_drive_operations( epoch, owner_id, platform_version, ) } DocumentTransitionAction::UpdatePriceAction(document_update_price_transition) => { - document_update_price_transition.into_high_level_document_drive_operations( + document_update_price_transition.into_high_level_batch_drive_operations( epoch, owner_id, platform_version, ) } - DocumentTransitionAction::BumpIdentityDataContractNonce( - bump_identity_contract_nonce_action, - ) => bump_identity_contract_nonce_action - .into_high_level_drive_operations(epoch, platform_version), } } } diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_update_price_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_update_price_transition.rs similarity index 90% rename from packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_update_price_transition.rs rename to packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_update_price_transition.rs index abea0ffa63..f01e313a8a 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/document_update_price_transition.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/document_update_price_transition.rs @@ -1,5 +1,5 @@ use crate::error::Error; -use crate::state_transition_action::action_convert_to_operations::document::DriveHighLevelDocumentOperationConverter; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; use crate::util::batch::DriveOperation::{DocumentOperation, IdentityOperation}; use crate::util::batch::{DocumentOperationType, DriveOperation, IdentityOperationType}; use crate::util::object_size_info::DocumentInfo::DocumentOwnedInfo; @@ -9,13 +9,13 @@ use dpp::block::epoch::Epoch; use dpp::prelude::Identifier; use std::borrow::Cow; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_update_price_transition_action::{DocumentUpdatePriceTransitionAction, DocumentUpdatePriceTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::{DocumentUpdatePriceTransitionAction, DocumentUpdatePriceTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::drive::DriveError; -impl DriveHighLevelDocumentOperationConverter for DocumentUpdatePriceTransitionAction { - fn into_high_level_document_drive_operations<'b>( +impl DriveHighLevelBatchOperationConverter for DocumentUpdatePriceTransitionAction { + fn into_high_level_batch_drive_operations<'b>( self, epoch: &Epoch, owner_id: Identifier, diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/documents_batch_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/documents_batch_transition.rs similarity index 84% rename from packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/documents_batch_transition.rs rename to packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/documents_batch_transition.rs index eb1371efc2..652b3a3376 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/documents_batch_transition.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/documents_batch_transition.rs @@ -1,13 +1,13 @@ use crate::error::drive::DriveError; use crate::error::Error; -use crate::state_transition_action::action_convert_to_operations::document::DriveHighLevelDocumentOperationConverter; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; use crate::state_transition_action::action_convert_to_operations::DriveHighLevelOperationConverter; -use crate::state_transition_action::document::documents_batch::DocumentsBatchTransitionAction; +use crate::state_transition_action::batch::BatchTransitionAction; use crate::util::batch::DriveOperation; use dpp::block::epoch::Epoch; use dpp::version::PlatformVersion; -impl DriveHighLevelOperationConverter for DocumentsBatchTransitionAction { +impl DriveHighLevelOperationConverter for BatchTransitionAction { fn into_high_level_drive_operations<'b>( self, epoch: &Epoch, @@ -26,7 +26,7 @@ impl DriveHighLevelOperationConverter for DocumentsBatchTransitionAction { Ok(transitions .into_iter() .map(|transition| { - transition.into_high_level_document_drive_operations( + transition.into_high_level_batch_drive_operations( epoch, owner_id, platform_version, diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/mod.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/mod.rs new file mode 100644 index 0000000000..a6831026e3 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/document/mod.rs @@ -0,0 +1,8 @@ +mod document_create_transition; +mod document_delete_transition; +mod document_purchase_transition; +mod document_replace_transition; +mod document_transfer_transition; +mod document_transition; +mod document_update_price_transition; +mod documents_batch_transition; diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/mod.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/mod.rs similarity index 57% rename from packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/mod.rs rename to packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/mod.rs index d473c995af..99c1c40408 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/document/mod.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/mod.rs @@ -4,19 +4,14 @@ use dpp::block::epoch::Epoch; use dpp::platform_value::Identifier; use dpp::version::PlatformVersion; -mod document_create_transition; -mod document_delete_transition; -mod document_purchase_transition; -mod document_replace_transition; -mod document_transfer_transition; -mod document_transition; -mod document_update_price_transition; -mod documents_batch_transition; +mod batch_transition; +mod document; +mod token; /// A converter that will get High Level Drive Operations from State transitions -pub trait DriveHighLevelDocumentOperationConverter { +pub trait DriveHighLevelBatchOperationConverter { /// This will get a list of atomic drive operations from a high level operations - fn into_high_level_document_drive_operations<'a>( + fn into_high_level_batch_drive_operations<'a>( self, epoch: &Epoch, owner_id: Identifier, diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/mod.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/mod.rs new file mode 100644 index 0000000000..f4f2e61aa8 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/mod.rs @@ -0,0 +1,8 @@ +mod token_burn_transition; +mod token_destroy_frozen_funds_transition; +mod token_emergency_action_transition; +mod token_freeze_transition; +mod token_mint_transition; +mod token_transfer_transition; +mod token_transition; +mod token_unfreeze_transition; diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_burn_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_burn_transition.rs new file mode 100644 index 0000000000..b4d62088fc --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_burn_transition.rs @@ -0,0 +1,102 @@ +use dpp::block::epoch::Epoch; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::group::action_event::GroupActionEvent; +use dpp::group::group_action::GroupAction; +use dpp::group::group_action::v0::GroupActionV0; +use dpp::group::GroupStateTransitionResolvedInfo; +use dpp::identifier::Identifier; +use dpp::tokens::token_event::TokenEvent; +use platform_version::version::PlatformVersion; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::{TokenBurnTransitionAction, TokenBurnTransitionActionAccessorsV0}; +use crate::util::batch::{DriveOperation, IdentityOperationType}; +use crate::util::batch::drive_op_batch::{GroupOperationType, TokenOperationType}; +use crate::util::batch::DriveOperation::{GroupOperation, IdentityOperation, TokenOperation}; + +impl DriveHighLevelBatchOperationConverter for TokenBurnTransitionAction { + fn into_high_level_batch_drive_operations<'b>( + self, + _epoch: &Epoch, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .state_transitions + .convert_to_high_level_operations + .token_burn_transition + { + 0 => { + let data_contract_id = self.base().data_contract_id(); + + let identity_contract_nonce = self.base().identity_contract_nonce(); + + let mut ops = vec![IdentityOperation( + IdentityOperationType::UpdateIdentityContractNonce { + identity_id: owner_id.into_buffer(), + contract_id: data_contract_id.into_buffer(), + nonce: identity_contract_nonce, + }, + )]; + + if let Some(GroupStateTransitionResolvedInfo { + group_contract_position, + action_id, + action_is_proposer, + signer_power, + .. + }) = self.base().store_in_group() + { + let event = TokenEvent::Burn(self.burn_amount(), self.public_note().cloned()); + + let initialize_with_insert_action_info = if *action_is_proposer { + Some(GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(event), + })) + } else { + None + }; + + ops.push(GroupOperation(GroupOperationType::AddGroupAction { + contract_id: data_contract_id, + group_contract_position: *group_contract_position, + initialize_with_insert_action_info, + action_id: *action_id, + signer_identity_id: owner_id, + signer_power: *signer_power, + })); + } + + if self.base().perform_action() { + ops.push(TokenOperation(TokenOperationType::TokenBurn { + token_id: self.token_id(), + identity_balance_holder_id: owner_id, + burn_amount: self.burn_amount(), + })); + + let token_configuration = self.base().token_configuration()?; + if token_configuration.keeps_history() { + ops.push(TokenOperation(TokenOperationType::TokenHistory { + token_id: self.token_id(), + owner_id, + nonce: identity_contract_nonce, + event: TokenEvent::Burn(self.burn_amount(), self.public_note_owned()), + })); + } + } + + Ok(ops) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "TokenBurnTransitionAction::into_high_level_document_drive_operations" + .to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_destroy_frozen_funds_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_destroy_frozen_funds_transition.rs new file mode 100644 index 0000000000..52b46800f9 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_destroy_frozen_funds_transition.rs @@ -0,0 +1,107 @@ +use dpp::block::epoch::Epoch; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::group::action_event::GroupActionEvent; +use dpp::group::group_action::GroupAction; +use dpp::group::group_action::v0::GroupActionV0; +use dpp::group::GroupStateTransitionResolvedInfo; +use dpp::identifier::Identifier; +use dpp::tokens::token_event::TokenEvent; +use platform_version::version::PlatformVersion; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::{TokenDestroyFrozenFundsTransitionAction, TokenDestroyFrozenFundsTransitionActionAccessorsV0}; +use crate::util::batch::{DriveOperation, IdentityOperationType}; +use crate::util::batch::drive_op_batch::{GroupOperationType, TokenOperationType}; +use crate::util::batch::DriveOperation::{GroupOperation, IdentityOperation, TokenOperation}; + +impl DriveHighLevelBatchOperationConverter for TokenDestroyFrozenFundsTransitionAction { + fn into_high_level_batch_drive_operations<'b>( + self, + _epoch: &Epoch, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .state_transitions + .convert_to_high_level_operations + .token_destroy_frozen_funds_transition + { + 0 => { + let data_contract_id = self.base().data_contract_id(); + + let identity_contract_nonce = self.base().identity_contract_nonce(); + + let mut ops = vec![IdentityOperation( + IdentityOperationType::UpdateIdentityContractNonce { + identity_id: owner_id.into_buffer(), + contract_id: data_contract_id.into_buffer(), + nonce: identity_contract_nonce, + }, + )]; + + if let Some(GroupStateTransitionResolvedInfo { + group_contract_position, + action_id, + action_is_proposer, + signer_power, + .. + }) = self.base().store_in_group() + { + let event = + TokenEvent::DestroyFrozenFunds(self.frozen_identity_id(), self.amount(), self.public_note().cloned()); + + let initialize_with_insert_action_info = if *action_is_proposer { + Some(GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(event), + })) + } else { + None + }; + + ops.push(GroupOperation(GroupOperationType::AddGroupAction { + contract_id: data_contract_id, + group_contract_position: *group_contract_position, + initialize_with_insert_action_info, + action_id: *action_id, + signer_identity_id: owner_id, + signer_power: *signer_power, + })); + } + + if self.base().perform_action() { + ops.push(TokenOperation(TokenOperationType::TokenBurn { + token_id: self.token_id(), + identity_balance_holder_id: self.frozen_identity_id(), + burn_amount: self.amount(), + })); + + let token_configuration = self.base().token_configuration()?; + if token_configuration.keeps_history() { + ops.push(TokenOperation(TokenOperationType::TokenHistory { + token_id: self.token_id(), + owner_id, + nonce: identity_contract_nonce, + event: TokenEvent::DestroyFrozenFunds( + self.frozen_identity_id(), + self.amount(), + self.public_note_owned(), + ), + })); + } + } + + Ok(ops) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "TokenDestroyFrozenFundsTransitionAction::into_high_level_document_drive_operations" + .to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_emergency_action_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_emergency_action_transition.rs new file mode 100644 index 0000000000..93a0899818 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_emergency_action_transition.rs @@ -0,0 +1,105 @@ +use dpp::block::epoch::Epoch; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::group::action_event::GroupActionEvent; +use dpp::group::group_action::GroupAction; +use dpp::group::group_action::v0::GroupActionV0; +use dpp::group::GroupStateTransitionResolvedInfo; +use dpp::identifier::Identifier; +use dpp::tokens::token_event::TokenEvent; +use platform_version::version::PlatformVersion; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::{TokenEmergencyActionTransitionAction, TokenEmergencyActionTransitionActionAccessorsV0}; +use crate::util::batch::{DriveOperation, IdentityOperationType}; +use crate::util::batch::drive_op_batch::{GroupOperationType, TokenOperationType}; +use crate::util::batch::DriveOperation::{GroupOperation, IdentityOperation, TokenOperation}; + +impl DriveHighLevelBatchOperationConverter for TokenEmergencyActionTransitionAction { + fn into_high_level_batch_drive_operations<'b>( + self, + _epoch: &Epoch, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .state_transitions + .convert_to_high_level_operations + .token_emergency_action_transition + { + 0 => { + let data_contract_id = self.base().data_contract_id(); + + let identity_contract_nonce = self.base().identity_contract_nonce(); + + let mut ops = vec![IdentityOperation( + IdentityOperationType::UpdateIdentityContractNonce { + identity_id: owner_id.into_buffer(), + contract_id: data_contract_id.into_buffer(), + nonce: identity_contract_nonce, + }, + )]; + + if let Some(GroupStateTransitionResolvedInfo { + group_contract_position, + action_id, + action_is_proposer, + signer_power, + .. + }) = self.base().store_in_group() + { + let event = + TokenEvent::EmergencyAction(self.emergency_action(), self.public_note().cloned()); + + let initialize_with_insert_action_info = if *action_is_proposer { + Some(GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(event), + })) + } else { + None + }; + + ops.push(GroupOperation(GroupOperationType::AddGroupAction { + contract_id: data_contract_id, + group_contract_position: *group_contract_position, + initialize_with_insert_action_info, + action_id: *action_id, + signer_identity_id: owner_id, + signer_power: *signer_power, + })); + } + + if self.base().perform_action() { + ops.push(TokenOperation(TokenOperationType::TokenSetStatus { + token_id: self.token_id(), + status: self.emergency_action().resulting_status(platform_version)?, + })); + + let token_configuration = self.base().token_configuration()?; + if token_configuration.keeps_history() { + ops.push(TokenOperation(TokenOperationType::TokenHistory { + token_id: self.token_id(), + owner_id, + nonce: identity_contract_nonce, + event: TokenEvent::EmergencyAction( + self.emergency_action(), + self.public_note_owned(), + ), + })); + } + } + + Ok(ops) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "TokenEmergencyActionTransitionAction::into_high_level_document_drive_operations" + .to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_freeze_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_freeze_transition.rs new file mode 100644 index 0000000000..29eb030fce --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_freeze_transition.rs @@ -0,0 +1,105 @@ +use dpp::block::epoch::Epoch; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::group::action_event::GroupActionEvent; +use dpp::group::group_action::GroupAction; +use dpp::group::group_action::v0::GroupActionV0; +use dpp::group::GroupStateTransitionResolvedInfo; +use dpp::identifier::Identifier; +use dpp::tokens::token_event::TokenEvent; +use platform_version::version::PlatformVersion; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::{TokenFreezeTransitionAction, TokenFreezeTransitionActionAccessorsV0}; +use crate::util::batch::{DriveOperation, IdentityOperationType}; +use crate::util::batch::drive_op_batch::{GroupOperationType, TokenOperationType}; +use crate::util::batch::DriveOperation::{GroupOperation, IdentityOperation, TokenOperation}; + +impl DriveHighLevelBatchOperationConverter for TokenFreezeTransitionAction { + fn into_high_level_batch_drive_operations<'b>( + self, + _epoch: &Epoch, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .state_transitions + .convert_to_high_level_operations + .token_freeze_transition + { + 0 => { + let data_contract_id = self.base().data_contract_id(); + + let identity_contract_nonce = self.base().identity_contract_nonce(); + + let mut ops = vec![IdentityOperation( + IdentityOperationType::UpdateIdentityContractNonce { + identity_id: owner_id.into_buffer(), + contract_id: data_contract_id.into_buffer(), + nonce: identity_contract_nonce, + }, + )]; + + if let Some(GroupStateTransitionResolvedInfo { + group_contract_position, + action_id, + action_is_proposer, + signer_power, + .. + }) = self.base().store_in_group() + { + let event = + TokenEvent::Freeze(self.frozen_identity_id(), self.public_note().cloned()); + + let initialize_with_insert_action_info = if *action_is_proposer { + Some(GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(event), + })) + } else { + None + }; + + ops.push(GroupOperation(GroupOperationType::AddGroupAction { + contract_id: data_contract_id, + group_contract_position: *group_contract_position, + initialize_with_insert_action_info, + action_id: *action_id, + signer_identity_id: owner_id, + signer_power: *signer_power, + })); + } + + if self.base().perform_action() { + ops.push(TokenOperation(TokenOperationType::TokenFreeze { + token_id: self.token_id(), + frozen_identity_id: self.frozen_identity_id(), + })); + + let token_configuration = self.base().token_configuration()?; + if token_configuration.keeps_history() { + ops.push(TokenOperation(TokenOperationType::TokenHistory { + token_id: self.token_id(), + owner_id, + nonce: identity_contract_nonce, + event: TokenEvent::Freeze( + self.frozen_identity_id(), + self.public_note_owned(), + ), + })); + } + } + + Ok(ops) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "TokenFreezeTransitionAction::into_high_level_document_drive_operations" + .to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_mint_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_mint_transition.rs new file mode 100644 index 0000000000..81cb0b2e1c --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_mint_transition.rs @@ -0,0 +1,111 @@ +use dpp::block::epoch::Epoch; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::group::action_event::GroupActionEvent; +use dpp::group::group_action::GroupAction; +use dpp::group::group_action::v0::GroupActionV0; +use dpp::group::GroupStateTransitionResolvedInfo; +use dpp::identifier::Identifier; +use dpp::tokens::token_event::TokenEvent; +use platform_version::version::PlatformVersion; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::{TokenMintTransitionAction, TokenMintTransitionActionAccessorsV0}; +use crate::util::batch::{DriveOperation, IdentityOperationType}; +use crate::util::batch::drive_op_batch::{GroupOperationType, TokenOperationType}; +use crate::util::batch::DriveOperation::{GroupOperation, IdentityOperation, TokenOperation}; + +impl DriveHighLevelBatchOperationConverter for TokenMintTransitionAction { + fn into_high_level_batch_drive_operations<'b>( + self, + _epoch: &Epoch, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .state_transitions + .convert_to_high_level_operations + .token_mint_transition + { + 0 => { + let data_contract_id = self.base().data_contract_id(); + + let identity_contract_nonce = self.base().identity_contract_nonce(); + + let mut ops = vec![IdentityOperation( + IdentityOperationType::UpdateIdentityContractNonce { + identity_id: owner_id.into_buffer(), + contract_id: data_contract_id.into_buffer(), + nonce: identity_contract_nonce, + }, + )]; + + if let Some(GroupStateTransitionResolvedInfo { + group_contract_position, + action_id, + action_is_proposer, + signer_power, + .. + }) = self.base().store_in_group() + { + let event = TokenEvent::Mint( + self.mint_amount(), + self.identity_balance_holder_id(), + self.public_note().cloned(), + ); + + let initialize_with_insert_action_info = if *action_is_proposer { + Some(GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(event), + })) + } else { + None + }; + + ops.push(GroupOperation(GroupOperationType::AddGroupAction { + contract_id: data_contract_id, + group_contract_position: *group_contract_position, + initialize_with_insert_action_info, + action_id: *action_id, + signer_identity_id: owner_id, + signer_power: *signer_power, + })); + } + + if self.base().perform_action() { + ops.push(TokenOperation(TokenOperationType::TokenMint { + token_id: self.token_id(), + identity_balance_holder_id: self.identity_balance_holder_id(), + mint_amount: self.mint_amount(), + allow_first_mint: false, + })); + + let token_configuration = self.base().token_configuration()?; + if token_configuration.keeps_history() { + ops.push(TokenOperation(TokenOperationType::TokenHistory { + token_id: self.token_id(), + owner_id, + nonce: identity_contract_nonce, + event: TokenEvent::Mint( + self.mint_amount(), + self.identity_balance_holder_id(), + self.public_note_owned(), + ), + })); + } + } + + Ok(ops) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "TokenMintTransitionAction::into_high_level_document_drive_operations" + .to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_transfer_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_transfer_transition.rs new file mode 100644 index 0000000000..cb9db8c9b8 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_transfer_transition.rs @@ -0,0 +1,84 @@ +use dpp::block::epoch::Epoch; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::identifier::Identifier; +use dpp::tokens::token_event::TokenEvent; +use platform_version::version::PlatformVersion; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::TokenTransferTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::v0::TokenTransferTransitionActionAccessorsV0; +use crate::util::batch::{DriveOperation, IdentityOperationType}; +use crate::util::batch::drive_op_batch::TokenOperationType; +use crate::util::batch::DriveOperation::{IdentityOperation, TokenOperation}; + +impl DriveHighLevelBatchOperationConverter for TokenTransferTransitionAction { + fn into_high_level_batch_drive_operations<'b>( + self, + _epoch: &Epoch, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .state_transitions + .convert_to_high_level_operations + .token_transfer_transition + { + 0 => { + let data_contract_id = self.base().data_contract_id(); + + let identity_contract_nonce = self.base().identity_contract_nonce(); + + let token_id = self.token_id(); + + let recipient_id = self.recipient_id(); + + let amount = self.amount(); + + let mut ops = vec![IdentityOperation( + IdentityOperationType::UpdateIdentityContractNonce { + identity_id: owner_id.into_buffer(), + contract_id: data_contract_id.into_buffer(), + nonce: identity_contract_nonce, + }, + )]; + + ops.push(TokenOperation(TokenOperationType::TokenTransfer { + token_id, + sender_id: owner_id, + recipient_id, + amount, + })); + + let token_configuration = self.base().token_configuration()?; + if token_configuration.keeps_history() { + let (public_note, shared_encrypted_note, private_encrypted_note) = + self.notes_owned(); + ops.push(TokenOperation(TokenOperationType::TokenHistory { + token_id, + owner_id, + nonce: identity_contract_nonce, + event: TokenEvent::Transfer( + recipient_id, + public_note, + shared_encrypted_note, + private_encrypted_note, + amount, + ), + })); + } + + Ok(ops) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "TokenTransferTransitionAction::into_high_level_document_drive_operations" + .to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_transition.rs new file mode 100644 index 0000000000..adb128e016 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_transition.rs @@ -0,0 +1,105 @@ +use crate::error::Error; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; +use crate::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; +use crate::util::batch::DriveOperation; +use dpp::block::epoch::Epoch; +use dpp::prelude::Identifier; +use dpp::tokens::token_event::TokenEvent; +use dpp::version::PlatformVersion; +use crate::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::TokenBurnTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::TokenEmergencyActionTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::TokenFreezeTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::TokenMintTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::TokenTransferTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_unfreeze_transition_action::TokenUnfreezeTransitionActionAccessorsV0; + +impl DriveHighLevelBatchOperationConverter for TokenTransitionAction { + fn into_high_level_batch_drive_operations<'b>( + self, + epoch: &Epoch, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match self { + TokenTransitionAction::BurnAction(token_burn_transition) => token_burn_transition + .into_high_level_batch_drive_operations(epoch, owner_id, platform_version), + TokenTransitionAction::MintAction(token_mint_transition) => token_mint_transition + .into_high_level_batch_drive_operations(epoch, owner_id, platform_version), + TokenTransitionAction::TransferAction(token_transfer_transition) => { + token_transfer_transition.into_high_level_batch_drive_operations( + epoch, + owner_id, + platform_version, + ) + } + TokenTransitionAction::FreezeAction(token_freeze_action) => token_freeze_action + .into_high_level_batch_drive_operations(epoch, owner_id, platform_version), + TokenTransitionAction::UnfreezeAction(token_unfreeze_action) => token_unfreeze_action + .into_high_level_batch_drive_operations(epoch, owner_id, platform_version), + TokenTransitionAction::EmergencyActionAction(token_emergency_action) => { + token_emergency_action.into_high_level_batch_drive_operations( + epoch, + owner_id, + platform_version, + ) + } + TokenTransitionAction::DestroyFrozenFundsAction(token_destroy_frozen_funds) => { + token_destroy_frozen_funds.into_high_level_batch_drive_operations( + epoch, + owner_id, + platform_version, + ) + } + } + } +} + +impl TokenTransitionAction { + /// Gets the associated token event for the transition action + pub fn associated_token_event(&self) -> TokenEvent { + match self { + TokenTransitionAction::BurnAction(burn_action) => TokenEvent::Burn( + burn_action.burn_amount(), + burn_action.public_note().cloned(), + ), + TokenTransitionAction::MintAction(mint_action) => TokenEvent::Mint( + mint_action.mint_amount(), + mint_action.identity_balance_holder_id(), + mint_action.public_note().cloned(), + ), + TokenTransitionAction::TransferAction(transfer_action) => { + let (public_note, shared_encrypted_note, private_encrypted_note) = + transfer_action.notes(); + TokenEvent::Transfer( + transfer_action.recipient_id(), + public_note, + shared_encrypted_note, + private_encrypted_note, + transfer_action.amount(), + ) + } + TokenTransitionAction::FreezeAction(freeze_action) => TokenEvent::Freeze( + freeze_action.frozen_identity_id(), + freeze_action.public_note().cloned(), + ), + TokenTransitionAction::UnfreezeAction(unfreeze_action) => TokenEvent::Unfreeze( + unfreeze_action.frozen_identity_id(), + unfreeze_action.public_note().cloned(), + ), + TokenTransitionAction::EmergencyActionAction(emergency_action) => { + TokenEvent::EmergencyAction( + emergency_action.emergency_action(), + emergency_action.public_note().cloned(), + ) + } + TokenTransitionAction::DestroyFrozenFundsAction(destroy_action) => { + TokenEvent::DestroyFrozenFunds( + destroy_action.frozen_identity_id(), + destroy_action.amount(), + destroy_action.public_note().cloned(), + ) + } + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_unfreeze_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_unfreeze_transition.rs new file mode 100644 index 0000000000..ca853cf564 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_unfreeze_transition.rs @@ -0,0 +1,107 @@ +use dpp::block::epoch::Epoch; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::group::action_event::GroupActionEvent; +use dpp::group::group_action::GroupAction; +use dpp::group::group_action::v0::GroupActionV0; +use dpp::group::GroupStateTransitionResolvedInfo; +use dpp::identifier::Identifier; +use dpp::tokens::token_event::TokenEvent; +use platform_version::version::PlatformVersion; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_unfreeze_transition_action::{TokenUnfreezeTransitionAction, TokenUnfreezeTransitionActionAccessorsV0}; +use crate::util::batch::{DriveOperation, IdentityOperationType}; +use crate::util::batch::drive_op_batch::{GroupOperationType, TokenOperationType}; +use crate::util::batch::DriveOperation::{GroupOperation, IdentityOperation, TokenOperation}; + +impl DriveHighLevelBatchOperationConverter for TokenUnfreezeTransitionAction { + fn into_high_level_batch_drive_operations<'b>( + self, + _epoch: &Epoch, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .state_transitions + .convert_to_high_level_operations + .token_unfreeze_transition + { + 0 => { + let data_contract_id = self.base().data_contract_id(); + + let identity_contract_nonce = self.base().identity_contract_nonce(); + + let mut ops = vec![IdentityOperation( + IdentityOperationType::UpdateIdentityContractNonce { + identity_id: owner_id.into_buffer(), + contract_id: data_contract_id.into_buffer(), + nonce: identity_contract_nonce, + }, + )]; + + if let Some(GroupStateTransitionResolvedInfo { + group_contract_position, + action_id, + action_is_proposer, + signer_power, + .. + }) = self.base().store_in_group() + { + let event = TokenEvent::Unfreeze( + self.frozen_identity_id(), + self.public_note().cloned(), + ); + + let initialize_with_insert_action_info = if *action_is_proposer { + Some(GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(event), + })) + } else { + None + }; + + ops.push(GroupOperation(GroupOperationType::AddGroupAction { + contract_id: data_contract_id, + group_contract_position: *group_contract_position, + initialize_with_insert_action_info, + action_id: *action_id, + signer_identity_id: owner_id, + signer_power: *signer_power, + })); + } + + if self.base().perform_action() { + ops.push(TokenOperation(TokenOperationType::TokenUnfreeze { + token_id: self.token_id(), + frozen_identity_id: self.frozen_identity_id(), + })); + + let token_configuration = self.base().token_configuration()?; + if token_configuration.keeps_history() { + ops.push(TokenOperation(TokenOperationType::TokenHistory { + token_id: self.token_id(), + owner_id, + nonce: identity_contract_nonce, + event: TokenEvent::Freeze( + self.frozen_identity_id(), + self.public_note_owned(), + ), + })); + } + } + + Ok(ops) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "TokenUnfreezeTransitionAction::into_high_level_document_drive_operations" + .to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/mod.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/mod.rs index bfc5b55e27..28c69e3f88 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/mod.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/mod.rs @@ -3,8 +3,8 @@ //! This module defines general, commonly used functions in Drive. //! +mod batch; mod contract; -mod document; mod identity; mod system; @@ -39,7 +39,7 @@ impl DriveHighLevelOperationConverter for StateTransitionAction { data_contract_update_transition .into_high_level_drive_operations(epoch, platform_version) } - StateTransitionAction::DocumentsBatchAction(documents_batch_transition) => { + StateTransitionAction::BatchAction(documents_batch_transition) => { documents_batch_transition.into_high_level_drive_operations(epoch, platform_version) } StateTransitionAction::IdentityCreateAction(identity_create_transition) => { diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_base_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_base_transition_action/mod.rs similarity index 100% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_base_transition_action/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_base_transition_action/mod.rs diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_base_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_base_transition_action/transformer.rs similarity index 81% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_base_transition_action/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_base_transition_action/transformer.rs index 35a79fc023..a9bc78577f 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_base_transition_action/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_base_transition_action/transformer.rs @@ -2,13 +2,13 @@ use dpp::platform_value::Identifier; use std::sync::Arc; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; +use dpp::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; use crate::drive::contract::DataContractFetchInfo; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionV0}; impl DocumentBaseTransitionAction { /// from base transition with contract lookup - pub fn from_base_transition_with_contract_lookup( + pub fn try_from_base_transition_with_contract_lookup( value: DocumentBaseTransition, get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, ) -> Result { @@ -24,7 +24,7 @@ impl DocumentBaseTransitionAction { } /// from borrowed base transition with contract lookup - pub fn from_borrowed_base_transition_with_contract_lookup( + pub fn try_from_borrowed_base_transition_with_contract_lookup( value: &DocumentBaseTransition, get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, ) -> Result { diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_base_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_base_transition_action/v0/mod.rs similarity index 100% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_base_transition_action/v0/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_base_transition_action/v0/mod.rs diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_base_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_base_transition_action/v0/transformer.rs similarity index 90% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_base_transition_action/v0/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_base_transition_action/v0/transformer.rs index b639eb421e..d64553ca35 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_base_transition_action/v0/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_base_transition_action/v0/transformer.rs @@ -3,9 +3,9 @@ use std::sync::Arc; use dpp::platform_value::Identifier; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; +use dpp::state_transition::batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; use crate::drive::contract::DataContractFetchInfo; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionV0; impl DocumentBaseTransitionActionV0 { /// try from base transition with contract lookup diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_create_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_create_transition_action/mod.rs similarity index 98% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_create_transition_action/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_create_transition_action/mod.rs index 352444f830..e529985db7 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_create_transition_action/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_create_transition_action/mod.rs @@ -14,7 +14,7 @@ use dpp::fee::Credits; use dpp::ProtocolError; pub use v0::*; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::{DocumentBaseTransitionAction}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::{DocumentBaseTransitionAction}; use dpp::version::PlatformVersion; use dpp::voting::vote_info_storage::contested_document_vote_poll_stored_info::ContestedDocumentVotePollStoredInfo; use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo; diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_create_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_create_transition_action/transformer.rs similarity index 86% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_create_transition_action/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_create_transition_action/transformer.rs index 50d8b830af..dab39d6d72 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_create_transition_action/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_create_transition_action/transformer.rs @@ -5,16 +5,16 @@ use grovedb::TransactionArg; use std::sync::Arc; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_create_transition::DocumentCreateTransition; +use dpp::state_transition::batch_transition::document_create_transition::DocumentCreateTransition; use platform_version::version::PlatformVersion; use crate::drive::contract::DataContractFetchInfo; use crate::drive::Drive; use crate::error::Error; -use crate::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::{DocumentCreateTransitionAction, DocumentCreateTransitionActionV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::{DocumentCreateTransitionAction, DocumentCreateTransitionActionV0}; impl DocumentCreateTransitionAction { /// from_document_create_transition_with_contract_lookup - pub fn from_document_create_transition_with_contract_lookup( + pub fn try_from_document_create_transition_with_contract_lookup( drive: &Drive, transaction: TransactionArg, value: DocumentCreateTransition, @@ -31,7 +31,7 @@ impl DocumentCreateTransitionAction { } /// from_document_borrowed_create_transition_with_contract_lookup - pub fn from_document_borrowed_create_transition_with_contract_lookup( + pub fn try_from_document_borrowed_create_transition_with_contract_lookup( drive: &Drive, transaction: TransactionArg, value: &DocumentCreateTransition, diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_create_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_create_transition_action/v0/mod.rs similarity index 99% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_create_transition_action/v0/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_create_transition_action/v0/mod.rs index e61fbb73c9..e30b3948a7 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_create_transition_action/v0/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_create_transition_action/v0/mod.rs @@ -18,7 +18,7 @@ use dpp::document::property_names::{ }; use dpp::fee::Credits; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionV0}; use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePollWithContractInfo; use dpp::version::PlatformVersion; diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_create_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_create_transition_action/v0/transformer.rs similarity index 95% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_create_transition_action/v0/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_create_transition_action/v0/transformer.rs index 2c2aea87be..5c7540f869 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_create_transition_action/v0/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_create_transition_action/v0/transformer.rs @@ -6,7 +6,7 @@ use grovedb::TransactionArg; use std::sync::Arc; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_create_transition::v0::DocumentCreateTransitionV0; +use dpp::state_transition::batch_transition::document_create_transition::v0::DocumentCreateTransitionV0; use dpp::voting::vote_info_storage::contested_document_vote_poll_stored_info::ContestedDocumentVotePollStoredInfo; use dpp::voting::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePoll; use platform_version::version::PlatformVersion; @@ -15,8 +15,8 @@ use crate::drive::Drive; use crate::drive::votes::resolved::vote_polls::contested_document_resource_vote_poll::resolve::ContestedDocumentResourceVotePollResolver; use crate::error::drive::DriveError; use crate::error::Error; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionAccessorsV0}; -use crate::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::DocumentCreateTransitionActionV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::DocumentCreateTransitionActionV0; impl DocumentCreateTransitionActionV0 { /// try from document create transition with contract lookup @@ -34,7 +34,7 @@ impl DocumentCreateTransitionActionV0 { prefunded_voting_balance, .. } = value; - let base = DocumentBaseTransitionAction::from_base_transition_with_contract_lookup( + let base = DocumentBaseTransitionAction::try_from_base_transition_with_contract_lookup( base, get_data_contract, )?; @@ -130,7 +130,7 @@ impl DocumentCreateTransitionActionV0 { .. } = value; let base = - DocumentBaseTransitionAction::from_borrowed_base_transition_with_contract_lookup( + DocumentBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( base, get_data_contract, )?; diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_delete_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_delete_transition_action/mod.rs similarity index 87% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_delete_transition_action/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_delete_transition_action/mod.rs index 6ab5b5d730..bb6a09b381 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_delete_transition_action/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_delete_transition_action/mod.rs @@ -1,13 +1,13 @@ use derive_more::From; -use crate::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::v0::{DocumentDeleteTransitionActionAccessorsV0, DocumentDeleteTransitionActionV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::v0::{DocumentDeleteTransitionActionAccessorsV0, DocumentDeleteTransitionActionV0}; /// transformer pub mod transformer; /// v0 pub mod v0; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionAction; /// document delete transition action #[derive(Debug, Clone, From)] diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_delete_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_delete_transition_action/transformer.rs similarity index 78% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_delete_transition_action/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_delete_transition_action/transformer.rs index da6cd644cc..ede80bd6f0 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_delete_transition_action/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_delete_transition_action/transformer.rs @@ -2,13 +2,13 @@ use dpp::platform_value::Identifier; use std::sync::Arc; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_transition::DocumentDeleteTransition; +use dpp::state_transition::batch_transition::batched_transition::DocumentDeleteTransition; use crate::drive::contract::DataContractFetchInfo; -use crate::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::{DocumentDeleteTransitionAction, DocumentDeleteTransitionActionV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::{DocumentDeleteTransitionAction, DocumentDeleteTransitionActionV0}; impl DocumentDeleteTransitionAction { /// from - pub fn from_document_create_transition_with_contract_lookup( + pub fn try_from_document_create_transition_with_contract_lookup( value: DocumentDeleteTransition, get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, ) -> Result { @@ -18,7 +18,7 @@ impl DocumentDeleteTransitionAction { } /// from borrowed - pub fn from_document_borrowed_create_transition_with_contract_lookup( + pub fn try_from_document_borrowed_create_transition_with_contract_lookup( value: &DocumentDeleteTransition, get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, ) -> Result { diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_delete_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_delete_transition_action/v0/mod.rs similarity index 89% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_delete_transition_action/v0/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_delete_transition_action/v0/mod.rs index 7df7f03744..c4e179c962 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_delete_transition_action/v0/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_delete_transition_action/v0/mod.rs @@ -1,7 +1,7 @@ /// transformer pub mod transformer; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionAction; #[derive(Debug, Clone)] /// document delete transition action v0 diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_delete_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_delete_transition_action/v0/transformer.rs similarity index 74% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_delete_transition_action/v0/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_delete_transition_action/v0/transformer.rs index ff18328944..e3bbfeb289 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_delete_transition_action/v0/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_delete_transition_action/v0/transformer.rs @@ -2,10 +2,10 @@ use dpp::platform_value::Identifier; use std::sync::Arc; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_transition::document_delete_transition::DocumentDeleteTransitionV0; +use dpp::state_transition::batch_transition::batched_transition::document_delete_transition::DocumentDeleteTransitionV0; use crate::drive::contract::DataContractFetchInfo; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionAction; -use crate::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionV0; impl DocumentDeleteTransitionActionV0 { /// try from @@ -15,7 +15,7 @@ impl DocumentDeleteTransitionActionV0 { ) -> Result { let DocumentDeleteTransitionV0 { base, .. } = value; Ok(DocumentDeleteTransitionActionV0 { - base: DocumentBaseTransitionAction::from_base_transition_with_contract_lookup( + base: DocumentBaseTransitionAction::try_from_base_transition_with_contract_lookup( base, get_data_contract, )?, @@ -29,7 +29,7 @@ impl DocumentDeleteTransitionActionV0 { ) -> Result { let DocumentDeleteTransitionV0 { base, .. } = value; Ok(DocumentDeleteTransitionActionV0 { - base: DocumentBaseTransitionAction::from_borrowed_base_transition_with_contract_lookup( + base: DocumentBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( base, get_data_contract, )?, diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_purchase_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_purchase_transition_action/mod.rs similarity index 97% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_purchase_transition_action/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_purchase_transition_action/mod.rs index 53a84fe1a5..e91b681f10 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_purchase_transition_action/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_purchase_transition_action/mod.rs @@ -8,7 +8,7 @@ use dpp::platform_value::Identifier; use dpp::ProtocolError; pub use v0::*; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionAction; use dpp::version::PlatformVersion; /// transformer diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_purchase_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_purchase_transition_action/transformer.rs similarity index 87% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_purchase_transition_action/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_purchase_transition_action/transformer.rs index 894e13b5bd..7f591c601f 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_purchase_transition_action/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_purchase_transition_action/transformer.rs @@ -4,9 +4,9 @@ use dpp::platform_value::Identifier; use std::sync::Arc; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_transition::DocumentPurchaseTransition; +use dpp::state_transition::batch_transition::batched_transition::DocumentPurchaseTransition; use crate::drive::contract::DataContractFetchInfo; -use crate::state_transition_action::document::documents_batch::document_transition::document_purchase_transition_action::{DocumentPurchaseTransitionAction, DocumentPurchaseTransitionActionV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::{DocumentPurchaseTransitionAction, DocumentPurchaseTransitionActionV0}; impl DocumentPurchaseTransitionAction { /// try from borrowed diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_purchase_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_purchase_transition_action/v0/mod.rs similarity index 94% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_purchase_transition_action/v0/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_purchase_transition_action/v0/mod.rs index 785ccb32b6..dd0fe6acb8 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_purchase_transition_action/v0/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_purchase_transition_action/v0/mod.rs @@ -4,7 +4,7 @@ use dpp::document::Document; use dpp::fee::Credits; use dpp::identifier::Identifier; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionAction; /// document purchase transition action v0 #[derive(Debug, Clone)] diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_purchase_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_purchase_transition_action/v0/transformer.rs similarity index 86% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_purchase_transition_action/v0/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_purchase_transition_action/v0/transformer.rs index e888f20d33..f6131860b2 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_purchase_transition_action/v0/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_purchase_transition_action/v0/transformer.rs @@ -5,10 +5,10 @@ use dpp::platform_value::Identifier; use std::sync::Arc; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_transition::document_purchase_transition::DocumentPurchaseTransitionV0; +use dpp::state_transition::batch_transition::batched_transition::document_purchase_transition::DocumentPurchaseTransitionV0; use crate::drive::contract::DataContractFetchInfo; -use crate::state_transition_action::document::documents_batch::document_transition::document_purchase_transition_action::v0::DocumentPurchaseTransitionActionV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::v0::DocumentPurchaseTransitionActionV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionAccessorsV0}; impl DocumentPurchaseTransitionActionV0 { /// try from borrowed @@ -21,7 +21,7 @@ impl DocumentPurchaseTransitionActionV0 { ) -> Result { let DocumentPurchaseTransitionV0 { base, price, .. } = document_purchase_transition; let base = - DocumentBaseTransitionAction::from_borrowed_base_transition_with_contract_lookup( + DocumentBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( base, get_data_contract, )?; diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_replace_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_replace_transition_action/mod.rs similarity index 98% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_replace_transition_action/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_replace_transition_action/mod.rs index f2dfc222e3..01d8400b38 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_replace_transition_action/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_replace_transition_action/mod.rs @@ -11,7 +11,7 @@ use dpp::prelude::{BlockHeight, CoreBlockHeight, Revision}; use dpp::ProtocolError; pub use v0::*; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionAction; use dpp::version::PlatformVersion; /// transformer diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_replace_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_replace_transition_action/transformer.rs similarity index 91% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_replace_transition_action/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_replace_transition_action/transformer.rs index 4c5cfa6316..51f52bd4e6 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_replace_transition_action/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_replace_transition_action/transformer.rs @@ -5,9 +5,9 @@ use std::sync::Arc; use dpp::identity::TimestampMillis; use dpp::prelude::{BlockHeight, CoreBlockHeight}; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_transition::DocumentReplaceTransition; +use dpp::state_transition::batch_transition::batched_transition::DocumentReplaceTransition; use crate::drive::contract::DataContractFetchInfo; -use crate::state_transition_action::document::documents_batch::document_transition::document_replace_transition_action::{DocumentReplaceTransitionAction, DocumentReplaceTransitionActionV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_replace_transition_action::{DocumentReplaceTransitionAction, DocumentReplaceTransitionActionV0}; impl DocumentReplaceTransitionAction { /// try from borrowed diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_replace_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_replace_transition_action/v0/mod.rs similarity index 99% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_replace_transition_action/v0/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_replace_transition_action/v0/mod.rs index 299d71136f..f8b4daa0fd 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_replace_transition_action/v0/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_replace_transition_action/v0/mod.rs @@ -8,7 +8,7 @@ use dpp::ProtocolError; use std::collections::BTreeMap; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; /// document replace transition action v0 diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_replace_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_replace_transition_action/v0/transformer.rs similarity index 88% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_replace_transition_action/v0/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_replace_transition_action/v0/transformer.rs index 8127c39532..b7d9ce25ed 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_replace_transition_action/v0/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_replace_transition_action/v0/transformer.rs @@ -6,10 +6,10 @@ use std::sync::Arc; use dpp::identity::TimestampMillis; use dpp::prelude::{BlockHeight, CoreBlockHeight}; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_transition::document_replace_transition::DocumentReplaceTransitionV0; +use dpp::state_transition::batch_transition::batched_transition::document_replace_transition::DocumentReplaceTransitionV0; use crate::drive::contract::DataContractFetchInfo; -use crate::state_transition_action::document::documents_batch::document_transition::document_replace_transition_action::v0::DocumentReplaceTransitionActionV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_replace_transition_action::v0::DocumentReplaceTransitionActionV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionAccessorsV0}; impl DocumentReplaceTransitionActionV0 { /// try from borrowed @@ -31,7 +31,7 @@ impl DocumentReplaceTransitionActionV0 { .. } = document_replace_transition; let base = - DocumentBaseTransitionAction::from_borrowed_base_transition_with_contract_lookup( + DocumentBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( base, get_data_contract, )?; diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_transfer_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/mod.rs similarity index 97% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_transfer_transition_action/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/mod.rs index d9a38534ca..6dde44bf56 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_transfer_transition_action/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/mod.rs @@ -7,7 +7,7 @@ use dpp::platform_value::Identifier; use dpp::ProtocolError; pub use v0::*; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionAction; use dpp::version::PlatformVersion; /// transformer diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_transfer_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/transformer.rs similarity index 87% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_transfer_transition_action/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/transformer.rs index 16bbaa4822..736d414f17 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_transfer_transition_action/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/transformer.rs @@ -4,9 +4,9 @@ use dpp::platform_value::Identifier; use std::sync::Arc; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_transition::DocumentTransferTransition; +use dpp::state_transition::batch_transition::batched_transition::DocumentTransferTransition; use crate::drive::contract::DataContractFetchInfo; -use crate::state_transition_action::document::documents_batch::document_transition::document_transfer_transition_action::{DocumentTransferTransitionAction, DocumentTransferTransitionActionV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::{DocumentTransferTransitionAction, DocumentTransferTransitionActionV0}; impl DocumentTransferTransitionAction { /// try from borrowed diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_transfer_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/v0/mod.rs similarity index 92% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_transfer_transition_action/v0/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/v0/mod.rs index d23667dd29..f87c75b622 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_transfer_transition_action/v0/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/v0/mod.rs @@ -2,7 +2,7 @@ pub mod transformer; use dpp::document::Document; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionAction; /// document transfer transition action v0 #[derive(Debug, Clone)] diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_transfer_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/v0/transformer.rs similarity index 85% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_transfer_transition_action/v0/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/v0/transformer.rs index 88f6d0776a..1bf629c41d 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_transfer_transition_action/v0/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transfer_transition_action/v0/transformer.rs @@ -5,10 +5,10 @@ use dpp::platform_value::Identifier; use std::sync::Arc; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_transition::document_transfer_transition::DocumentTransferTransitionV0; +use dpp::state_transition::batch_transition::batched_transition::document_transfer_transition::DocumentTransferTransitionV0; use crate::drive::contract::DataContractFetchInfo; -use crate::state_transition_action::document::documents_batch::document_transition::document_transfer_transition_action::v0::DocumentTransferTransitionActionV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::v0::DocumentTransferTransitionActionV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionAccessorsV0}; impl DocumentTransferTransitionActionV0 { /// try from borrowed @@ -24,7 +24,7 @@ impl DocumentTransferTransitionActionV0 { .. } = document_transfer_transition; let base = - DocumentBaseTransitionAction::from_borrowed_base_transition_with_contract_lookup( + DocumentBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( base, get_data_contract, )?; diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/action_type.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transition_action_type.rs similarity index 63% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/action_type.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transition_action_type.rs index de03698b22..83d41158ea 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/action_type.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_transition_action_type.rs @@ -1,9 +1,9 @@ -use crate::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; -use dpp::state_transition::documents_batch_transition::document_transition::action_type::{ - DocumentTransitionActionType, TransitionActionTypeGetter, +use crate::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; +use dpp::state_transition::batch_transition::batched_transition::document_transition_action_type::{ + DocumentTransitionActionType, DocumentTransitionActionTypeGetter, }; -impl TransitionActionTypeGetter for DocumentTransitionAction { +impl DocumentTransitionActionTypeGetter for DocumentTransitionAction { fn action_type(&self) -> DocumentTransitionActionType { match self { DocumentTransitionAction::CreateAction(_) => DocumentTransitionActionType::Create, @@ -14,9 +14,6 @@ impl TransitionActionTypeGetter for DocumentTransitionAction { DocumentTransitionAction::UpdatePriceAction(_) => { DocumentTransitionActionType::UpdatePrice } - DocumentTransitionAction::BumpIdentityDataContractNonce(_) => { - DocumentTransitionActionType::IgnoreWhileBumpingRevision - } } } } diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_update_price_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_update_price_transition_action/mod.rs similarity index 97% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_update_price_transition_action/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_update_price_transition_action/mod.rs index c206f21da9..254e3f803b 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_update_price_transition_action/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_update_price_transition_action/mod.rs @@ -7,7 +7,7 @@ use dpp::platform_value::Identifier; use dpp::ProtocolError; pub use v0::*; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionAction; use dpp::version::PlatformVersion; /// transformer diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_update_price_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_update_price_transition_action/transformer.rs similarity index 87% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_update_price_transition_action/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_update_price_transition_action/transformer.rs index f52e99d0d6..524ff7e6c1 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_update_price_transition_action/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_update_price_transition_action/transformer.rs @@ -4,9 +4,9 @@ use dpp::platform_value::Identifier; use std::sync::Arc; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_transition::DocumentUpdatePriceTransition; +use dpp::state_transition::batch_transition::batched_transition::DocumentUpdatePriceTransition; use crate::drive::contract::DataContractFetchInfo; -use crate::state_transition_action::document::documents_batch::document_transition::document_update_price_transition_action::{DocumentUpdatePriceTransitionAction, DocumentUpdatePriceTransitionActionV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::{DocumentUpdatePriceTransitionAction, DocumentUpdatePriceTransitionActionV0}; impl DocumentUpdatePriceTransitionAction { /// try from borrowed diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_update_price_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_update_price_transition_action/v0/mod.rs similarity index 93% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_update_price_transition_action/v0/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_update_price_transition_action/v0/mod.rs index 37f3f8100c..493af12a6d 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_update_price_transition_action/v0/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_update_price_transition_action/v0/mod.rs @@ -2,7 +2,7 @@ pub mod transformer; use dpp::document::Document; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionAction; /// document transfer transition action v0 #[derive(Debug, Clone)] diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_update_price_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_update_price_transition_action/v0/transformer.rs similarity index 84% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_update_price_transition_action/v0/transformer.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_update_price_transition_action/v0/transformer.rs index 6054d09f9b..c34bba6cb6 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/document_update_price_transition_action/v0/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/document_update_price_transition_action/v0/transformer.rs @@ -5,10 +5,10 @@ use dpp::platform_value::Identifier; use std::sync::Arc; use dpp::ProtocolError; -use dpp::state_transition::documents_batch_transition::document_transition::document_update_price_transition::DocumentUpdatePriceTransitionV0; +use dpp::state_transition::batch_transition::batched_transition::document_update_price_transition::DocumentUpdatePriceTransitionV0; use crate::drive::contract::DataContractFetchInfo; -use crate::state_transition_action::document::documents_batch::document_transition::document_update_price_transition_action::v0::DocumentUpdatePriceTransitionActionV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::v0::DocumentUpdatePriceTransitionActionV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::{DocumentBaseTransitionAction, DocumentBaseTransitionActionAccessorsV0}; impl DocumentUpdatePriceTransitionActionV0 { /// try from borrowed @@ -20,7 +20,7 @@ impl DocumentUpdatePriceTransitionActionV0 { ) -> Result { let DocumentUpdatePriceTransitionV0 { base, price, .. } = document_update_price_transition; let base = - DocumentBaseTransitionAction::from_borrowed_base_transition_with_contract_lookup( + DocumentBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( base, get_data_contract, )?; diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/mod.rs similarity index 51% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/mod.rs index 51c7f19d2d..7c40b64531 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/document_transition/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/document_transition/mod.rs @@ -1,4 +1,3 @@ -mod action_type; /// document_base_transition_action pub mod document_base_transition_action; /// document_create_transition_action @@ -11,22 +10,21 @@ pub mod document_purchase_transition_action; pub mod document_replace_transition_action; /// document_transfer_transition_action pub mod document_transfer_transition_action; +mod document_transition_action_type; /// document_update_price_transition_action pub mod document_update_price_transition_action; -pub use dpp::state_transition::documents_batch_transition::document_transition::action_type::DocumentTransitionActionType; +pub use dpp::state_transition::batch_transition::batched_transition::document_transition_action_type::DocumentTransitionActionType; use derive_more::From; - -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionAction; -use crate::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::{DocumentCreateTransitionAction, DocumentCreateTransitionActionAccessorsV0}; -use crate::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; -use crate::state_transition_action::document::documents_batch::document_transition::document_replace_transition_action::{DocumentReplaceTransitionAction, DocumentReplaceTransitionActionAccessorsV0}; -use crate::state_transition_action::document::documents_batch::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_purchase_transition_action::{DocumentPurchaseTransitionAction, DocumentPurchaseTransitionActionAccessorsV0}; -use crate::state_transition_action::document::documents_batch::document_transition::document_transfer_transition_action::{DocumentTransferTransitionAction, DocumentTransferTransitionActionAccessorsV0}; -use crate::state_transition_action::document::documents_batch::document_transition::document_update_price_transition_action::{DocumentUpdatePriceTransitionAction, DocumentUpdatePriceTransitionActionAccessorsV0}; -use crate::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::{DocumentCreateTransitionAction, DocumentCreateTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::DocumentDeleteTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_replace_transition_action::{DocumentReplaceTransitionAction, DocumentReplaceTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::{DocumentPurchaseTransitionAction, DocumentPurchaseTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::{DocumentTransferTransitionAction, DocumentTransferTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::{DocumentUpdatePriceTransitionAction, DocumentUpdatePriceTransitionActionAccessorsV0}; /// version pub const DOCUMENT_TRANSITION_ACTION_VERSION: u32 = 0; @@ -46,34 +44,30 @@ pub enum DocumentTransitionAction { PurchaseAction(DocumentPurchaseTransitionAction), /// update price UpdatePriceAction(DocumentUpdatePriceTransitionAction), - /// bump identity data contract nonce - BumpIdentityDataContractNonce(BumpIdentityDataContractNonceAction), } impl DocumentTransitionAction { /// base - pub fn base(&self) -> Option<&DocumentBaseTransitionAction> { + pub fn base(&self) -> &DocumentBaseTransitionAction { match self { - DocumentTransitionAction::CreateAction(d) => Some(d.base()), - DocumentTransitionAction::DeleteAction(d) => Some(d.base()), - DocumentTransitionAction::ReplaceAction(d) => Some(d.base()), - DocumentTransitionAction::TransferAction(d) => Some(d.base()), - DocumentTransitionAction::PurchaseAction(d) => Some(d.base()), - DocumentTransitionAction::UpdatePriceAction(d) => Some(d.base()), - DocumentTransitionAction::BumpIdentityDataContractNonce(_) => None, + DocumentTransitionAction::CreateAction(d) => d.base(), + DocumentTransitionAction::DeleteAction(d) => d.base(), + DocumentTransitionAction::ReplaceAction(d) => d.base(), + DocumentTransitionAction::TransferAction(d) => d.base(), + DocumentTransitionAction::PurchaseAction(d) => d.base(), + DocumentTransitionAction::UpdatePriceAction(d) => d.base(), } } /// base owned - pub fn base_owned(self) -> Option { + pub fn base_owned(self) -> DocumentBaseTransitionAction { match self { - DocumentTransitionAction::CreateAction(d) => Some(d.base_owned()), - DocumentTransitionAction::DeleteAction(d) => Some(d.base_owned()), - DocumentTransitionAction::ReplaceAction(d) => Some(d.base_owned()), - DocumentTransitionAction::TransferAction(d) => Some(d.base_owned()), - DocumentTransitionAction::PurchaseAction(d) => Some(d.base_owned()), - DocumentTransitionAction::UpdatePriceAction(d) => Some(d.base_owned()), - DocumentTransitionAction::BumpIdentityDataContractNonce(_) => None, + DocumentTransitionAction::CreateAction(d) => d.base_owned(), + DocumentTransitionAction::DeleteAction(d) => d.base_owned(), + DocumentTransitionAction::ReplaceAction(d) => d.base_owned(), + DocumentTransitionAction::TransferAction(d) => d.base_owned(), + DocumentTransitionAction::PurchaseAction(d) => d.base_owned(), + DocumentTransitionAction::UpdatePriceAction(d) => d.base_owned(), } } } diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/mod.rs new file mode 100644 index 0000000000..4ba839bd84 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/mod.rs @@ -0,0 +1,40 @@ +use derive_more::From; +use dpp::identifier::Identifier; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; +use crate::state_transition_action::system::bump_identity_data_contract_nonce_action::{BumpIdentityDataContractNonceAction, BumpIdentityDataContractNonceActionAccessorsV0}; + +/// document transition +pub mod document_transition; +/// token transition +pub mod token_transition; + +/// token action +#[derive(Debug, Clone, From)] +pub enum BatchedTransitionAction { + /// document + DocumentAction(DocumentTransitionAction), + /// token + TokenAction(TokenTransitionAction), + /// bump identity data contract nonce + BumpIdentityDataContractNonce(BumpIdentityDataContractNonceAction), +} + +impl BatchedTransitionAction { + /// Helper method to get the data contract id + pub fn data_contract_id(&self) -> Identifier { + match self { + BatchedTransitionAction::DocumentAction(document_action) => { + document_action.base().data_contract_id() + } + BatchedTransitionAction::TokenAction(token_action) => { + token_action.base().data_contract_id() + } + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action) => { + bump_action.data_contract_id() + } + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/mod.rs new file mode 100644 index 0000000000..af779c91c2 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/mod.rs @@ -0,0 +1,144 @@ +mod token_transition_action_type; + +/// token_base_transition_action +pub mod token_base_transition_action; +/// token_burn_transition_action +pub mod token_burn_transition_action; +/// token_freeze_transition_action +pub mod token_freeze_transition_action; +/// token_issuance_transition_action +pub mod token_mint_transition_action; +/// token_transfer_transition_action +pub mod token_transfer_transition_action; +/// token_unfreeze_transition_action +pub mod token_unfreeze_transition_action; + +/// token_destroy_frozen_funds_transition_action +pub mod token_destroy_frozen_funds_transition_action; +/// token_emergency_action_transition_action +pub mod token_emergency_action_transition_action; + +use derive_more::From; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::document_type::DocumentTypeRef; +use dpp::data_contracts::SystemDataContract; +use dpp::document::Document; +use dpp::identifier::Identifier; +use dpp::prelude::{DataContract, IdentityNonce}; +use dpp::ProtocolError; +use crate::error::Error; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::{TokenBurnTransitionAction, TokenBurnTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::{TokenFreezeTransitionAction, TokenFreezeTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::token_transition::token_unfreeze_transition_action::{TokenUnfreezeTransitionAction, TokenUnfreezeTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::{TokenMintTransitionAction, TokenMintTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::TokenTransferTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::TokenTransferTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::TokenEmergencyActionTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::TokenEmergencyActionTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionActionAccessorsV0; + +/// token action +#[derive(Debug, Clone, From)] +pub enum TokenTransitionAction { + /// burn + BurnAction(TokenBurnTransitionAction), + /// issuance + MintAction(TokenMintTransitionAction), + /// transfer + TransferAction(TokenTransferTransitionAction), + /// freeze + FreezeAction(TokenFreezeTransitionAction), + /// unfreeze + UnfreezeAction(TokenUnfreezeTransitionAction), + /// emergency action + EmergencyActionAction(TokenEmergencyActionTransitionAction), + /// destroy frozen funds action + DestroyFrozenFundsAction(TokenDestroyFrozenFundsTransitionAction), +} + +impl TokenTransitionAction { + /// Returns a reference to the base token transition action if available + pub fn base(&self) -> &TokenBaseTransitionAction { + match self { + TokenTransitionAction::BurnAction(action) => action.base(), + TokenTransitionAction::MintAction(action) => action.base(), + TokenTransitionAction::TransferAction(action) => action.base(), + TokenTransitionAction::FreezeAction(action) => action.base(), + TokenTransitionAction::UnfreezeAction(action) => action.base(), + TokenTransitionAction::EmergencyActionAction(action) => action.base(), + TokenTransitionAction::DestroyFrozenFundsAction(action) => action.base(), + } + } + + /// Consumes self and returns the base token transition action if available + pub fn base_owned(self) -> TokenBaseTransitionAction { + match self { + TokenTransitionAction::BurnAction(action) => action.base_owned(), + TokenTransitionAction::MintAction(action) => action.base_owned(), + TokenTransitionAction::TransferAction(action) => action.base_owned(), + TokenTransitionAction::FreezeAction(action) => action.base_owned(), + TokenTransitionAction::UnfreezeAction(action) => action.base_owned(), + TokenTransitionAction::EmergencyActionAction(action) => action.base_owned(), + TokenTransitionAction::DestroyFrozenFundsAction(action) => action.base_owned(), + } + } + + /// Historical document type name for the token history contract + pub fn historical_document_type_name(&self) -> &str { + match self { + TokenTransitionAction::BurnAction(_) => "burn", + TokenTransitionAction::MintAction(_) => "mint", + TokenTransitionAction::TransferAction(_) => "transfer", + TokenTransitionAction::FreezeAction(_) => "freeze", + TokenTransitionAction::UnfreezeAction(_) => "unfreeze", + TokenTransitionAction::EmergencyActionAction(_) => "emergencyAction", + TokenTransitionAction::DestroyFrozenFundsAction(_) => "destroyFrozenFunds", + } + } + + /// Historical document type for the token history contract + pub fn historical_document_type<'a>( + &self, + token_history_contract: &'a DataContract, + ) -> Result, ProtocolError> { + Ok(token_history_contract.document_type_for_name(self.historical_document_type_name())?) + } + + /// Historical document id + pub fn historical_document_id( + &self, + owner_id: Identifier, + owner_nonce: IdentityNonce, + ) -> Identifier { + let name = self.historical_document_type_name(); + Document::generate_document_id_v0( + &SystemDataContract::TokenHistory.id(), + &owner_id, + name, + owner_nonce.to_be_bytes().as_slice(), + ) + } + + /// Historical document id + pub fn build_historical_document( + &self, + token_historical_contract: &DataContract, + token_id: Identifier, + owner_id: Identifier, + owner_nonce: IdentityNonce, + block_info: &BlockInfo, + ) -> Result { + self.associated_token_event() + .build_historical_document_owned( + token_historical_contract, + token_id, + owner_id, + owner_nonce, + block_info, + ) + .map_err(Error::Protocol) + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/mod.rs new file mode 100644 index 0000000000..49b42cf17c --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/mod.rs @@ -0,0 +1,79 @@ +use derive_more::From; +use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; +use dpp::data_contract::TokenContractPosition; +use dpp::group::GroupStateTransitionResolvedInfo; +use dpp::platform_value::Identifier; +use dpp::prelude::IdentityNonce; +use std::sync::Arc; + +/// transformer module +pub mod transformer; +mod v0; + +use crate::drive::contract::DataContractFetchInfo; + +use crate::error::Error; +pub use v0::*; + +/// document base transition action +#[derive(Debug, Clone, From)] +pub enum TokenBaseTransitionAction { + /// v0 + V0(TokenBaseTransitionActionV0), +} + +impl TokenBaseTransitionActionAccessorsV0 for TokenBaseTransitionAction { + fn token_position(&self) -> TokenContractPosition { + match self { + TokenBaseTransitionAction::V0(v0) => v0.token_contract_position, + } + } + + fn token_id(&self) -> Identifier { + match self { + TokenBaseTransitionAction::V0(v0) => v0.token_id, + } + } + + fn data_contract_id(&self) -> Identifier { + match self { + TokenBaseTransitionAction::V0(v0) => v0.data_contract_id(), + } + } + + fn data_contract_fetch_info_ref(&self) -> &Arc { + match self { + TokenBaseTransitionAction::V0(v0) => v0.data_contract_fetch_info_ref(), + } + } + + fn data_contract_fetch_info(&self) -> Arc { + match self { + TokenBaseTransitionAction::V0(v0) => v0.data_contract_fetch_info(), + } + } + + fn token_configuration(&self) -> Result<&TokenConfiguration, Error> { + match self { + TokenBaseTransitionAction::V0(v0) => v0.token_configuration(), + } + } + + fn identity_contract_nonce(&self) -> IdentityNonce { + match self { + TokenBaseTransitionAction::V0(v0) => v0.identity_contract_nonce(), + } + } + + fn store_in_group(&self) -> Option<&GroupStateTransitionResolvedInfo> { + match self { + TokenBaseTransitionAction::V0(v0) => v0.store_in_group(), + } + } + + fn perform_action(&self) -> bool { + match self { + TokenBaseTransitionAction::V0(v0) => v0.perform_action(), + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/transformer.rs new file mode 100644 index 0000000000..ab33951ffc --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/transformer.rs @@ -0,0 +1,69 @@ +use dpp::platform_value::Identifier; +use std::sync::Arc; +use grovedb::TransactionArg; +use dpp::prelude::ConsensusValidationResult; +use dpp::ProtocolError; +use dpp::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use platform_version::version::PlatformVersion; +use crate::drive::contract::DataContractFetchInfo; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionV0}; + +impl TokenBaseTransitionAction { + /// from base transition with contract lookup + pub fn try_from_base_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenBaseTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match value { + TokenBaseTransition::V0(v0) => Ok( + TokenBaseTransitionActionV0::try_from_base_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + drive_operations, + get_data_contract, + platform_version, + )? + .map(|v0| v0.into()), + ), + } + } + + /// from borrowed base transition with contract lookup + pub fn try_from_borrowed_base_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenBaseTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match value { + TokenBaseTransition::V0(v0) => Ok( + TokenBaseTransitionActionV0::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + drive_operations, + get_data_contract, + platform_version, + )?.map(|v0| v0.into()) + ), + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/v0/mod.rs new file mode 100644 index 0000000000..9995478c57 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/v0/mod.rs @@ -0,0 +1,112 @@ +use crate::drive::contract::DataContractFetchInfo; +use crate::error::Error; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; +use dpp::data_contract::TokenContractPosition; +use dpp::group::GroupStateTransitionResolvedInfo; +use dpp::identifier::Identifier; +use dpp::prelude::IdentityNonce; +use dpp::ProtocolError; +use std::sync::Arc; + +/// transformer +pub mod transformer; + +/// Token base transition action v0 +#[derive(Debug, Clone)] +pub struct TokenBaseTransitionActionV0 { + /// Token Id + pub token_id: Identifier, + /// The identity contract nonce, used to prevent replay attacks + pub identity_contract_nonce: IdentityNonce, + /// The token position within the data contract + pub token_contract_position: u16, + /// A potential data contract + pub data_contract: Arc, + /// Using group multi party rules for authentication + /// If this is set we should store in group + pub store_in_group: Option, + /// Should the action be performed. + /// This is true if we don't store in group. + /// And also true if we store in group and with this have enough signatures to perform the action + pub perform_action: bool, +} + +/// Token base transition action accessors v0 +pub trait TokenBaseTransitionActionAccessorsV0 { + /// The token position within the data contract + fn token_position(&self) -> TokenContractPosition; + + /// The token id + fn token_id(&self) -> Identifier; + + /// Returns the data contract ID + fn data_contract_id(&self) -> Identifier; + + /// Returns a reference to the data contract fetch info, without cloning + fn data_contract_fetch_info_ref(&self) -> &Arc; + + /// Returns the data contract fetch info (cloned Arc) + fn data_contract_fetch_info(&self) -> Arc; + + /// Returns the identity contract nonce + fn identity_contract_nonce(&self) -> IdentityNonce; + + /// Gets the token configuration associated to the action + fn token_configuration(&self) -> Result<&TokenConfiguration, Error>; + + /// Gets the store_in_group field (optional) + fn store_in_group(&self) -> Option<&GroupStateTransitionResolvedInfo>; + + /// Gets the perform_action field + fn perform_action(&self) -> bool; +} + +impl TokenBaseTransitionActionAccessorsV0 for TokenBaseTransitionActionV0 { + fn token_position(&self) -> u16 { + self.token_contract_position + } + + fn token_id(&self) -> Identifier { + self.token_id + } + + fn data_contract_id(&self) -> Identifier { + self.data_contract.contract.id() + } + + fn data_contract_fetch_info_ref(&self) -> &Arc { + &self.data_contract + } + + fn data_contract_fetch_info(&self) -> Arc { + self.data_contract.clone() + } + + fn identity_contract_nonce(&self) -> IdentityNonce { + self.identity_contract_nonce + } + + fn token_configuration(&self) -> Result<&TokenConfiguration, Error> { + self.data_contract + .as_ref() + .contract + .tokens() + .get(&self.token_contract_position) + .ok_or(Error::Protocol(ProtocolError::CorruptedCodeExecution( + format!( + "data contract does not have a token at position {}", + self.token_contract_position + ), + ))) + } + + fn store_in_group(&self) -> Option<&GroupStateTransitionResolvedInfo> { + self.store_in_group.as_ref() + } + + fn perform_action(&self) -> bool { + self.perform_action + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/v0/transformer.rs new file mode 100644 index 0000000000..64532238e7 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_base_transition_action/v0/transformer.rs @@ -0,0 +1,242 @@ +use dpp::group::{GroupStateTransitionInfo, GroupStateTransitionResolvedInfo}; +use dpp::platform_value::Identifier; +use grovedb::TransactionArg; +use std::sync::Arc; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::group::{GroupActionAlreadyCompletedError, GroupActionDoesNotExistError, IdentityNotMemberOfGroupError}; +use dpp::consensus::state::state_error::StateError; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::group::accessors::v0::GroupV0Getters; +use dpp::prelude::ConsensusValidationResult; +use dpp::ProtocolError; +use dpp::state_transition::batch_transition::token_base_transition::v0::TokenBaseTransitionV0; +use platform_version::version::PlatformVersion; +use crate::drive::contract::DataContractFetchInfo; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionV0; + +impl TokenBaseTransitionActionV0 { + /// try from base transition with contract lookup + pub fn try_from_base_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenBaseTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let TokenBaseTransitionV0 { + token_contract_position, + data_contract_id, + identity_contract_nonce, + token_id, + using_group_info, + } = value; + + let data_contract = get_data_contract(data_contract_id)?; + + let (perform_action, store_in_group) = match using_group_info { + None => (true, None), + Some(GroupStateTransitionInfo { + group_contract_position, + action_id, + action_is_proposer, + }) => { + let group = data_contract.contract.group(group_contract_position)?; + let signer_power = match group.member_power(owner_id) { + Ok(signer_power) => signer_power, + Err(ProtocolError::GroupMemberNotFound(_)) => { + return Ok(ConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::IdentityNotMemberOfGroupError( + IdentityNotMemberOfGroupError::new( + owner_id, + data_contract_id, + group_contract_position, + ), + )), + )); + } + Err(e) => return Err(e.into()), + }; + let required_power = group.required_power(); + let current_power = if action_is_proposer { + 0 + } else { + match drive.fetch_action_id_signers_power_and_add_operations( + data_contract_id, + group_contract_position, + action_id, + approximate_without_state_for_costs, + transaction, + drive_operations, + platform_version, + )? { + None => { + return Ok(ConsensusValidationResult::new_with_error( + ConsensusError::StateError( + StateError::GroupActionDoesNotExistError( + GroupActionDoesNotExistError::new( + data_contract_id, + group_contract_position, + action_id, + ), + ), + ), + )); + } + Some(power) => power, + } + }; + if current_power >= required_power { + return Ok(ConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::GroupActionAlreadyCompletedError( + GroupActionAlreadyCompletedError::new( + data_contract_id, + group_contract_position, + action_id, + ), + )), + )); + } + let perform_action = if approximate_without_state_for_costs { + // most expensive case is that we perform action + true + } else { + current_power + signer_power >= required_power + }; + let store_in_group = GroupStateTransitionResolvedInfo { + group_contract_position, + group: group.clone(), + action_id, + action_is_proposer, + signer_power, + }; + (perform_action, Some(store_in_group)) + } + }; + Ok(TokenBaseTransitionActionV0 { + token_id, + identity_contract_nonce, + token_contract_position, + data_contract, + store_in_group, + perform_action, + } + .into()) + } + + /// try from borrowed base transition with contract lookup + pub fn try_from_borrowed_base_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenBaseTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + drive_operations: &mut Vec, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let TokenBaseTransitionV0 { + token_contract_position, + data_contract_id, + identity_contract_nonce, + token_id, + using_group_info, + } = value; + + let data_contract = get_data_contract(*data_contract_id)?; + + let (perform_action, store_in_group) = match using_group_info { + None => (true, None), + Some(GroupStateTransitionInfo { + group_contract_position, + action_id, + action_is_proposer, + }) => { + let group = data_contract.contract.group(*group_contract_position)?; + let signer_power = match group.member_power(owner_id) { + Ok(signer_power) => signer_power, + Err(ProtocolError::GroupMemberNotFound(_)) => { + return Ok(ConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::IdentityNotMemberOfGroupError( + IdentityNotMemberOfGroupError::new( + owner_id, + *data_contract_id, + *group_contract_position, + ), + )), + )); + } + Err(e) => return Err(e.into()), + }; + let required_power = group.required_power(); + let current_power = if *action_is_proposer { + 0 + } else { + match drive.fetch_action_id_signers_power_and_add_operations( + *data_contract_id, + *group_contract_position, + *action_id, + approximate_without_state_for_costs, + transaction, + drive_operations, + platform_version, + )? { + None => { + return Ok(ConsensusValidationResult::new_with_error( + ConsensusError::StateError( + StateError::GroupActionDoesNotExistError( + GroupActionDoesNotExistError::new( + *data_contract_id, + *group_contract_position, + *action_id, + ), + ), + ), + )); + } + Some(power) => power, + } + }; + if current_power >= required_power { + return Ok(ConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::GroupActionAlreadyCompletedError( + GroupActionAlreadyCompletedError::new( + *data_contract_id, + *group_contract_position, + *action_id, + ), + )), + )); + } + let perform_action = if approximate_without_state_for_costs { + // most expensive case is that we perform action + true + } else { + current_power + signer_power >= required_power + }; + let store_in_group = GroupStateTransitionResolvedInfo { + group_contract_position: *group_contract_position, + group: group.clone(), + action_id: *action_id, + action_is_proposer: *action_is_proposer, + signer_power, + }; + (perform_action, Some(store_in_group)) + } + }; + Ok(TokenBaseTransitionActionV0 { + token_id: *token_id, + identity_contract_nonce: *identity_contract_nonce, + token_contract_position: *token_contract_position, + data_contract, + store_in_group, + perform_action, + } + .into()) + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/mod.rs new file mode 100644 index 0000000000..0e24f14920 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/mod.rs @@ -0,0 +1,60 @@ +use derive_more::From; + +/// transformer module for token burn transition action +pub mod transformer; +mod v0; + +pub use v0::*; // re-export the v0 module items (including TokenBurnTransitionActionV0) + +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; + +/// Token burn transition action +#[derive(Debug, Clone, From)] +pub enum TokenBurnTransitionAction { + /// v0 + V0(TokenBurnTransitionActionV0), +} + +impl TokenBurnTransitionActionAccessorsV0 for TokenBurnTransitionAction { + fn base(&self) -> &TokenBaseTransitionAction { + match self { + TokenBurnTransitionAction::V0(v0) => &v0.base, + } + } + + fn base_owned(self) -> TokenBaseTransitionAction { + match self { + TokenBurnTransitionAction::V0(v0) => v0.base, + } + } + + fn burn_amount(&self) -> u64 { + match self { + TokenBurnTransitionAction::V0(v0) => v0.burn_amount, + } + } + + fn set_burn_amount(&mut self, amount: u64) { + match self { + TokenBurnTransitionAction::V0(v0) => v0.burn_amount = amount, + } + } + + fn public_note(&self) -> Option<&String> { + match self { + TokenBurnTransitionAction::V0(v0) => v0.public_note.as_ref(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenBurnTransitionAction::V0(v0) => v0.public_note, + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenBurnTransitionAction::V0(v0) => v0.public_note = public_note, + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/transformer.rs new file mode 100644 index 0000000000..92383d278b --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/transformer.rs @@ -0,0 +1,125 @@ +use dpp::platform_value::Identifier; +use dpp::ProtocolError; +use grovedb::TransactionArg; +use std::sync::Arc; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::{ + TokenBurnTransitionAction, TokenBurnTransitionActionV0, +}; +use dpp::state_transition::batch_transition::token_burn_transition::TokenBurnTransition; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::BatchedTransitionAction; + +/// Implement methods to transform a `TokenBurnTransition` into a `TokenBurnTransitionAction`. +impl TokenBurnTransitionAction { + /// Transform a `TokenBurnTransition` into a `TokenBurnTransitionAction` using the provided data contract lookup. + /// + /// This method processes a `TokenBurnTransition` and converts it into a `TokenBurnTransitionAction` while + /// looking up necessary data contracts and calculating transaction fees. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the burn transition. + /// * `value` - The `TokenBurnTransition` instance to be converted into a `TokenBurnTransitionAction`. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state information. + /// * `transaction` - The transaction argument used for state changes. + /// * `block_info` - Block information needed to process the transition. + /// * `get_data_contract` - A closure that retrieves the `DataContractFetchInfo` for a given contract ID. + /// * `platform_version` - The platform version in use for the context of the transition. + /// + /// # Returns + /// + /// * `Result<(TokenBurnTransitionAction, FeeResult), Error>` - A result containing the `TokenBurnTransitionAction` and associated fees if successful, otherwise an error. + pub fn try_from_token_burn_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenBurnTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenBurnTransition::V0(v0) => { + TokenBurnTransitionActionV0::try_from_token_burn_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } + + /// Transform a borrowed `TokenBurnTransition` into a `TokenBurnTransitionAction` using the provided data contract lookup. + /// + /// This method processes a borrowed reference to a `TokenBurnTransition` and converts it into a `TokenBurnTransitionAction` + /// while looking up necessary data contracts and calculating transaction fees. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the burn transition. + /// * `value` - A reference to the `TokenBurnTransition` to be converted into a `TokenBurnTransitionAction`. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state information. + /// * `transaction` - The transaction argument used for state changes. + /// * `block_info` - Block information needed to process the transition. + /// * `get_data_contract` - A closure that retrieves the `DataContractFetchInfo` for a given contract ID. + /// * `platform_version` - The platform version in use for the context of the transition. + /// + /// # Returns + /// + /// * `Result<(TokenBurnTransitionAction, FeeResult), Error>` - A result containing the `TokenBurnTransitionAction` and associated fees if successful, otherwise an error. + pub fn try_from_borrowed_token_burn_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenBurnTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenBurnTransition::V0(v0) => { + TokenBurnTransitionActionV0::try_from_borrowed_token_burn_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/v0/mod.rs new file mode 100644 index 0000000000..7a6c9a5184 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/v0/mod.rs @@ -0,0 +1,102 @@ +mod transformer; + +use std::sync::Arc; +use dpp::identifier::Identifier; +use dpp::prelude::IdentityNonce; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0}; + +/// Token burn transition action v0 +#[derive(Debug, Clone)] +pub struct TokenBurnTransitionActionV0 { + /// Base token transition action + pub base: TokenBaseTransitionAction, + /// The amount of tokens to burn + pub burn_amount: u64, + /// A public note + pub public_note: Option, +} + +/// Accessors for `TokenBurnTransitionActionV0` +pub trait TokenBurnTransitionActionAccessorsV0 { + /// Returns a reference to the base token transition action + fn base(&self) -> &TokenBaseTransitionAction; + + /// Consumes self and returns the base token transition action + fn base_owned(self) -> TokenBaseTransitionAction; + + /// Returns the amount of tokens to burn + fn burn_amount(&self) -> u64; + + /// Sets the amount of tokens to burn + fn set_burn_amount(&mut self, amount: u64); + + /// Returns a reference to the `public_note` field of the `TokenBurnTransitionActionV0` + fn public_note(&self) -> Option<&String>; + + /// Returns the owned `public_note` field of the `TokenBurnTransitionActionV0` + fn public_note_owned(self) -> Option; + + /// Sets the value of the `public_note` field in the `TokenBurnTransitionActionV0` + fn set_public_note(&mut self, public_note: Option); + + /// Returns the token position in the contract + fn token_position(&self) -> u16 { + self.base().token_position() + } + + /// Returns the token ID + fn token_id(&self) -> Identifier { + self.base().token_id() + } + + /// Returns the data contract ID + fn data_contract_id(&self) -> Identifier { + self.base().data_contract_id() + } + + /// Returns a reference to the data contract fetch info + fn data_contract_fetch_info_ref(&self) -> &Arc { + self.base().data_contract_fetch_info_ref() + } + + /// Returns the data contract fetch info + fn data_contract_fetch_info(&self) -> Arc { + self.base().data_contract_fetch_info() + } + + /// Returns the identity contract nonce + fn identity_contract_nonce(&self) -> IdentityNonce { + self.base().identity_contract_nonce() + } +} + +impl TokenBurnTransitionActionAccessorsV0 for TokenBurnTransitionActionV0 { + fn base(&self) -> &TokenBaseTransitionAction { + &self.base + } + + fn base_owned(self) -> TokenBaseTransitionAction { + self.base + } + + fn burn_amount(&self) -> u64 { + self.burn_amount + } + + fn set_burn_amount(&mut self, amount: u64) { + self.burn_amount = amount; + } + + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/v0/transformer.rs new file mode 100644 index 0000000000..1542acc0b2 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_burn_transition_action/v0/transformer.rs @@ -0,0 +1,229 @@ +use dpp::identifier::Identifier; +use dpp::state_transition::batch_transition::token_burn_transition::v0::TokenBurnTransitionV0; +use dpp::ProtocolError; +use grovedb::TransactionArg; +use std::sync::Arc; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::UserFeeIncrease; +use dpp::validation::ConsensusValidationResult; +use platform_version::version::PlatformVersion; +use crate::drive::contract::DataContractFetchInfo; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::v0::TokenBurnTransitionActionV0; +use crate::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; + +impl TokenBurnTransitionActionV0 { + /// Attempts to create a `TokenBurnTransitionActionV0` from the given `TokenBurnTransitionV0` value. + /// + /// This function extracts the necessary data from the provided `TokenBurnTransitionV0` and + /// delegates to the `try_from_base_transition_with_contract_lookup` function to construct the + /// base action. It then constructs the `TokenBurnTransitionActionV0` struct by including the + /// `burn_amount` and `public_note` values, along with the base action. + /// + /// # Parameters + /// - `drive`: A reference to the `Drive` struct which provides access to the system. + /// - `owner_id`: The identifier of the owner initiating the burn transition. + /// - `value`: The `TokenBurnTransitionV0` containing the details for the token burn. + /// - `approximate_without_state_for_costs`: A flag indicating whether to approximate state costs. + /// - `transaction`: The transaction argument used for state changes. + /// - `block_info`: Information about the current block to calculate fees. + /// - `get_data_contract`: A closure function that looks up the data contract for a given identifier. + /// - `platform_version`: The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// A `Result` containing the constructed `TokenBurnTransitionActionV0` on success, or an error + /// if any issues occur during the process. + /// + /// # Errors + /// - Returns an `Error` if any error occurs while trying to create the base action or process the burn. + pub fn try_from_token_burn_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenBurnTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenBurnTransitionV0 { + base, + burn_amount, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + &base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = BumpIdentityDataContractNonceAction::from_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::BurnAction( + TokenBurnTransitionActionV0 { + base: base_action, + burn_amount, + public_note, + } + .into(), + )) + .into(), + fee_result, + )) + } + + /// Attempts to create a `TokenBurnTransitionActionV0` from the borrowed `TokenBurnTransitionV0` value. + /// + /// This function is similar to `try_from_token_burn_transition_with_contract_lookup`, but it + /// operates on a borrowed `TokenBurnTransitionV0` to avoid ownership transfer. It delegates + /// to `try_from_borrowed_base_transition_with_contract_lookup` for constructing the base action, + /// then combines it with the `burn_amount` and `public_note` to form a `TokenBurnTransitionActionV0`. + /// + /// # Parameters + /// - `drive`: A reference to the `Drive` struct which provides access to the system. + /// - `owner_id`: The identifier of the owner initiating the burn transition. + /// - `value`: A borrowed reference to the `TokenBurnTransitionV0` containing the details for the token burn. + /// - `approximate_without_state_for_costs`: A flag indicating whether to approximate state costs. + /// - `transaction`: The transaction argument used for state changes. + /// - `block_info`: Information about the current block to calculate fees. + /// - `get_data_contract`: A closure function that looks up the data contract for a given identifier. + /// - `platform_version`: The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// A `Result` containing the constructed `TokenBurnTransitionActionV0` on success, or an error + /// if any issues occur during the process. + /// + /// # Errors + /// - Returns an `Error` if any error occurs while trying to create the base action or process the burn. + pub fn try_from_borrowed_token_burn_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenBurnTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenBurnTransitionV0 { + base, + burn_amount, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::BurnAction( + TokenBurnTransitionActionV0 { + base: base_action, + burn_amount: *burn_amount, + public_note: public_note.clone(), + } + .into(), + )) + .into(), + fee_result, + )) + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/mod.rs new file mode 100644 index 0000000000..b3074af948 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/mod.rs @@ -0,0 +1,76 @@ +use derive_more::From; +use dpp::balances::credits::TokenAmount; +use dpp::identifier::Identifier; + +/// transformer module for token destroy_frozen_funds transition action +pub mod transformer; +mod v0; + +pub use v0::*; // re-export the v0 module items (including TokenIssuanceTransitionActionV0) + +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; + +/// Token destroy_frozen_funds transition action +#[derive(Debug, Clone, From)] +pub enum TokenDestroyFrozenFundsTransitionAction { + /// v0 + V0(TokenDestroyFrozenFundsTransitionActionV0), +} + +impl TokenDestroyFrozenFundsTransitionActionAccessorsV0 + for TokenDestroyFrozenFundsTransitionAction +{ + fn base(&self) -> &TokenBaseTransitionAction { + match self { + TokenDestroyFrozenFundsTransitionAction::V0(v0) => &v0.base, + } + } + + fn base_owned(self) -> TokenBaseTransitionAction { + match self { + TokenDestroyFrozenFundsTransitionAction::V0(v0) => v0.base, + } + } + + fn frozen_identity_id(&self) -> Identifier { + match self { + TokenDestroyFrozenFundsTransitionAction::V0(v0) => v0.frozen_identity_id, + } + } + + fn set_frozen_identity_id(&mut self, id: Identifier) { + match self { + TokenDestroyFrozenFundsTransitionAction::V0(v0) => v0.frozen_identity_id = id, + } + } + + fn amount(&self) -> TokenAmount { + match self { + TokenDestroyFrozenFundsTransitionAction::V0(v0) => v0.amount, + } + } + + fn set_amount(&mut self, amount: TokenAmount) { + match self { + TokenDestroyFrozenFundsTransitionAction::V0(v0) => v0.amount = amount, + } + } + + fn public_note(&self) -> Option<&String> { + match self { + TokenDestroyFrozenFundsTransitionAction::V0(v0) => v0.public_note.as_ref(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenDestroyFrozenFundsTransitionAction::V0(v0) => v0.public_note, + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenDestroyFrozenFundsTransitionAction::V0(v0) => v0.public_note = public_note, + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/transformer.rs new file mode 100644 index 0000000000..6b83b6e6a3 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/transformer.rs @@ -0,0 +1,117 @@ +use dpp::platform_value::Identifier; +use dpp::ProtocolError; +use grovedb::TransactionArg; +use std::sync::Arc; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::{TokenDestroyFrozenFundsTransitionActionV0, TokenDestroyFrozenFundsTransitionAction}; +use dpp::state_transition::batch_transition::token_destroy_frozen_funds_transition::TokenDestroyFrozenFundsTransition; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::BatchedTransitionAction; + +/// Implement methods to transform a `TokenDestroyFrozenFundsTransition` into a `TokenDestroyFrozenFundsTransitionAction`. +impl TokenDestroyFrozenFundsTransitionAction { + /// Transform a `TokenDestroyFrozenFundsTransition` into a `TokenDestroyFrozenFundsTransitionAction` using the provided data contract lookup. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the destroy_frozen_funds transition. + /// * `transaction` - The transaction argument used for state changes. + /// * `value` - A `TokenDestroyFrozenFundsTransition` instance. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state. + /// * `drive_operations` - A mutable reference to the vector of low-level operations that need to be performed. + /// * `get_data_contract` - A closure that fetches the `DataContractFetchInfo` given a contract ID. + /// * `platform_version` - The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - A `TokenDestroyFrozenFundsTransitionAction` if successful, otherwise `ProtocolError`. + pub fn try_from_token_destroy_frozen_funds_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenDestroyFrozenFundsTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenDestroyFrozenFundsTransition::V0(v0) => { + TokenDestroyFrozenFundsTransitionActionV0::try_from_token_destroy_frozen_funds_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } + + /// Transform a borrowed `TokenDestroyFrozenFundsTransition` into a `TokenDestroyFrozenFundsTransitionAction` using the provided data contract lookup. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the destroy_frozen_funds transition. + /// * `transaction` - The transaction argument used for state changes. + /// * `value` - A reference to a `TokenDestroyFrozenFundsTransition`. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state. + /// * `drive_operations` - A mutable reference to the vector of low-level operations that need to be performed. + /// * `get_data_contract` - A closure that fetches the `DataContractFetchInfo` given a contract ID. + /// * `platform_version` - The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - A `TokenDestroyFrozenFundsTransitionAction` if successful, otherwise `ProtocolError`. + pub fn try_from_borrowed_token_destroy_frozen_funds_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenDestroyFrozenFundsTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenDestroyFrozenFundsTransition::V0(v0) => { + TokenDestroyFrozenFundsTransitionActionV0::try_from_borrowed_token_destroy_frozen_funds_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/v0/mod.rs new file mode 100644 index 0000000000..9cbe01544e --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/v0/mod.rs @@ -0,0 +1,115 @@ +mod transformer; + +use std::sync::Arc; +use dpp::balances::credits::TokenAmount; +use dpp::identifier::Identifier; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0}; + +/// Token issuance transition action v0 +#[derive(Debug, Clone)] +pub struct TokenDestroyFrozenFundsTransitionActionV0 { + /// Base token transition action + pub base: TokenBaseTransitionAction, + /// The identity to credit the token to + pub frozen_identity_id: Identifier, + /// The amount that will be burned + pub amount: TokenAmount, + /// A public note + pub public_note: Option, +} + +/// Accessors for `TokenIssuanceTransitionActionV0` +pub trait TokenDestroyFrozenFundsTransitionActionAccessorsV0 { + /// Returns a reference to the base token transition action + fn base(&self) -> &TokenBaseTransitionAction; + + /// Consumes self and returns the base token transition action + fn base_owned(self) -> TokenBaseTransitionAction; + + /// Consumes self and returns the identity balance holder ID + fn frozen_identity_id(&self) -> Identifier; + + /// Sets the identity balance holder ID + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier); + + /// Returns the amount of tokens that the identity had and will be burned + fn amount(&self) -> TokenAmount; + + /// Sets the amount of tokens that the identity had and will be burned + fn set_amount(&mut self, amount: TokenAmount); + + /// Returns the token position in the contract + fn token_position(&self) -> u16 { + self.base().token_position() + } + + /// Returns the token ID + fn token_id(&self) -> Identifier { + self.base().token_id() + } + + /// Returns the data contract ID + fn data_contract_id(&self) -> Identifier { + self.base().data_contract_id() + } + + /// Returns a reference to the data contract fetch info + fn data_contract_fetch_info_ref(&self) -> &Arc { + self.base().data_contract_fetch_info_ref() + } + + /// Returns the data contract fetch info + fn data_contract_fetch_info(&self) -> Arc { + self.base().data_contract_fetch_info() + } + + /// Returns the public note (optional) + fn public_note(&self) -> Option<&String>; + + /// Returns the public note (owned) + fn public_note_owned(self) -> Option; + + /// Sets the public note + fn set_public_note(&mut self, public_note: Option); +} + +impl TokenDestroyFrozenFundsTransitionActionAccessorsV0 + for TokenDestroyFrozenFundsTransitionActionV0 +{ + fn base(&self) -> &TokenBaseTransitionAction { + &self.base + } + + fn base_owned(self) -> TokenBaseTransitionAction { + self.base + } + + fn frozen_identity_id(&self) -> Identifier { + self.frozen_identity_id + } + + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier) { + self.frozen_identity_id = frozen_identity_id; + } + + fn amount(&self) -> TokenAmount { + self.amount + } + + fn set_amount(&mut self, amount: TokenAmount) { + self.amount = amount; + } + + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/v0/transformer.rs new file mode 100644 index 0000000000..0b0ee7adbe --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_destroy_frozen_funds_transition_action/v0/transformer.rs @@ -0,0 +1,311 @@ +use std::sync::Arc; +use grovedb::TransactionArg; +use dpp::block::block_info::BlockInfo; +use dpp::consensus::state::state_error::StateError; +use dpp::consensus::state::token::IdentityDoesNotHaveEnoughTokenBalanceError; +use dpp::identifier::Identifier; +use dpp::state_transition::batch_transition::token_destroy_frozen_funds_transition::v0::TokenDestroyFrozenFundsTransitionV0; +use dpp::ProtocolError; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::v0::TokenDestroyFrozenFundsTransitionActionV0; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use dpp::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; +use crate::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; + +impl TokenDestroyFrozenFundsTransitionActionV0 { + /// Converts a `TokenDestroyFrozenFundsTransitionV0` into a `TokenDestroyFrozenFundsTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token destroy_frozen_fundsing transition and returns the corresponding transition action + /// while looking up necessary data contracts and applying the relevant logic for destroy_frozen_fundsing. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance which handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the destroy_frozen_fundsing transition. This is typically the identity + /// performing the transaction, such as the user's ID. + /// * `transaction` - A transaction context that includes the necessary state and other details for the transition. + /// * `value` - The `TokenDestroyFrozenFundsTransitionV0` struct containing the transition data, including token amount and recipient. + /// * `approximate_without_state_for_costs` - A flag to determine if costs should be approximated without considering + /// the full state for the operation. Useful for optimizing the transaction cost calculations. + /// * `block_info` - Information about the current block to calculate fees. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns a `DataContractFetchInfo` + /// containing the data contract details, including token configurations. + /// * `platform_version` - A reference to the platform version, ensuring the transition respects version-specific logic. + /// + /// # Returns + /// + /// * `Result, Error>` - Returns the constructed `TokenDestroyFrozenFundsTransitionActionV0` if successful, + /// or an error if any issue arises, such as missing data or an invalid state transition. + pub fn try_from_token_destroy_frozen_funds_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenDestroyFrozenFundsTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenDestroyFrozenFundsTransitionV0 { + base, + frozen_identity_id, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + &base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let maybe_token_amount = drive.fetch_identity_token_balance_operations( + base.token_id().to_buffer(), + owner_id.to_buffer(), + !approximate_without_state_for_costs, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let Some(token_amount) = maybe_token_amount else { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition( + &base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + vec![StateError::IdentityDoesNotHaveEnoughTokenBalanceError( + IdentityDoesNotHaveEnoughTokenBalanceError::new( + base.token_id(), + frozen_identity_id, + 1, + 0, + "destroy_frozen_funds".to_string(), + ), + ) + .into()], + ), + fee_result, + )); + }; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = BumpIdentityDataContractNonceAction::from_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::DestroyFrozenFundsAction( + TokenDestroyFrozenFundsTransitionActionV0 { + base: base_action, + frozen_identity_id, + amount: token_amount, + public_note, + } + .into(), + )) + .into(), + fee_result, + )) + } + + /// Converts a borrowed `TokenDestroyFrozenFundsTransitionV0` into a `TokenDestroyFrozenFundsTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token destroy_frozen_fundsing transition and constructs the corresponding transition action while + /// looking up necessary data contracts and applying the relevant destroy_frozen_fundsing logic. It does not require `drive_operations` + /// to be passed as a parameter, but it manages them internally. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance that handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the destroy_frozen_fundsing transition. This is typically the identity + /// performing the transaction, such as the user's ID. + /// * `value` - A reference to the `TokenDestroyFrozenFundsTransitionV0` struct containing the transition data, including token + /// amount and recipient. + /// * `approximate_without_state_for_costs` - A flag to indicate whether costs should be approximated without full + /// state consideration. Useful for optimizing transaction cost calculations in scenarios where full state is not needed. + /// * `transaction` - The transaction context, which includes the necessary state and other details for the transition. + /// * `block_info` - Information about the current block (e.g., epoch) to help calculate transaction fees. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns a `DataContractFetchInfo` + /// containing the data contract details, including token configurations. + /// * `platform_version` - A reference to the platform version to ensure the transition respects version-specific logic. + /// + //// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - Returns a tuple containing the constructed + /// `TokenDestroyFrozenFundsTransitionActionV0` and a `FeeResult` if successful. If an error occurs (e.g., missing data or + /// invalid state transition), it returns an `Error`. + /// + pub fn try_from_borrowed_token_destroy_frozen_funds_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenDestroyFrozenFundsTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenDestroyFrozenFundsTransitionV0 { + base, + frozen_identity_id, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let maybe_token_amount = drive.fetch_identity_token_balance_operations( + base.token_id().to_buffer(), + owner_id.to_buffer(), + !approximate_without_state_for_costs, + transaction, + &mut drive_operations, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let Some(token_amount) = maybe_token_amount else { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition( + &base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + vec![StateError::IdentityDoesNotHaveEnoughTokenBalanceError( + IdentityDoesNotHaveEnoughTokenBalanceError::new( + base.token_id(), + *frozen_identity_id, + 1, + 0, + "destroy_frozen_funds".to_string(), + ), + ) + .into()], + ), + fee_result, + )); + }; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::DestroyFrozenFundsAction( + TokenDestroyFrozenFundsTransitionActionV0 { + base: base_action, + frozen_identity_id: *frozen_identity_id, + amount: token_amount, + public_note: public_note.clone(), + } + .into(), + )) + .into(), + fee_result, + )) + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/mod.rs new file mode 100644 index 0000000000..4cd3b96c26 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/mod.rs @@ -0,0 +1,63 @@ +use derive_more::From; +use dpp::tokens::emergency_action::TokenEmergencyAction; + +/// transformer module for token emergency_action transition action +pub mod transformer; +mod v0; + +pub use v0::*; // re-export the v0 module items (including TokenIssuanceTransitionActionV0) + +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; + +/// Token emergency_action transition action +#[derive(Debug, Clone, From)] +pub enum TokenEmergencyActionTransitionAction { + /// v0 + V0(TokenEmergencyActionTransitionActionV0), +} + +impl TokenEmergencyActionTransitionActionAccessorsV0 for TokenEmergencyActionTransitionAction { + fn base(&self) -> &TokenBaseTransitionAction { + match self { + TokenEmergencyActionTransitionAction::V0(v0) => &v0.base, + } + } + + fn base_owned(self) -> TokenBaseTransitionAction { + match self { + TokenEmergencyActionTransitionAction::V0(v0) => v0.base, + } + } + + fn emergency_action(&self) -> TokenEmergencyAction { + match self { + TokenEmergencyActionTransitionAction::V0(v0) => v0.emergency_action(), + } + } + + fn set_emergency_action(&mut self, emergency_action: TokenEmergencyAction) { + match self { + TokenEmergencyActionTransitionAction::V0(v0) => { + v0.set_emergency_action(emergency_action) + } + } + } + + fn public_note(&self) -> Option<&String> { + match self { + TokenEmergencyActionTransitionAction::V0(v0) => v0.public_note.as_ref(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenEmergencyActionTransitionAction::V0(v0) => v0.public_note, + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenEmergencyActionTransitionAction::V0(v0) => v0.public_note = public_note, + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/transformer.rs new file mode 100644 index 0000000000..0e2670ed95 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/transformer.rs @@ -0,0 +1,117 @@ +use dpp::platform_value::Identifier; +use dpp::ProtocolError; +use grovedb::TransactionArg; +use std::sync::Arc; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::{TokenEmergencyActionTransitionActionV0, TokenEmergencyActionTransitionAction}; +use dpp::state_transition::batch_transition::token_emergency_action_transition::TokenEmergencyActionTransition; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::BatchedTransitionAction; + +/// Implement methods to transform a `TokenEmergencyActionTransition` into a `TokenEmergencyActionTransitionAction`. +impl TokenEmergencyActionTransitionAction { + /// Transform a `TokenEmergencyActionTransition` into a `TokenEmergencyActionTransitionAction` using the provided data contract lookup. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the emergency_action transition. + /// * `transaction` - The transaction argument used for state changes. + /// * `value` - A `TokenEmergencyActionTransition` instance. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state. + /// * `drive_operations` - A mutable reference to the vector of low-level operations that need to be performed. + /// * `get_data_contract` - A closure that fetches the `DataContractFetchInfo` given a contract ID. + /// * `platform_version` - The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - A `TokenEmergencyActionTransitionAction` if successful, otherwise `ProtocolError`. + pub fn try_from_token_emergency_action_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenEmergencyActionTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenEmergencyActionTransition::V0(v0) => { + TokenEmergencyActionTransitionActionV0::try_from_token_emergency_action_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } + + /// Transform a borrowed `TokenEmergencyActionTransition` into a `TokenEmergencyActionTransitionAction` using the provided data contract lookup. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the emergency_action transition. + /// * `transaction` - The transaction argument used for state changes. + /// * `value` - A reference to a `TokenEmergencyActionTransition`. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state. + /// * `drive_operations` - A mutable reference to the vector of low-level operations that need to be performed. + /// * `get_data_contract` - A closure that fetches the `DataContractFetchInfo` given a contract ID. + /// * `platform_version` - The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - A `TokenEmergencyActionTransitionAction` if successful, otherwise `ProtocolError`. + pub fn try_from_borrowed_token_emergency_action_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenEmergencyActionTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenEmergencyActionTransition::V0(v0) => { + TokenEmergencyActionTransitionActionV0::try_from_borrowed_token_emergency_action_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/v0/mod.rs new file mode 100644 index 0000000000..12dd5babe3 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/v0/mod.rs @@ -0,0 +1,97 @@ +mod transformer; + +use std::sync::Arc; +use dpp::identifier::Identifier; +use dpp::tokens::emergency_action::TokenEmergencyAction; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0}; + +/// Token issuance transition action v0 +#[derive(Debug, Clone)] +pub struct TokenEmergencyActionTransitionActionV0 { + /// Base token transition action + pub base: TokenBaseTransitionAction, + /// The emergency action + pub emergency_action: TokenEmergencyAction, + /// A public note + pub public_note: Option, +} + +/// Accessors for `TokenIssuanceTransitionActionV0` +pub trait TokenEmergencyActionTransitionActionAccessorsV0 { + /// Returns a reference to the base token transition action + fn base(&self) -> &TokenBaseTransitionAction; + + /// Consumes self and returns the base token transition action + fn base_owned(self) -> TokenBaseTransitionAction; + + /// Returns the `emergency_action` field. + fn emergency_action(&self) -> TokenEmergencyAction; + + /// Sets the value of the `emergency_action` field. + fn set_emergency_action(&mut self, emergency_action: TokenEmergencyAction); + + /// Returns the token position in the contract + fn token_position(&self) -> u16 { + self.base().token_position() + } + + /// Returns the token ID + fn token_id(&self) -> Identifier { + self.base().token_id() + } + + /// Returns the data contract ID + fn data_contract_id(&self) -> Identifier { + self.base().data_contract_id() + } + + /// Returns a reference to the data contract fetch info + fn data_contract_fetch_info_ref(&self) -> &Arc { + self.base().data_contract_fetch_info_ref() + } + + /// Returns the data contract fetch info + fn data_contract_fetch_info(&self) -> Arc { + self.base().data_contract_fetch_info() + } + + /// Returns the public note (optional) + fn public_note(&self) -> Option<&String>; + + /// Returns the public note (owned) + fn public_note_owned(self) -> Option; + + /// Sets the public note + fn set_public_note(&mut self, public_note: Option); +} + +impl TokenEmergencyActionTransitionActionAccessorsV0 for TokenEmergencyActionTransitionActionV0 { + fn base(&self) -> &TokenBaseTransitionAction { + &self.base + } + + fn base_owned(self) -> TokenBaseTransitionAction { + self.base + } + + fn emergency_action(&self) -> TokenEmergencyAction { + self.emergency_action + } + + fn set_emergency_action(&mut self, emergency_action: TokenEmergencyAction) { + self.emergency_action = emergency_action; + } + + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/v0/transformer.rs new file mode 100644 index 0000000000..b1d3b29459 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_emergency_action_transition_action/v0/transformer.rs @@ -0,0 +1,232 @@ +use std::sync::Arc; +use grovedb::TransactionArg; +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::state_transition::batch_transition::token_emergency_action_transition::v0::TokenEmergencyActionTransitionV0; +use dpp::ProtocolError; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::v0::TokenEmergencyActionTransitionActionV0; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; +use crate::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; + +impl TokenEmergencyActionTransitionActionV0 { + /// Converts a `TokenEmergencyActionTransitionV0` into a `TokenEmergencyActionTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token emergency_actioning transition and returns the corresponding transition action + /// while looking up necessary data contracts and applying the relevant logic for emergency_actioning. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance which handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the emergency_actioning transition. This is typically the identity + /// performing the transaction, such as the user's ID. + /// * `transaction` - A transaction context that includes the necessary state and other details for the transition. + /// * `value` - The `TokenEmergencyActionTransitionV0` struct containing the transition data, including token amount and recipient. + /// * `approximate_without_state_for_costs` - A flag to determine if costs should be approximated without considering + /// the full state for the operation. Useful for optimizing the transaction cost calculations. + /// * `block_info` - Information about the current block to calculate fees. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns a `DataContractFetchInfo` + /// containing the data contract details, including token configurations. + /// * `platform_version` - A reference to the platform version, ensuring the transition respects version-specific logic. + /// + /// # Returns + /// + /// * `Result, Error>` - Returns the constructed `TokenEmergencyActionTransitionActionV0` if successful, + /// or an error if any issue arises, such as missing data or an invalid state transition. + pub fn try_from_token_emergency_action_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenEmergencyActionTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenEmergencyActionTransitionV0 { + base, + emergency_action, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + &base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = BumpIdentityDataContractNonceAction::from_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::EmergencyActionAction( + TokenEmergencyActionTransitionActionV0 { + base: base_action, + emergency_action, + public_note, + } + .into(), + )) + .into(), + fee_result, + )) + } + + /// Converts a borrowed `TokenEmergencyActionTransitionV0` into a `TokenEmergencyActionTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token emergency_actioning transition and constructs the corresponding transition action while + /// looking up necessary data contracts and applying the relevant emergency_actioning logic. It does not require `drive_operations` + /// to be passed as a parameter, but it manages them internally. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance that handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the emergency_actioning transition. This is typically the identity + /// performing the transaction, such as the user's ID. + /// * `value` - A reference to the `TokenEmergencyActionTransitionV0` struct containing the transition data, including token + /// amount and recipient. + /// * `approximate_without_state_for_costs` - A flag to indicate whether costs should be approximated without full + /// state consideration. Useful for optimizing transaction cost calculations in scenarios where full state is not needed. + /// * `transaction` - The transaction context, which includes the necessary state and other details for the transition. + /// * `block_info` - Information about the current block (e.g., epoch) to help calculate transaction fees. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns a `DataContractFetchInfo` + /// containing the data contract details, including token configurations. + /// * `platform_version` - A reference to the platform version to ensure the transition respects version-specific logic. + /// + //// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - Returns a tuple containing the constructed + /// `TokenEmergencyActionTransitionActionV0` and a `FeeResult` if successful. If an error occurs (e.g., missing data or + /// invalid state transition), it returns an `Error`. + /// + pub fn try_from_borrowed_token_emergency_action_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenEmergencyActionTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenEmergencyActionTransitionV0 { + base, + emergency_action, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::EmergencyActionAction( + TokenEmergencyActionTransitionActionV0 { + base: base_action, + emergency_action: *emergency_action, + public_note: public_note.clone(), + } + .into(), + )) + .into(), + fee_result, + )) + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/mod.rs new file mode 100644 index 0000000000..f61d5d6d2e --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/mod.rs @@ -0,0 +1,61 @@ +use derive_more::From; +use dpp::identifier::Identifier; + +/// transformer module for token freeze transition action +pub mod transformer; +mod v0; + +pub use v0::*; // re-export the v0 module items (including TokenIssuanceTransitionActionV0) + +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; + +/// Token freeze transition action +#[derive(Debug, Clone, From)] +pub enum TokenFreezeTransitionAction { + /// v0 + V0(TokenFreezeTransitionActionV0), +} + +impl TokenFreezeTransitionActionAccessorsV0 for TokenFreezeTransitionAction { + fn base(&self) -> &TokenBaseTransitionAction { + match self { + TokenFreezeTransitionAction::V0(v0) => &v0.base, + } + } + + fn base_owned(self) -> TokenBaseTransitionAction { + match self { + TokenFreezeTransitionAction::V0(v0) => v0.base, + } + } + + fn frozen_identity_id(&self) -> Identifier { + match self { + TokenFreezeTransitionAction::V0(v0) => v0.frozen_identity_id, + } + } + + fn set_frozen_identity_id(&mut self, id: Identifier) { + match self { + TokenFreezeTransitionAction::V0(v0) => v0.frozen_identity_id = id, + } + } + + fn public_note(&self) -> Option<&String> { + match self { + TokenFreezeTransitionAction::V0(v0) => v0.public_note.as_ref(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenFreezeTransitionAction::V0(v0) => v0.public_note, + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenFreezeTransitionAction::V0(v0) => v0.public_note = public_note, + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/transformer.rs new file mode 100644 index 0000000000..3347e72524 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/transformer.rs @@ -0,0 +1,117 @@ +use dpp::platform_value::Identifier; +use dpp::ProtocolError; +use grovedb::TransactionArg; +use std::sync::Arc; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::{TokenFreezeTransitionActionV0, TokenFreezeTransitionAction}; +use dpp::state_transition::batch_transition::token_freeze_transition::TokenFreezeTransition; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::BatchedTransitionAction; + +/// Implement methods to transform a `TokenFreezeTransition` into a `TokenFreezeTransitionAction`. +impl TokenFreezeTransitionAction { + /// Transform a `TokenFreezeTransition` into a `TokenFreezeTransitionAction` using the provided data contract lookup. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the freeze transition. + /// * `transaction` - The transaction argument used for state changes. + /// * `value` - A `TokenFreezeTransition` instance. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state. + /// * `drive_operations` - A mutable reference to the vector of low-level operations that need to be performed. + /// * `get_data_contract` - A closure that fetches the `DataContractFetchInfo` given a contract ID. + /// * `platform_version` - The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - A `TokenFreezeTransitionAction` if successful, otherwise `ProtocolError`. + pub fn try_from_token_freeze_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenFreezeTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenFreezeTransition::V0(v0) => { + TokenFreezeTransitionActionV0::try_from_token_freeze_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } + + /// Transform a borrowed `TokenFreezeTransition` into a `TokenFreezeTransitionAction` using the provided data contract lookup. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the freeze transition. + /// * `transaction` - The transaction argument used for state changes. + /// * `value` - A reference to a `TokenFreezeTransition`. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state. + /// * `drive_operations` - A mutable reference to the vector of low-level operations that need to be performed. + /// * `get_data_contract` - A closure that fetches the `DataContractFetchInfo` given a contract ID. + /// * `platform_version` - The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - A `TokenFreezeTransitionAction` if successful, otherwise `ProtocolError`. + pub fn try_from_borrowed_token_freeze_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenFreezeTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenFreezeTransition::V0(v0) => { + TokenFreezeTransitionActionV0::try_from_borrowed_token_freeze_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/v0/mod.rs new file mode 100644 index 0000000000..80a912b127 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/v0/mod.rs @@ -0,0 +1,96 @@ +mod transformer; + +use std::sync::Arc; +use dpp::identifier::Identifier; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0}; + +/// Token issuance transition action v0 +#[derive(Debug, Clone)] +pub struct TokenFreezeTransitionActionV0 { + /// Base token transition action + pub base: TokenBaseTransitionAction, + /// The identity to credit the token to + pub frozen_identity_id: Identifier, + /// A public note + pub public_note: Option, +} + +/// Accessors for `TokenIssuanceTransitionActionV0` +pub trait TokenFreezeTransitionActionAccessorsV0 { + /// Returns a reference to the base token transition action + fn base(&self) -> &TokenBaseTransitionAction; + + /// Consumes self and returns the base token transition action + fn base_owned(self) -> TokenBaseTransitionAction; + + /// Consumes self and returns the identity balance holder ID + fn frozen_identity_id(&self) -> Identifier; + + /// Sets the identity balance holder ID + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier); + + /// Returns the token position in the contract + fn token_position(&self) -> u16 { + self.base().token_position() + } + + /// Returns the token ID + fn token_id(&self) -> Identifier { + self.base().token_id() + } + + /// Returns the data contract ID + fn data_contract_id(&self) -> Identifier { + self.base().data_contract_id() + } + + /// Returns a reference to the data contract fetch info + fn data_contract_fetch_info_ref(&self) -> &Arc { + self.base().data_contract_fetch_info_ref() + } + + /// Returns the data contract fetch info + fn data_contract_fetch_info(&self) -> Arc { + self.base().data_contract_fetch_info() + } + + /// Returns the public note (optional) + fn public_note(&self) -> Option<&String>; + + /// Returns the public note (owned) + fn public_note_owned(self) -> Option; + + /// Sets the public note + fn set_public_note(&mut self, public_note: Option); +} + +impl TokenFreezeTransitionActionAccessorsV0 for TokenFreezeTransitionActionV0 { + fn base(&self) -> &TokenBaseTransitionAction { + &self.base + } + + fn base_owned(self) -> TokenBaseTransitionAction { + self.base + } + + fn frozen_identity_id(&self) -> Identifier { + self.frozen_identity_id + } + + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier) { + self.frozen_identity_id = frozen_identity_id; + } + + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/v0/transformer.rs new file mode 100644 index 0000000000..913dec97c6 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_freeze_transition_action/v0/transformer.rs @@ -0,0 +1,232 @@ +use std::sync::Arc; +use grovedb::TransactionArg; +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::state_transition::batch_transition::token_freeze_transition::v0::TokenFreezeTransitionV0; +use dpp::ProtocolError; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::v0::TokenFreezeTransitionActionV0; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; +use crate::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; + +impl TokenFreezeTransitionActionV0 { + /// Converts a `TokenFreezeTransitionV0` into a `TokenFreezeTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token freezeing transition and returns the corresponding transition action + /// while looking up necessary data contracts and applying the relevant logic for freezeing. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance which handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the freezeing transition. This is typically the identity + /// performing the transaction, such as the user's ID. + /// * `transaction` - A transaction context that includes the necessary state and other details for the transition. + /// * `value` - The `TokenFreezeTransitionV0` struct containing the transition data, including token amount and recipient. + /// * `approximate_without_state_for_costs` - A flag to determine if costs should be approximated without considering + /// the full state for the operation. Useful for optimizing the transaction cost calculations. + /// * `block_info` - Information about the current block to calculate fees. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns a `DataContractFetchInfo` + /// containing the data contract details, including token configurations. + /// * `platform_version` - A reference to the platform version, ensuring the transition respects version-specific logic. + /// + /// # Returns + /// + /// * `Result, Error>` - Returns the constructed `TokenFreezeTransitionActionV0` if successful, + /// or an error if any issue arises, such as missing data or an invalid state transition. + pub fn try_from_token_freeze_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenFreezeTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenFreezeTransitionV0 { + base, + frozen_identity_id, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + &base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = BumpIdentityDataContractNonceAction::from_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::FreezeAction( + TokenFreezeTransitionActionV0 { + base: base_action, + frozen_identity_id, + public_note, + } + .into(), + )) + .into(), + fee_result, + )) + } + + /// Converts a borrowed `TokenFreezeTransitionV0` into a `TokenFreezeTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token freezeing transition and constructs the corresponding transition action while + /// looking up necessary data contracts and applying the relevant freezeing logic. It does not require `drive_operations` + /// to be passed as a parameter, but it manages them internally. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance that handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the freezeing transition. This is typically the identity + /// performing the transaction, such as the user's ID. + /// * `value` - A reference to the `TokenFreezeTransitionV0` struct containing the transition data, including token + /// amount and recipient. + /// * `approximate_without_state_for_costs` - A flag to indicate whether costs should be approximated without full + /// state consideration. Useful for optimizing transaction cost calculations in scenarios where full state is not needed. + /// * `transaction` - The transaction context, which includes the necessary state and other details for the transition. + /// * `block_info` - Information about the current block (e.g., epoch) to help calculate transaction fees. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns a `DataContractFetchInfo` + /// containing the data contract details, including token configurations. + /// * `platform_version` - A reference to the platform version to ensure the transition respects version-specific logic. + /// + //// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - Returns a tuple containing the constructed + /// `TokenFreezeTransitionActionV0` and a `FeeResult` if successful. If an error occurs (e.g., missing data or + /// invalid state transition), it returns an `Error`. + /// + pub fn try_from_borrowed_token_freeze_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenFreezeTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenFreezeTransitionV0 { + base, + frozen_identity_id, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::FreezeAction( + TokenFreezeTransitionActionV0 { + base: base_action, + frozen_identity_id: *frozen_identity_id, + public_note: public_note.clone(), + } + .into(), + )) + .into(), + fee_result, + )) + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/mod.rs new file mode 100644 index 0000000000..2c4b75de5e --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/mod.rs @@ -0,0 +1,73 @@ +use derive_more::From; +use dpp::identifier::Identifier; + +/// transformer module for token issuance transition action +pub mod transformer; +mod v0; + +pub use v0::*; // re-export the v0 module items (including TokenIssuanceTransitionActionV0) + +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; + +/// Token issuance transition action +#[derive(Debug, Clone, From)] +pub enum TokenMintTransitionAction { + /// v0 + V0(TokenMintTransitionActionV0), +} + +impl TokenMintTransitionActionAccessorsV0 for TokenMintTransitionAction { + fn base(&self) -> &TokenBaseTransitionAction { + match self { + TokenMintTransitionAction::V0(v0) => &v0.base, + } + } + + fn base_owned(self) -> TokenBaseTransitionAction { + match self { + TokenMintTransitionAction::V0(v0) => v0.base, + } + } + + fn mint_amount(&self) -> u64 { + match self { + TokenMintTransitionAction::V0(v0) => v0.mint_amount, + } + } + + fn set_mint_amount(&mut self, amount: u64) { + match self { + TokenMintTransitionAction::V0(v0) => v0.mint_amount = amount, + } + } + + fn identity_balance_holder_id(&self) -> Identifier { + match self { + TokenMintTransitionAction::V0(v0) => v0.identity_balance_holder_id, + } + } + + fn set_identity_balance_holder_id(&mut self, id: Identifier) { + match self { + TokenMintTransitionAction::V0(v0) => v0.identity_balance_holder_id = id, + } + } + + fn public_note(&self) -> Option<&String> { + match self { + TokenMintTransitionAction::V0(v0) => v0.public_note.as_ref(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenMintTransitionAction::V0(v0) => v0.public_note, + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenMintTransitionAction::V0(v0) => v0.public_note = public_note, + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/transformer.rs new file mode 100644 index 0000000000..0183d1a7fd --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/transformer.rs @@ -0,0 +1,117 @@ +use dpp::platform_value::Identifier; +use dpp::ProtocolError; +use grovedb::TransactionArg; +use std::sync::Arc; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::{TokenMintTransitionActionV0, TokenMintTransitionAction}; +use dpp::state_transition::batch_transition::token_mint_transition::TokenMintTransition; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::BatchedTransitionAction; + +/// Implement methods to transform a `TokenMintTransition` into a `TokenMintTransitionAction`. +impl TokenMintTransitionAction { + /// Transform a `TokenMintTransition` into a `TokenMintTransitionAction` using the provided data contract lookup. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the mint transition. + /// * `transaction` - The transaction argument used for state changes. + /// * `value` - A `TokenMintTransition` instance. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state. + /// * `drive_operations` - A mutable reference to the vector of low-level operations that need to be performed. + /// * `get_data_contract` - A closure that fetches the `DataContractFetchInfo` given a contract ID. + /// * `platform_version` - The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - A `TokenMintTransitionAction` if successful, otherwise `ProtocolError`. + pub fn try_from_token_mint_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenMintTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenMintTransition::V0(v0) => { + TokenMintTransitionActionV0::try_from_token_mint_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } + + /// Transform a borrowed `TokenMintTransition` into a `TokenMintTransitionAction` using the provided data contract lookup. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the mint transition. + /// * `transaction` - The transaction argument used for state changes. + /// * `value` - A reference to a `TokenMintTransition`. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state. + /// * `drive_operations` - A mutable reference to the vector of low-level operations that need to be performed. + /// * `get_data_contract` - A closure that fetches the `DataContractFetchInfo` given a contract ID. + /// * `platform_version` - The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - A `TokenMintTransitionAction` if successful, otherwise `ProtocolError`. + pub fn try_from_borrowed_token_mint_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenMintTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenMintTransition::V0(v0) => { + TokenMintTransitionActionV0::try_from_borrowed_token_mint_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/v0/mod.rs new file mode 100644 index 0000000000..812949c03c --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/v0/mod.rs @@ -0,0 +1,112 @@ +mod transformer; + +use std::sync::Arc; +use dpp::identifier::Identifier; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0}; + +/// Token issuance transition action v0 +#[derive(Debug, Clone)] +pub struct TokenMintTransitionActionV0 { + /// Base token transition action + pub base: TokenBaseTransitionAction, + /// The amount of tokens to create + pub mint_amount: u64, + /// The identity to credit the token to + pub identity_balance_holder_id: Identifier, + /// A public note + pub public_note: Option, +} + +/// Accessors for `TokenIssuanceTransitionActionV0` +pub trait TokenMintTransitionActionAccessorsV0 { + /// Returns a reference to the base token transition action + fn base(&self) -> &TokenBaseTransitionAction; + + /// Consumes self and returns the base token transition action + fn base_owned(self) -> TokenBaseTransitionAction; + + /// Returns the amount of tokens to issuance + fn mint_amount(&self) -> u64; + + /// Sets the amount of tokens to issuance + fn set_mint_amount(&mut self, amount: u64); + + /// Consumes self and returns the identity balance holder ID + fn identity_balance_holder_id(&self) -> Identifier; + + /// Sets the identity balance holder ID + fn set_identity_balance_holder_id(&mut self, id: Identifier); + + /// Returns the token position in the contract + fn token_position(&self) -> u16 { + self.base().token_position() + } + + /// Returns the token ID + fn token_id(&self) -> Identifier { + self.base().token_id() + } + + /// Returns the data contract ID + fn data_contract_id(&self) -> Identifier { + self.base().data_contract_id() + } + + /// Returns a reference to the data contract fetch info + fn data_contract_fetch_info_ref(&self) -> &Arc { + self.base().data_contract_fetch_info_ref() + } + + /// Returns the data contract fetch info + fn data_contract_fetch_info(&self) -> Arc { + self.base().data_contract_fetch_info() + } + + /// Returns the public note (optional) + fn public_note(&self) -> Option<&String>; + + /// Returns the public note (owned) + fn public_note_owned(self) -> Option; + + /// Sets the public note + fn set_public_note(&mut self, public_note: Option); +} + +impl TokenMintTransitionActionAccessorsV0 for TokenMintTransitionActionV0 { + fn base(&self) -> &TokenBaseTransitionAction { + &self.base + } + + fn base_owned(self) -> TokenBaseTransitionAction { + self.base + } + + fn mint_amount(&self) -> u64 { + self.mint_amount + } + + fn set_mint_amount(&mut self, amount: u64) { + self.mint_amount = amount; + } + + fn identity_balance_holder_id(&self) -> Identifier { + self.identity_balance_holder_id + } + + fn set_identity_balance_holder_id(&mut self, id: Identifier) { + self.identity_balance_holder_id = id; + } + + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/v0/transformer.rs new file mode 100644 index 0000000000..5fba01b5e0 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_mint_transition_action/v0/transformer.rs @@ -0,0 +1,367 @@ +use std::sync::Arc; +use grovedb::TransactionArg; +use dpp::block::block_info::BlockInfo; +use dpp::consensus::basic::BasicError; +use dpp::consensus::basic::token::{ChoosingTokenMintRecipientNotAllowedError, DestinationIdentityForTokenMintingNotSetError}; +use dpp::identifier::Identifier; +use dpp::state_transition::batch_transition::token_mint_transition::v0::TokenMintTransitionV0; +use dpp::ProtocolError; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::v0::TokenMintTransitionActionV0; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; +use crate::state_transition_action::batch::BatchedTransitionAction; +use crate::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; + +impl TokenMintTransitionActionV0 { + /// Converts a `TokenMintTransitionV0` into a `TokenMintTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token minting transition and returns the corresponding transition action + /// while looking up necessary data contracts and applying the relevant logic for minting. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance which handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the minting transition. This is typically the identity + /// performing the transaction, such as the user's ID. + /// * `transaction` - A transaction context that includes the necessary state and other details for the transition. + /// * `value` - The `TokenMintTransitionV0` struct containing the transition data, including token amount and recipient. + /// * `approximate_without_state_for_costs` - A flag to determine if costs should be approximated without considering + /// the full state for the operation. Useful for optimizing the transaction cost calculations. + /// * `block_info` - Information about the current block to calculate fees. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns a `DataContractFetchInfo` + /// containing the data contract details, including token configurations. + /// * `platform_version` - A reference to the platform version, ensuring the transition respects version-specific logic. + /// + /// # Returns + /// + /// * `Result, Error>` - Returns the constructed `TokenMintTransitionActionV0` if successful, + /// or an error if any issue arises, such as missing data or an invalid state transition. + pub fn try_from_token_mint_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenMintTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenMintTransitionV0 { + base, + issued_to_identity_id, + amount, + public_note, + } = value; + + let position = base.token_contract_position(); + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + &base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = BumpIdentityDataContractNonceAction::from_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + if !base_action + .token_configuration()? + .minting_allow_choosing_destination() + && issued_to_identity_id.is_some() + { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action( + &base_action, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + vec![BasicError::ChoosingTokenMintRecipientNotAllowedError( + ChoosingTokenMintRecipientNotAllowedError::new(base_action.token_id()), + ) + .into()], + ), + fee_result, + )); + } + + let identity_balance_holder_id = match issued_to_identity_id.or_else(|| { + base_action + .data_contract_fetch_info_ref() + .contract + .tokens() + .get(&position) + .and_then(|token_configuration| { + token_configuration.new_tokens_destination_identity() + }) + }) { + Some(identity_balance_holder_id) => identity_balance_holder_id, + None => { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action( + &base_action, + owner_id, + 0, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + vec![BasicError::DestinationIdentityForTokenMintingNotSetError( + DestinationIdentityForTokenMintingNotSetError::new( + base_action.token_id(), + ), + ) + .into()], + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::MintAction( + TokenMintTransitionActionV0 { + base: base_action, + mint_amount: amount, + identity_balance_holder_id, + public_note, + } + .into(), + )) + .into(), + fee_result, + )) + } + + /// Converts a borrowed `TokenMintTransitionV0` into a `TokenMintTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token minting transition and constructs the corresponding transition action while + /// looking up necessary data contracts and applying the relevant minting logic. It does not require `drive_operations` + /// to be passed as a parameter, but it manages them internally. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance that handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the minting transition. This is typically the identity + /// performing the transaction, such as the user's ID. + /// * `value` - A reference to the `TokenMintTransitionV0` struct containing the transition data, including token + /// amount and recipient. + /// * `approximate_without_state_for_costs` - A flag to indicate whether costs should be approximated without full + /// state consideration. Useful for optimizing transaction cost calculations in scenarios where full state is not needed. + /// * `transaction` - The transaction context, which includes the necessary state and other details for the transition. + /// * `block_info` - Information about the current block (e.g., epoch) to help calculate transaction fees. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns a `DataContractFetchInfo` + /// containing the data contract details, including token configurations. + /// * `platform_version` - A reference to the platform version to ensure the transition respects version-specific logic. + /// + //// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - Returns a tuple containing the constructed + /// `TokenMintTransitionActionV0` and a `FeeResult` if successful. If an error occurs (e.g., missing data or + /// invalid state transition), it returns an `Error`. + /// + pub fn try_from_borrowed_token_mint_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenMintTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenMintTransitionV0 { + base, + issued_to_identity_id, + amount, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + if !base_action + .token_configuration()? + .minting_allow_choosing_destination() + && issued_to_identity_id.is_some() + { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action( + &base_action, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + vec![BasicError::ChoosingTokenMintRecipientNotAllowedError( + ChoosingTokenMintRecipientNotAllowedError::new(base_action.token_id()), + ) + .into()], + ), + fee_result, + )); + } + + let identity_balance_holder_id = match issued_to_identity_id.or_else(|| { + base_action + .data_contract_fetch_info_ref() + .contract + .tokens() + .get(&base.token_contract_position()) + .and_then(|token_configuration| { + token_configuration.new_tokens_destination_identity() + }) + }) { + Some(identity_balance_holder_id) => identity_balance_holder_id, + None => { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action( + &base_action, + owner_id, + 0, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + vec![BasicError::DestinationIdentityForTokenMintingNotSetError( + DestinationIdentityForTokenMintingNotSetError::new( + base_action.token_id(), + ), + ) + .into()], + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::MintAction( + TokenMintTransitionActionV0 { + base: base_action, + mint_amount: *amount, + identity_balance_holder_id, + public_note: public_note.clone(), + } + .into(), + )) + .into(), + fee_result, + )) + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/mod.rs new file mode 100644 index 0000000000..9202c66a24 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/mod.rs @@ -0,0 +1,157 @@ +use derive_more::From; + +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; +use dpp::identifier::Identifier; +use dpp::prelude::{DerivationEncryptionKeyIndex, RecipientKeyIndex, RootEncryptionKeyIndex, SenderKeyIndex}; + +/// transformer module +pub mod transformer; +/// v0 +pub mod v0; + +pub use v0::*; + +/// TokenTransferTransitionAction +#[derive(Debug, Clone, From)] +pub enum TokenTransferTransitionAction { + /// v0 + V0(TokenTransferTransitionActionV0), +} + +impl TokenTransferTransitionActionAccessorsV0 for TokenTransferTransitionAction { + fn base(&self) -> &TokenBaseTransitionAction { + match self { + TokenTransferTransitionAction::V0(v0) => v0.base(), + } + } + + fn base_owned(self) -> TokenBaseTransitionAction { + match self { + TokenTransferTransitionAction::V0(v0) => v0.base_owned(), + } + } + + fn amount(&self) -> u64 { + match self { + TokenTransferTransitionAction::V0(v0) => v0.amount(), + } + } + + fn recipient_id(&self) -> Identifier { + match self { + TokenTransferTransitionAction::V0(v0) => v0.recipient_id(), + } + } + + fn public_note(&self) -> Option<&String> { + match self { + TokenTransferTransitionAction::V0(v0) => v0.public_note(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenTransferTransitionAction::V0(v0) => v0.public_note_owned(), + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenTransferTransitionAction::V0(v0) => v0.set_public_note(public_note), + } + } + + fn shared_encrypted_note(&self) -> Option<&(SenderKeyIndex, RecipientKeyIndex, Vec)> { + match self { + TokenTransferTransitionAction::V0(v0) => v0.shared_encrypted_note(), + } + } + + fn shared_encrypted_note_owned(self) -> Option<(SenderKeyIndex, RecipientKeyIndex, Vec)> { + match self { + TokenTransferTransitionAction::V0(v0) => v0.shared_encrypted_note_owned(), + } + } + + fn set_shared_encrypted_note( + &mut self, + shared_encrypted_note: Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + ) { + match self { + TokenTransferTransitionAction::V0(v0) => { + v0.set_shared_encrypted_note(shared_encrypted_note) + } + } + } + + fn private_encrypted_note( + &self, + ) -> Option<&( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )> { + match self { + TokenTransferTransitionAction::V0(v0) => v0.private_encrypted_note(), + } + } + + fn private_encrypted_note_owned( + self, + ) -> Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )> { + match self { + TokenTransferTransitionAction::V0(v0) => v0.private_encrypted_note_owned(), + } + } + + fn set_private_encrypted_note( + &mut self, + private_encrypted_note: Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ) { + match self { + TokenTransferTransitionAction::V0(v0) => { + v0.set_private_encrypted_note(private_encrypted_note) + } + } + } + + fn notes( + &self, + ) -> ( + Option, + Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ) { + match self { + TokenTransferTransitionAction::V0(v0) => v0.notes(), + } + } + + fn notes_owned( + self, + ) -> ( + Option, + Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ) { + match self { + TokenTransferTransitionAction::V0(v0) => v0.notes_owned(), + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/transformer.rs new file mode 100644 index 0000000000..3cf42ca910 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/transformer.rs @@ -0,0 +1,112 @@ +use std::sync::Arc; +use grovedb::TransactionArg; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::platform_value::Identifier; +use dpp::ProtocolError; +use dpp::state_transition::batch_transition::TokenTransferTransition; +use platform_version::version::PlatformVersion; +use crate::drive::contract::DataContractFetchInfo; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::TokenTransferTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::v0::TokenTransferTransitionActionV0; + +/// Implement methods to transform a `TokenTransferTransition` into a `TokenTransferTransitionAction`. +impl TokenTransferTransitionAction { + /// Converts a `TokenTransferTransition` into a `TokenTransferTransitionAction` using the provided contract lookup. + /// + /// This function processes a `TokenTransferTransition` (which may contain multiple versions), looks up the necessary data + /// contracts, and calculates the associated fees for the transaction. Currently, only the `V0` variant of the transition is + /// supported. The result is a `TokenTransferTransitionAction` along with the fee result. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance for handling data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the token transfer. + /// * `value` - The `TokenTransferTransition` containing the transition data (currently only the `V0` variant is supported). + /// * `approximate_without_state_for_costs` - A flag to approximate transaction costs without full state consideration. + /// * `transaction` - The transaction context, which provides the necessary state for processing the transition. + /// * `block_info` - Information about the current block used to calculate fees for the transition. + /// * `get_data_contract` - A closure that takes an identifier and returns the associated `DataContractFetchInfo`. + /// * `platform_version` - The platform version to ensure the transition is compatible with the current version logic. + /// + /// # Returns + /// + /// * `Result<(TokenTransferTransitionAction, FeeResult), Error>` - A result containing the constructed `TokenTransferTransitionAction` + /// and the calculated `FeeResult`, or an error if the transition cannot be processed. + pub fn from_token_transfer_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenTransferTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result<(Self, FeeResult), Error> { + match value { + TokenTransferTransition::V0(v0) => { + let (v0, fee) = TokenTransferTransitionActionV0::try_from_token_transfer_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + get_data_contract, + platform_version, + )?; + Ok((v0.into(), fee)) + } + } + } + + /// Converts a borrowed reference of a `TokenTransferTransition` into a `TokenTransferTransitionAction` using the provided contract lookup. + /// + /// This function is similar to `from_token_transfer_transition_with_contract_lookup` but operates on a borrowed reference of the + /// `TokenTransferTransition`, which avoids copying the data. It processes the `TokenTransferTransition`, looks up the necessary + /// data contracts, and calculates the associated fees for the transaction. Only the `V0` variant of the transition is supported. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance for handling data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the token transfer. + /// * `value` - A borrowed reference to the `TokenTransferTransition` containing the transition data (currently only the `V0` variant is supported). + /// * `approximate_without_state_for_costs` - A flag to approximate transaction costs without full state consideration. + /// * `transaction` - The transaction context, which provides the necessary state for processing the transition. + /// * `block_info` - Information about the current block used to calculate fees for the transition. + /// * `get_data_contract` - A closure that takes an identifier and returns the associated `DataContractFetchInfo`. + /// * `platform_version` - The platform version to ensure the transition is compatible with the current version logic. + /// + /// # Returns + /// + /// * `Result<(TokenTransferTransitionAction, FeeResult), Error>` - A result containing the constructed `TokenTransferTransitionAction` + /// and the calculated `FeeResult`, or an error if the transition cannot be processed. + pub fn try_from_borrowed_token_transfer_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenTransferTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result<(Self, FeeResult), Error> { + match value { + TokenTransferTransition::V0(v0) => { + let (v0, fee) = TokenTransferTransitionActionV0::try_from_borrowed_token_transfer_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + get_data_contract, + platform_version, + )?; + Ok((v0.into(), fee)) + } + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/mod.rs new file mode 100644 index 0000000000..962053117f --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/mod.rs @@ -0,0 +1,266 @@ +mod transformer; + +use std::sync::Arc; + +use dpp::identifier::Identifier; +use dpp::prelude::{ + DerivationEncryptionKeyIndex, IdentityNonce, RecipientKeyIndex, RootEncryptionKeyIndex, + SenderKeyIndex, +}; + +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{ + TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0, +}; + +/// Token transfer transition action v0 +#[derive(Debug, Clone)] +pub struct TokenTransferTransitionActionV0 { + /// Base token transition action + pub base: TokenBaseTransitionAction, + /// The amount to transfer + pub amount: u64, + /// The recipient owner ID + pub recipient_id: Identifier, + /// The public note + pub public_note: Option, + /// An optional shared encrypted note + pub shared_encrypted_note: Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + /// An optional private encrypted note + pub private_encrypted_note: Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, +} + +/// Accessors for `TokenTransferTransitionActionV0` +pub trait TokenTransferTransitionActionAccessorsV0 { + /// Returns the base token transition action + fn base(&self) -> &TokenBaseTransitionAction; + + /// Returns the base owned token transition action + fn base_owned(self) -> TokenBaseTransitionAction; + + /// Returns the amount of tokens to transfer + fn amount(&self) -> u64; + + /// Returns the recipient owner ID + fn recipient_id(&self) -> Identifier; + + /// Returns the token position in the contract + fn token_position(&self) -> u16 { + self.base().token_position() + } + + /// Returns the token ID + fn token_id(&self) -> Identifier { + self.base().token_id() + } + + /// Returns the data contract ID from the base action + fn data_contract_id(&self) -> Identifier { + self.base().data_contract_id() + } + + /// Returns a reference to the data contract fetch info from the base action + fn data_contract_fetch_info_ref(&self) -> &Arc { + self.base().data_contract_fetch_info_ref() + } + + /// Returns the data contract fetch info + fn data_contract_fetch_info(&self) -> Arc { + self.base().data_contract_fetch_info() + } + + /// Returns the identity contract nonce from the base action + fn identity_contract_nonce(&self) -> IdentityNonce { + self.base().identity_contract_nonce() + } + + /// Returns the public note, if present + fn public_note(&self) -> Option<&String>; + + /// Consumes the `TokenTransferTransitionActionV0` and returns the public note, if present + fn public_note_owned(self) -> Option; + + /// Sets the public note + fn set_public_note(&mut self, public_note: Option); + + /// Returns the shared encrypted note, if present + fn shared_encrypted_note(&self) -> Option<&(SenderKeyIndex, RecipientKeyIndex, Vec)>; + + /// Consumes the `TokenTransferTransitionActionV0` and returns the shared encrypted note, if present + fn shared_encrypted_note_owned(self) -> Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>; + + /// Sets the shared encrypted note + fn set_shared_encrypted_note( + &mut self, + shared_encrypted_note: Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + ); + + /// Returns the private encrypted note, if present + fn private_encrypted_note( + &self, + ) -> Option<&( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>; + + /// Consumes the `TokenTransferTransitionActionV0` and returns the private encrypted note, if present + fn private_encrypted_note_owned( + self, + ) -> Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>; + + /// Sets the private encrypted note + fn set_private_encrypted_note( + &mut self, + private_encrypted_note: Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ); + + /// All notes + fn notes_owned( + self, + ) -> ( + Option, + Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ); + /// All notes + fn notes( + &self, + ) -> ( + Option, + Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ); +} + +impl TokenTransferTransitionActionAccessorsV0 for TokenTransferTransitionActionV0 { + fn base(&self) -> &TokenBaseTransitionAction { + &self.base + } + + fn base_owned(self) -> TokenBaseTransitionAction { + self.base + } + + fn amount(&self) -> u64 { + self.amount + } + + fn recipient_id(&self) -> Identifier { + self.recipient_id + } + + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } + + fn shared_encrypted_note(&self) -> Option<&(SenderKeyIndex, RecipientKeyIndex, Vec)> { + self.shared_encrypted_note.as_ref() + } + + fn shared_encrypted_note_owned(self) -> Option<(SenderKeyIndex, RecipientKeyIndex, Vec)> { + self.shared_encrypted_note + } + + fn set_shared_encrypted_note( + &mut self, + shared_encrypted_note: Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + ) { + self.shared_encrypted_note = shared_encrypted_note; + } + + fn private_encrypted_note( + &self, + ) -> Option<&( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )> { + self.private_encrypted_note.as_ref() + } + + fn private_encrypted_note_owned( + self, + ) -> Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )> { + self.private_encrypted_note + } + + fn set_private_encrypted_note( + &mut self, + private_encrypted_note: Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ) { + self.private_encrypted_note = private_encrypted_note; + } + + fn notes( + &self, + ) -> ( + Option, + Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ) { + ( + self.public_note.clone(), + self.shared_encrypted_note.clone(), + self.private_encrypted_note.clone(), + ) + } + + fn notes_owned( + self, + ) -> ( + Option, + Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ) { + ( + self.public_note, + self.shared_encrypted_note, + self.private_encrypted_note, + ) + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/transformer.rs new file mode 100644 index 0000000000..8f652ae7d1 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transfer_transition_action/v0/transformer.rs @@ -0,0 +1,177 @@ +use dpp::identifier::Identifier; +use dpp::state_transition::batch_transition::token_transfer_transition::v0::TokenTransferTransitionV0; +use dpp::ProtocolError; +use grovedb::TransactionArg; +use std::sync::Arc; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use platform_version::version::PlatformVersion; +use crate::drive::contract::DataContractFetchInfo; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::TokenTransferTransitionActionV0; + +impl TokenTransferTransitionActionV0 { + /// Converts a `TokenTransferTransitionV0` into a `TokenTransferTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token transfer transition, looks up the necessary data contracts, performs required + /// checks, and applies the relevant logic for token transfer. It also calculates the fees associated with the transaction. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance which handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the transfer. + /// * `value` - The `TokenTransferTransitionV0` struct containing the transition data, including token amount, + /// recipient details, and encrypted notes. + /// * `approximate_without_state_for_costs` - A flag to determine if costs should be approximated without considering + /// the full state for the operation. Useful for optimizing transaction cost calculations when full state is not needed. + /// * `transaction` - The transaction context, which includes state details and necessary operations for the transition. + /// * `block_info` - Information about the current block to calculate the fees for the transition. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns the associated `DataContractFetchInfo`. + /// * `platform_version` - A reference to the platform version, ensuring that the transition respects version-specific logic. + /// + /// # Returns + /// + /// * `Result<(TokenTransferTransitionActionV0, FeeResult), Error>` - Returns a tuple containing the constructed + /// `TokenTransferTransitionActionV0` and the calculated `FeeResult` if successful, or an error if the transition cannot + /// be created or an issue arises with the provided state or data. + pub fn try_from_token_transfer_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenTransferTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result<(Self, FeeResult), Error> { + let TokenTransferTransitionV0 { + base, + amount, + recipient_id, + public_note, + shared_encrypted_note, + private_encrypted_note, + } = value; + + let mut drive_operations = vec![]; + + // Lookup the base action using the base transition data and contract information + let base_action = TokenBaseTransitionAction::try_from_base_transition_with_contract_lookup( + drive, + owner_id, + base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )? + .into_data()?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + // Return the TokenTransferTransitionActionV0 with the relevant data + Ok(( + TokenTransferTransitionActionV0 { + base: base_action, + amount, + recipient_id, + public_note, + shared_encrypted_note, + private_encrypted_note, + }, + fee_result, + )) + } + + /// Converts a borrowed `TokenTransferTransitionV0` into a `TokenTransferTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token transfer transition similarly to the `try_from_token_transfer_transition_with_contract_lookup` + /// method but operates on a borrowed reference of the `TokenTransferTransitionV0`. It performs the same checks and applies + /// the token transfer logic, while avoiding copying the `TokenTransferTransitionV0` struct. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance which handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the transfer. + /// * `value` - A reference to the `TokenTransferTransitionV0` struct containing the transition data, including token amount, + /// recipient details, and encrypted notes. + /// * `approximate_without_state_for_costs` - A flag to determine if costs should be approximated without considering + /// the full state for the operation. Useful for optimizing transaction cost calculations when full state is not needed. + /// * `transaction` - The transaction context, which includes state details and necessary operations for the transition. + /// * `block_info` - Information about the current block to calculate the fees for the transition. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns the associated `DataContractFetchInfo`. + /// * `platform_version` - A reference to the platform version, ensuring that the transition respects version-specific logic. + /// + /// # Returns + /// + /// * `Result<(TokenTransferTransitionActionV0, FeeResult), Error>` - Returns a tuple containing the constructed + /// `TokenTransferTransitionActionV0` and the calculated `FeeResult` if successful, or an error if the transition cannot + /// be created or an issue arises with the provided state or data. + pub fn try_from_borrowed_token_transfer_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenTransferTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result<(Self, FeeResult), Error> { + let TokenTransferTransitionV0 { + base, + amount, + recipient_id, + public_note, + shared_encrypted_note, + private_encrypted_note, + } = value; + + let mut drive_operations = vec![]; + + // Lookup the base action using the borrowed base transition data and contract information + let base_action = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + &base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )? + .into_data()?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + // Return the TokenTransferTransitionActionV0 with the relevant data + Ok(( + TokenTransferTransitionActionV0 { + base: base_action.into(), + amount: *amount, + recipient_id: *recipient_id, + public_note: public_note.clone(), + shared_encrypted_note: shared_encrypted_note.clone(), + private_encrypted_note: private_encrypted_note.clone(), + }, + fee_result, + )) + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transition_action_type.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transition_action_type.rs new file mode 100644 index 0000000000..69689509bc --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transition_action_type.rs @@ -0,0 +1,22 @@ +use crate::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; +use dpp::state_transition::batch_transition::batched_transition::token_transition_action_type::{ + TokenTransitionActionType, TokenTransitionActionTypeGetter, +}; + +impl TokenTransitionActionTypeGetter for TokenTransitionAction { + fn action_type(&self) -> TokenTransitionActionType { + match self { + TokenTransitionAction::BurnAction(_) => TokenTransitionActionType::Burn, + TokenTransitionAction::MintAction(_) => TokenTransitionActionType::Mint, + TokenTransitionAction::TransferAction(_) => TokenTransitionActionType::Transfer, + TokenTransitionAction::FreezeAction(_) => TokenTransitionActionType::Freeze, + TokenTransitionAction::UnfreezeAction(_) => TokenTransitionActionType::Unfreeze, + TokenTransitionAction::EmergencyActionAction(_) => { + TokenTransitionActionType::EmergencyAction + } + TokenTransitionAction::DestroyFrozenFundsAction(_) => { + TokenTransitionActionType::DestroyFrozenFunds + } + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/mod.rs new file mode 100644 index 0000000000..ec55cb2835 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/mod.rs @@ -0,0 +1,61 @@ +use derive_more::From; +use dpp::identifier::Identifier; + +/// transformer module for token freeze transition action +pub mod transformer; +mod v0; + +pub use v0::*; // re-export the v0 module items (including TokenIssuanceTransitionActionV0) + +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; + +/// Token freeze transition action +#[derive(Debug, Clone, From)] +pub enum TokenUnfreezeTransitionAction { + /// v0 + V0(TokenUnfreezeTransitionActionV0), +} + +impl TokenUnfreezeTransitionActionAccessorsV0 for TokenUnfreezeTransitionAction { + fn base(&self) -> &TokenBaseTransitionAction { + match self { + TokenUnfreezeTransitionAction::V0(v0) => &v0.base, + } + } + + fn base_owned(self) -> TokenBaseTransitionAction { + match self { + TokenUnfreezeTransitionAction::V0(v0) => v0.base, + } + } + + fn frozen_identity_id(&self) -> Identifier { + match self { + TokenUnfreezeTransitionAction::V0(v0) => v0.frozen_identity_id, + } + } + + fn set_frozen_identity_id(&mut self, id: Identifier) { + match self { + TokenUnfreezeTransitionAction::V0(v0) => v0.frozen_identity_id = id, + } + } + + fn public_note(&self) -> Option<&String> { + match self { + TokenUnfreezeTransitionAction::V0(v0) => v0.public_note.as_ref(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenUnfreezeTransitionAction::V0(v0) => v0.public_note, + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenUnfreezeTransitionAction::V0(v0) => v0.public_note = public_note, + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/transformer.rs new file mode 100644 index 0000000000..14df0f2fdf --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/transformer.rs @@ -0,0 +1,117 @@ +use dpp::platform_value::Identifier; +use dpp::ProtocolError; +use grovedb::TransactionArg; +use std::sync::Arc; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_unfreeze_transition_action::{TokenUnfreezeTransitionActionV0, TokenUnfreezeTransitionAction}; +use dpp::state_transition::batch_transition::token_unfreeze_transition::TokenUnfreezeTransition; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::BatchedTransitionAction; + +/// Implement methods to transform a `TokenUnfreezeTransition` into a `TokenUnfreezeTransitionAction`. +impl TokenUnfreezeTransitionAction { + /// Transform a `TokenUnfreezeTransition` into a `TokenUnfreezeTransitionAction` using the provided data contract lookup. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the freeze transition. + /// * `transaction` - The transaction argument used for state changes. + /// * `value` - A `TokenUnfreezeTransition` instance. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state. + /// * `drive_operations` - A mutable reference to the vector of low-level operations that need to be performed. + /// * `get_data_contract` - A closure that fetches the `DataContractFetchInfo` given a contract ID. + /// * `platform_version` - The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - A `TokenUnfreezeTransitionAction` if successful, otherwise `ProtocolError`. + pub fn try_from_token_unfreeze_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenUnfreezeTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenUnfreezeTransition::V0(v0) => { + TokenUnfreezeTransitionActionV0::try_from_token_unfreeze_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } + + /// Transform a borrowed `TokenUnfreezeTransition` into a `TokenUnfreezeTransitionAction` using the provided data contract lookup. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the freeze transition. + /// * `transaction` - The transaction argument used for state changes. + /// * `value` - A reference to a `TokenUnfreezeTransition`. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state. + /// * `drive_operations` - A mutable reference to the vector of low-level operations that need to be performed. + /// * `get_data_contract` - A closure that fetches the `DataContractFetchInfo` given a contract ID. + /// * `platform_version` - The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - A `TokenUnfreezeTransitionAction` if successful, otherwise `ProtocolError`. + pub fn try_from_borrowed_token_unfreeze_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenUnfreezeTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenUnfreezeTransition::V0(v0) => { + TokenUnfreezeTransitionActionV0::try_from_borrowed_token_unfreeze_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/v0/mod.rs new file mode 100644 index 0000000000..9dab3dfe50 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/v0/mod.rs @@ -0,0 +1,96 @@ +mod transformer; + +use std::sync::Arc; +use dpp::identifier::Identifier; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0}; + +/// Token issuance transition action v0 +#[derive(Debug, Clone)] +pub struct TokenUnfreezeTransitionActionV0 { + /// Base token transition action + pub base: TokenBaseTransitionAction, + /// The identity to credit the token to + pub frozen_identity_id: Identifier, + /// A public note + pub public_note: Option, +} + +/// Accessors for `TokenIssuanceTransitionActionV0` +pub trait TokenUnfreezeTransitionActionAccessorsV0 { + /// Returns a reference to the base token transition action + fn base(&self) -> &TokenBaseTransitionAction; + + /// Consumes self and returns the base token transition action + fn base_owned(self) -> TokenBaseTransitionAction; + + /// Consumes self and returns the identity balance holder ID + fn frozen_identity_id(&self) -> Identifier; + + /// Sets the identity balance holder ID + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier); + + /// Returns the token position in the contract + fn token_position(&self) -> u16 { + self.base().token_position() + } + + /// Returns the token ID + fn token_id(&self) -> Identifier { + self.base().token_id() + } + + /// Returns the data contract ID + fn data_contract_id(&self) -> Identifier { + self.base().data_contract_id() + } + + /// Returns a reference to the data contract fetch info + fn data_contract_fetch_info_ref(&self) -> &Arc { + self.base().data_contract_fetch_info_ref() + } + + /// Returns the data contract fetch info + fn data_contract_fetch_info(&self) -> Arc { + self.base().data_contract_fetch_info() + } + + /// Returns the public note (optional) + fn public_note(&self) -> Option<&String>; + + /// Returns the public note (owned) + fn public_note_owned(self) -> Option; + + /// Sets the public note + fn set_public_note(&mut self, public_note: Option); +} + +impl TokenUnfreezeTransitionActionAccessorsV0 for TokenUnfreezeTransitionActionV0 { + fn base(&self) -> &TokenBaseTransitionAction { + &self.base + } + + fn base_owned(self) -> TokenBaseTransitionAction { + self.base + } + + fn frozen_identity_id(&self) -> Identifier { + self.frozen_identity_id + } + + fn set_frozen_identity_id(&mut self, frozen_identity_id: Identifier) { + self.frozen_identity_id = frozen_identity_id; + } + + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/v0/transformer.rs new file mode 100644 index 0000000000..b9c2dd5ca8 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_unfreeze_transition_action/v0/transformer.rs @@ -0,0 +1,232 @@ +use std::sync::Arc; +use grovedb::TransactionArg; +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::state_transition::batch_transition::token_unfreeze_transition::v0::TokenUnfreezeTransitionV0; +use dpp::ProtocolError; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_unfreeze_transition_action::v0::TokenUnfreezeTransitionActionV0; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; +use crate::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; + +impl TokenUnfreezeTransitionActionV0 { + /// Converts a `TokenUnfreezeTransitionV0` into a `TokenUnfreezeTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token freezeing transition and returns the corresponding transition action + /// while looking up necessary data contracts and applying the relevant logic for freezeing. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance which handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the freezeing transition. This is typically the identity + /// performing the transaction, such as the user's ID. + /// * `transaction` - A transaction context that includes the necessary state and other details for the transition. + /// * `value` - The `TokenUnfreezeTransitionV0` struct containing the transition data, including token amount and recipient. + /// * `approximate_without_state_for_costs` - A flag to determine if costs should be approximated without considering + /// the full state for the operation. Useful for optimizing the transaction cost calculations. + /// * `block_info` - Information about the current block to calculate fees. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns a `DataContractFetchInfo` + /// containing the data contract details, including token configurations. + /// * `platform_version` - A reference to the platform version, ensuring the transition respects version-specific logic. + /// + /// # Returns + /// + /// * `Result, Error>` - Returns the constructed `TokenUnfreezeTransitionActionV0` if successful, + /// or an error if any issue arises, such as missing data or an invalid state transition. + pub fn try_from_token_unfreeze_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenUnfreezeTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenUnfreezeTransitionV0 { + base, + frozen_identity_id, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + &base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = BumpIdentityDataContractNonceAction::from_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::UnfreezeAction( + TokenUnfreezeTransitionActionV0 { + base: base_action, + frozen_identity_id, + public_note, + } + .into(), + )) + .into(), + fee_result, + )) + } + + /// Converts a borrowed `TokenUnfreezeTransitionV0` into a `TokenUnfreezeTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token freezeing transition and constructs the corresponding transition action while + /// looking up necessary data contracts and applying the relevant freezeing logic. It does not require `drive_operations` + /// to be passed as a parameter, but it manages them internally. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance that handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the freezeing transition. This is typically the identity + /// performing the transaction, such as the user's ID. + /// * `value` - A reference to the `TokenUnfreezeTransitionV0` struct containing the transition data, including token + /// amount and recipient. + /// * `approximate_without_state_for_costs` - A flag to indicate whether costs should be approximated without full + /// state consideration. Useful for optimizing transaction cost calculations in scenarios where full state is not needed. + /// * `transaction` - The transaction context, which includes the necessary state and other details for the transition. + /// * `block_info` - Information about the current block (e.g., epoch) to help calculate transaction fees. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns a `DataContractFetchInfo` + /// containing the data contract details, including token configurations. + /// * `platform_version` - A reference to the platform version to ensure the transition respects version-specific logic. + /// + //// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - Returns a tuple containing the constructed + /// `TokenUnfreezeTransitionActionV0` and a `FeeResult` if successful. If an error occurs (e.g., missing data or + /// invalid state transition), it returns an `Error`. + /// + pub fn try_from_borrowed_token_unfreeze_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenUnfreezeTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenUnfreezeTransitionV0 { + base, + frozen_identity_id, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::UnfreezeAction( + TokenUnfreezeTransitionActionV0 { + base: base_action, + frozen_identity_id: *frozen_identity_id, + public_note: public_note.clone(), + } + .into(), + )) + .into(), + fee_result, + )) + } +} diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/mod.rs b/packages/rs-drive/src/state_transition_action/batch/mod.rs similarity index 60% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/mod.rs index 9d5891f0d1..5aad18441e 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/mod.rs @@ -1,5 +1,5 @@ -use crate::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; -use crate::state_transition_action::document::documents_batch::v0::DocumentsBatchTransitionActionV0; +use crate::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use crate::state_transition_action::batch::v0::BatchTransitionActionV0; use derive_more::From; use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; @@ -8,83 +8,83 @@ use dpp::identity::SecurityLevel; use dpp::platform_value::Identifier; use dpp::prelude::UserFeeIncrease; use dpp::ProtocolError; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionAccessorsV0; -/// document transition -pub mod document_transition; +/// batched transition +pub mod batched_transition; /// v0 pub mod v0; /// documents batch transition action #[derive(Debug, Clone, From)] -pub enum DocumentsBatchTransitionAction { +pub enum BatchTransitionAction { /// v0 - V0(DocumentsBatchTransitionActionV0), + V0(BatchTransitionActionV0), } -impl DocumentsBatchTransitionAction { +impl BatchTransitionAction { /// owner id pub fn owner_id(&self) -> Identifier { match self { - DocumentsBatchTransitionAction::V0(v0) => v0.owner_id, + BatchTransitionAction::V0(v0) => v0.owner_id, } } /// transitions - pub fn transitions(&self) -> &Vec { + pub fn transitions(&self) -> &Vec { match self { - DocumentsBatchTransitionAction::V0(v0) => &v0.transitions, + BatchTransitionAction::V0(v0) => &v0.transitions, } } /// transitions - pub fn transitions_mut(&mut self) -> &mut Vec { + pub fn transitions_mut(&mut self) -> &mut Vec { match self { - DocumentsBatchTransitionAction::V0(v0) => &mut v0.transitions, + BatchTransitionAction::V0(v0) => &mut v0.transitions, } } /// transitions - pub fn transitions_take(&mut self) -> Vec { + pub fn transitions_take(&mut self) -> Vec { match self { - DocumentsBatchTransitionAction::V0(v0) => std::mem::take(&mut v0.transitions), + BatchTransitionAction::V0(v0) => std::mem::take(&mut v0.transitions), } } /// transitions owned - pub fn transitions_owned(self) -> Vec { + pub fn transitions_owned(self) -> Vec { match self { - DocumentsBatchTransitionAction::V0(v0) => v0.transitions, + BatchTransitionAction::V0(v0) => v0.transitions, } } /// set transitions - pub fn set_transitions(&mut self, transitions: Vec) { + pub fn set_transitions(&mut self, transitions: Vec) { match self { - DocumentsBatchTransitionAction::V0(v0) => v0.transitions = transitions, + BatchTransitionAction::V0(v0) => v0.transitions = transitions, } } /// fee multiplier pub fn user_fee_increase(&self) -> UserFeeIncrease { match self { - DocumentsBatchTransitionAction::V0(transition) => transition.user_fee_increase, + BatchTransitionAction::V0(transition) => transition.user_fee_increase, } } } -impl DocumentsBatchTransitionAction { +impl BatchTransitionAction { /// The sum of all purchases amount and all conflicting index collateral voting funds pub fn all_used_balances(&self) -> Result, ProtocolError> { match self { - DocumentsBatchTransitionAction::V0(v0) => v0.all_used_balances(), + BatchTransitionAction::V0(v0) => v0.all_used_balances(), } } /// The sum of all purchases amounts for all purchase transitions in the batch pub fn all_purchases_amount(&self) -> Result, ProtocolError> { match self { - DocumentsBatchTransitionAction::V0(v0) => v0.all_purchases_amount(), + BatchTransitionAction::V0(v0) => v0.all_purchases_amount(), } } @@ -93,9 +93,7 @@ impl DocumentsBatchTransitionAction { &self, ) -> Result, ProtocolError> { match self { - DocumentsBatchTransitionAction::V0(v0) => { - v0.all_conflicting_index_collateral_voting_funds() - } + BatchTransitionAction::V0(v0) => v0.all_conflicting_index_collateral_voting_funds(), } } @@ -136,28 +134,20 @@ impl DocumentsBatchTransitionAction { let mut highest_security_level = SecurityLevel::lowest_level(); for transition in self.transitions().iter() { - let document_type_name = transition - .base() - .ok_or(ProtocolError::CorruptedCodeExecution( - "expecting action to have a base".to_string(), - ))? - .document_type_name(); - let data_contract_info = transition - .base() - .ok_or(ProtocolError::CorruptedCodeExecution( - "expecting action to have a base".to_string(), - ))? - .data_contract_fetch_info(); - - let document_type = data_contract_info - .contract - .document_type_for_name(document_type_name)?; - - let document_security_level = document_type.security_level_requirement(); - - // lower enum enum representation means higher in security - if document_security_level < highest_security_level { - highest_security_level = document_security_level + if let BatchedTransitionAction::DocumentAction(document_transition) = transition { + let document_type_name = document_transition.base().document_type_name(); + let data_contract_info = document_transition.base().data_contract_fetch_info(); + + let document_type = data_contract_info + .contract + .document_type_for_name(document_type_name)?; + + let document_security_level = document_type.security_level_requirement(); + + // lower enum enum representation means higher in security + if document_security_level < highest_security_level { + highest_security_level = document_security_level + } } } Ok(if highest_security_level == SecurityLevel::MASTER { diff --git a/packages/rs-drive/src/state_transition_action/document/documents_batch/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/v0/mod.rs similarity index 68% rename from packages/rs-drive/src/state_transition_action/document/documents_batch/v0/mod.rs rename to packages/rs-drive/src/state_transition_action/batch/v0/mod.rs index 295f0c45b4..380fba6af7 100644 --- a/packages/rs-drive/src/state_transition_action/document/documents_batch/v0/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/v0/mod.rs @@ -1,24 +1,27 @@ use dpp::fee::Credits; -use crate::state_transition_action::document::documents_batch::document_transition::DocumentTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; use dpp::identifier::Identifier; use dpp::prelude::UserFeeIncrease; use dpp::ProtocolError; -use crate::state_transition_action::document::documents_batch::document_transition::document_create_transition_action::DocumentCreateTransitionActionAccessorsV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_purchase_transition_action::DocumentPurchaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_create_transition_action::DocumentCreateTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_purchase_transition_action::DocumentPurchaseTransitionActionAccessorsV0; /// action v0 #[derive(Default, Debug, Clone)] -pub struct DocumentsBatchTransitionActionV0 { +pub struct BatchTransitionActionV0 { /// The owner making the transitions pub owner_id: Identifier, /// The inner transitions - pub transitions: Vec, + pub transitions: Vec, /// fee multiplier pub user_fee_increase: UserFeeIncrease, } -impl DocumentsBatchTransitionActionV0 { - pub(super) fn all_used_balances(&self) -> Result, ProtocolError> { +impl BatchTransitionActionV0 { + pub(in crate::state_transition_action) fn all_used_balances( + &self, + ) -> Result, ProtocolError> { Ok(match (self.all_purchases_amount()?, self.all_conflicting_index_collateral_voting_funds()?) { (Some(all_purchases_amount), Some(all_conflicting_index_collateral_voting_funds)) => Some(all_purchases_amount.checked_add(all_conflicting_index_collateral_voting_funds).ok_or(ProtocolError::Overflow("overflow between all_purchases_amount and all_conflicting_index_collateral_voting_funds"))?), (Some(all_purchases_amount), None) => Some(all_purchases_amount), @@ -26,12 +29,16 @@ impl DocumentsBatchTransitionActionV0 { (None, None) => None, }) } - pub(super) fn all_purchases_amount(&self) -> Result, ProtocolError> { + pub(in crate::state_transition_action) fn all_purchases_amount( + &self, + ) -> Result, ProtocolError> { let (total, any_purchases): (Option, bool) = self .transitions .iter() .filter_map(|transition| match transition { - DocumentTransitionAction::PurchaseAction(purchase) => Some(purchase.price()), + BatchedTransitionAction::DocumentAction( + DocumentTransitionAction::PurchaseAction(purchase), + ) => Some(purchase.price()), _ => None, }) .fold((None, false), |(acc, _), price| match acc { @@ -48,19 +55,19 @@ impl DocumentsBatchTransitionActionV0 { } } - pub(super) fn all_conflicting_index_collateral_voting_funds( + pub(in crate::state_transition_action) fn all_conflicting_index_collateral_voting_funds( &self, ) -> Result, ProtocolError> { let (total, any_voting_funds): (Option, bool) = self .transitions .iter() .filter_map(|transition| match transition { - DocumentTransitionAction::CreateAction(document_create_transition_action) => { - document_create_transition_action - .prefunded_voting_balance() - .iter() - .try_fold(0u64, |acc, &(_, val)| acc.checked_add(val)) - } + BatchedTransitionAction::DocumentAction( + DocumentTransitionAction::CreateAction(document_create_transition_action), + ) => document_create_transition_action + .prefunded_voting_balance() + .iter() + .try_fold(0u64, |acc, &(_, val)| acc.checked_add(val)), _ => None, }) .fold((None, false), |(acc, _), price| match acc { diff --git a/packages/rs-drive/src/state_transition_action/document/mod.rs b/packages/rs-drive/src/state_transition_action/document/mod.rs deleted file mode 100644 index 1af2727c64..0000000000 --- a/packages/rs-drive/src/state_transition_action/document/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -/// documents_batch -pub mod documents_batch; diff --git a/packages/rs-drive/src/state_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/mod.rs index c4e9d8477c..13600ca2cc 100644 --- a/packages/rs-drive/src/state_transition_action/mod.rs +++ b/packages/rs-drive/src/state_transition_action/mod.rs @@ -1,7 +1,5 @@ /// contract pub mod contract; -/// documents -pub mod document; /// identity pub mod identity; @@ -9,10 +7,12 @@ pub mod identity; pub mod system; // TODO: Must crate only but we need to remove of use it first pub mod action_convert_to_operations; +/// documents_batch +pub mod batch; +use crate::state_transition_action::batch::BatchTransitionAction; use crate::state_transition_action::contract::data_contract_create::DataContractCreateTransitionAction; use crate::state_transition_action::contract::data_contract_update::DataContractUpdateTransitionAction; -use crate::state_transition_action::document::documents_batch::DocumentsBatchTransitionAction; use crate::state_transition_action::identity::identity_create::IdentityCreateTransitionAction; use crate::state_transition_action::identity::identity_credit_transfer::IdentityCreditTransferTransitionAction; use crate::state_transition_action::identity::identity_credit_withdrawal::IdentityCreditWithdrawalTransitionAction; @@ -38,8 +38,8 @@ pub enum StateTransitionAction { DataContractCreateAction(DataContractCreateTransitionAction), /// data contract update DataContractUpdateAction(DataContractUpdateTransitionAction), - /// documents batch - DocumentsBatchAction(DocumentsBatchTransitionAction), + /// batch + BatchAction(BatchTransitionAction), /// identity create IdentityCreateAction(IdentityCreateTransitionAction), /// identity topup @@ -71,7 +71,7 @@ impl StateTransitionAction { match self { StateTransitionAction::DataContractCreateAction(action) => action.user_fee_increase(), StateTransitionAction::DataContractUpdateAction(action) => action.user_fee_increase(), - StateTransitionAction::DocumentsBatchAction(action) => action.user_fee_increase(), + StateTransitionAction::BatchAction(action) => action.user_fee_increase(), StateTransitionAction::IdentityCreateAction(action) => action.user_fee_increase(), StateTransitionAction::IdentityTopUpAction(action) => action.user_fee_increase(), StateTransitionAction::IdentityCreditWithdrawalAction(action) => { diff --git a/packages/rs-drive/src/state_transition_action/system/bump_identity_data_contract_nonce_action/transformer.rs b/packages/rs-drive/src/state_transition_action/system/bump_identity_data_contract_nonce_action/transformer.rs index e5c8c19074..e0691b16e6 100644 --- a/packages/rs-drive/src/state_transition_action/system/bump_identity_data_contract_nonce_action/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/system/bump_identity_data_contract_nonce_action/transformer.rs @@ -1,13 +1,100 @@ use dpp::platform_value::Identifier; use dpp::prelude::UserFeeIncrease; - +use dpp::ProtocolError; +use dpp::state_transition::batch_transition::batched_transition::BatchedTransitionRef; +use dpp::state_transition::batch_transition::batched_transition::document_transition::DocumentTransitionV0Methods; +use dpp::state_transition::batch_transition::batched_transition::token_transition::TokenTransitionV0Methods; use dpp::state_transition::data_contract_update_transition::DataContractUpdateTransition; -use dpp::state_transition::documents_batch_transition::document_base_transition::DocumentBaseTransition; +use dpp::state_transition::batch_transition::document_base_transition::DocumentBaseTransition; +use dpp::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::error::Error; +use crate::state_transition_action::batch::batched_transition::BatchedTransitionAction; use crate::state_transition_action::contract::data_contract_update::DataContractUpdateTransitionAction; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; use crate::state_transition_action::system::bump_identity_data_contract_nonce_action::{BumpIdentityDataContractNonceAction, BumpIdentityDataContractNonceActionV0}; impl BumpIdentityDataContractNonceAction { + /// from borrowed base transition + pub fn from_batched_transition_ref( + value: BatchedTransitionRef, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + ) -> Self { + match value { + BatchedTransitionRef::Document(document) => { + Self::from_borrowed_document_base_transition( + document.base(), + identity_id, + user_fee_increase, + ) + } + BatchedTransitionRef::Token(token) => Self::from_borrowed_token_base_transition( + token.base(), + identity_id, + user_fee_increase, + ), + } + } + + /// helper method + pub fn try_from_batched_transition_action( + value: BatchedTransitionAction, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + ) -> Result { + match value { + BatchedTransitionAction::DocumentAction(document) => { + Ok(Self::from_document_base_transition_action( + document.base_owned(), + identity_id, + user_fee_increase, + )) + } + BatchedTransitionAction::TokenAction(token) => Ok(Self::from_token_base_transition_action( + token.base_owned(), + identity_id, + user_fee_increase, + )), + BatchedTransitionAction::BumpIdentityDataContractNonce(_) => { + Err(Error::Protocol( + ProtocolError::CorruptedCodeExecution( + "we should never be trying to convert from a BumpIdentityDataContractNonce to a BumpIdentityDataContractNonceAction".to_string(), + ), + )) + } + } + } + + /// helper method + pub fn try_from_borrowed_batched_transition_action( + value: &BatchedTransitionAction, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + ) -> Result { + match value { + BatchedTransitionAction::DocumentAction(document) => { + Ok(Self::from_borrowed_document_base_transition_action( + document.base(), + identity_id, + user_fee_increase, + )) + } + BatchedTransitionAction::TokenAction(token) => Ok(Self::from_borrowed_token_base_transition_action( + token.base(), + identity_id, + user_fee_increase, + )), + BatchedTransitionAction::BumpIdentityDataContractNonce(_) => { + Err(Error::Protocol( + ProtocolError::CorruptedCodeExecution( + "we should never be trying to convert from a BumpIdentityDataContractNonce to a BumpIdentityDataContractNonceAction".to_string(), + ), + )) + } + } + } + /// from base transition pub fn from_document_base_transition( value: DocumentBaseTransition, @@ -16,7 +103,7 @@ impl BumpIdentityDataContractNonceAction { ) -> Self { match value { DocumentBaseTransition::V0(v0) => { - BumpIdentityDataContractNonceActionV0::from_base_transition( + BumpIdentityDataContractNonceActionV0::from_document_base_transition( v0, identity_id, user_fee_increase, @@ -34,7 +121,7 @@ impl BumpIdentityDataContractNonceAction { ) -> Self { match value { DocumentBaseTransition::V0(v0) => { - BumpIdentityDataContractNonceActionV0::from_borrowed_base_transition( + BumpIdentityDataContractNonceActionV0::from_borrowed_document_base_transition( v0, identity_id, user_fee_increase, @@ -52,7 +139,7 @@ impl BumpIdentityDataContractNonceAction { ) -> Self { match value { DocumentBaseTransitionAction::V0(v0) => { - BumpIdentityDataContractNonceActionV0::from_base_transition_action( + BumpIdentityDataContractNonceActionV0::from_document_base_transition_action( v0, identity_id, user_fee_increase, @@ -70,7 +157,79 @@ impl BumpIdentityDataContractNonceAction { ) -> Self { match value { DocumentBaseTransitionAction::V0(v0) => { - BumpIdentityDataContractNonceActionV0::from_borrowed_base_transition_action( + BumpIdentityDataContractNonceActionV0::from_borrowed_document_base_transition_action( + v0, + identity_id, + user_fee_increase, + ) + .into() + } + } + } + + /// from base transition + pub fn from_token_base_transition( + value: TokenBaseTransition, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + ) -> Self { + match value { + TokenBaseTransition::V0(v0) => { + BumpIdentityDataContractNonceActionV0::from_token_base_transition( + v0, + identity_id, + user_fee_increase, + ) + .into() + } + } + } + + /// from borrowed base transition + pub fn from_borrowed_token_base_transition( + value: &TokenBaseTransition, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + ) -> Self { + match value { + TokenBaseTransition::V0(v0) => { + BumpIdentityDataContractNonceActionV0::from_borrowed_token_base_transition( + v0, + identity_id, + user_fee_increase, + ) + .into() + } + } + } + + /// from base transition + pub fn from_token_base_transition_action( + value: TokenBaseTransitionAction, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + ) -> Self { + match value { + TokenBaseTransitionAction::V0(v0) => { + BumpIdentityDataContractNonceActionV0::from_token_base_transition_action( + v0, + identity_id, + user_fee_increase, + ) + .into() + } + } + } + + /// from borrowed base transition + pub fn from_borrowed_token_base_transition_action( + value: &TokenBaseTransitionAction, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + ) -> Self { + match value { + TokenBaseTransitionAction::V0(v0) => { + BumpIdentityDataContractNonceActionV0::from_borrowed_token_base_transition_action( v0, identity_id, user_fee_increase, diff --git a/packages/rs-drive/src/state_transition_action/system/bump_identity_data_contract_nonce_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/system/bump_identity_data_contract_nonce_action/v0/transformer.rs index 42a9912790..c87a865a70 100644 --- a/packages/rs-drive/src/state_transition_action/system/bump_identity_data_contract_nonce_action/v0/transformer.rs +++ b/packages/rs-drive/src/state_transition_action/system/bump_identity_data_contract_nonce_action/v0/transformer.rs @@ -3,14 +3,16 @@ use dpp::platform_value::Identifier; use dpp::prelude::UserFeeIncrease; use dpp::state_transition::data_contract_update_transition::DataContractUpdateTransitionV0; -use dpp::state_transition::documents_batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; +use dpp::state_transition::batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; +use dpp::state_transition::batch_transition::token_base_transition::v0::TokenBaseTransitionV0; use crate::state_transition_action::contract::data_contract_update::v0::DataContractUpdateTransitionActionV0; -use crate::state_transition_action::document::documents_batch::document_transition::document_base_transition_action::DocumentBaseTransitionActionV0; +use crate::state_transition_action::batch::batched_transition::document_transition::document_base_transition_action::DocumentBaseTransitionActionV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionV0; use crate::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceActionV0; impl BumpIdentityDataContractNonceActionV0 { /// from base transition - pub fn from_base_transition( + pub fn from_document_base_transition( value: DocumentBaseTransitionV0, identity_id: Identifier, user_fee_increase: UserFeeIncrease, @@ -29,7 +31,7 @@ impl BumpIdentityDataContractNonceActionV0 { } /// from borrowed base transition - pub fn from_borrowed_base_transition( + pub fn from_borrowed_document_base_transition( value: &DocumentBaseTransitionV0, identity_id: Identifier, user_fee_increase: UserFeeIncrease, @@ -48,7 +50,7 @@ impl BumpIdentityDataContractNonceActionV0 { } /// from base transition - pub fn from_base_transition_action( + pub fn from_document_base_transition_action( value: DocumentBaseTransitionActionV0, identity_id: Identifier, user_fee_increase: UserFeeIncrease, @@ -67,7 +69,7 @@ impl BumpIdentityDataContractNonceActionV0 { } /// from borrowed base transition - pub fn from_borrowed_base_transition_action( + pub fn from_borrowed_document_base_transition_action( value: &DocumentBaseTransitionActionV0, identity_id: Identifier, user_fee_increase: UserFeeIncrease, @@ -85,6 +87,82 @@ impl BumpIdentityDataContractNonceActionV0 { } } + /// from base transition + pub fn from_token_base_transition( + value: TokenBaseTransitionV0, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + ) -> Self { + let TokenBaseTransitionV0 { + data_contract_id, + identity_contract_nonce, + .. + } = value; + BumpIdentityDataContractNonceActionV0 { + identity_id, + data_contract_id, + identity_contract_nonce, + user_fee_increase, + } + } + + /// from borrowed base transition + pub fn from_borrowed_token_base_transition( + value: &TokenBaseTransitionV0, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + ) -> Self { + let TokenBaseTransitionV0 { + data_contract_id, + identity_contract_nonce, + .. + } = value; + BumpIdentityDataContractNonceActionV0 { + identity_id, + data_contract_id: *data_contract_id, + identity_contract_nonce: *identity_contract_nonce, + user_fee_increase, + } + } + + /// from base transition + pub fn from_token_base_transition_action( + value: TokenBaseTransitionActionV0, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + ) -> Self { + let TokenBaseTransitionActionV0 { + data_contract, + identity_contract_nonce, + .. + } = value; + BumpIdentityDataContractNonceActionV0 { + identity_id, + data_contract_id: data_contract.contract.id(), + identity_contract_nonce, + user_fee_increase, + } + } + + /// from borrowed base transition + pub fn from_borrowed_token_base_transition_action( + value: &TokenBaseTransitionActionV0, + identity_id: Identifier, + user_fee_increase: UserFeeIncrease, + ) -> Self { + let TokenBaseTransitionActionV0 { + data_contract, + identity_contract_nonce, + .. + } = value; + BumpIdentityDataContractNonceActionV0 { + identity_id, + data_contract_id: data_contract.contract.id(), + identity_contract_nonce: *identity_contract_nonce, + user_fee_increase, + } + } + /// from data contract update pub fn from_data_contract_update(value: DataContractUpdateTransitionV0) -> Self { let DataContractUpdateTransitionV0 { diff --git a/packages/rs-drive/src/util/batch/drive_op_batch/drive_methods/convert_drive_operations_to_grove_operations/v0/mod.rs b/packages/rs-drive/src/util/batch/drive_op_batch/drive_methods/convert_drive_operations_to_grove_operations/v0/mod.rs index de4fecc4c4..0b719f85d4 100644 --- a/packages/rs-drive/src/util/batch/drive_op_batch/drive_methods/convert_drive_operations_to_grove_operations/v0/mod.rs +++ b/packages/rs-drive/src/util/batch/drive_op_batch/drive_methods/convert_drive_operations_to_grove_operations/v0/mod.rs @@ -30,7 +30,7 @@ impl Drive { /// Returns a `Result` containing a `GroveDbOpBatch` with transformed grove database operations, /// or an error if any step in the conversion process fails. #[inline(always)] - pub(crate) fn convert_drive_operations_to_grove_operations_v0( + pub(super) fn convert_drive_operations_to_grove_operations_v0( &self, drive_batch_operations: Vec, block_info: &BlockInfo, diff --git a/packages/rs-drive/src/util/batch/drive_op_batch/group.rs b/packages/rs-drive/src/util/batch/drive_op_batch/group.rs new file mode 100644 index 0000000000..ce1a193c45 --- /dev/null +++ b/packages/rs-drive/src/util/batch/drive_op_batch/group.rs @@ -0,0 +1,68 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::batch::drive_op_batch::DriveLowLevelOperationConverter; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::group::GroupMemberPower; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action::GroupAction; +use dpp::identifier::Identifier; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use platform_version::version::PlatformVersion; +use std::collections::HashMap; + +/// Group operations requiring many people to agree to something for the action to occur. +#[derive(Clone, Debug)] +pub enum GroupOperationType { + /// Adds a group action + AddGroupAction { + /// The contract id + contract_id: Identifier, + /// The group contract position + group_contract_position: GroupContractPosition, + /// Initialize with the action info + initialize_with_insert_action_info: Option, + /// The action id + action_id: Identifier, + /// The identity that is signing + signer_identity_id: Identifier, + /// The signer's power in the group + signer_power: GroupMemberPower, + }, +} + +impl DriveLowLevelOperationConverter for GroupOperationType { + fn into_low_level_drive_operations( + self, + drive: &Drive, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match self { + GroupOperationType::AddGroupAction { + contract_id, + group_contract_position, + initialize_with_insert_action_info, + action_id, + signer_identity_id, + signer_power, + } => drive.add_group_action_operations( + contract_id, + group_contract_position, + initialize_with_insert_action_info, + action_id, + signer_identity_id, + signer_power, + block_info, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + ), + } + } +} diff --git a/packages/rs-drive/src/util/batch/drive_op_batch/mod.rs b/packages/rs-drive/src/util/batch/drive_op_batch/mod.rs index abdd9f4cc6..8ccfc48578 100644 --- a/packages/rs-drive/src/util/batch/drive_op_batch/mod.rs +++ b/packages/rs-drive/src/util/batch/drive_op_batch/mod.rs @@ -2,9 +2,11 @@ mod contract; mod document; mod drive_methods; mod finalize_task; +mod group; mod identity; mod prefunded_specialized_balance; mod system; +mod token; mod withdrawals; use crate::util::batch::GroveDbOpBatch; @@ -19,9 +21,11 @@ pub use document::DocumentOperation; pub use document::DocumentOperationType; pub use document::DocumentOperationsForContractDocumentType; pub use document::UpdateOperationInfo; +pub use group::GroupOperationType; pub use identity::IdentityOperationType; pub use prefunded_specialized_balance::PrefundedSpecializedBalanceOperationType; pub use system::SystemOperationType; +pub use token::TokenOperationType; pub use withdrawals::WithdrawalOperationType; use grovedb::{EstimatedLayerInformation, TransactionArg}; @@ -69,6 +73,8 @@ pub enum DriveOperation<'a> { DataContractOperation(DataContractOperationType<'a>), /// A document operation DocumentOperation(DocumentOperationType<'a>), + /// A token operation + TokenOperation(TokenOperationType), /// Withdrawal operation WithdrawalOperation(WithdrawalOperationType), /// An identity operation @@ -77,6 +83,8 @@ pub enum DriveOperation<'a> { PrefundedSpecializedBalanceOperation(PrefundedSpecializedBalanceOperationType), /// A system operation SystemOperation(SystemOperationType), + /// A group operation + GroupOperation(GroupOperationType), /// A single low level groveDB operation GroveDBOperation(QualifiedGroveDbOp), /// Multiple low level groveDB operations @@ -152,6 +160,22 @@ impl DriveLowLevelOperationConverter for DriveOperation<'_> { .into_iter() .map(GroveOperation) .collect()), + DriveOperation::TokenOperation(token_operation_type) => token_operation_type + .into_low_level_drive_operations( + drive, + estimated_costs_only_with_layer_info, + block_info, + transaction, + platform_version, + ), + DriveOperation::GroupOperation(group_operation_type) => group_operation_type + .into_low_level_drive_operations( + drive, + estimated_costs_only_with_layer_info, + block_info, + transaction, + platform_version, + ), } } } @@ -199,16 +223,16 @@ mod tests { use super::*; + use crate::util::test_helpers::setup_contract; use dpp::block::block_info::BlockInfo; use dpp::data_contract::accessors::v0::DataContractV0Getters; + use dpp::data_contract::DataContract; use dpp::serialization::PlatformSerializableWithPlatformVersion; use dpp::tests::json_document::{json_document_to_contract, json_document_to_document}; use dpp::util::cbor_serializer; use rand::Rng; use serde_json::json; - use crate::util::test_helpers::setup_contract; - use crate::util::batch::drive_op_batch::document::DocumentOperation::{ AddOperation, UpdateOperation, }; @@ -579,7 +603,10 @@ mod tests { &drive, "tests/supporting_files/contract/family/family-contract.json", None, + None, + None::, Some(&db_transaction), + None, ); let document_type = contract @@ -690,7 +717,10 @@ mod tests { &drive, "tests/supporting_files/contract/family/family-contract-only-age-index.json", None, + None, + None::, Some(&db_transaction), + None, ); let document_type = contract @@ -907,7 +937,10 @@ mod tests { &drive, "tests/supporting_files/contract/family/family-contract-only-age-index.json", None, + None, + None::, Some(&db_transaction), + None, ); let document_type = contract diff --git a/packages/rs-drive/src/util/batch/drive_op_batch/token.rs b/packages/rs-drive/src/util/batch/drive_op_batch/token.rs new file mode 100644 index 0000000000..51b976c4dc --- /dev/null +++ b/packages/rs-drive/src/util/batch/drive_op_batch/token.rs @@ -0,0 +1,212 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::batch::drive_op_batch::DriveLowLevelOperationConverter; +use dpp::balances::credits::TokenAmount; +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::prelude::IdentityNonce; +use dpp::tokens::status::TokenStatus; +use dpp::tokens::token_event::TokenEvent; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use platform_version::version::PlatformVersion; +use std::collections::HashMap; + +/// Operations on Tokens +#[derive(Clone, Debug)] +pub enum TokenOperationType { + /// Burns token from the account issuing the action. + TokenBurn { + /// The token id + token_id: Identifier, + /// The identity to burn from + identity_balance_holder_id: Identifier, + /// The amount to burn + burn_amount: TokenAmount, + }, + /// Mints tokens + TokenMint { + /// The token id + token_id: Identifier, + /// The identity to burn from + identity_balance_holder_id: Identifier, + /// The amount to issue + mint_amount: TokenAmount, + /// Should we allow this to be the first ever mint + allow_first_mint: bool, + }, + /// Performs a token transfer + TokenTransfer { + /// The token id + token_id: Identifier, + /// The token id + sender_id: Identifier, + /// The recipient of the transfer + recipient_id: Identifier, + /// The amount to transfer + amount: TokenAmount, + }, + /// Freezes an identity's token balance so money can no longer be sent out. + TokenFreeze { + /// The token id + token_id: Identifier, + /// The frozen identity id + frozen_identity_id: Identifier, + }, + /// Unfreezes an identity's token balance so money can be sent out again. + TokenUnfreeze { + /// The token id + token_id: Identifier, + /// The frozen identity id + frozen_identity_id: Identifier, + }, + /// Sets the status of the token. + TokenSetStatus { + /// The token id + token_id: Identifier, + /// The status + status: TokenStatus, + }, + /// Adds a historical document explaining a token action. + TokenHistory { + /// The token id + token_id: Identifier, + /// The identity making the event + owner_id: Identifier, + /// The nonce + nonce: IdentityNonce, + /// The token event + event: TokenEvent, + }, +} + +impl DriveLowLevelOperationConverter for TokenOperationType { + fn into_low_level_drive_operations( + self, + drive: &Drive, + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + block_info: &BlockInfo, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match self { + TokenOperationType::TokenBurn { + token_id, + identity_balance_holder_id, + burn_amount, + } => { + let token_id_bytes: [u8; 32] = token_id.to_buffer(); + let identity_id_bytes: [u8; 32] = identity_balance_holder_id.to_buffer(); + let batch_operations = drive.token_burn_operations( + token_id_bytes, + identity_id_bytes, + burn_amount, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + Ok(batch_operations) + } + TokenOperationType::TokenMint { + token_id, + identity_balance_holder_id, + mint_amount, + allow_first_mint, + } => { + println!( + "minting in {} token to id {} ({})", + token_id, identity_balance_holder_id, mint_amount + ); + let token_id_bytes: [u8; 32] = token_id.to_buffer(); + let identity_id_bytes: [u8; 32] = identity_balance_holder_id.to_buffer(); + let batch_operations = drive.token_mint_operations( + token_id_bytes, + identity_id_bytes, + mint_amount, + allow_first_mint, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + Ok(batch_operations) + } + TokenOperationType::TokenTransfer { + token_id, + sender_id, + recipient_id, + amount, + } => { + let token_id_bytes: [u8; 32] = token_id.to_buffer(); + let sender_id_bytes: [u8; 32] = sender_id.to_buffer(); + let recipient_id_bytes: [u8; 32] = recipient_id.to_buffer(); + + let batch_operations = drive.token_transfer_operations( + token_id_bytes, + sender_id_bytes, + recipient_id_bytes, + amount, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + Ok(batch_operations) + } + TokenOperationType::TokenHistory { + token_id, + owner_id, + nonce, + event, + } => { + let batch_operations = drive.add_token_transaction_history_operations( + token_id, + owner_id, + nonce, + event, + block_info, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + Ok(batch_operations) + } + TokenOperationType::TokenFreeze { + token_id, + frozen_identity_id, + } => { + let batch_operations = drive.token_freeze_operations( + token_id, + frozen_identity_id, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + Ok(batch_operations) + } + TokenOperationType::TokenUnfreeze { + token_id, + frozen_identity_id, + } => { + let batch_operations = drive.token_unfreeze_operations( + token_id, + frozen_identity_id, + estimated_costs_only_with_layer_info, + transaction, + platform_version, + )?; + Ok(batch_operations) + } + TokenOperationType::TokenSetStatus { token_id, status } => { + let batch_operations = drive.token_apply_status_operations( + token_id.to_buffer(), + status, + estimated_costs_only_with_layer_info, + platform_version, + )?; + Ok(batch_operations) + } + } + } +} diff --git a/packages/rs-drive/src/util/batch/drive_op_batch/withdrawals.rs b/packages/rs-drive/src/util/batch/drive_op_batch/withdrawals.rs index 26bf6617a7..8146f534d7 100644 --- a/packages/rs-drive/src/util/batch/drive_op_batch/withdrawals.rs +++ b/packages/rs-drive/src/util/batch/drive_op_batch/withdrawals.rs @@ -18,7 +18,7 @@ use dpp::fee::{Credits, SignedCredits}; use dpp::prelude::TimestampMillis; use dpp::version::PlatformVersion; use dpp::withdrawal::{WithdrawalTransactionIndex, WithdrawalTransactionIndexAndBytes}; -use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg}; +use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, MaybeTree, TransactionArg}; use grovedb::{Element, PathQuery, SizedQuery}; /// Operations for Withdrawals @@ -164,7 +164,7 @@ impl DriveLowLevelOperationConverter for WithdrawalOperationType { true, // we know that we are not deleting a subtree BatchMoveApplyType::StatefulBatchMove { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, &mut drive_operations, @@ -205,7 +205,7 @@ impl DriveLowLevelOperationConverter for WithdrawalOperationType { true, // we know that we are not deleting a subtree BatchMoveApplyType::StatefulBatchMove { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, &mut drive_operations, @@ -244,7 +244,7 @@ impl DriveLowLevelOperationConverter for WithdrawalOperationType { true, // we know that we are not deleting a subtree BatchDeleteApplyType::StatefulBatchDelete { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }, transaction, &mut drive_operations, diff --git a/packages/rs-drive/src/util/batch/grovedb_op_batch/mod.rs b/packages/rs-drive/src/util/batch/grovedb_op_batch/mod.rs index 67d5f8908e..ecf25027e2 100644 --- a/packages/rs-drive/src/util/batch/grovedb_op_batch/mod.rs +++ b/packages/rs-drive/src/util/batch/grovedb_op_batch/mod.rs @@ -13,7 +13,7 @@ use dpp::prelude::Identifier; use grovedb::batch::key_info::KeyInfo; use grovedb::batch::{GroveDbOpConsistencyResults, GroveOp, KeyInfoPath, QualifiedGroveDbOp}; use grovedb::operations::proof::util::hex_to_ascii; -use grovedb::Element; +use grovedb::{Element, TreeType}; use std::borrow::Cow; use std::fmt; @@ -52,6 +52,7 @@ enum KnownPath { TokenBalancesRoot, //Level 1 VersionsRoot, //Level 1 VotesRoot, //Level 1 + GroupActionsRoot, //Level 1 } impl From for KnownPath { @@ -71,9 +72,10 @@ impl From for KnownPath { RootTree::Misc => KnownPath::MiscRoot, RootTree::WithdrawalTransactions => KnownPath::WithdrawalTransactionsRoot, RootTree::Balances => KnownPath::BalancesRoot, - RootTree::TokenBalances => KnownPath::TokenBalancesRoot, + RootTree::Tokens => KnownPath::TokenBalancesRoot, RootTree::Versions => KnownPath::VersionsRoot, RootTree::Votes => KnownPath::VotesRoot, + RootTree::GroupActions => KnownPath::GroupActionsRoot, } } } @@ -358,7 +360,7 @@ pub trait GroveDbOpBatchV0Methods { fn add_delete(&mut self, path: Vec>, key: Vec); /// Adds a `Delete` tree operation to a list of GroveDB ops. - fn add_delete_tree(&mut self, path: Vec>, key: Vec, is_sum_tree: bool); + fn add_delete_tree(&mut self, path: Vec>, key: Vec, tree_type: TreeType); /// Adds an `Insert` operation with an element to a list of GroveDB ops. fn add_insert(&mut self, path: Vec>, key: Vec, element: Element); @@ -510,9 +512,9 @@ impl GroveDbOpBatchV0Methods for GroveDbOpBatch { } /// Adds a `Delete` tree operation to a list of GroveDB ops. - fn add_delete_tree(&mut self, path: Vec>, key: Vec, is_sum_tree: bool) { + fn add_delete_tree(&mut self, path: Vec>, key: Vec, tree_type: TreeType) { self.operations - .push(QualifiedGroveDbOp::delete_tree_op(path, key, is_sum_tree)) + .push(QualifiedGroveDbOp::delete_tree_op(path, key, tree_type)) } /// Adds an `Insert` operation with an element to a list of GroveDB ops. diff --git a/packages/rs-drive/src/util/grove_operations/batch_delete/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_delete/v0/mod.rs index 25a083ced3..bc77445630 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_delete/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_delete/v0/mod.rs @@ -32,7 +32,7 @@ impl Drive { }; let delete_operation = match apply_type { BatchDeleteApplyType::StatelessBatchDelete { - is_sum_tree, + in_tree_type: is_sum_tree, estimated_key_size, estimated_value_size, } => GroveDb::average_case_delete_operation_for_delete::( diff --git a/packages/rs-drive/src/util/grove_operations/batch_delete_items_in_path_query/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_delete_items_in_path_query/v0/mod.rs index a530776986..3ae43af7c8 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_delete_items_in_path_query/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_delete_items_in_path_query/v0/mod.rs @@ -87,7 +87,7 @@ impl Drive { }; let delete_operation = match apply_type { BatchDeleteApplyType::StatelessBatchDelete { - is_sum_tree, + in_tree_type: is_sum_tree, estimated_key_size, estimated_value_size, } => GroveDb::average_case_delete_operation_for_delete::( @@ -136,14 +136,14 @@ mod tests { util::grove_operations::BatchDeleteApplyType, }; use assert_matches::assert_matches; - use grovedb::SizedQuery; + use grovedb::{SizedQuery, TreeType}; use grovedb_path::SubtreePath; use platform_version::version::PlatformVersion; #[test] fn test_batch_delete_items_in_path_query_success() { // Set up a test drive instance and transaction - let drive = setup_drive(None); + let drive = setup_drive(None, None); let platform_version = PlatformVersion::latest(); let transaction = drive.grove.start_transaction(); @@ -234,7 +234,7 @@ mod tests { #[test] fn test_batch_delete_items_in_path_query_range_query() { // Set up a test drive instance and transaction - let drive = setup_drive(None); + let drive = setup_drive(None, None); let platform_version = PlatformVersion::latest(); let transaction = drive.grove.start_transaction(); @@ -379,7 +379,7 @@ mod tests { #[test] fn test_batch_delete_items_in_path_query_no_elements() { // Set up a test drive instance and transaction - let drive = setup_drive(None); + let drive = setup_drive(None, None); let platform_version = PlatformVersion::latest(); let transaction = drive.grove.start_transaction(); @@ -455,7 +455,7 @@ mod tests { #[test] fn test_batch_delete_items_in_path_query_intermediate_path_missing() { // Set up a test drive instance and transaction - let drive = setup_drive(None); + let drive = setup_drive(None, None); let platform_version = PlatformVersion::latest(); let transaction = drive.grove.start_transaction(); @@ -491,7 +491,7 @@ mod tests { #[test] fn test_batch_delete_items_in_path_query_stateless_delete() { // Set up a test drive instance and transaction - let drive = setup_drive(None); + let drive = setup_drive(None, None); let platform_version = PlatformVersion::latest(); let transaction = drive.grove.start_transaction(); @@ -533,7 +533,7 @@ mod tests { // Set up the stateless apply type with estimated sizes let apply_type = BatchDeleteApplyType::StatelessBatchDelete { - is_sum_tree: false, + in_tree_type: TreeType::NormalTree, estimated_key_size: key.len() as u32, estimated_value_size: element .serialized_size(&platform_version.drive.grove_version) diff --git a/packages/rs-drive/src/util/grove_operations/batch_insert_empty_sum_tree/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_insert_empty_sum_tree/mod.rs new file mode 100644 index 0000000000..2a2a033ff4 --- /dev/null +++ b/packages/rs-drive/src/util/grove_operations/batch_insert_empty_sum_tree/mod.rs @@ -0,0 +1,52 @@ +mod v0; + +use crate::util::object_size_info::DriveKeyInfo; +use crate::util::storage_flags::StorageFlags; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::version::drive_versions::DriveVersion; + +impl Drive { + /// Pushes an "insert empty tree" operation to `drive_operations`. + /// + /// # Parameters + /// * `path`: The path to insert an empty tree. + /// * `key_info`: The key information of the document. + /// * `storage_flags`: Storage options for the operation. + /// * `drive_operations`: The vector containing low-level drive operations. + /// * `drive_version`: The drive version to select the correct function version to run. + /// + /// # Returns + /// * `Ok(())` if the operation was successful. + /// * `Err(DriveError::UnknownVersionMismatch)` if the drive version does not match known versions. + pub fn batch_insert_empty_sum_tree<'a, 'c, P>( + &'a self, + path: P, + key_info: DriveKeyInfo<'c>, + storage_flags: Option<&StorageFlags>, + drive_operations: &mut Vec, + drive_version: &DriveVersion, + ) -> Result<(), Error> + where + P: IntoIterator, +

::IntoIter: ExactSizeIterator + DoubleEndedIterator + Clone, + { + match drive_version + .grove_methods + .batch + .batch_insert_empty_sum_tree + { + 0 => { + self.batch_insert_empty_sum_tree_v0(path, key_info, storage_flags, drive_operations) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "batch_insert_empty_sum_tree".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/util/grove_operations/batch_insert_empty_sum_tree/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_insert_empty_sum_tree/v0/mod.rs new file mode 100644 index 0000000000..fb76aa3f18 --- /dev/null +++ b/packages/rs-drive/src/util/grove_operations/batch_insert_empty_sum_tree/v0/mod.rs @@ -0,0 +1,53 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::object_size_info::DriveKeyInfo; +use crate::util::object_size_info::DriveKeyInfo::{Key, KeyRef, KeySize}; +use crate::util::storage_flags::StorageFlags; +use grovedb::batch::KeyInfoPath; + +impl Drive { + /// Pushes an "insert empty tree" operation to `drive_operations`. + pub(crate) fn batch_insert_empty_sum_tree_v0<'a, 'c, P>( + &'a self, + path: P, + key_info: DriveKeyInfo<'c>, + storage_flags: Option<&StorageFlags>, + drive_operations: &mut Vec, + ) -> Result<(), Error> + where + P: IntoIterator, +

::IntoIter: ExactSizeIterator + DoubleEndedIterator + Clone, + { + match key_info { + KeyRef(key) => { + let path_items: Vec> = path.into_iter().map(Vec::from).collect(); + drive_operations.push(LowLevelDriveOperation::for_known_path_key_empty_sum_tree( + path_items, + key.to_vec(), + storage_flags, + )); + Ok(()) + } + KeySize(key) => { + drive_operations.push( + LowLevelDriveOperation::for_estimated_path_key_empty_sum_tree( + KeyInfoPath::from_known_path(path), + key, + storage_flags, + ), + ); + Ok(()) + } + Key(key) => { + let path_items: Vec> = path.into_iter().map(Vec::from).collect(); + drive_operations.push(LowLevelDriveOperation::for_known_path_key_empty_sum_tree( + path_items, + key, + storage_flags, + )); + Ok(()) + } + } + } +} diff --git a/packages/rs-drive/src/util/grove_operations/batch_insert_empty_tree_if_not_exists/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_insert_empty_tree_if_not_exists/mod.rs index a4f630e691..5425de9741 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_insert_empty_tree_if_not_exists/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_insert_empty_tree_if_not_exists/mod.rs @@ -10,7 +10,7 @@ use crate::error::Error; use crate::fees::op::LowLevelDriveOperation; use dpp::version::drive_versions::DriveVersion; -use grovedb::TransactionArg; +use grovedb::{TransactionArg, TreeType}; impl Drive { /// Pushes an "insert empty tree where path key does not yet exist" operation to `drive_operations`. @@ -19,7 +19,7 @@ impl Drive { pub fn batch_insert_empty_tree_if_not_exists( &self, path_key_info: PathKeyInfo, - use_sum_tree: bool, + tree_type: TreeType, storage_flags: Option<&StorageFlags>, apply_type: BatchInsertTreeApplyType, transaction: TransactionArg, @@ -34,7 +34,7 @@ impl Drive { { 0 => self.batch_insert_empty_tree_if_not_exists_v0( path_key_info, - use_sum_tree, + tree_type, storage_flags, apply_type, transaction, diff --git a/packages/rs-drive/src/util/grove_operations/batch_insert_empty_tree_if_not_exists/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_insert_empty_tree_if_not_exists/v0/mod.rs index 4f2c30664c..e1b0dc30b3 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_insert_empty_tree_if_not_exists/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_insert_empty_tree_if_not_exists/v0/mod.rs @@ -1,8 +1,8 @@ use crate::drive::Drive; use crate::error::drive::DriveError; use crate::error::Error; -use crate::fees::op::LowLevelDriveOperation; use crate::fees::op::LowLevelDriveOperation::GroveOperation; +use crate::fees::op::{LowLevelDriveOperation, LowLevelDriveOperationTreeTypeConverter}; use crate::util::grove_operations::BatchInsertTreeApplyType; use crate::util::object_size_info::PathKeyInfo; use crate::util::object_size_info::PathKeyInfo::{ @@ -11,7 +11,7 @@ use crate::util::object_size_info::PathKeyInfo::{ use crate::util::storage_flags::StorageFlags; use dpp::version::drive_versions::DriveVersion; use grovedb::batch::GroveOp; -use grovedb::TransactionArg; +use grovedb::{TransactionArg, TreeType}; impl Drive { /// Pushes an "insert empty tree where path key does not yet exist" operation to `drive_operations`. @@ -19,7 +19,7 @@ impl Drive { pub(crate) fn batch_insert_empty_tree_if_not_exists_v0( &self, path_key_info: PathKeyInfo, - use_sum_tree: bool, + tree_type: TreeType, storage_flags: Option<&StorageFlags>, apply_type: BatchInsertTreeApplyType, transaction: TransactionArg, @@ -30,19 +30,11 @@ impl Drive { //todo: clean up the duplication match path_key_info { PathKeyRef((path, key)) => { - let drive_operation = if use_sum_tree { - LowLevelDriveOperation::for_known_path_key_empty_sum_tree( - path.clone(), - key.to_vec(), - storage_flags, - ) - } else { - LowLevelDriveOperation::for_known_path_key_empty_tree( - path.clone(), - key.to_vec(), - storage_flags, - ) - }; + let drive_operation = tree_type.empty_tree_operation_for_known_path_key( + path.clone(), + key.to_vec(), + storage_flags, + ); // we only add the operation if it doesn't already exist in the current batch if let Some(existing_operations) = check_existing_operations { let mut i = 0; @@ -58,7 +50,7 @@ impl Drive { } else if let GroveOperation(grove_op) = previous_drive_operation { if grove_op.key == key && grove_op.path == path - && matches!(grove_op.op, GroveOp::DeleteTree) + && matches!(grove_op.op, GroveOp::DeleteTree(_)) { found = true; existing_operations.remove(i); @@ -105,19 +97,11 @@ impl Drive { DriveError::NotSupportedPrivate("document sizes in batch operations not supported"), )), PathKey((path, key)) => { - let drive_operation = if use_sum_tree { - LowLevelDriveOperation::for_known_path_key_empty_sum_tree( - path.clone(), - key.to_vec(), - storage_flags, - ) - } else { - LowLevelDriveOperation::for_known_path_key_empty_tree( - path.clone(), - key.to_vec(), - storage_flags, - ) - }; + let drive_operation = tree_type.empty_tree_operation_for_known_path_key( + path.clone(), + key.to_vec(), + storage_flags, + ); // we only add the operation if it doesn't already exist in the current batch if let Some(existing_operations) = check_existing_operations { let mut i = 0; @@ -133,7 +117,7 @@ impl Drive { } else if let GroveOperation(grove_op) = previous_drive_operation { if grove_op.key == key && grove_op.path == path - && matches!(grove_op.op, GroveOp::DeleteTree) + && matches!(grove_op.op, GroveOp::DeleteTree(_)) { found = true; existing_operations.remove(i); @@ -178,19 +162,11 @@ impl Drive { } PathFixedSizeKey((path, key)) => { let path_items: Vec> = path.into_iter().map(Vec::from).collect(); - let drive_operation = if use_sum_tree { - LowLevelDriveOperation::for_known_path_key_empty_sum_tree( - path_items, - key.to_vec(), - storage_flags, - ) - } else { - LowLevelDriveOperation::for_known_path_key_empty_tree( - path_items, - key.to_vec(), - storage_flags, - ) - }; + let drive_operation = tree_type.empty_tree_operation_for_known_path_key( + path_items, + key.to_vec(), + storage_flags, + ); // we only add the operation if it doesn't already exist in the current batch if let Some(existing_operations) = check_existing_operations { let mut i = 0; @@ -206,7 +182,7 @@ impl Drive { } else if let GroveOperation(grove_op) = previous_drive_operation { if grove_op.key == key && grove_op.path == path - && matches!(grove_op.op, GroveOp::DeleteTree) + && matches!(grove_op.op, GroveOp::DeleteTree(_)) { found = true; existing_operations.remove(i); @@ -251,19 +227,11 @@ impl Drive { } PathFixedSizeKeyRef((path, key)) => { let path_items: Vec> = path.into_iter().map(Vec::from).collect(); - let drive_operation = if use_sum_tree { - LowLevelDriveOperation::for_known_path_key_empty_sum_tree( - path_items, - key.to_vec(), - storage_flags, - ) - } else { - LowLevelDriveOperation::for_known_path_key_empty_tree( - path_items, - key.to_vec(), - storage_flags, - ) - }; + let drive_operation = tree_type.empty_tree_operation_for_known_path_key( + path_items, + key.to_vec(), + storage_flags, + ); // we only add the operation if it doesn't already exist in the current batch if let Some(existing_operations) = check_existing_operations { let mut i = 0; @@ -279,7 +247,7 @@ impl Drive { } else if let GroveOperation(grove_op) = previous_drive_operation { if grove_op.key == key && grove_op.path == path - && matches!(grove_op.op, GroveOp::DeleteTree) + && matches!(grove_op.op, GroveOp::DeleteTree(_)) { found = true; existing_operations.remove(i); diff --git a/packages/rs-drive/src/util/grove_operations/batch_insert_if_changed_value/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_insert_if_changed_value/v0/mod.rs index de5431d8f1..f464fc3c18 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_insert_if_changed_value/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_insert_if_changed_value/v0/mod.rs @@ -99,7 +99,8 @@ impl Drive { PathKeyElementSize((key_info_path, key_info, element)) => { match apply_type { BatchInsertApplyType::StatelessBatchInsert { - in_tree_using_sums, .. + in_tree_type: in_tree_using_sums, + .. } => { // we can estimate that the element was the same size drive_operations.push(CalculatedCostOperation( diff --git a/packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists/v0/mod.rs index 8fc5c16c5b..cdf15dc489 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists/v0/mod.rs @@ -87,7 +87,8 @@ impl Drive { PathKeyElementSize((key_info_path, key_info, element)) => { match apply_type { BatchInsertApplyType::StatelessBatchInsert { - in_tree_using_sums, .. + in_tree_type: in_tree_using_sums, + .. } => { // we can estimate that the element was the same size drive_operations.push(CalculatedCostOperation( diff --git a/packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists_return_existing_element/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists_return_existing_element/v0/mod.rs index 55f411caeb..ed3e356880 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists_return_existing_element/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists_return_existing_element/v0/mod.rs @@ -129,7 +129,8 @@ impl Drive { PathKeyElementSize((key_info_path, key_info, element)) => { match apply_type { BatchInsertApplyType::StatelessBatchInsert { - in_tree_using_sums, .. + in_tree_type: in_tree_using_sums, + .. } => { // Estimate if the element with the given size already exists drive_operations.push(CalculatedCostOperation( diff --git a/packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_if_not_exists/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_if_not_exists/mod.rs new file mode 100644 index 0000000000..9200949046 --- /dev/null +++ b/packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_if_not_exists/mod.rs @@ -0,0 +1,71 @@ +mod v0; + +use crate::util::grove_operations::BatchInsertApplyType; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::object_size_info::PathKeyElementInfo; + +use dpp::version::drive_versions::DriveVersion; +use grovedb::TransactionArg; + +impl Drive { + /// Attempts to batch insert a sum item at the specified path and key if it doesn't already exist. + /// This method dispatches to the appropriate version of the `batch_insert_sum_item_if_not_exists` function + /// based on the version of the drive. Currently, version `0` is supported. + /// + /// # Parameters + /// * `path_key_element_info`: Contains the path, key, and element information to be inserted. + /// * `error_if_exists`: A flag that determines whether an error is returned if a sum item already exists at the given path and key. + /// * `apply_type`: Defines the batch insert type, such as stateless or stateful insertion. + /// * `transaction`: The transaction argument used for the operation. + /// * `drive_operations`: A mutable reference to a vector that collects low-level drive operations to be executed. + /// * `drive_version`: The version of the drive that influences the behavior of the batch insert operation. + /// + /// # Returns + /// * `Ok(())` if the batch insert is successful. + /// * `Err(Error)` if the operation fails, including an error for unknown version mismatches. + /// + /// # Description + /// This function checks the version of the drive's batch methods and dispatches the operation to the appropriate version of + /// `batch_insert_sum_item_if_not_exists`. Currently, only version `0` is supported, which delegates to the function + /// `batch_insert_sum_item_if_not_exists_v0`. If the drive version is not supported, an error is returned. + /// + /// In version `0`, the function performs the following: + /// - Checks if a sum item exists at the specified path and key. + /// - If the sum item exists and `error_if_exists` is true, an error is returned. + /// - If no sum item exists, a new sum item is inserted at the path and key. + /// + /// This method allows flexibility for future versions of the drive to implement different behaviors for batch insertion. + pub fn batch_insert_sum_item_if_not_exists( + &self, + path_key_element_info: PathKeyElementInfo, + error_if_exists: bool, + apply_type: BatchInsertApplyType, + transaction: TransactionArg, + drive_operations: &mut Vec, + drive_version: &DriveVersion, + ) -> Result { + match drive_version + .grove_methods + .batch + .batch_insert_sum_item_if_not_exists + { + 0 => self.batch_insert_sum_item_if_not_exists_v0( + path_key_element_info, + error_if_exists, + apply_type, + transaction, + drive_operations, + drive_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "batch_insert_sum_item_if_not_exists".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_if_not_exists/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_if_not_exists/v0/mod.rs new file mode 100644 index 0000000000..902f806e79 --- /dev/null +++ b/packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_if_not_exists/v0/mod.rs @@ -0,0 +1,230 @@ +use crate::util::grove_operations::BatchInsertApplyType; +use crate::util::object_size_info::PathKeyElementInfo::{ + PathFixedSizeKeyRefElement, PathKeyElement, PathKeyElementSize, PathKeyRefElement, + PathKeyUnknownElementSize, +}; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::fees::op::LowLevelDriveOperation::CalculatedCostOperation; +use crate::util::object_size_info::PathKeyElementInfo; +use dpp::version::drive_versions::DriveVersion; +use grovedb::{Element, GroveDb, TransactionArg}; + +impl Drive { + /// Inserts a sum item at the specified path and key if it doesn't already exist. + /// If a sum item exists at the specified location and `error_if_exists` is true, an error is returned. + /// If a sum item exists and `error_if_exists` is false, no changes are made. + /// If no sum item exists, a new sum item is inserted at the specified path and key. + /// + /// # Parameters + /// * `path_key_element_info`: Contains information about the path, key, and element to be processed. + /// * `error_if_exists`: A flag that determines whether to return an error if the sum item already exists. + /// * `apply_type`: Defines the type of batch insert to be performed (stateful or stateless). + /// * `transaction`: The transaction argument for the operation. + /// * `drive_operations`: A mutable reference to a vector of low-level drive operations to which new operations will be appended. + /// * `drive_version`: The version of the drive to ensure compatibility with the operation. + /// + /// # Returns + /// * `Ok(())` if the operation is successful. + /// * `Err(Error)` if the operation fails for any reason, such as corrupted state or unsupported operation. + /// + /// # Description + /// This function checks whether an existing sum item exists at the given path and key: + /// - If a sum item is found and `error_if_exists` is true, an error is returned. + /// - If a sum item is found and `error_if_exists` is false, no changes are made. + /// - If no sum item exists, a new sum item is inserted at the specified path and key. + /// + /// This function supports several types of paths and keys, including: + /// - `PathKeyRefElement`: A path with a reference to a key and element. + /// - `PathKeyElement`: A path with a direct key and element. + /// - `PathFixedSizeKeyRefElement`: A fixed-size key reference. + /// - `PathKeyElementSize`: An element with an associated size. + /// - `PathKeyUnknownElementSize`: An unknown element size type. + /// + /// Depending on the element type (`SumItem` in this case), the appropriate operations will be applied. + /// + /// **Note**: Stateful batch insertions of document sizes are not supported. + pub(super) fn batch_insert_sum_item_if_not_exists_v0( + &self, + path_key_element_info: PathKeyElementInfo, + error_if_exists: bool, + apply_type: BatchInsertApplyType, + transaction: TransactionArg, + drive_operations: &mut Vec, + drive_version: &DriveVersion, + ) -> Result { + match path_key_element_info { + PathKeyRefElement((path, key, element)) => { + if let Element::SumItem(new_value, _) = element { + // Check if the sum item already exists + let existing_element = self.grove_get_raw_optional( + path.as_slice().into(), + key, + apply_type.to_direct_query_type(), + transaction, + drive_operations, + drive_version, + )?; + + if let Some(Element::SumItem(..)) = existing_element { + return if error_if_exists { + Err(Error::Drive(DriveError::CorruptedDriveState( + "expected no sum item".to_string(), + ))) + } else { + Ok(false) + }; + // Else do nothing + } else if existing_element.is_some() { + return Err(Error::Drive(DriveError::CorruptedElementType( + "expected sum item element type", + ))); + } else { + // Insert as a new sum item + drive_operations.push( + LowLevelDriveOperation::insert_for_known_path_key_element( + path, + key.to_vec(), + Element::new_sum_item(new_value), + ), + ); + } + } else { + return Err(Error::Drive(DriveError::CorruptedCodeExecution( + "expected sum item element type", + ))); + } + Ok(true) + } + PathKeyElement((path, key, element)) => { + if let Element::SumItem(new_value, _) = element { + // Check if the sum item already exists + let existing_element = self.grove_get_raw_optional( + path.as_slice().into(), + key.as_slice(), + apply_type.to_direct_query_type(), + transaction, + drive_operations, + drive_version, + )?; + + if let Some(Element::SumItem(..)) = existing_element { + return if error_if_exists { + Err(Error::Drive(DriveError::CorruptedDriveState( + "expected no sum item".to_string(), + ))) + } else { + Ok(false) + }; + // Else do nothing + } else if existing_element.is_some() { + return Err(Error::Drive(DriveError::CorruptedElementType( + "expected sum item element type", + ))); + } else { + // Insert as a new sum item + drive_operations.push( + LowLevelDriveOperation::insert_for_known_path_key_element( + path, + key, + Element::new_sum_item(new_value), + ), + ); + } + } else { + return Err(Error::Drive(DriveError::CorruptedCodeExecution( + "expected sum item element type", + ))); + } + Ok(true) + } + PathFixedSizeKeyRefElement((path, key, element)) => { + if let Element::SumItem(new_value, _) = element { + // Check if the sum item already exists + let existing_element = self.grove_get_raw_optional( + path.as_slice().into(), + key, + apply_type.to_direct_query_type(), + transaction, + drive_operations, + drive_version, + )?; + + if let Some(Element::SumItem(..)) = existing_element { + return if error_if_exists { + Err(Error::Drive(DriveError::CorruptedDriveState( + "expected no sum item".to_string(), + ))) + } else { + Ok(false) + }; + // Else do nothing + } else if existing_element.is_some() { + return Err(Error::Drive(DriveError::CorruptedElementType( + "expected sum item element type", + ))); + } else { + // Insert as a new sum item + let path_items: Vec> = path.into_iter().map(Vec::from).collect(); + drive_operations.push( + LowLevelDriveOperation::insert_for_known_path_key_element( + path_items, + key.to_vec(), + Element::new_sum_item(new_value), + ), + ); + } + } else { + return Err(Error::Drive(DriveError::CorruptedCodeExecution( + "expected sum item element type", + ))); + } + Ok(true) + } + PathKeyElementSize((key_info_path, key_info, element)) => { + if let Element::SumItem(new_value, _) = element { + match apply_type { + BatchInsertApplyType::StatelessBatchInsert { + in_tree_type, .. + } => { + // Estimate if the sum item with the given size already exists + drive_operations.push(CalculatedCostOperation( + GroveDb::average_case_for_has_raw( + &key_info_path, + &key_info, + element.serialized_size(&drive_version.grove_version)? as u32, + in_tree_type, + &drive_version.grove_version, + )?, + )); + + drive_operations.push( + LowLevelDriveOperation::insert_for_estimated_path_key_element( + key_info_path, + key_info, + Element::new_sum_item(new_value), + ), + ); + Ok(true) + } + BatchInsertApplyType::StatefulBatchInsert => { + Err(Error::Drive(DriveError::NotSupportedPrivate( + "document sizes for stateful insert in batch operations not supported", + ))) + } + } + } else { + Err(Error::Drive(DriveError::CorruptedCodeExecution( + "expected sum item element type", + ))) + } + } + PathKeyUnknownElementSize(_) => Err(Error::Drive(DriveError::NotSupportedPrivate( + "document sizes in batch operations not supported", + ))), + } + } +} diff --git a/packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_or_add_to_if_already_exists/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_or_add_to_if_already_exists/v0/mod.rs index 8294a6786b..c9abd72a50 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_or_add_to_if_already_exists/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_or_add_to_if_already_exists/v0/mod.rs @@ -178,7 +178,7 @@ impl Drive { if let Element::SumItem(new_value, _) = element { match apply_type { BatchInsertApplyType::StatelessBatchInsert { - in_tree_using_sums, .. + in_tree_type, .. } => { // Estimate if the sum item with the given size already exists drive_operations.push(CalculatedCostOperation( @@ -186,7 +186,7 @@ impl Drive { &key_info_path, &key_info, element.serialized_size(&drive_version.grove_version)? as u32, - in_tree_using_sums, + in_tree_type, &drive_version.grove_version, )?, )); diff --git a/packages/rs-drive/src/util/grove_operations/batch_move_items_in_path_query/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_move_items_in_path_query/v0/mod.rs index f8b2b904cc..15ee4c5bda 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_move_items_in_path_query/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_move_items_in_path_query/v0/mod.rs @@ -89,14 +89,14 @@ impl Drive { }; let delete_operation = match apply_type { BatchMoveApplyType::StatelessBatchMove { - is_sum_tree, + in_tree_type, estimated_key_size, estimated_value_size, .. } => GroveDb::average_case_delete_operation_for_delete::( &KeyInfoPath::from_known_owned_path(path.to_vec()), &KeyInfo::KnownKey(key.to_vec()), - is_sum_tree, + in_tree_type, false, true, 0, @@ -142,14 +142,14 @@ mod tests { util::test_helpers::setup::setup_drive, }; use assert_matches::assert_matches; - use grovedb::{Element, PathQuery, Query, SizedQuery}; + use grovedb::{Element, MaybeTree, PathQuery, Query, SizedQuery}; use grovedb_path::SubtreePath; use platform_version::version::PlatformVersion; #[test] fn test_batch_move_items_in_path_query_success() { // Set up a test drive instance and transaction - let drive = setup_drive(None); + let drive = setup_drive(None, None); let platform_version = PlatformVersion::latest(); let transaction = drive.grove.start_transaction(); @@ -218,7 +218,7 @@ mod tests { // Set up the apply type and drive operations vector let apply_type = BatchMoveApplyType::StatefulBatchMove { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }; let mut drive_operations = Vec::new(); @@ -305,7 +305,7 @@ mod tests { #[test] fn test_batch_move_items_in_path_query_no_elements() { // Set up a test drive instance and transaction - let drive = setup_drive(None); + let drive = setup_drive(None, None); let platform_version = PlatformVersion::latest(); let transaction = drive.grove.start_transaction(); @@ -330,7 +330,7 @@ mod tests { // Set up the apply type and drive operations vector let apply_type = BatchMoveApplyType::StatefulBatchMove { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }; let mut drive_operations = Vec::new(); @@ -351,7 +351,7 @@ mod tests { #[test] fn test_batch_move_items_in_path_query_range_query() { // Set up a test drive instance and transaction - let drive = setup_drive(None); + let drive = setup_drive(None, None); let platform_version = PlatformVersion::latest(); let transaction = drive.grove.start_transaction(); @@ -433,7 +433,7 @@ mod tests { // Set up the apply type and drive operations vector let apply_type = BatchMoveApplyType::StatefulBatchMove { - is_known_to_be_subtree_with_sum: Some((false, false)), + is_known_to_be_subtree_with_sum: Some(MaybeTree::NotTree), }; let mut drive_operations = Vec::new(); diff --git a/packages/rs-drive/src/util/grove_operations/batch_remove_raw/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/batch_remove_raw/v0/mod.rs index d6ef95dad2..89902830ef 100644 --- a/packages/rs-drive/src/util/grove_operations/batch_remove_raw/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/batch_remove_raw/v0/mod.rs @@ -45,9 +45,7 @@ impl Drive { "we should not be seeing internal grovedb operations", ))); } - Some(GroveOp::Delete { .. }) - | Some(GroveOp::DeleteTree { .. }) - | Some(GroveOp::DeleteSumTree { .. }) => false, + Some(GroveOp::Delete { .. }) | Some(GroveOp::DeleteTree { .. }) => false, _ => true, }; @@ -70,7 +68,7 @@ impl Drive { if needs_removal_from_state { let delete_operation = match apply_type { BatchDeleteApplyType::StatelessBatchDelete { - is_sum_tree, + in_tree_type: is_sum_tree, estimated_key_size, estimated_value_size, } => GroveDb::average_case_delete_operation_for_delete::( diff --git a/packages/rs-drive/src/util/grove_operations/grove_apply_batch_with_add_costs/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_apply_batch_with_add_costs/v0/mod.rs index c0afbdaa79..3c212ba544 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_apply_batch_with_add_costs/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_apply_batch_with_add_costs/v0/mod.rs @@ -13,7 +13,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Applies the given groveDB operations batch and gets and passes the costs to `push_drive_operation_result`. - pub(crate) fn grove_apply_batch_with_add_costs_v0( + pub(super) fn grove_apply_batch_with_add_costs_v0( &self, ops: GroveDbOpBatch, validate: bool, diff --git a/packages/rs-drive/src/util/grove_operations/grove_apply_operation/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_apply_operation/v0/mod.rs index dbbb761349..9bb4ab95c4 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_apply_operation/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_apply_operation/v0/mod.rs @@ -7,7 +7,7 @@ use grovedb::TransactionArg; impl Drive { /// Applies the given groveDB operation - pub(crate) fn grove_apply_operation_v0( + pub(super) fn grove_apply_operation_v0( &self, operation: QualifiedGroveDbOp, validate: bool, diff --git a/packages/rs-drive/src/util/grove_operations/grove_apply_partial_batch_with_add_costs/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_apply_partial_batch_with_add_costs/v0/mod.rs index a734e406db..9d7a6bc8eb 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_apply_partial_batch_with_add_costs/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_apply_partial_batch_with_add_costs/v0/mod.rs @@ -16,7 +16,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Applies the given groveDB operations batch and gets and passes the costs to `push_drive_operation_result`. - pub(crate) fn grove_apply_partial_batch_with_add_costs_v0( + pub(super) fn grove_apply_partial_batch_with_add_costs_v0( &self, ops: GroveDbOpBatch, validate: bool, diff --git a/packages/rs-drive/src/util/grove_operations/grove_batch_operations_costs/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_batch_operations_costs/v0/mod.rs index 146db3487e..fb1f867e8d 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_batch_operations_costs/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_batch_operations_costs/v0/mod.rs @@ -12,7 +12,7 @@ use std::collections::HashMap; impl Drive { /// Gets the costs for the given groveDB op batch and passes them to `push_drive_operation_result`. - pub(crate) fn grove_batch_operations_costs_v0( + pub(super) fn grove_batch_operations_costs_v0( &self, ops: GroveDbOpBatch, estimated_layer_info: HashMap, diff --git a/packages/rs-drive/src/util/grove_operations/grove_clear/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_clear/v0/mod.rs index ad3152f895..e1de93ec3a 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_clear/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_clear/v0/mod.rs @@ -7,7 +7,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Pushes the `OperationCost` of deleting an element in groveDB to `drive_operations`. - pub(crate) fn grove_clear_v0>( + pub(super) fn grove_clear_v0>( &self, path: SubtreePath<'_, B>, transaction: TransactionArg, diff --git a/packages/rs-drive/src/util/grove_operations/grove_delete/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_delete/v0/mod.rs index 13c8a0776e..d5e0c2ab1e 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_delete/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_delete/v0/mod.rs @@ -9,7 +9,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Pushes the `OperationCost` of deleting an element in groveDB to `drive_operations`. - pub(crate) fn grove_delete_v0>( + pub(super) fn grove_delete_v0>( &self, path: SubtreePath<'_, B>, key: &[u8], diff --git a/packages/rs-drive/src/util/grove_operations/grove_get/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get/v0/mod.rs index c5d473ea6d..3baac60f01 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get/v0/mod.rs @@ -13,7 +13,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Gets the element at the given path from groveDB. /// Pushes the `OperationCost` of getting the element to `drive_operations`. - pub(crate) fn grove_get_v0>( + pub(super) fn grove_get_v0>( &self, path: SubtreePath<'_, B>, key: &[u8], @@ -24,19 +24,19 @@ impl Drive { ) -> Result, Error> { match query_type { QueryType::StatelessQuery { - in_tree_using_sums, + in_tree_type: in_tree_using_sums, query_target, estimated_reference_sizes, } => { let key_info_path = KeyInfoPath::from_known_owned_path(path.to_vec()); let key_info = KeyInfo::KnownKey(key.to_vec()); let cost = match query_target { - QueryTarget::QueryTargetTree(flags_size, is_sum_tree) => { + QueryTarget::QueryTargetTree(flags_size, tree_type) => { GroveDb::average_case_for_get_tree( &key_info_path, &key_info, flags_size, - is_sum_tree, + tree_type, in_tree_using_sums, &drive_version.grove_version, ) diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_big_sum_tree_total_value/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_big_sum_tree_total_value/mod.rs new file mode 100644 index 0000000000..571cd7461b --- /dev/null +++ b/packages/rs-drive/src/util/grove_operations/grove_get_big_sum_tree_total_value/mod.rs @@ -0,0 +1,58 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use dpp::version::drive_versions::DriveVersion; +use grovedb::TransactionArg; +use grovedb_path::SubtreePath; + +impl Drive { + /// Retrieves the total value from a sum tree within groveDB at the specified path and key. + /// The cost of the operation is then appended to `drive_operations` for later processing. + /// + /// # Parameters + /// * `path`: The groveDB hierarchical authenticated structure path where the sum tree is located. + /// * `key`: The key where the sum tree resides within the subtree. + /// * `query_type`: The type of query to perform, either `StatelessDirectQuery` or `StatefulDirectQuery`. + /// * `transaction`: The groveDB transaction associated with this operation. + /// * `drive_operations`: A vector to collect the costs of operations for later computation. + /// * `platform_version`: The platform version to select the correct function version to run. + /// + /// # Returns + /// * `Ok(i64)` if the operation was successful, returning the total value of the sum tree. + /// * `Err(DriveError::UnknownVersionMismatch)` if the platform version does not match known versions. + /// * `Err(DriveError::CorruptedBalancePath)` if the balance path does not refer to a sum tree. + /// * `Err(DriveError::CorruptedCodeExecution)` if trying to query a non-tree element. + pub fn grove_get_big_sum_tree_total_value>( + &self, + path: SubtreePath<'_, B>, + key: &[u8], + query_type: DirectQueryType, + transaction: TransactionArg, + drive_operations: &mut Vec, + drive_version: &DriveVersion, + ) -> Result { + match drive_version + .grove_methods + .basic + .grove_get_big_sum_tree_total_value + { + 0 => self.grove_get_big_sum_tree_total_value_v0( + path, + key, + query_type, + transaction, + drive_operations, + drive_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "grove_get_big_sum_tree_total_value".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_big_sum_tree_total_value/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_big_sum_tree_total_value/v0/mod.rs new file mode 100644 index 0000000000..71ab45ea20 --- /dev/null +++ b/packages/rs-drive/src/util/grove_operations/grove_get_big_sum_tree_total_value/v0/mod.rs @@ -0,0 +1,67 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::fees::op::LowLevelDriveOperation::CalculatedCostOperation; +use crate::util::grove_operations::{DirectQueryType, QueryTarget}; +use grovedb::batch::key_info::KeyInfo; +use grovedb::batch::KeyInfoPath; +use grovedb::{Element, GroveDb, TransactionArg}; +use grovedb_costs::CostContext; +use grovedb_path::SubtreePath; +use platform_version::version::drive_versions::DriveVersion; + +impl Drive { + /// Gets the element at the given path from groveDB. + /// Pushes the `OperationCost` of getting the element to `drive_operations`. + pub(super) fn grove_get_big_sum_tree_total_value_v0>( + &self, + path: SubtreePath<'_, B>, + key: &[u8], + query_type: DirectQueryType, + transaction: TransactionArg, + drive_operations: &mut Vec, + drive_version: &DriveVersion, + ) -> Result { + match query_type { + DirectQueryType::StatelessDirectQuery { + in_tree_type, + query_target, + } => { + let key_info_path = KeyInfoPath::from_known_owned_path(path.to_vec()); + let key_info = KeyInfo::KnownKey(key.to_vec()); + let cost = match query_target { + QueryTarget::QueryTargetTree(flags_size, tree_type) => { + Ok(GroveDb::average_case_for_get_tree( + &key_info_path, + &key_info, + flags_size, + tree_type, + in_tree_type, + &drive_version.grove_version, + )?) + } + _ => Err(Error::Drive(DriveError::CorruptedCodeExecution( + "can not query a non tree", + ))), + }?; + + drive_operations.push(CalculatedCostOperation(cost)); + Ok(0) + } + DirectQueryType::StatefulDirectQuery => { + let CostContext { value, cost } = + self.grove + .get_raw(path, key, transaction, &drive_version.grove_version); + drive_operations.push(CalculatedCostOperation(cost)); + let element = value.map_err(Error::GroveDB)?; + match element { + Element::BigSumTree(_, value, _) => Ok(value), + _ => Err(Error::Drive(DriveError::CorruptedBalancePath( + "balance path does not refer to a big sum tree", + ))), + } + } + } + } +} diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_optional_sum_tree_total_value/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_optional_sum_tree_total_value/mod.rs new file mode 100644 index 0000000000..2be6d7a68e --- /dev/null +++ b/packages/rs-drive/src/util/grove_operations/grove_get_optional_sum_tree_total_value/mod.rs @@ -0,0 +1,58 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use dpp::version::drive_versions::DriveVersion; +use grovedb::TransactionArg; +use grovedb_path::SubtreePath; + +impl Drive { + /// Retrieves the total value from a sum tree within groveDB at the specified path and key. + /// The cost of the operation is then appended to `drive_operations` for later processing. + /// + /// # Parameters + /// * `path`: The groveDB hierarchical authenticated structure path where the sum tree is located. + /// * `key`: The key where the sum tree resides within the subtree. + /// * `query_type`: The type of query to perform, either `StatelessDirectQuery` or `StatefulDirectQuery`. + /// * `transaction`: The groveDB transaction associated with this operation. + /// * `drive_operations`: A vector to collect the costs of operations for later computation. + /// * `platform_version`: The platform version to select the correct function version to run. + /// + /// # Returns + /// * `Ok(Option)` if the operation was successful, returning the total value of the sum tree if it exists. + /// * `Err(DriveError::UnknownVersionMismatch)` if the platform version does not match known versions. + /// * `Err(DriveError::CorruptedBalancePath)` if the balance path does not refer to a sum tree. + /// * `Err(DriveError::CorruptedCodeExecution)` if trying to query a non-tree element. + pub fn grove_get_optional_sum_tree_total_value>( + &self, + path: SubtreePath<'_, B>, + key: &[u8], + query_type: DirectQueryType, + transaction: TransactionArg, + drive_operations: &mut Vec, + drive_version: &DriveVersion, + ) -> Result, Error> { + match drive_version + .grove_methods + .basic + .grove_get_optional_sum_tree_total_value + { + 0 => self.grove_get_optional_sum_tree_total_value_v0( + path, + key, + query_type, + transaction, + drive_operations, + drive_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "grove_get_optional_sum_tree_total_value".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_optional_sum_tree_total_value/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_optional_sum_tree_total_value/v0/mod.rs new file mode 100644 index 0000000000..59fb056344 --- /dev/null +++ b/packages/rs-drive/src/util/grove_operations/grove_get_optional_sum_tree_total_value/v0/mod.rs @@ -0,0 +1,72 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::fees::op::LowLevelDriveOperation::CalculatedCostOperation; +use crate::util::grove_operations::{DirectQueryType, QueryTarget}; +use grovedb::batch::key_info::KeyInfo; +use grovedb::batch::KeyInfoPath; +use grovedb::{Element, GroveDb, TransactionArg}; +use grovedb_costs::CostContext; +use grovedb_path::SubtreePath; +use platform_version::version::drive_versions::DriveVersion; + +impl Drive { + /// Gets the element at the given path from groveDB. + /// Pushes the `OperationCost` of getting the element to `drive_operations`. + pub(super) fn grove_get_optional_sum_tree_total_value_v0>( + &self, + path: SubtreePath<'_, B>, + key: &[u8], + query_type: DirectQueryType, + transaction: TransactionArg, + drive_operations: &mut Vec, + drive_version: &DriveVersion, + ) -> Result, Error> { + match query_type { + DirectQueryType::StatelessDirectQuery { + in_tree_type: in_tree_using_sums, + query_target, + } => { + let key_info_path = KeyInfoPath::from_known_owned_path(path.to_vec()); + let key_info = KeyInfo::KnownKey(key.to_vec()); + let cost = match query_target { + QueryTarget::QueryTargetTree(flags_size, tree_type) => { + Ok(GroveDb::average_case_for_get_tree( + &key_info_path, + &key_info, + flags_size, + tree_type, + in_tree_using_sums, + &drive_version.grove_version, + )?) + } + _ => Err(Error::Drive(DriveError::CorruptedCodeExecution( + "can not query a non tree", + ))), + }?; + + drive_operations.push(CalculatedCostOperation(cost)); + Ok(Some(0)) + } + DirectQueryType::StatefulDirectQuery => { + let CostContext { value, cost } = self.grove.get_raw_optional( + path, + key, + transaction, + &drive_version.grove_version, + ); + drive_operations.push(CalculatedCostOperation(cost)); + let Some(element) = value.map_err(Error::GroveDB)? else { + return Ok(None); + }; + match element { + Element::SumTree(_, value, _) => Ok(Some(value)), + _ => Err(Error::Drive(DriveError::CorruptedBalancePath( + "balance path does not refer to a sum tree", + ))), + } + } + } + } +} diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_path_query/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_path_query/v0/mod.rs index 9997184f5f..80a48f0509 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get_path_query/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get_path_query/v0/mod.rs @@ -10,7 +10,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Gets the return value and the cost of a groveDB path query. /// Pushes the cost to `drive_operations` and returns the return value. - pub(crate) fn grove_get_path_query_v0( + pub(super) fn grove_get_path_query_v0( &self, path_query: &PathQuery, transaction: TransactionArg, diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_path_query_serialized_or_sum_results/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_path_query_serialized_or_sum_results/v0/mod.rs index 18753f813b..56625e4b2f 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get_path_query_serialized_or_sum_results/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get_path_query_serialized_or_sum_results/v0/mod.rs @@ -10,7 +10,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Gets the return value and the cost of a groveDB path query. /// Pushes the cost to `drive_operations` and returns the return value. - pub(crate) fn grove_get_path_query_serialized_or_sum_results_v0( + pub(super) fn grove_get_path_query_serialized_or_sum_results_v0( &self, path_query: &PathQuery, transaction: TransactionArg, diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_path_query_serialized_results/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_path_query_serialized_results/v0/mod.rs index 584f36d4d6..cb58485487 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get_path_query_serialized_results/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get_path_query_serialized_results/v0/mod.rs @@ -9,7 +9,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Gets the return value and the cost of a groveDB path query. /// Pushes the cost to `drive_operations` and returns the return value. - pub(crate) fn grove_get_path_query_serialized_results_v0( + pub(super) fn grove_get_path_query_serialized_results_v0( &self, path_query: &PathQuery, transaction: TransactionArg, diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_path_query_with_optional/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_path_query_with_optional/v0/mod.rs index bd914b73b8..4ee57d66e8 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get_path_query_with_optional/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get_path_query_with_optional/v0/mod.rs @@ -10,7 +10,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Gets the return value and the cost of a groveDB path query. /// Pushes the cost to `drive_operations` and returns the return value. - pub(crate) fn grove_get_path_query_with_optional_v0( + pub(super) fn grove_get_path_query_with_optional_v0( &self, path_query: &PathQuery, transaction: TransactionArg, diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_proved_path_query/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_proved_path_query/v0/mod.rs index 3b9a9614a5..ecc4d49907 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get_proved_path_query/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get_proved_path_query/v0/mod.rs @@ -11,7 +11,7 @@ impl Drive { /// Pushes the cost to `drive_operations` and returns the return value. /// Verbose should be generally set to false unless one needs to prove /// subsets of a proof. - pub(crate) fn grove_get_proved_path_query_v0( + pub(super) fn grove_get_proved_path_query_v0( &self, path_query: &PathQuery, transaction: TransactionArg, diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_proved_path_query_with_conditional/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_proved_path_query_with_conditional/v0/mod.rs index 3d3d4aad5d..40a47aa901 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get_proved_path_query_with_conditional/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get_proved_path_query_with_conditional/v0/mod.rs @@ -12,7 +12,7 @@ impl Drive { /// Pushes the cost to `drive_operations` and returns the return value. /// Verbose should be generally set to false unless one needs to prove /// subsets of a proof. - pub(crate) fn grove_get_proved_path_query_with_conditional_v0>( + pub(super) fn grove_get_proved_path_query_with_conditional_v0>( &self, root_path: SubtreePath, key: &[u8], diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_raw/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_raw/v0/mod.rs index a564abc273..0d6778540c 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get_raw/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get_raw/v0/mod.rs @@ -13,7 +13,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// grove_get_raw basically means that there are no reference hops, this only matters /// when calculating worst case costs - pub(crate) fn grove_get_raw_v0>( + pub(super) fn grove_get_raw_v0>( &self, path: SubtreePath<'_, B>, key: &[u8], @@ -24,18 +24,18 @@ impl Drive { ) -> Result, Error> { match direct_query_type { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums, + in_tree_type: in_tree_using_sums, query_target, } => { let key_info_path = KeyInfoPath::from_known_owned_path(path.to_vec()); let key_info = KeyInfo::KnownKey(key.to_vec()); let cost = match query_target { - QueryTarget::QueryTargetTree(flags_size, is_sum_tree) => { + QueryTarget::QueryTargetTree(flags_size, tree_type) => { GroveDb::average_case_for_get_tree( &key_info_path, &key_info, flags_size, - is_sum_tree, + tree_type, in_tree_using_sums, &drive_version.grove_version, ) diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_raw_item/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_raw_item/mod.rs new file mode 100644 index 0000000000..cd9d7a4d92 --- /dev/null +++ b/packages/rs-drive/src/util/grove_operations/grove_get_raw_item/mod.rs @@ -0,0 +1,55 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; + +use dpp::version::drive_versions::DriveVersion; + +use grovedb::TransactionArg; +use grovedb_path::SubtreePath; + +impl Drive { + /// Handles the retrieval of a raw element from GroveDB at the specified path and key. + /// The operation cost is added to `drive_operations` for later processing. + /// + /// # Parameters + /// * `path`: The groveDB hierarchical authenticated structure path from where the element is to be retrieved. + /// * `key`: The key of the element to be retrieved from the subtree. + /// * `direct_query_type`: The type of query to perform, whether stateless or stateful. + /// * `transaction`: The groveDB transaction associated with this operation. + /// * `drive_operations`: A vector to collect the costs of operations for later computation. + /// * `platform_version`: The platform version to select the correct function version to run. + /// + /// # Returns + /// * `Ok(Some(Element))` if the operation was successful and the element was found. + /// * `Ok(None)` if the operation was successful but the element was not found. + /// * `Err(DriveError::UnknownVersionMismatch)` if the platform version does not match known versions. + pub fn grove_get_raw_item>( + &self, + path: SubtreePath<'_, B>, + key: &[u8], + direct_query_type: DirectQueryType, + transaction: TransactionArg, + drive_operations: &mut Vec, + drive_version: &DriveVersion, + ) -> Result, Error> { + match drive_version.grove_methods.basic.grove_get_raw_item { + 0 => self.grove_get_raw_item_v0( + path, + key, + direct_query_type, + transaction, + drive_operations, + drive_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "grove_get_raw_item".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_raw_item/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_raw_item/v0/mod.rs new file mode 100644 index 0000000000..4f7dc34a36 --- /dev/null +++ b/packages/rs-drive/src/util/grove_operations/grove_get_raw_item/v0/mod.rs @@ -0,0 +1,83 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::fees::op::LowLevelDriveOperation::CalculatedCostOperation; +use crate::util::grove_operations::{DirectQueryType, QueryTarget}; +use grovedb::batch::key_info::KeyInfo; +use grovedb::batch::KeyInfoPath; +use grovedb::{Element, GroveDb, TransactionArg}; +use grovedb_costs::CostContext; +use grovedb_path::SubtreePath; +use itertools::Itertools; +use platform_version::version::drive_versions::DriveVersion; + +impl Drive { + /// grove_get_raw_item basically means that there are no reference hops, this only matters + /// when calculating worst case costs + pub(super) fn grove_get_raw_item_v0>( + &self, + path: SubtreePath<'_, B>, + key: &[u8], + direct_query_type: DirectQueryType, + transaction: TransactionArg, + drive_operations: &mut Vec, + drive_version: &DriveVersion, + ) -> Result, Error> { + match direct_query_type { + DirectQueryType::StatelessDirectQuery { + in_tree_type: in_tree_using_sums, + query_target, + } => { + let key_info_path = KeyInfoPath::from_known_owned_path(path.to_vec()); + let key_info = KeyInfo::KnownKey(key.to_vec()); + let cost = match query_target { + QueryTarget::QueryTargetTree(flags_size, tree_type) => { + GroveDb::average_case_for_get_tree( + &key_info_path, + &key_info, + flags_size, + tree_type, + in_tree_using_sums, + &drive_version.grove_version, + ) + } + QueryTarget::QueryTargetValue(estimated_value_size) => { + GroveDb::average_case_for_get_raw( + &key_info_path, + &key_info, + estimated_value_size, + in_tree_using_sums, + &drive_version.grove_version, + ) + } + }?; + + drive_operations.push(CalculatedCostOperation(cost)); + Ok(vec![]) + } + DirectQueryType::StatefulDirectQuery => { + //todo remove path clone + let CostContext { value, cost } = self.grove.get_raw( + path.clone(), + key, + transaction, + &drive_version.grove_version, + ); + drive_operations.push(CalculatedCostOperation(cost)); + let element = value.map_err(Error::GroveDB)?; + match element { + Element::Item(value, _) => Ok(value), + _ => Err(Error::Drive(DriveError::CorruptedDriveState(format!( + "path {}/0x{} does not refer to an item", + path.to_vec() + .iter() + .map(|bytes| format!("0x{}", hex::encode(bytes))) + .join("/"), + hex::encode(key) + )))), + } + } + } + } +} diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_raw_optional/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_raw_optional/v0/mod.rs index 9c8f567fa9..90e2b2b004 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get_raw_optional/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get_raw_optional/v0/mod.rs @@ -24,18 +24,18 @@ impl Drive { ) -> Result, Error> { match direct_query_type { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums, + in_tree_type: in_tree_using_sums, query_target, } => { let key_info_path = KeyInfoPath::from_known_owned_path(path.to_vec()); let key_info = KeyInfo::KnownKey(key.to_vec()); let cost = match query_target { - QueryTarget::QueryTargetTree(flags_size, is_sum_tree) => { + QueryTarget::QueryTargetTree(flags_size, tree_type) => { GroveDb::average_case_for_get_tree( &key_info_path, &key_info, flags_size, - is_sum_tree, + tree_type, in_tree_using_sums, &drive_version.grove_version, ) diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_raw_optional_item/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_raw_optional_item/mod.rs new file mode 100644 index 0000000000..667e956ce9 --- /dev/null +++ b/packages/rs-drive/src/util/grove_operations/grove_get_raw_optional_item/mod.rs @@ -0,0 +1,59 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; + +use dpp::version::drive_versions::DriveVersion; + +use grovedb::TransactionArg; +use grovedb_path::SubtreePath; + +impl Drive { + /// Handles the retrieval of a raw element from GroveDB at the specified path and key. + /// The operation cost is added to `drive_operations` for later processing. + /// + /// # Parameters + /// * `path`: The groveDB hierarchical authenticated structure path from where the element is to be retrieved. + /// * `key`: The key of the element to be retrieved from the subtree. + /// * `direct_query_type`: The type of query to perform, whether stateless or stateful. + /// * `transaction`: The groveDB transaction associated with this operation. + /// * `drive_operations`: A vector to collect the costs of operations for later computation. + /// * `platform_version`: The platform version to select the correct function version to run. + /// + /// # Returns + /// * `Ok(Some(Element))` if the operation was successful and the element was found. + /// * `Ok(None)` if the operation was successful but the element was not found. + /// * `Err(DriveError::UnknownVersionMismatch)` if the platform version does not match known versions. + pub fn grove_get_raw_optional_item>( + &self, + path: SubtreePath<'_, B>, + key: &[u8], + direct_query_type: DirectQueryType, + transaction: TransactionArg, + drive_operations: &mut Vec, + drive_version: &DriveVersion, + ) -> Result>, Error> { + match drive_version + .grove_methods + .basic + .grove_get_raw_optional_item + { + 0 => self.grove_get_raw_optional_item_v0( + path, + key, + direct_query_type, + transaction, + drive_operations, + drive_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "grove_get_raw_optional_item".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_raw_optional_item/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_raw_optional_item/v0/mod.rs new file mode 100644 index 0000000000..3ca57601fd --- /dev/null +++ b/packages/rs-drive/src/util/grove_operations/grove_get_raw_optional_item/v0/mod.rs @@ -0,0 +1,84 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::fees::op::LowLevelDriveOperation::CalculatedCostOperation; +use crate::util::grove_operations::{DirectQueryType, QueryTarget}; +use grovedb::batch::key_info::KeyInfo; +use grovedb::batch::KeyInfoPath; +use grovedb::{Element, GroveDb, TransactionArg}; +use grovedb_costs::CostContext; +use grovedb_path::SubtreePath; +use itertools::Itertools; +use platform_version::version::drive_versions::DriveVersion; + +impl Drive { + /// grove_get_raw_item basically means that there are no reference hops, this only matters + /// when calculating worst case costs + pub(super) fn grove_get_raw_optional_item_v0>( + &self, + path: SubtreePath<'_, B>, + key: &[u8], + direct_query_type: DirectQueryType, + transaction: TransactionArg, + drive_operations: &mut Vec, + drive_version: &DriveVersion, + ) -> Result>, Error> { + match direct_query_type { + DirectQueryType::StatelessDirectQuery { + in_tree_type: in_tree_using_sums, + query_target, + } => { + let key_info_path = KeyInfoPath::from_known_owned_path(path.to_vec()); + let key_info = KeyInfo::KnownKey(key.to_vec()); + let cost = match query_target { + QueryTarget::QueryTargetTree(flags_size, tree_type) => { + GroveDb::average_case_for_get_tree( + &key_info_path, + &key_info, + flags_size, + tree_type, + in_tree_using_sums, + &drive_version.grove_version, + ) + } + QueryTarget::QueryTargetValue(estimated_value_size) => { + GroveDb::average_case_for_get_raw( + &key_info_path, + &key_info, + estimated_value_size, + in_tree_using_sums, + &drive_version.grove_version, + ) + } + }?; + + drive_operations.push(CalculatedCostOperation(cost)); + Ok(None) + } + DirectQueryType::StatefulDirectQuery => { + //todo remove path clone + let CostContext { value, cost } = self.grove.get_raw_optional( + path.clone(), + key, + transaction, + &drive_version.grove_version, + ); + drive_operations.push(CalculatedCostOperation(cost)); + let element = value.map_err(Error::GroveDB)?; + match element { + Some(Element::Item(value, _)) => Ok(Some(value)), + None => Ok(None), + _ => Err(Error::Drive(DriveError::CorruptedDriveState(format!( + "path {}/0x{} does not refer to an item", + path.to_vec() + .iter() + .map(|bytes| format!("0x{}", hex::encode(bytes))) + .join("/"), + hex::encode(key) + )))), + } + } + } + } +} diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_raw_path_query/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_raw_path_query/v0/mod.rs index eebeb4b524..2deec8ba8b 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get_raw_path_query/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get_raw_path_query/v0/mod.rs @@ -10,7 +10,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Gets the return value and the cost of a groveDB raw path query. /// Pushes the cost to `drive_operations` and returns the return value. - pub(crate) fn grove_get_raw_path_query_v0( + pub(super) fn grove_get_raw_path_query_v0( &self, path_query: &PathQuery, transaction: TransactionArg, diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_raw_path_query_with_optional/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_raw_path_query_with_optional/v0/mod.rs index add7c65d91..1e852fcb77 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get_raw_path_query_with_optional/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get_raw_path_query_with_optional/v0/mod.rs @@ -10,7 +10,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Gets the return value and the cost of a groveDB path query. /// Pushes the cost to `drive_operations` and returns the return value. - pub(crate) fn grove_get_raw_path_query_with_optional_v0( + pub(super) fn grove_get_raw_path_query_with_optional_v0( &self, path_query: &PathQuery, error_if_intermediate_path_tree_not_present: bool, diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_raw_value_u64_from_encoded_var_vec/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_raw_value_u64_from_encoded_var_vec/v0/mod.rs index 368a7d2933..07418407bb 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get_raw_value_u64_from_encoded_var_vec/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get_raw_value_u64_from_encoded_var_vec/v0/mod.rs @@ -10,7 +10,7 @@ use integer_encoding::VarInt; impl Drive { /// grove_get_direct_u64 is a helper function to get a - pub(crate) fn grove_get_raw_value_u64_from_encoded_var_vec_v0>( + pub(super) fn grove_get_raw_value_u64_from_encoded_var_vec_v0>( &self, path: SubtreePath<'_, B>, key: &[u8], diff --git a/packages/rs-drive/src/util/grove_operations/grove_get_sum_tree_total_value/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_get_sum_tree_total_value/v0/mod.rs index 65bd03f3e3..f163c9ac51 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_get_sum_tree_total_value/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_get_sum_tree_total_value/v0/mod.rs @@ -25,18 +25,18 @@ impl Drive { ) -> Result { match query_type { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums, + in_tree_type: in_tree_using_sums, query_target, } => { let key_info_path = KeyInfoPath::from_known_owned_path(path.to_vec()); let key_info = KeyInfo::KnownKey(key.to_vec()); let cost = match query_target { - QueryTarget::QueryTargetTree(flags_size, is_sum_tree) => { + QueryTarget::QueryTargetTree(flags_size, tree_type) => { Ok(GroveDb::average_case_for_get_tree( &key_info_path, &key_info, flags_size, - is_sum_tree, + tree_type, in_tree_using_sums, &drive_version.grove_version, )?) diff --git a/packages/rs-drive/src/util/grove_operations/grove_has_raw/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_has_raw/v0/mod.rs index 52b3eaaa96..f6b57a7c6f 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_has_raw/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_has_raw/v0/mod.rs @@ -14,7 +14,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Gets the return value and the cost of a groveDB `has_raw` operation. /// Pushes the cost to `drive_operations` and returns the return value. - pub(crate) fn grove_has_raw_v0>( + pub(super) fn grove_has_raw_v0>( &self, path: SubtreePath<'_, B>, key: &[u8], @@ -25,18 +25,18 @@ impl Drive { ) -> Result { let CostContext { value, cost } = match query_type { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums, + in_tree_type: in_tree_using_sums, query_target, } => { let key_info_path = KeyInfoPath::from_known_owned_path(path.to_vec()); let key_info = KeyInfo::KnownKey(key.to_vec()); let cost = match query_target { - QueryTarget::QueryTargetTree(flags_len, is_sum_tree) => { + QueryTarget::QueryTargetTree(flags_len, tree_type) => { GroveDb::average_case_for_has_raw_tree( &key_info_path, &key_info, flags_len, - is_sum_tree, + tree_type, in_tree_using_sums, &drive_version.grove_version, )? diff --git a/packages/rs-drive/src/util/grove_operations/grove_insert/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_insert/v0/mod.rs index f9c81c65c7..f949ecc605 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_insert/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_insert/v0/mod.rs @@ -9,7 +9,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Pushes the `OperationCost` of inserting an element in groveDB to `drive_operations`. - pub(crate) fn grove_insert_v0>( + pub(super) fn grove_insert_v0>( &self, path: SubtreePath<'_, B>, key: &[u8], diff --git a/packages/rs-drive/src/util/grove_operations/grove_insert_empty_sum_tree/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_insert_empty_sum_tree/v0/mod.rs index a025023bf3..2ea0ae20d8 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_insert_empty_sum_tree/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_insert_empty_sum_tree/v0/mod.rs @@ -9,7 +9,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Pushes the `OperationCost` of inserting an empty sum tree in groveDB to `drive_operations`. - pub fn grove_insert_empty_sum_tree_v0>( + pub(super) fn grove_insert_empty_sum_tree_v0>( &self, path: SubtreePath<'_, B>, key: &[u8], diff --git a/packages/rs-drive/src/util/grove_operations/grove_insert_empty_tree/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_insert_empty_tree/v0/mod.rs index 6628036899..4a0a2d3488 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_insert_empty_tree/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_insert_empty_tree/v0/mod.rs @@ -9,7 +9,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Pushes the `OperationCost` of inserting an empty tree in groveDB to `drive_operations`. - pub(crate) fn grove_insert_empty_tree_v0>( + pub(super) fn grove_insert_empty_tree_v0>( &self, path: SubtreePath<'_, B>, key: &[u8], diff --git a/packages/rs-drive/src/util/grove_operations/grove_insert_if_not_exists/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_insert_if_not_exists/v0/mod.rs index b03297457c..4d27e25459 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_insert_if_not_exists/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_insert_if_not_exists/v0/mod.rs @@ -9,7 +9,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Pushes the `OperationCost` of inserting an element in groveDB where the path key does not yet exist /// to `drive_operations`. - pub(crate) fn grove_insert_if_not_exists_v0>( + pub(super) fn grove_insert_if_not_exists_v0>( &self, path: SubtreePath<'_, B>, key: &[u8], diff --git a/packages/rs-drive/src/util/grove_operations/grove_insert_if_not_exists_return_existing_element/v0/mod.rs b/packages/rs-drive/src/util/grove_operations/grove_insert_if_not_exists_return_existing_element/v0/mod.rs index 69b55ba2d7..86bb679a39 100644 --- a/packages/rs-drive/src/util/grove_operations/grove_insert_if_not_exists_return_existing_element/v0/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/grove_insert_if_not_exists_return_existing_element/v0/mod.rs @@ -9,7 +9,7 @@ use platform_version::version::drive_versions::DriveVersion; impl Drive { /// Pushes the `OperationCost` of inserting an element in groveDB where the path key does not yet exist /// to `drive_operations`. - pub(crate) fn grove_insert_if_not_exists_return_existing_element_v0>( + pub(super) fn grove_insert_if_not_exists_return_existing_element_v0>( &self, path: SubtreePath<'_, B>, key: &[u8], diff --git a/packages/rs-drive/src/util/grove_operations/mod.rs b/packages/rs-drive/src/util/grove_operations/mod.rs index 8178d007b2..098d8259cd 100644 --- a/packages/rs-drive/src/util/grove_operations/mod.rs +++ b/packages/rs-drive/src/util/grove_operations/mod.rs @@ -21,6 +21,9 @@ pub mod grove_delete; /// Fetch raw grove data pub mod grove_get_raw; +/// Fetch raw grove data and match that is item +pub mod grove_get_raw_item; + /// Fetch raw grove data if it exists pub mod grove_get_raw_optional; @@ -57,6 +60,9 @@ pub mod grove_has_raw; /// Batch insert operation into empty tree pub mod batch_insert_empty_tree; +/// Batch insert operation into empty sum tree +pub mod batch_insert_empty_sum_tree; + /// Batch insert operation into empty tree, but only if it doesn't already exist pub mod batch_insert_empty_tree_if_not_exists; @@ -126,12 +132,21 @@ pub mod grove_get_proved_path_query_with_conditional; /// Inserts an element if it does not exist and returns the existing element if it does in GroveDB. pub mod grove_insert_if_not_exists_return_existing_element; +/// Batch inserts sum item if not already existing +pub mod batch_insert_sum_item_if_not_exists; /// Moved items that are found in a path query to a new path. pub mod batch_move_items_in_path_query; +/// Get the total value from a big sum tree +pub mod grove_get_big_sum_tree_total_value; +/// Get total value from sum tree in grove if it exists +pub mod grove_get_optional_sum_tree_total_value; +/// Fetch raw grove data if it exists, None otherwise +pub mod grove_get_raw_optional_item; + use grovedb_costs::CostContext; -use grovedb::EstimatedLayerInformation; +use grovedb::{EstimatedLayerInformation, MaybeTree, TreeType}; use crate::error::Error; use crate::fees::op::LowLevelDriveOperation; @@ -179,7 +194,7 @@ pub enum BatchDeleteApplyType { /// Stateless batch delete StatelessBatchDelete { /// Are we deleting in a sum tree - is_sum_tree: bool, + in_tree_type: TreeType, /// What is the estimated key size estimated_key_size: u32, /// What is the estimated value size @@ -188,7 +203,7 @@ pub enum BatchDeleteApplyType { /// Stateful batch delete StatefulBatchDelete { /// Are we known to be in a subtree and does this subtree have sums - is_known_to_be_subtree_with_sum: Option<(IsSubTree, IsSumSubTree)>, + is_known_to_be_subtree_with_sum: Option, }, } @@ -198,9 +213,9 @@ pub enum BatchMoveApplyType { /// Stateless batch move StatelessBatchMove { /// Are we moving from inside a sum tree - in_tree_using_sums: bool, + in_tree_type: TreeType, /// Are we moving a sum tree - is_sum_tree: bool, + tree_type: TreeType, /// What is the estimated key size estimated_key_size: u32, /// What is the estimated value size @@ -211,7 +226,7 @@ pub enum BatchMoveApplyType { /// Stateful batch move StatefulBatchMove { /// Are we known to be in a subtree and does this subtree have sums - is_known_to_be_subtree_with_sum: Option<(IsSubTree, IsSumSubTree)>, + is_known_to_be_subtree_with_sum: Option, }, } @@ -226,7 +241,7 @@ pub enum BatchDeleteUpTreeApplyType { /// Stateful batch delete StatefulBatchDelete { /// Are we known to be in a subtree and does this subtree have sums - is_known_to_be_subtree_with_sum: Option<(IsSubTree, IsSumSubTree)>, + is_known_to_be_subtree_with_sum: Option, }, } @@ -237,9 +252,9 @@ pub enum BatchInsertTreeApplyType { /// Stateless batch insert tree StatelessBatchInsertTree { /// Does this tree use sums? - in_tree_using_sums: bool, + in_tree_type: TreeType, /// Are we inserting in a sum tree - is_sum_tree: bool, + tree_type: TreeType, /// The flags length flags_len: FlagsLen, }, @@ -259,12 +274,12 @@ impl BatchInsertTreeApplyType { pub(crate) fn to_direct_query_type(self) -> DirectQueryType { match self { BatchInsertTreeApplyType::StatelessBatchInsertTree { - in_tree_using_sums, - is_sum_tree, + in_tree_type, + tree_type, flags_len, } => DirectQueryType::StatelessDirectQuery { - in_tree_using_sums, - query_target: QueryTarget::QueryTargetTree(flags_len, is_sum_tree), + in_tree_type, + query_target: QueryTarget::QueryTargetTree(flags_len, tree_type), }, BatchInsertTreeApplyType::StatefulBatchInsertTree => { DirectQueryType::StatefulDirectQuery @@ -274,11 +289,12 @@ impl BatchInsertTreeApplyType { } /// Batch insert apply type +#[derive(Clone, Copy)] pub enum BatchInsertApplyType { /// Stateless batch insert StatelessBatchInsert { /// Does this tree use sums? - in_tree_using_sums: bool, + in_tree_type: TreeType, /// the type of Target (Tree or Value) target: QueryTarget, }, @@ -297,10 +313,10 @@ impl BatchInsertApplyType { pub(crate) fn to_direct_query_type(&self) -> DirectQueryType { match self { BatchInsertApplyType::StatelessBatchInsert { - in_tree_using_sums, + in_tree_type: in_tree_using_sums, target, } => DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: *in_tree_using_sums, + in_tree_type: *in_tree_using_sums, query_target: *target, }, BatchInsertApplyType::StatefulBatchInsert => DirectQueryType::StatefulDirectQuery, @@ -316,7 +332,7 @@ pub type FlagsLen = u32; /// Query target pub enum QueryTarget { /// tree - QueryTargetTree(FlagsLen, IsSumTree), + QueryTargetTree(FlagsLen, TreeType), /// value QueryTargetValue(u32), } @@ -325,9 +341,8 @@ impl QueryTarget { /// Length pub(crate) fn len(&self) -> u32 { match self { - QueryTarget::QueryTargetTree(flags_len, is_sum_tree) => { - let len = if *is_sum_tree { 11 } else { 3 }; - *flags_len + len + QueryTarget::QueryTargetTree(flags_len, tree_type) => { + *flags_len + tree_type.inner_node_type().cost() + 3 } QueryTarget::QueryTargetValue(len) => *len, } @@ -341,7 +356,7 @@ pub enum DirectQueryType { /// Stateless direct query StatelessDirectQuery { /// Does this tree use sums? - in_tree_using_sums: bool, + in_tree_type: TreeType, /// the type of Target (Tree or Value) query_target: QueryTarget, }, @@ -353,10 +368,10 @@ impl From for QueryType { fn from(value: DirectQueryType) -> Self { match value { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums, + in_tree_type, query_target, } => QueryType::StatelessQuery { - in_tree_using_sums, + in_tree_type, query_target, estimated_reference_sizes: vec![], }, @@ -397,10 +412,10 @@ impl DirectQueryType { pub(crate) fn add_reference_sizes(self, reference_sizes: Vec) -> QueryType { match self { DirectQueryType::StatelessDirectQuery { - in_tree_using_sums, + in_tree_type: in_tree_using_sums, query_target, } => QueryType::StatelessQuery { - in_tree_using_sums, + in_tree_type: in_tree_using_sums, query_target, estimated_reference_sizes: reference_sizes, }, @@ -415,7 +430,7 @@ pub enum QueryType { /// Stateless query StatelessQuery { /// Does this tree use sums? - in_tree_using_sums: bool, + in_tree_type: TreeType, /// the type of Target (Tree or Value) query_target: QueryTarget, /// The estimated sizes of references @@ -429,11 +444,11 @@ impl From for QueryType { fn from(value: BatchDeleteApplyType) -> Self { match value { BatchDeleteApplyType::StatelessBatchDelete { - is_sum_tree, + in_tree_type: is_sum_tree, estimated_value_size, .. } => QueryType::StatelessQuery { - in_tree_using_sums: is_sum_tree, + in_tree_type: is_sum_tree, query_target: QueryTarget::QueryTargetValue(estimated_value_size), estimated_reference_sizes: vec![], }, @@ -446,11 +461,11 @@ impl From<&BatchDeleteApplyType> for QueryType { fn from(value: &BatchDeleteApplyType) -> Self { match value { BatchDeleteApplyType::StatelessBatchDelete { - is_sum_tree, + in_tree_type: is_sum_tree, estimated_value_size, .. } => QueryType::StatelessQuery { - in_tree_using_sums: *is_sum_tree, + in_tree_type: *is_sum_tree, query_target: QueryTarget::QueryTargetValue(*estimated_value_size), estimated_reference_sizes: vec![], }, @@ -463,11 +478,11 @@ impl From for DirectQueryType { fn from(value: BatchDeleteApplyType) -> Self { match value { BatchDeleteApplyType::StatelessBatchDelete { - is_sum_tree, + in_tree_type: is_sum_tree, estimated_value_size, .. } => DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: is_sum_tree, + in_tree_type: is_sum_tree, query_target: QueryTarget::QueryTargetValue(estimated_value_size), }, BatchDeleteApplyType::StatefulBatchDelete { .. } => { @@ -481,11 +496,11 @@ impl From<&BatchDeleteApplyType> for DirectQueryType { fn from(value: &BatchDeleteApplyType) -> Self { match value { BatchDeleteApplyType::StatelessBatchDelete { - is_sum_tree, + in_tree_type: is_sum_tree, estimated_value_size, .. } => DirectQueryType::StatelessDirectQuery { - in_tree_using_sums: *is_sum_tree, + in_tree_type: *is_sum_tree, query_target: QueryTarget::QueryTargetValue(*estimated_value_size), }, BatchDeleteApplyType::StatefulBatchDelete { .. } => { diff --git a/packages/rs-drive/src/util/object_size_info/contract_info.rs b/packages/rs-drive/src/util/object_size_info/contract_info.rs index d5bde596fa..7e8713f62d 100644 --- a/packages/rs-drive/src/util/object_size_info/contract_info.rs +++ b/packages/rs-drive/src/util/object_size_info/contract_info.rs @@ -1,10 +1,14 @@ #[cfg(feature = "server")] use crate::drive::contract::DataContractFetchInfo; +#[cfg(feature = "server")] use crate::drive::Drive; +#[cfg(feature = "server")] use crate::error::document::DocumentError; +#[cfg(feature = "server")] use crate::error::Error; #[cfg(feature = "server")] use crate::fees::op::LowLevelDriveOperation; +#[cfg(feature = "server")] use dpp::block::block_info::BlockInfo; use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::document_type::DocumentTypeRef; @@ -13,6 +17,7 @@ use dpp::identifier::Identifier; use dpp::ProtocolError; #[cfg(feature = "server")] use grovedb::TransactionArg; +#[cfg(feature = "server")] use platform_version::version::PlatformVersion; use std::sync::Arc; diff --git a/packages/rs-drive/src/util/operations/apply_batch_grovedb_operations/v0/mod.rs b/packages/rs-drive/src/util/operations/apply_batch_grovedb_operations/v0/mod.rs index af240c9490..22622d5adf 100644 --- a/packages/rs-drive/src/util/operations/apply_batch_grovedb_operations/v0/mod.rs +++ b/packages/rs-drive/src/util/operations/apply_batch_grovedb_operations/v0/mod.rs @@ -9,7 +9,7 @@ use std::collections::HashMap; impl Drive { /// Applies a batch of groveDB operations if apply is True, otherwise gets the cost of the operations. - pub(crate) fn apply_batch_grovedb_operations_v0( + pub(super) fn apply_batch_grovedb_operations_v0( &self, estimated_costs_only_with_layer_info: Option< HashMap, diff --git a/packages/rs-drive/src/util/test_helpers/mod.rs b/packages/rs-drive/src/util/test_helpers/mod.rs index 81447b4691..8600f2eddb 100644 --- a/packages/rs-drive/src/util/test_helpers/mod.rs +++ b/packages/rs-drive/src/util/test_helpers/mod.rs @@ -40,18 +40,25 @@ pub fn setup_contract( drive: &Drive, path: &str, contract_id: Option<[u8; 32]>, + owner_id: Option<[u8; 32]>, + contract_modification: Option, transaction: TransactionArg, + use_platform_version: Option<&PlatformVersion>, ) -> DataContract { - let platform_version = PlatformVersion::latest(); - let contract = json_document_to_contract_with_ids( + let platform_version = use_platform_version.unwrap_or(PlatformVersion::latest()); + let mut contract = json_document_to_contract_with_ids( path, contract_id.map(Identifier::from), - None, + owner_id.map(Identifier::from), false, //no need to validate the data contracts in tests for drive platform_version, ) .expect("expected to get json based contract"); + if let Some(contract_modification) = contract_modification { + contract_modification(&mut contract); + } + drive .apply_contract( &contract, diff --git a/packages/rs-drive/src/util/test_helpers/setup.rs b/packages/rs-drive/src/util/test_helpers/setup.rs index d80f600def..bbb935219c 100644 --- a/packages/rs-drive/src/util/test_helpers/setup.rs +++ b/packages/rs-drive/src/util/test_helpers/setup.rs @@ -36,10 +36,14 @@ impl Default for SetupFeePoolsOptions { #[cfg(feature = "full")] /// Sets up Drive using a temporary directory and the optionally given Drive configuration settings. -pub fn setup_drive(drive_config: Option) -> Drive { +pub fn setup_drive( + drive_config: Option, + specific_platform_version: Option<&PlatformVersion>, +) -> Drive { let tmp_dir = TempDir::new().unwrap(); - let (drive, _) = Drive::open(tmp_dir, drive_config).expect("should open Drive successfully"); + let (drive, _) = Drive::open(tmp_dir, drive_config, specific_platform_version) + .expect("should open Drive successfully"); drive } @@ -49,10 +53,13 @@ pub fn setup_drive(drive_config: Option) -> Drive { pub fn setup_drive_with_initial_state_structure( specific_platform_version: Option<&PlatformVersion>, ) -> Drive { - let drive = setup_drive(Some(DriveConfig { - batching_consistency_verification: true, - ..Default::default() - })); + let drive = setup_drive( + Some(DriveConfig { + batching_consistency_verification: true, + ..Default::default() + }), + specific_platform_version, + ); let platform_version = specific_platform_version.unwrap_or(PlatformVersion::latest()); drive diff --git a/packages/rs-drive/src/util/type_constants.rs b/packages/rs-drive/src/util/type_constants.rs index 517a08a275..8979cca62a 100644 --- a/packages/rs-drive/src/util/type_constants.rs +++ b/packages/rs-drive/src/util/type_constants.rs @@ -11,6 +11,8 @@ pub const DEFAULT_HASH_SIZE_U32: u32 = 32; /// Default float size pub const DEFAULT_FLOAT_SIZE: u32 = 8; /// u64 size +pub const U64_SIZE_U32: u32 = 8; +/// u64 size pub const U64_SIZE_U16: u16 = 8; /// u64 size pub const U64_SIZE_U8: u8 = 8; diff --git a/packages/rs-drive/src/verify/mod.rs b/packages/rs-drive/src/verify/mod.rs index b4c627718e..18474b4bbb 100644 --- a/packages/rs-drive/src/verify/mod.rs +++ b/packages/rs-drive/src/verify/mod.rs @@ -12,6 +12,7 @@ pub mod system; /// Verifies that a state transition contents exist in the proof pub mod state_transition; +mod tokens; pub mod voting; /// Represents the root hash of the grovedb tree 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 d424fbe328..8225f4f666 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 @@ -11,23 +11,22 @@ use dpp::identity::PartialIdentity; use dpp::platform_value::btreemap_extensions::BTreeValueMapHelper; use dpp::state_transition::data_contract_create_transition::accessors::DataContractCreateTransitionAccessorsV0; use dpp::state_transition::data_contract_update_transition::accessors::DataContractUpdateTransitionAccessorsV0; -use dpp::state_transition::documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; -use dpp::state_transition::documents_batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_transition::{DocumentTransition, DocumentTransitionV0Methods}; +use dpp::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use dpp::state_transition::batch_transition::document_base_transition::v0::v0_methods::DocumentBaseTransitionV0Methods; +use dpp::state_transition::batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; +use dpp::state_transition::batch_transition::batched_transition::BatchedTransitionRef; use dpp::state_transition::identity_create_transition::accessors::IdentityCreateTransitionAccessorsV0; use dpp::state_transition::identity_credit_transfer_transition::accessors::IdentityCreditTransferTransitionAccessorsV0; use dpp::state_transition::identity_credit_withdrawal_transition::accessors::IdentityCreditWithdrawalTransitionAccessorsV0; use dpp::state_transition::identity_topup_transition::accessors::IdentityTopUpTransitionAccessorsV0; use dpp::state_transition::identity_update_transition::accessors::IdentityUpdateTransitionAccessorsV0; use dpp::state_transition::{StateTransition, StateTransitionLike}; -use dpp::state_transition::documents_batch_transition::document_create_transition::DocumentFromCreateTransition; -use dpp::state_transition::documents_batch_transition::document_delete_transition::v0::v0_methods::DocumentDeleteTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_replace_transition::DocumentFromReplaceTransition; -use dpp::state_transition::documents_batch_transition::document_replace_transition::v0::v0_methods::DocumentReplaceTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_transition::document_purchase_transition::v0::v0_methods::DocumentPurchaseTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_transition::document_transfer_transition::v0::v0_methods::DocumentTransferTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods; +use dpp::state_transition::batch_transition::document_base_transition::document_base_transition_trait::DocumentBaseTransitionAccessors; +use dpp::state_transition::batch_transition::document_create_transition::DocumentFromCreateTransition; +use dpp::state_transition::batch_transition::document_replace_transition::DocumentFromReplaceTransition; +use dpp::state_transition::batch_transition::batched_transition::document_transfer_transition::v0::v0_methods::DocumentTransferTransitionV0Methods; +use dpp::state_transition::batch_transition::batched_transition::document_transition::{DocumentTransition, DocumentTransitionV0Methods}; +use dpp::state_transition::batch_transition::batched_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods; use dpp::state_transition::masternode_vote_transition::accessors::MasternodeVoteTransitionAccessorsV0; use dpp::state_transition::proof_result::StateTransitionProofResult; use dpp::state_transition::proof_result::StateTransitionProofResult::{VerifiedBalanceTransfer, VerifiedDataContract, VerifiedDocuments, VerifiedIdentity, VerifiedMasternodeVote, VerifiedPartialIdentity}; @@ -91,11 +90,11 @@ impl Drive { } Ok((root_hash, VerifiedDataContract(contract))) } - StateTransition::DocumentsBatch(documents_batch_transition) => { - if documents_batch_transition.transitions().len() > 1 { + StateTransition::Batch(documents_batch_transition) => { + if documents_batch_transition.transitions_len() > 1 { return Err(Error::Proof(ProofError::InvalidTransition(format!("version {} does not support more than one document in a document batch transition", platform_version.protocol_version)))); } - let Some(transition) = documents_batch_transition.transitions().first() else { + let Some(transition) = documents_batch_transition.first_transition() else { return Err(Error::Proof(ProofError::InvalidTransition( "no transition in a document batch transition".to_string(), ))); @@ -103,168 +102,193 @@ impl Drive { let owner_id = documents_batch_transition.owner_id(); - let data_contract_id = transition.data_contract_id(); + match transition { + BatchedTransitionRef::Document(document_transition) => { + let data_contract_id = document_transition.data_contract_id(); - let contract = known_contracts_provider_fn(&data_contract_id)?.ok_or( - Error::Proof(ProofError::UnknownContract(format!( - "unknown contract with id {}", - data_contract_id - ))), - )?; + let contract = known_contracts_provider_fn(&data_contract_id)?.ok_or( + Error::Proof(ProofError::UnknownContract(format!( + "unknown contract with id {}", + data_contract_id + ))), + )?; - let document_type = contract - .document_type_for_name(transition.document_type_name()) - .map_err(|e| { - Error::Proof(ProofError::UnknownContract(format!( - "cannot fetch contract for document {} with id {}: {}", - transition.document_type_name(), - transition.data_contract_id(), - e - ))) - })?; + let document_type = contract + .document_type_for_name(document_transition.document_type_name()) + .map_err(|e| { + Error::Proof(ProofError::UnknownContract(format!( + "cannot fetch contract for document {} with id {}: {}", + document_transition.document_type_name(), + document_transition.data_contract_id(), + e + ))) + })?; - let contested_status = - if let DocumentTransition::Create(create_transition) = transition { - if create_transition.prefunded_voting_balance().is_some() { - SingleDocumentDriveQueryContestedStatus::Contested - } else { - SingleDocumentDriveQueryContestedStatus::NotContested - } - } else { - SingleDocumentDriveQueryContestedStatus::NotContested - }; + let contested_status = + if let DocumentTransition::Create(create_transition) = + document_transition + { + if create_transition.prefunded_voting_balance().is_some() { + SingleDocumentDriveQueryContestedStatus::Contested + } else { + SingleDocumentDriveQueryContestedStatus::NotContested + } + } else { + SingleDocumentDriveQueryContestedStatus::NotContested + }; - match transition { - DocumentTransition::Create(_) => {} - DocumentTransition::Replace(_) => {} - DocumentTransition::Delete(_) => {} - DocumentTransition::Transfer(_) => {} - DocumentTransition::UpdatePrice(_) => {} - DocumentTransition::Purchase(_) => {} - } + let query = SingleDocumentDriveQuery { + contract_id: document_transition.data_contract_id().into_buffer(), + document_type_name: document_transition.document_type_name().clone(), + document_type_keeps_history: document_type.documents_keep_history(), + document_id: document_transition.base().id().into_buffer(), + block_time_ms: None, //None because we want latest + contested_status, + }; + let (root_hash, document) = + query.verify_proof(false, proof, document_type, platform_version)?; - let query = SingleDocumentDriveQuery { - contract_id: transition.data_contract_id().into_buffer(), - document_type_name: transition.document_type_name().clone(), - document_type_keeps_history: document_type.documents_keep_history(), - document_id: transition.base().id().into_buffer(), - block_time_ms: None, //None because we want latest - contested_status, - }; - let (root_hash, document) = - query.verify_proof(false, proof, document_type, platform_version)?; + match document_transition { + DocumentTransition::Create(create_transition) => { + let document = document.ok_or(Error::Proof(ProofError::IncorrectProof(format!("proof did not contain document with id {} expected to exist because of state transition (create)", create_transition.base().id()))))?; + let expected_document = Document::try_from_create_transition( + create_transition, + documents_batch_transition.owner_id(), + block_info, + &document_type, + platform_version, + )?; - match transition { - DocumentTransition::Create(create_transition) => { - let document = document.ok_or(Error::Proof(ProofError::IncorrectProof(format!("proof did not contain document with id {} expected to exist because of state transition (create)", create_transition.base().id()))))?; - let expected_document = Document::try_from_create_transition( - create_transition, - documents_batch_transition.owner_id(), - block_info, - &document_type, - platform_version, - )?; + let transient_fields = document_type + .transient_fields() + .iter() + .map(|a| a.as_str()) + .collect(); - let transient_fields = document_type - .transient_fields() - .iter() - .map(|a| a.as_str()) - .collect(); + if !document.is_equal_ignoring_time_based_fields( + &expected_document, + Some(transient_fields), + platform_version, + )? { + return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution did not contain expected document (time fields were not checked) after create with id {}", create_transition.base().id())))); + } + Ok(( + root_hash, + VerifiedDocuments(BTreeMap::from([( + document.id(), + Some(document), + )])), + )) + } + DocumentTransition::Replace(replace_transition) => { + let document = document.ok_or(Error::Proof(ProofError::IncorrectProof(format!("proof did not contain document with id {} expected to exist because of state transition (replace)", replace_transition.base().id()))))?; + let expected_document = Document::try_from_replace_transition( + replace_transition, + documents_batch_transition.owner_id(), + document.created_at(), //we can trust the created at (as we don't care) + document.created_at_block_height(), //we can trust the created at block height (as we don't care) + document.created_at_core_block_height(), //we can trust the created at core block height (as we don't care) + document.created_at(), //we can trust the created at (as we don't care) + document.created_at_block_height(), //we can trust the created at block height (as we don't care) + document.created_at_core_block_height(), //we can trust the created at core block height (as we don't care) + block_info, + &document_type, + platform_version, + )?; - if !document.is_equal_ignoring_time_based_fields( - &expected_document, - Some(transient_fields), - platform_version, - )? { - return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution did not contain expected document (time fields were not checked) after create with id {}", create_transition.base().id())))); - } - Ok(( - root_hash, - VerifiedDocuments(BTreeMap::from([(document.id(), Some(document))])), - )) - } - DocumentTransition::Replace(replace_transition) => { - let document = document.ok_or(Error::Proof(ProofError::IncorrectProof(format!("proof did not contain document with id {} expected to exist because of state transition (replace)", replace_transition.base().id()))))?; - let expected_document = Document::try_from_replace_transition( - replace_transition, - documents_batch_transition.owner_id(), - document.created_at(), //we can trust the created at (as we don't care) - document.created_at_block_height(), //we can trust the created at block height (as we don't care) - document.created_at_core_block_height(), //we can trust the created at core block height (as we don't care) - document.created_at(), //we can trust the created at (as we don't care) - document.created_at_block_height(), //we can trust the created at block height (as we don't care) - document.created_at_core_block_height(), //we can trust the created at core block height (as we don't care) - block_info, - &document_type, - platform_version, - )?; + let transient_fields = document_type + .transient_fields() + .iter() + .map(|a| a.as_str()) + .collect(); - let transient_fields = document_type - .transient_fields() - .iter() - .map(|a| a.as_str()) - .collect(); + if !document.is_equal_ignoring_time_based_fields( + &expected_document, + Some(transient_fields), + platform_version, + )? { + return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution did not contain expected document (time fields were not checked) after replace with id {}", replace_transition.base().id())))); + } - if !document.is_equal_ignoring_time_based_fields( - &expected_document, - Some(transient_fields), - platform_version, - )? { - return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution did not contain expected document (time fields were not checked) after replace with id {}", replace_transition.base().id())))); - } + Ok(( + root_hash, + VerifiedDocuments(BTreeMap::from([( + document.id(), + Some(document), + )])), + )) + } + DocumentTransition::Transfer(transfer_transition) => { + let document = document.ok_or(Error::Proof(ProofError::IncorrectProof(format!("proof did not contain document with id {} expected to exist because of state transition (transfer)", transfer_transition.base().id()))))?; + let recipient_owner_id = transfer_transition.recipient_owner_id(); - Ok(( - root_hash, - VerifiedDocuments(BTreeMap::from([(document.id(), Some(document))])), - )) - } - DocumentTransition::Transfer(transfer_transition) => { - let document = document.ok_or(Error::Proof(ProofError::IncorrectProof(format!("proof did not contain document with id {} expected to exist because of state transition (transfer)", transfer_transition.base().id()))))?; - let recipient_owner_id = transfer_transition.recipient_owner_id(); + if document.owner_id() != recipient_owner_id { + return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution did not have the transfer executed after expected transfer with id {}", transfer_transition.base().id())))); + } - if document.owner_id() != recipient_owner_id { - return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution did not have the transfer executed after expected transfer with id {}", transfer_transition.base().id())))); - } + Ok(( + root_hash, + VerifiedDocuments(BTreeMap::from([( + document.id(), + Some(document), + )])), + )) + } + DocumentTransition::Delete(delete_transition) => { + if document.is_some() { + return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution contained document after delete with id {}", delete_transition.base().id())))); + } + Ok(( + root_hash, + VerifiedDocuments(BTreeMap::from([( + delete_transition.base().id(), + None, + )])), + )) + } + DocumentTransition::UpdatePrice(update_price_transition) => { + let document = document.ok_or(Error::Proof(ProofError::IncorrectProof(format!("proof did not contain document with id {} expected to exist because of state transition (update price)", update_price_transition.base().id()))))?; + let new_document_price : Credits = document.properties().get_integer(PRICE).map_err(|e| Error::Proof(ProofError::IncorrectProof(format!("proof did not contain a document that contained a price field with id {} expected to exist because of state transition (update price): {}", update_price_transition.base().id(), e))))?; + if new_document_price != update_price_transition.price() { + return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution did not contain expected document update of price after price update with id {}", update_price_transition.base().id())))); + } + Ok(( + root_hash, + VerifiedDocuments(BTreeMap::from([( + document.id(), + Some(document), + )])), + )) + } + DocumentTransition::Purchase(purchase_transition) => { + let document = document.ok_or(Error::Proof(ProofError::IncorrectProof(format!("proof did not contain document with id {} expected to exist because of state transition (purchase)", purchase_transition.base().id()))))?; - Ok(( - root_hash, - VerifiedDocuments(BTreeMap::from([(document.id(), Some(document))])), - )) - } - DocumentTransition::Delete(delete_transition) => { - if document.is_some() { - return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution contained document after delete with id {}", delete_transition.base().id())))); - } - Ok(( - root_hash, - VerifiedDocuments(BTreeMap::from([( - delete_transition.base().id(), - None, - )])), - )) - } - DocumentTransition::UpdatePrice(update_price_transition) => { - let document = document.ok_or(Error::Proof(ProofError::IncorrectProof(format!("proof did not contain document with id {} expected to exist because of state transition (update price)", update_price_transition.base().id()))))?; - let new_document_price : Credits = document.properties().get_integer(PRICE).map_err(|e| Error::Proof(ProofError::IncorrectProof(format!("proof did not contain a document that contained a price field with id {} expected to exist because of state transition (update price): {}", update_price_transition.base().id(), e))))?; - if new_document_price != update_price_transition.price() { - return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution did not contain expected document update of price after price update with id {}", update_price_transition.base().id())))); - } - Ok(( - root_hash, - VerifiedDocuments(BTreeMap::from([(document.id(), Some(document))])), - )) - } - DocumentTransition::Purchase(purchase_transition) => { - let document = document.ok_or(Error::Proof(ProofError::IncorrectProof(format!("proof did not contain document with id {} expected to exist because of state transition (purchase)", purchase_transition.base().id()))))?; + if document.owner_id() != owner_id { + return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution did not have the transfer executed after expected transfer with id {}", purchase_transition.base().id())))); + } - if document.owner_id() != owner_id { - return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution did not have the transfer executed after expected transfer with id {}", purchase_transition.base().id())))); + Ok(( + root_hash, + VerifiedDocuments(BTreeMap::from([( + document.id(), + Some(document), + )])), + )) + } } - - Ok(( - root_hash, - VerifiedDocuments(BTreeMap::from([(document.id(), Some(document))])), - )) + } + BatchedTransitionRef::Token(token_transition) => { + todo!() + //todo + // we need to check if the contract has history + // if it has history we verify the proof of the history + // known_contracts_provider_fn + // let token_id = token_transition.token_id(); + // match token_transition { + // TokenTransition::Burn(_) => {} + // TokenTransition::Issuance(_) => {} + // TokenTransition::Transfer(_) => {} + // } } } } diff --git a/packages/rs-drive/src/verify/tokens/mod.rs b/packages/rs-drive/src/verify/tokens/mod.rs new file mode 100644 index 0000000000..9110a47eed --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/mod.rs @@ -0,0 +1,2 @@ +mod verify_token_balances_for_identity_ids; +mod verify_token_infos_for_identity_ids; diff --git a/packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_ids/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_ids/mod.rs new file mode 100644 index 0000000000..6959213d81 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_ids/mod.rs @@ -0,0 +1,80 @@ +mod v0; + +use crate::drive::Drive; +use dpp::balances::credits::TokenAmount; + +use crate::error::drive::DriveError; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the token balances for a set of identity IDs. + /// + /// This function checks the token balances of multiple identities by verifying the provided + /// proof against the specified token ID and identity IDs. It also supports verifying a subset + /// of a larger proof if necessary. + /// + /// # Parameters + /// + /// - `proof`: A byte slice representing the proof of authentication from the user. This is used + /// to verify the validity of the identity and its associated balance. + /// - `token_id`: A 32-byte array representing the unique identifier for the token whose balance + /// is being verified. + /// - `identity_ids`: A slice of 32-byte arrays, each representing a unique identity ID. These + /// are the identities whose token balances are being verified. + /// - `verify_subset_of_proof`: A boolean flag indicating whether the proof being verified is a + /// subset of a larger proof. If `true`, the verification will consider only a part of the proof. + /// - `platform_version`: The version of the platform against which the identity token balances are + /// being verified. This ensures compatibility with the correct API version. + /// + /// # Returns + /// + /// - `Result<(RootHash, BTreeMap<[u8; 32], Option>), Error>`: If the verification is successful: + /// - `RootHash`: The root hash of the GroveDB, representing the state of the database. + /// - `BTreeMap<[u8; 32], Option>`: A map of identity IDs to their associated token balances. + /// The `Option` can be `Some(TokenAmount)` if a balance exists or `None` if no balance is found. + /// + /// # Errors + /// + /// The function will return an `Error` if any of the following occur: + /// + /// - The provided authentication proof is invalid. + /// - The provided identity ID does not correspond to a valid balance. + /// - The provided platform version is unknown or unsupported. + /// + pub fn verify_token_balances_for_identity_ids< + T: FromIterator<(I, Option)>, + I: From<[u8; 32]>, + >( + proof: &[u8], + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + match platform_version + .drive + .methods + .verify + .token + .verify_token_balances_for_identity_ids + { + 0 => Self::verify_token_balances_for_identity_ids_v0( + proof, + token_id, + identity_ids, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_token_balances_for_identity_ids".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_ids/v0/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_ids/v0/mod.rs new file mode 100644 index 0000000000..3bfa94f7a9 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_ids/v0/mod.rs @@ -0,0 +1,71 @@ +use crate::drive::Drive; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::balances::credits::TokenAmount; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_token_balances_for_identity_ids_v0< + T: FromIterator<(I, Option)>, + I: From<[u8; 32]>, + >( + proof: &[u8], + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + let path_query = Self::token_balances_for_identity_ids_query(token_id, identity_ids); + let (root_hash, proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + } else { + GroveDb::verify_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + }; + if proved_key_values.len() == identity_ids.len() { + let values = proved_key_values + .into_iter() + .map(|proved_key_value| { + let key: [u8; 32] = proved_key_value + .1 + .try_into() + .map_err(|_| Error::Proof(ProofError::IncorrectValueSize("value size")))?; + let maybe_element = proved_key_value.2; + match maybe_element { + None => Ok((key.into(), None)), + Some(element) => { + let balance: TokenAmount = element + .as_sum_item_value() + .map_err(Error::GroveDB)? + .try_into() + .map_err(|_| { + Error::Proof(ProofError::IncorrectValueSize( + "balance was negative", + )) + })?; + Ok((key.into(), Some(balance))) + } + } + }) + .collect::>()?; + Ok((root_hash, values)) + } else { + Err(Error::Proof(ProofError::WrongElementCount { + expected: identity_ids.len(), + got: proved_key_values.len(), + })) + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_ids/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_ids/mod.rs new file mode 100644 index 0000000000..b936762a97 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_ids/mod.rs @@ -0,0 +1,79 @@ +mod v0; + +use crate::drive::Drive; +use dpp::tokens::info::IdentityTokenInfo; + +use crate::error::drive::DriveError; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the token infos for a set of identity IDs. + /// + /// This function checks the token infos of multiple identities by verifying the provided + /// proof against the specified token ID and identity IDs. It also supports verifying a subset + /// of a larger proof if necessary. + /// + /// # Parameters + /// + /// - `proof`: A byte slice representing the proof of authentication from the user. This is used + /// to verify the validity of the identity and its associated info. + /// - `token_id`: A 32-byte array representing the unique identifier for the token whose info + /// is being verified. + /// - `identity_ids`: A slice of 32-byte arrays, each representing a unique identity ID. These + /// are the identities whose token infos are being verified. + /// - `verify_subset_of_proof`: A boolean flag indicating whether the proof being verified is a + /// subset of a larger proof. If `true`, the verification will consider only a part of the proof. + /// - `platform_version`: The version of the platform against which the identity token infos are + /// being verified. This ensures compatibility with the correct API version. + /// + /// # Returns + /// + /// - `Result<(RootHash, BTreeMap<[u8; 32], Option>), Error>`: If the verification is successful: + /// - `RootHash`: The root hash of the GroveDB, representing the state of the database. + /// - `BTreeMap<[u8; 32], Option>`: A map of identity IDs to their associated token infos. + /// + /// # Errors + /// + /// The function will return an `Error` if any of the following occur: + /// + /// - The provided authentication proof is invalid. + /// - The provided identity ID does not correspond to a valid info. + /// - The provided platform version is unknown or unsupported. + /// + pub fn verify_token_infos_for_identity_ids< + T: FromIterator<(I, Option)>, + I: From<[u8; 32]>, + >( + proof: &[u8], + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + match platform_version + .drive + .methods + .verify + .token + .verify_token_infos_for_identity_ids + { + 0 => Self::verify_token_infos_for_identity_ids_v0( + proof, + token_id, + identity_ids, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_token_infos_for_identity_ids".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_ids/v0/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_ids/v0/mod.rs new file mode 100644 index 0000000000..4c4a6092e4 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_ids/v0/mod.rs @@ -0,0 +1,65 @@ +use crate::drive::Drive; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::serialization::PlatformDeserializable; +use dpp::tokens::info::IdentityTokenInfo; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_token_infos_for_identity_ids_v0< + T: FromIterator<(I, Option)>, + I: From<[u8; 32]>, + >( + proof: &[u8], + token_id: [u8; 32], + identity_ids: &[[u8; 32]], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + let path_query = Self::token_infos_for_identity_ids_query(token_id, identity_ids); + let (root_hash, proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + } else { + GroveDb::verify_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + }; + if proved_key_values.len() == identity_ids.len() { + let values = proved_key_values + .into_iter() + .map(|proved_key_value| { + let key: [u8; 32] = proved_key_value + .1 + .try_into() + .map_err(|_| Error::Proof(ProofError::IncorrectValueSize("value size")))?; + let maybe_element = proved_key_value.2; + match maybe_element { + None => Ok((key.into(), None)), + Some(element) => { + let info_bytes = element.as_item_bytes().map_err(Error::GroveDB)?; + let info = IdentityTokenInfo::deserialize_from_bytes(info_bytes)?; + Ok((key.into(), Some(info))) + } + } + }) + .collect::>()?; + Ok((root_hash, values)) + } else { + Err(Error::Proof(ProofError::WrongElementCount { + expected: identity_ids.len(), + got: proved_key_values.len(), + })) + } + } +} diff --git a/packages/rs-drive/tests/deterministic_root_hash.rs b/packages/rs-drive/tests/deterministic_root_hash.rs index e2cd8cc75e..690fce9609 100644 --- a/packages/rs-drive/tests/deterministic_root_hash.rs +++ b/packages/rs-drive/tests/deterministic_root_hash.rs @@ -19,9 +19,11 @@ mod tests { /// Tests that the root hash is being calculated correctly after inserting empty subtrees into /// the root tree and the DPNS contract. - fn test_root_hash_with_batches(drive: &Drive, db_transaction: &Transaction) { - let platform_version = PlatformVersion::latest(); - + fn test_root_hash_with_batches( + drive: &Drive, + db_transaction: &Transaction, + platform_version: &PlatformVersion, + ) { // [1644293142180] INFO (35 on bf3bb2a2796a): createTree // path: [] // pathHash: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" @@ -297,20 +299,45 @@ mod tests { .unwrap() .expect("should return app hash"); - let expected_app_hash = "1b80f4a9f00597b3f1ddca904b3cee67576868adcdd802c0a3f91e14209bb402"; + // We expect a different app hash because data contract is not serialized the same way + let expected_app_hash = match platform_version.protocol_version { + 0..7 => "1b80f4a9f00597b3f1ddca904b3cee67576868adcdd802c0a3f91e14209bb402", + _ => "387fe8e2298bb33e0ff79fd377eccb14109fb2534c7338c535bd74b5b8580580", + }; assert_eq!(hex::encode(app_hash), expected_app_hash); } /// Runs `test_root_hash_with_batches` 10 times. #[test] - fn test_deterministic_root_hash_with_batches() { - let drive = setup_drive(None); + fn test_deterministic_root_hash_with_batches_first_platform_version() { + let drive = setup_drive(None, None); + + let platform_version = PlatformVersion::first(); + + let db_transaction = drive.grove.start_transaction(); + + for _ in 0..10 { + test_root_hash_with_batches(&drive, &db_transaction, platform_version); + + drive + .grove + .rollback_transaction(&db_transaction) + .expect("transaction should be rolled back"); + } + } + + /// Runs `test_root_hash_with_batches` 10 times. + #[test] + fn test_deterministic_root_hash_with_batches_latest_platform_version() { + let drive = setup_drive(None, None); + + let platform_version = PlatformVersion::latest(); let db_transaction = drive.grove.start_transaction(); for _ in 0..10 { - test_root_hash_with_batches(&drive, &db_transaction); + test_root_hash_with_batches(&drive, &db_transaction, platform_version); drive .grove diff --git a/packages/rs-drive/tests/query_tests.rs b/packages/rs-drive/tests/query_tests.rs index 6bad5144f9..8451908d68 100644 --- a/packages/rs-drive/tests/query_tests.rs +++ b/packages/rs-drive/tests/query_tests.rs @@ -196,10 +196,14 @@ impl PersonWithOptionalValues { #[cfg(feature = "server")] /// Inserts the test "family" contract and adds `count` documents containing randomly named people to it. -pub fn setup_family_tests(count: u32, seed: u64) -> (Drive, DataContract) { +pub fn setup_family_tests( + count: u32, + seed: u64, + platform_version: &PlatformVersion, +) -> (Drive, DataContract) { let drive_config = DriveConfig::default(); - let drive = setup_drive(Some(drive_config)); + let drive = setup_drive(Some(drive_config), None); let db_transaction = drive.grove.start_transaction(); @@ -208,8 +212,6 @@ pub fn setup_family_tests(count: u32, seed: u64) -> (Drive, DataContract) { add_init_contracts_structure_operations(&mut batch); - let platform_version = PlatformVersion::latest(); - drive .grove_apply_batch(batch, false, Some(&db_transaction), &platform_version.drive) .expect("expected to create contracts tree successfully"); @@ -219,7 +221,10 @@ pub fn setup_family_tests(count: u32, seed: u64) -> (Drive, DataContract) { &drive, "tests/supporting_files/contract/family/family-contract.json", None, + None, + None::, Some(&db_transaction), + Some(platform_version), ); let people = Person::random_people(count, seed); @@ -269,7 +274,7 @@ pub fn setup_family_tests(count: u32, seed: u64) -> (Drive, DataContract) { pub fn setup_family_tests_with_nulls(count: u32, seed: u64) -> (Drive, DataContract) { let drive_config = DriveConfig::default(); - let drive = setup_drive(Some(drive_config)); + let drive = setup_drive(Some(drive_config), None); let db_transaction = drive.grove.start_transaction(); @@ -289,7 +294,10 @@ pub fn setup_family_tests_with_nulls(count: u32, seed: u64) -> (Drive, DataContr &drive, "tests/supporting_files/contract/family/family-contract-fields-optional.json", None, + None, + None::, Some(&db_transaction), + None, ); let people = PersonWithOptionalValues::random_people(count, seed); @@ -338,7 +346,7 @@ pub fn setup_family_tests_with_nulls(count: u32, seed: u64) -> (Drive, DataContr pub fn setup_family_tests_only_first_name_index(count: u32, seed: u64) -> (Drive, DataContract) { let drive_config = DriveConfig::default(); - let drive = setup_drive(Some(drive_config)); + let drive = setup_drive(Some(drive_config), None); let db_transaction = drive.grove.start_transaction(); @@ -358,7 +366,10 @@ pub fn setup_family_tests_only_first_name_index(count: u32, seed: u64) -> (Drive &drive, "tests/supporting_files/contract/family/family-contract-only-first-name-index.json", None, + None, + None::, Some(&db_transaction), + None, ); let people = Person::random_people(count, seed); @@ -803,8 +814,9 @@ pub fn setup_dpns_tests_with_batches( count: u32, total_owners: Option, seed: u64, + platform_version: &PlatformVersion, ) -> (Drive, DataContract) { - let drive = setup_drive(Some(DriveConfig::default())); + let drive = setup_drive(Some(DriveConfig::default()), None); let db_transaction = drive.grove.start_transaction(); @@ -813,8 +825,6 @@ pub fn setup_dpns_tests_with_batches( add_init_contracts_structure_operations(&mut batch); - let platform_version = PlatformVersion::latest(); - drive .grove_apply_batch(batch, false, Some(&db_transaction), &platform_version.drive) .expect("expected to create contracts tree successfully"); @@ -824,7 +834,10 @@ pub fn setup_dpns_tests_with_batches( &drive, "tests/supporting_files/contract/dpns/dpns-contract.json", None, + None, + None::, Some(&db_transaction), + Some(platform_version), ); add_domains_to_contract( @@ -851,7 +864,7 @@ pub fn setup_withdrawal_tests( total_owners: Option, seed: u64, ) -> (Drive, DataContract) { - let drive = setup_drive(Some(DriveConfig::default())); + let drive = setup_drive(Some(DriveConfig::default()), None); let db_transaction = drive.grove.start_transaction(); @@ -871,7 +884,10 @@ pub fn setup_withdrawal_tests( &drive, "tests/supporting_files/contract/withdrawals/withdrawals-contract.json", None, + None, + None::, Some(&db_transaction), + None, ); add_withdrawals_to_contract( @@ -894,7 +910,7 @@ pub fn setup_withdrawal_tests( #[cfg(feature = "server")] /// Sets up the References contract to test queries on. pub fn setup_references_tests(_count: u32, _seed: u64) -> (Drive, DataContract) { - let drive = setup_drive(Some(DriveConfig::default())); + let drive = setup_drive(Some(DriveConfig::default()), None); let db_transaction = drive.grove.start_transaction(); @@ -914,7 +930,10 @@ pub fn setup_references_tests(_count: u32, _seed: u64) -> (Drive, DataContract) &drive, "tests/supporting_files/contract/references/references_with_contract_history.json", None, + None, + None::, Some(&db_transaction), + None, ); drive @@ -929,7 +948,7 @@ pub fn setup_references_tests(_count: u32, _seed: u64) -> (Drive, DataContract) #[cfg(feature = "server")] /// Sets up and inserts random domain name data to the DPNS contract to test queries on. pub fn setup_dpns_tests_label_not_required(count: u32, seed: u64) -> (Drive, DataContract) { - let drive = setup_drive(Some(DriveConfig::default())); + let drive = setup_drive(Some(DriveConfig::default()), None); let db_transaction = drive.grove.start_transaction(); @@ -949,7 +968,10 @@ pub fn setup_dpns_tests_label_not_required(count: u32, seed: u64) -> (Drive, Dat &drive, "tests/supporting_files/contract/dpns/dpns-contract-label-not-required.json", None, + None, + None::, Some(&db_transaction), + None, ); add_domains_to_contract(&drive, &contract, Some(&db_transaction), count, None, seed); @@ -965,7 +987,7 @@ pub fn setup_dpns_tests_label_not_required(count: u32, seed: u64) -> (Drive, Dat #[cfg(feature = "server")] /// Sets up the DPNS contract and inserts data from the given path to test queries on. pub fn setup_dpns_test_with_data(path: &str) -> (Drive, DataContract) { - let drive = setup_drive(None); + let drive = setup_drive(None, None); let db_transaction = drive.grove.start_transaction(); @@ -984,7 +1006,10 @@ pub fn setup_dpns_test_with_data(path: &str) -> (Drive, DataContract) { &drive, "tests/supporting_files/contract/dpns/dpns-contract.json", None, + None, + None::, Some(&db_transaction), + None, ); let file = File::open(path).expect("should read domains from file"); @@ -1037,7 +1062,8 @@ pub fn setup_dpns_test_with_data(path: &str) -> (Drive, DataContract) { #[test] #[ignore] fn test_query_many() { - let (drive, contract) = setup_family_tests(1600, 73509); + let platform_version = PlatformVersion::latest(); + let (drive, contract) = setup_family_tests(1600, 73509, platform_version); let db_transaction = drive.grove.start_transaction(); let platform_version = PlatformVersion::latest(); @@ -1081,107 +1107,1442 @@ fn test_query_many() { .expect("transaction should be committed"); } -#[cfg(feature = "server")] -#[test] -fn test_reference_proof_single_index() { - let (drive, contract) = setup_family_tests_only_first_name_index(1, 73509); +#[cfg(feature = "server")] +#[test] +fn test_reference_proof_single_index() { + let (drive, contract) = setup_family_tests_only_first_name_index(1, 73509); + + let platform_version = PlatformVersion::latest(); + + let db_transaction = drive.grove.start_transaction(); + + let root_hash = drive + .grove + .root_hash(Some(&db_transaction), &platform_version.drive.grove_version) + .unwrap() + .expect("there is always a root hash"); + + // A query getting all elements by firstName + + let query_value = json!({ + "where": [ + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, Some(&db_transaction), platform_version) + .expect("proof should be executed"); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); +} + +#[cfg(feature = "server")] +#[test] +fn test_non_existence_reference_proof_single_index() { + let (drive, contract) = setup_family_tests_only_first_name_index(0, 73509); + + let platform_version = PlatformVersion::latest(); + + let db_transaction = drive.grove.start_transaction(); + + let root_hash = drive + .grove + .root_hash(Some(&db_transaction), &platform_version.drive.grove_version) + .unwrap() + .expect("there is always a root hash"); + + // A query getting all elements by firstName + + let query_value = json!({ + "where": [ + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, Some(&db_transaction), platform_version) + .expect("proof should be executed"); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); +} + +#[cfg(feature = "server")] +#[test] +fn test_family_basic_queries_first_version() { + let platform_version = PlatformVersion::first(); + let (drive, contract) = setup_family_tests(10, 73509, platform_version); + + let db_transaction = drive.grove.start_transaction(); + + let root_hash = drive + .grove + .root_hash(Some(&db_transaction), &platform_version.drive.grove_version) + .unwrap() + .expect("there is always a root hash"); + + let expected_app_hash = vec![ + 32, 210, 24, 196, 148, 43, 20, 34, 0, 116, 183, 136, 32, 210, 163, 183, 214, 6, 152, 86, + 46, 45, 88, 13, 23, 41, 37, 70, 129, 119, 211, 12, + ]; + + assert_eq!(root_hash.as_slice(), expected_app_hash); + + let all_names = [ + "Adey".to_string(), + "Briney".to_string(), + "Cammi".to_string(), + "Celinda".to_string(), + "Dalia".to_string(), + "Gilligan".to_string(), + "Kevina".to_string(), + "Meta".to_string(), + "Noellyn".to_string(), + "Prissie".to_string(), + ]; + + // A query getting all elements by firstName + + let query_value = json!({ + "where": [ + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, Some(&db_transaction), platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the document"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + assert_eq!(names, all_names); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + // A query getting all people who's first name is Adey (which should exist) + let query_value = json!({ + "where": [ + ["firstName", "==", "Adey"] + ] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + assert_eq!(results.len(), 1); + + let (proof_root_hash, proof_results, _) = drive + .query_proof_of_documents_using_cbor_encoded_query_only_get_elements( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + // A query getting all people who's first name is Adey and lastName Randolf + + let query_value = json!({ + "where": [ + ["firstName", "==", "Adey"], + ["lastName", "==", "Randolf"] + ], + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + let (proof_root_hash, proof_results, _) = drive + .query_proof_of_documents_using_cbor_encoded_query_only_get_elements( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + let document = Document::from_bytes( + results.first().unwrap().as_slice(), + person_document_type, + platform_version, + ) + .expect("we should be able to deserialize from bytes"); + let last_name = document + .get("lastName") + .expect("we should be able to get the last name") + .as_text() + .expect("last name must be a string"); + + assert_eq!(last_name, "Randolf"); + + // A query getting all people who's first name is in a range with a single element Adey, + // order by lastName (this should exist) + + let query_value = json!({ + "where": [ + ["firstName", "in", ["Adey"]] + ], + "orderBy": [ + ["firstName", "asc"], + ["lastName", "asc"] + ] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + let (proof_root_hash, proof_results, _) = drive + .query_proof_of_documents_using_cbor_encoded_query_only_get_elements( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + // A query getting all people who's first name is Adey, order by lastName (which should exist) + + let query_value = json!({ + "where": [ + ["firstName", "==", "Adey"] + ], + "orderBy": [ + ["lastName", "asc"] + ] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + let (proof_root_hash, proof_results, _) = drive + .query_proof_of_documents_using_cbor_encoded_query_only_get_elements( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + let document = Document::from_bytes( + results.first().unwrap().as_slice(), + person_document_type, + platform_version, + ) + .expect("we should be able to deserialize from bytes"); + let last_name = document + .get("lastName") + .expect("we should be able to get the last name") + .as_text() + .expect("last name must be a string"); + + assert_eq!(last_name, "Randolf"); + + // A query getting all people who's first name is Chris (which is not exist) + + let query_value = json!({ + "where": [ + ["firstName", "==", "Chris"] + ] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 0); + + let (proof_root_hash, proof_results, _) = drive + .query_proof_of_documents_using_cbor_encoded_query_only_get_elements( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + // A query getting a middle name + + let query_value = json!({ + "where": [ + ["middleName", "==", "Briggs"] + ] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + let (proof_root_hash, proof_results, _) = drive + .query_proof_of_documents_using_cbor_encoded_query_only_get_elements( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + // A query getting all people who's first name is before Chris + + let query_value = json!({ + "where": [ + ["firstName", "<", "Chris"] + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the document"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + let expected_names_before_chris = [ + "Adey".to_string(), + "Briney".to_string(), + "Cammi".to_string(), + "Celinda".to_string(), + ]; + assert_eq!(names, expected_names_before_chris); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + // A query getting all people who's first name starts with C + + let query_value = json!({ + "where": [ + ["firstName", "StartsWith", "C"] + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the document"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + let expected_names_starting_with_c = ["Cammi".to_string(), "Celinda".to_string()]; + assert_eq!(names, expected_names_starting_with_c); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + // A query getting all people who's first name starts with C, but limit to 1 and be descending + + let query_value = json!({ + "where": [ + ["firstName", "StartsWith", "C"] + ], + "limit": 1, + "orderBy": [ + ["firstName", "desc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the document"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + let expected_names_starting_with_c_desc_1 = ["Celinda".to_string()]; + assert_eq!(names, expected_names_starting_with_c_desc_1); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + // A query getting all people who's first name is between Chris and Noellyn included + + let query_value = json!({ + "where": [ + ["firstName", ">", "Chris"], + ["firstName", "<=", "Noellyn"] + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + assert_eq!(results.len(), 5); + + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the document"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + let expected_between_names = [ + "Dalia".to_string(), + "Gilligan".to_string(), + "Kevina".to_string(), + "Meta".to_string(), + "Noellyn".to_string(), + ]; + + assert_eq!(names, expected_between_names); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + // A query getting back elements having specific names + + let query_value = json!({ + "where": [ + ["firstName", "in", names] + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the document"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + assert_eq!(names, expected_between_names); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + let query_value = json!({ + "where": [ + ["firstName", "in", names] + ], + "limit": 100, + "orderBy": [ + ["firstName", "desc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the document"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + let expected_reversed_between_names = [ + "Noellyn".to_string(), + "Meta".to_string(), + "Kevina".to_string(), + "Gilligan".to_string(), + "Dalia".to_string(), + ]; + + assert_eq!(names, expected_reversed_between_names); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + // A query getting back elements having specific names and over a certain age + + let query_value = json!({ + "where": [ + ["firstName", "in", names], + ["age", ">=", 45] + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"], + ["age", "desc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the document"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + let expected_names_45_over = [ + "Dalia".to_string(), + "Gilligan".to_string(), + "Kevina".to_string(), + "Meta".to_string(), + ]; + + assert_eq!(names, expected_names_45_over); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + // A query getting back elements having specific names and over a certain age + + let query_value = json!({ + "where": [ + ["firstName", "in", names], + ["age", ">", 48] + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"], + ["age", "desc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the document"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + // Kevina is 48 so she should be now excluded, Dalia is 68, Gilligan is 49 and Meta is 59 + + let expected_names_over_48 = [ + "Dalia".to_string(), + "Gilligan".to_string(), + "Meta".to_string(), + ]; + + assert_eq!(names, expected_names_over_48); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); + + let ages: HashMap = results + .into_iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the document"); + let name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let name = name_value + .as_text() + .expect("the first name should be a string") + .to_string(); + let age_value = document + .get("age") + .expect("we should be able to get the age"); + let age: u8 = age_value.to_integer().expect("expected u8 value"); + (name, age) + }) + .collect(); + + let meta_age = ages + .get("Meta") + .expect("we should be able to get Kevina as she is 48"); + + assert_eq!(*meta_age, 59); + + // fetching by $id + let mut rng = rand::rngs::StdRng::seed_from_u64(84594); + let id_bytes = bs58::decode("ATxXeP5AvY4aeUFA6WRo7uaBKTBgPQCjTrgtNpCMNVRD") + .into_vec() + .expect("this should decode"); + + let owner_id_bytes = bs58::decode("BYR3zJgXDuz1BYAkEagwSjVqTcE1gbqEojd6RwAGuMzj") + .into_vec() + .expect("this should decode"); + + let fixed_person = Person { + id: id_bytes, + owner_id: owner_id_bytes, + first_name: String::from("Wisdom"), + middle_name: String::from("Madabuchukwu"), + last_name: String::from("Ogwu"), + age: rng.gen_range(0..85), + }; + let serialized_person = serde_json::to_value(fixed_person).expect("serialized person"); + let person_cbor = cbor_serializer::serializable_value_to_cbor(&serialized_person, Some(0)) + .expect("expected to serialize to cbor"); + let document = Document::from_cbor(person_cbor.as_slice(), None, None, platform_version) + .expect("document should be properly deserialized"); + + let document_type = contract + .document_type_for_name("person") + .expect("expected to get document type"); + + let storage_flags = Some(Cow::Owned(StorageFlags::SingleEpoch(0))); + + drive + .add_document_for_contract( + DocumentAndContractInfo { + owned_document_info: OwnedDocumentInfo { + document_info: DocumentRefInfo((&document, storage_flags)), + owner_id: None, + }, + contract: &contract, + document_type, + }, + true, + BlockInfo::genesis(), + true, + Some(&db_transaction), + platform_version, + None, + ) + .expect("document should be inserted"); + + let id_two_bytes = bs58::decode("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179") + .into_vec() + .expect("should decode"); + let owner_id_bytes = bs58::decode("Di8dtJXv3L2YnzDNUN4w5rWLPSsSAzv6hLMMQbg3eyVA") + .into_vec() + .expect("this should decode"); + let next_person = Person { + id: id_two_bytes, + owner_id: owner_id_bytes, + first_name: String::from("Wdskdfslgjfdlj"), + middle_name: String::from("Mdsfdsgsdl"), + last_name: String::from("dkfjghfdk"), + age: rng.gen_range(0..85), + }; + let serialized_person = serde_json::to_value(next_person).expect("serialized person"); + let person_cbor = cbor_serializer::serializable_value_to_cbor(&serialized_person, Some(0)) + .expect("expected to serialize to cbor"); + let document = Document::from_cbor(person_cbor.as_slice(), None, None, platform_version) + .expect("document should be properly deserialized"); + + let document_type = contract + .document_type_for_name("person") + .expect("expected to get document type"); + + let storage_flags = Some(Cow::Owned(StorageFlags::SingleEpoch(0))); + + drive + .add_document_for_contract( + DocumentAndContractInfo { + owned_document_info: OwnedDocumentInfo { + document_info: DocumentRefInfo((&document, storage_flags)), + owner_id: None, + }, + contract: &contract, + document_type, + }, + true, + BlockInfo::genesis(), + true, + Some(&db_transaction), + platform_version, + None, + ) + .expect("document should be inserted"); + + let query_value = json!({ + "where": [ + ["$id", "in", vec![String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179")]], + ], + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + // TODO: Add test for proofs after transaction + // drive.grove.commit_transaction(db_transaction).expect("unable to commit transaction"); + // let (proof_root_hash, proof_results) = drive + // .query_documents_from_contract_as_grove_proof_only_get_elements( + // &contract, + // person_document_type, + // query_cbor.as_slice(), + // None, + // ) + // .expect("query should be executed"); + // assert_eq!(root_hash, proof_root_hash); + // assert_eq!(results, proof_results); + // let db_transaction = drive.grove.start_transaction(); + + // fetching by $id with order by + + let query_value = json!({ + "where": [ + ["$id", "in", [String::from("ATxXeP5AvY4aeUFA6WRo7uaBKTBgPQCjTrgtNpCMNVRD"), String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179")]], + ], + "orderBy": [["$id", "asc"]], + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 2); + + let last_person = Document::from_bytes( + results.first().unwrap().as_slice(), + document_type, + platform_version, + ) + .expect("we should be able to deserialize the document"); + + assert_eq!( + last_person.id().to_vec(), + vec![ + 76, 161, 17, 201, 152, 232, 129, 48, 168, 13, 49, 10, 218, 53, 118, 136, 165, 198, 189, + 116, 116, 22, 133, 92, 104, 165, 186, 249, 94, 81, 45, 20, + ] + ); + + // fetching by $id with order by desc + + let query_value = json!({ + "where": [ + ["$id", "in", [String::from("ATxXeP5AvY4aeUFA6WRo7uaBKTBgPQCjTrgtNpCMNVRD"), String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179")]], + ], + "orderBy": [["$id", "desc"]], + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 2); + + let last_person = Document::from_bytes( + results.first().unwrap().as_slice(), + document_type, + platform_version, + ) + .expect("we should be able to deserialize the document"); + + assert_eq!( + last_person.id().to_vec(), + vec![ + 140, 161, 17, 201, 152, 232, 129, 48, 168, 13, 49, 10, 218, 53, 118, 136, 165, 198, + 189, 116, 116, 22, 133, 92, 104, 165, 186, 249, 94, 81, 45, 20, + ] + ); + + // + // // fetching with empty where and orderBy + // + let query_value = json!({}); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 12); + + // + // // fetching with empty where and orderBy $id desc + // + let query_value = json!({ + "orderBy": [["$id", "desc"]] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 12); + + let last_person = Document::from_bytes( + results.first().unwrap().as_slice(), + document_type, + platform_version, + ) + .expect("we should be able to deserialize the document"); + + assert_eq!( + last_person.id().to_vec(), + vec![ + 249, 170, 70, 122, 181, 31, 35, 176, 175, 131, 70, 150, 250, 223, 194, 203, 175, 200, + 107, 252, 199, 227, 154, 105, 89, 57, 38, 85, 236, 192, 254, 88, + ] + ); + + // + // // fetching with ownerId in a set of values + // + let query_value = json!({ + "where": [ + ["$ownerId", "in", ["BYR3zJgXDuz1BYAkEagwSjVqTcE1gbqEojd6RwAGuMzj", "Di8dtJXv3L2YnzDNUN4w5rWLPSsSAzv6hLMMQbg3eyVA"]] + ], + "orderBy": [["$ownerId", "desc"]] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 2); + + // + // // fetching with ownerId equal and orderBy + // + let query_value = json!({ + "where": [ + ["$ownerId", "==", "BYR3zJgXDuz1BYAkEagwSjVqTcE1gbqEojd6RwAGuMzj"] + ], + "orderBy": [["$ownerId", "asc"]] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + // query empty contract with nested path queries + + let dashpay_contract = json_document_to_contract( + "tests/supporting_files/contract/dashpay/dashpay-contract.json", + false, + platform_version, + ) + .expect("expected to get cbor document"); + + drive + .apply_contract( + &dashpay_contract, + BlockInfo::default(), + true, + StorageFlags::optional_default_as_cow(), + None, + platform_version, + ) + .expect("expected to apply contract successfully"); + + let query_value = json!({ + "where": [ + ["$ownerId", "==", "BYR3zJgXDuz1BYAkEagwSjVqTcE1gbqEojd6RwAGuMzj"], + ["toUserId", "==", "BYR3zJgXDuz1BYAkEagwSjVqTcE1gbqEojd6RwAGuMzj"], + ], + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &dashpay_contract, + dashpay_contract + .document_type_for_name("contactRequest") + .expect("should have contact document type"), + &query_cbor, + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 0); - let platform_version = PlatformVersion::latest(); + // using non existing document in startAt - let db_transaction = drive.grove.start_transaction(); + let query_value = json!({ + "where": [ + ["$id", "in", [String::from("ATxXeP5AvY4aeUFA6WRo7uaBKTBgPQCjTrgtNpCMNVRD"), String::from("5A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF178")]], + ], + "orderBy": [["$id", "asc"]], + }); - let root_hash = drive - .grove - .root_hash(Some(&db_transaction), &platform_version.drive.grove_version) - .unwrap() - .expect("there is always a root hash"); + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); - // A query getting all elements by firstName + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + // using non existing document in startAt let query_value = json!({ "where": [ + ["$id", "in", [String::from("ATxXeP5AvY4aeUFA6WRo7uaBKTBgPQCjTrgtNpCMNVRD"), String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179")]], ], - "limit": 100, - "orderBy": [ - ["firstName", "asc"] - ] + "startAt": String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF178"), + "orderBy": [["$id", "asc"]], }); - let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) .expect("expected to serialize to cbor"); + let person_document_type = contract .document_type_for_name("person") .expect("contract should have a person document type"); - let query = DriveDocumentQuery::from_cbor( - where_cbor.as_slice(), + + let result = drive.query_documents_cbor_from_contract( &contract, person_document_type, - &drive.config, - ) - .expect("query should be built"); - let (results, _, _) = query - .execute_raw_results_no_proof(&drive, None, Some(&db_transaction), platform_version) - .expect("proof should be executed"); - - let (proof_root_hash, proof_results, _) = query - .execute_with_proof_only_get_elements(&drive, None, None, platform_version) - .expect("we should be able to a proof"); - assert_eq!(root_hash, proof_root_hash); - assert_eq!(results, proof_results); -} - -#[cfg(feature = "server")] -#[test] -fn test_non_existence_reference_proof_single_index() { - let (drive, contract) = setup_family_tests_only_first_name_index(0, 73509); - - let platform_version = PlatformVersion::latest(); - - let db_transaction = drive.grove.start_transaction(); + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ); - let root_hash = drive - .grove - .root_hash(Some(&db_transaction), &platform_version.drive.grove_version) - .unwrap() - .expect("there is always a root hash"); + assert!( + matches!(result, Err(Error::Query(QuerySyntaxError::StartDocumentNotFound(message))) if message == "startAt document not found") + ); - // A query getting all elements by firstName + // using non existing document in startAfter let query_value = json!({ "where": [ + ["$id", "in", [String::from("ATxXeP5AvY4aeUFA6WRo7uaBKTBgPQCjTrgtNpCMNVRD"), String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179")]], ], - "limit": 100, - "orderBy": [ - ["firstName", "asc"] - ] + "startAfter": String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF178"), + "orderBy": [["$id", "asc"]], }); - let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) .expect("expected to serialize to cbor"); + let person_document_type = contract .document_type_for_name("person") .expect("contract should have a person document type"); - let query = DriveDocumentQuery::from_cbor( - where_cbor.as_slice(), + + let result = drive.query_documents_cbor_from_contract( &contract, person_document_type, - &drive.config, - ) - .expect("query should be built"); - let (results, _, _) = query - .execute_raw_results_no_proof(&drive, None, Some(&db_transaction), platform_version) - .expect("proof should be executed"); + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ); - let (proof_root_hash, proof_results, _) = query - .execute_with_proof_only_get_elements(&drive, None, None, platform_version) - .expect("we should be able to a proof"); - assert_eq!(root_hash, proof_root_hash); - assert_eq!(results, proof_results); + assert!( + matches!(result, Err(Error::Query(QuerySyntaxError::StartDocumentNotFound(message))) if message == "startAfter document not found") + ); + + // validate eventual root hash + + let root_hash = drive + .grove + .root_hash(Some(&db_transaction), &platform_version.drive.grove_version) + .unwrap() + .expect("there is always a root hash"); + + assert_eq!( + root_hash.as_slice(), + vec![ + 251, 69, 177, 93, 128, 236, 106, 87, 205, 123, 80, 61, 44, 107, 186, 193, 22, 192, 239, + 7, 107, 110, 97, 197, 59, 245, 26, 12, 63, 91, 248, 231 + ], + ); } #[cfg(feature = "server")] #[test] fn test_family_basic_queries() { - let (drive, contract) = setup_family_tests(10, 73509); let platform_version = PlatformVersion::latest(); + let (drive, contract) = setup_family_tests(10, 73509, platform_version); let db_transaction = drive.grove.start_transaction(); @@ -1192,8 +2553,8 @@ fn test_family_basic_queries() { .expect("there is always a root hash"); let expected_app_hash = vec![ - 32, 210, 24, 196, 148, 43, 20, 34, 0, 116, 183, 136, 32, 210, 163, 183, 214, 6, 152, 86, - 46, 45, 88, 13, 23, 41, 37, 70, 129, 119, 211, 12, + 63, 90, 74, 129, 70, 204, 232, 67, 190, 85, 133, 79, 254, 245, 203, 180, 77, 67, 94, 22, + 180, 99, 51, 251, 82, 117, 211, 14, 136, 51, 228, 177, ]; assert_eq!(root_hash.as_slice(), expected_app_hash); @@ -2506,8 +3867,8 @@ fn test_family_basic_queries() { assert_eq!( root_hash.as_slice(), vec![ - 251, 69, 177, 93, 128, 236, 106, 87, 205, 123, 80, 61, 44, 107, 186, 193, 22, 192, 239, - 7, 107, 110, 97, 197, 59, 245, 26, 12, 63, 91, 248, 231, + 187, 202, 114, 108, 228, 21, 246, 191, 11, 30, 112, 178, 38, 36, 145, 109, 238, 11, + 210, 210, 0, 227, 175, 151, 149, 166, 143, 15, 144, 255, 82, 229, ], ); } @@ -2515,9 +3876,8 @@ fn test_family_basic_queries() { #[cfg(feature = "server")] #[test] fn test_family_person_update() { - let (drive, contract) = setup_family_tests(10, 73509); - let platform_version = PlatformVersion::latest(); + let (drive, contract) = setup_family_tests(10, 73509, platform_version); let epoch_change_fee_version_test: Lazy = Lazy::new(|| BTreeMap::from([(0, FeeVersion::first())])); @@ -2645,9 +4005,8 @@ fn test_family_person_update() { #[cfg(feature = "server")] #[test] fn test_family_starts_at_queries() { - let (drive, contract) = setup_family_tests(10, 73509); - let platform_version = PlatformVersion::latest(); + let (drive, contract) = setup_family_tests(10, 73509, platform_version); let db_transaction = drive.grove.start_transaction(); @@ -2658,8 +4017,8 @@ fn test_family_starts_at_queries() { .expect("there is always a root hash"); let expected_app_hash = vec![ - 32, 210, 24, 196, 148, 43, 20, 34, 0, 116, 183, 136, 32, 210, 163, 183, 214, 6, 152, 86, - 46, 45, 88, 13, 23, 41, 37, 70, 129, 119, 211, 12, + 63, 90, 74, 129, 70, 204, 232, 67, 190, 85, 133, 79, 254, 245, 203, 180, 77, 67, 94, 22, + 180, 99, 51, 251, 82, 117, 211, 14, 136, 51, 228, 177, ]; assert_eq!(root_hash.as_slice(), expected_app_hash); @@ -2908,10 +4267,11 @@ fn test_family_starts_at_queries() { #[cfg(feature = "server")] #[test] fn test_family_sql_query() { + let platform_version = PlatformVersion::latest(); // These helpers confirm that sql statements produce the same drive query // as their json counterparts, helpers above confirm that the json queries // produce the correct result set - let (drive, contract) = setup_family_tests(10, 73509); + let (drive, contract) = setup_family_tests(10, 73509, platform_version); let person_document_type = contract .document_type_for_name("person") .expect("contract should have a person document type"); @@ -3109,8 +4469,8 @@ fn test_family_with_nulls_query() { .expect("there is always a root hash"); let expected_app_hash = vec![ - 92, 186, 224, 49, 242, 195, 32, 14, 46, 55, 244, 57, 55, 191, 10, 119, 228, 132, 91, 235, - 170, 114, 36, 41, 126, 136, 180, 51, 132, 17, 26, 182, + 144, 185, 8, 30, 191, 97, 149, 182, 117, 203, 98, 187, 156, 93, 168, 171, 134, 112, 221, + 230, 249, 131, 86, 1, 26, 92, 242, 25, 251, 187, 192, 182, ]; assert_eq!(root_hash.as_slice(), expected_app_hash); @@ -3219,9 +4579,8 @@ fn test_family_with_nulls_query() { #[cfg(feature = "server")] #[test] fn test_query_with_cached_contract() { - let (drive, contract) = setup_family_tests(10, 73509); - let platform_version = PlatformVersion::latest(); + let (drive, contract) = setup_family_tests(10, 73509, platform_version); let db_transaction = drive.grove.start_transaction(); @@ -3233,8 +4592,8 @@ fn test_query_with_cached_contract() { // Make sure the state is deterministic let expected_app_hash = vec![ - 32, 210, 24, 196, 148, 43, 20, 34, 0, 116, 183, 136, 32, 210, 163, 183, 214, 6, 152, 86, - 46, 45, 88, 13, 23, 41, 37, 70, 129, 119, 211, 12, + 63, 90, 74, 129, 70, 204, 232, 67, 190, 85, 133, 79, 254, 245, 203, 180, 77, 67, 94, 22, + 180, 99, 51, 251, 82, 117, 211, 14, 136, 51, 228, 177, ]; assert_eq!(root_hash.as_slice(), expected_app_hash); @@ -3292,9 +4651,8 @@ fn test_query_with_cached_contract() { #[cfg(feature = "server")] #[test] fn test_dpns_query_contract_verification() { - let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456); - let platform_version = PlatformVersion::latest(); + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456, platform_version); let root_hash = drive .grove @@ -3368,10 +4726,9 @@ fn test_contract_keeps_history_fetch_and_verification() { #[cfg(feature = "server")] #[test] -fn test_dpns_query() { - let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456); - - let platform_version = PlatformVersion::latest(); +fn test_dpns_query_first_version() { + let platform_version = PlatformVersion::first(); + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456, &platform_version); let db_transaction = drive.grove.start_transaction(); @@ -3919,9 +5276,10 @@ fn test_dpns_insertion_with_aliases() { #[cfg(feature = "server")] #[test] -fn test_dpns_query_start_at() { +fn test_dpns_query_start_at_first_version() { + let platform_version = PlatformVersion::first(); // The point of this test is to test the situation where we have a start at a certain value for the DPNS query. - let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456); + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456, platform_version); let platform_version = PlatformVersion::latest(); @@ -4011,11 +5369,107 @@ fn test_dpns_query_start_at() { assert_eq!(results, proof_results); } +#[cfg(feature = "server")] +#[test] +fn test_dpns_query_start_at_latest_version() { + let platform_version = PlatformVersion::latest(); + // The point of this test is to test the situation where we have a start at a certain value for the DPNS query. + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456, platform_version); + + let platform_version = PlatformVersion::latest(); + + let db_transaction = drive.grove.start_transaction(); + + let root_hash = drive + .grove + .root_hash(Some(&db_transaction), &platform_version.drive.grove_version) + .unwrap() + .expect("there is always a root hash"); + + let expected_app_hash = vec![ + 248, 74, 104, 110, 129, 228, 194, 1, 4, 239, 134, 54, 105, 172, 221, 43, 101, 133, 235, + 146, 182, 153, 212, 118, 189, 99, 227, 14, 94, 83, 17, 98, + ]; + + assert_eq!(root_hash.as_slice(), expected_app_hash,); + + // let all_names = [ + // "amalle".to_string(), + // "anna-diane".to_string(), + // "atalanta".to_string(), + // "eden".to_string(), + // "laureen".to_string(), + // "leone".to_string(), + // "marilyn".to_string(), + // "minna".to_string(), + // "mora".to_string(), + // "phillie".to_string(), + // ]; + + // A query getting one element starting with a in dash parent domain asc + + let anna_id = hex::decode("0e97eb86ceca4309751616089336a127a5d48282712473b2d0fc5663afb1a080") + .expect("expected to decode id"); + let encoded_start_at = bs58::encode(anna_id).into_string(); + + let query_value = json!({ + "where": [ + ["normalizedParentDomainName", "==", "dash"] + ], + "startAt": encoded_start_at, + "limit": 1, + "orderBy": [ + ["normalizedLabel", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let domain_document_type = contract + .document_type_for_name("domain") + .expect("contract should have a domain document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + domain_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, Some(&db_transaction), platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), domain_document_type, platform_version) + .expect("we should be able to deserialize the document"); + let normalized_label_value = document + .get("normalizedLabel") + .expect("we should be able to get the first name"); + let normalized_label = normalized_label_value + .as_text() + .expect("the normalized label should be a string"); + String::from(normalized_label) + }) + .collect(); + + let a_names = ["anna-diane".to_string()]; + + assert_eq!(names, a_names); + + let (proof_root_hash, proof_results, _) = query + .execute_with_proof_only_get_elements(&drive, None, None, platform_version) + .expect("we should be able to a proof"); + assert_eq!(root_hash, proof_root_hash); + assert_eq!(results, proof_results); +} + #[cfg(feature = "server")] #[test] fn test_dpns_query_start_after() { + let platform_version = PlatformVersion::latest(); // The point of this test is to test the situation where we have a start at a certain value for the DPNS query. - let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456); + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456, platform_version); let platform_version = PlatformVersion::latest(); @@ -4028,8 +5482,8 @@ fn test_dpns_query_start_after() { .expect("there is always a root hash"); let expected_app_hash = vec![ - 142, 246, 25, 166, 52, 184, 158, 102, 192, 111, 173, 255, 155, 125, 53, 233, 98, 241, 201, - 233, 2, 58, 47, 90, 209, 207, 147, 204, 83, 68, 183, 143, + 248, 74, 104, 110, 129, 228, 194, 1, 4, 239, 134, 54, 105, 172, 221, 43, 101, 133, 235, + 146, 182, 153, 212, 118, 189, 99, 227, 14, 94, 83, 17, 98, ]; assert_eq!(root_hash.as_slice(), expected_app_hash); @@ -4108,8 +5562,9 @@ fn test_dpns_query_start_after() { #[cfg(feature = "server")] #[test] fn test_dpns_query_start_at_desc() { + let platform_version = PlatformVersion::latest(); // The point of this test is to test the situation where we have a start at a certain value for the DPNS query. - let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456); + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456, platform_version); let platform_version = PlatformVersion::latest(); @@ -4122,8 +5577,8 @@ fn test_dpns_query_start_at_desc() { .expect("there is always a root hash"); let expected_app_hash = vec![ - 142, 246, 25, 166, 52, 184, 158, 102, 192, 111, 173, 255, 155, 125, 53, 233, 98, 241, 201, - 233, 2, 58, 47, 90, 209, 207, 147, 204, 83, 68, 183, 143, + 248, 74, 104, 110, 129, 228, 194, 1, 4, 239, 134, 54, 105, 172, 221, 43, 101, 133, 235, + 146, 182, 153, 212, 118, 189, 99, 227, 14, 94, 83, 17, 98, ]; assert_eq!(root_hash.as_slice(), expected_app_hash); @@ -4202,8 +5657,9 @@ fn test_dpns_query_start_at_desc() { #[cfg(feature = "server")] #[test] fn test_dpns_query_start_after_desc() { + let platform_version = PlatformVersion::latest(); // The point of this test is to test the situation where we have a start at a certain value for the DPNS query. - let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456); + let (drive, contract) = setup_dpns_tests_with_batches(10, None, 11456, platform_version); let platform_version = PlatformVersion::latest(); @@ -4216,8 +5672,8 @@ fn test_dpns_query_start_after_desc() { .expect("there is always a root hash"); let expected_app_hash = vec![ - 142, 246, 25, 166, 52, 184, 158, 102, 192, 111, 173, 255, 155, 125, 53, 233, 98, 241, 201, - 233, 2, 58, 47, 90, 209, 207, 147, 204, 83, 68, 183, 143, + 248, 74, 104, 110, 129, 228, 194, 1, 4, 239, 134, 54, 105, 172, 221, 43, 101, 133, 235, + 146, 182, 153, 212, 118, 189, 99, 227, 14, 94, 83, 17, 98, ]; assert_eq!(root_hash.as_slice(), expected_app_hash); @@ -4410,8 +5866,8 @@ fn test_dpns_query_start_at_with_null_id() { .expect("there is always a root hash"); let expected_app_hash = vec![ - 72, 138, 172, 70, 225, 95, 64, 122, 142, 96, 131, 223, 154, 119, 132, 79, 182, 97, 202, 63, - 120, 116, 39, 217, 25, 208, 176, 49, 242, 138, 67, 112, + 11, 67, 98, 193, 214, 56, 66, 244, 193, 131, 252, 190, 5, 52, 29, 96, 160, 27, 222, 78, 91, + 150, 54, 85, 81, 249, 14, 74, 213, 181, 254, 120, ]; assert_eq!(root_hash.as_slice(), expected_app_hash); @@ -4615,8 +6071,8 @@ fn test_dpns_query_start_after_with_null_id() { .expect("there is always a root hash"); let expected_app_hash = vec![ - 72, 138, 172, 70, 225, 95, 64, 122, 142, 96, 131, 223, 154, 119, 132, 79, 182, 97, 202, 63, - 120, 116, 39, 217, 25, 208, 176, 49, 242, 138, 67, 112, + 11, 67, 98, 193, 214, 56, 66, 244, 193, 131, 252, 190, 5, 52, 29, 96, 160, 27, 222, 78, 91, + 150, 54, 85, 81, 249, 14, 74, 213, 181, 254, 120, ]; assert_eq!(root_hash.as_slice(), expected_app_hash); @@ -4823,8 +6279,8 @@ fn test_dpns_query_start_after_with_null_id_desc() { .expect("there is always a root hash"); let expected_app_hash = vec![ - 72, 138, 172, 70, 225, 95, 64, 122, 142, 96, 131, 223, 154, 119, 132, 79, 182, 97, 202, 63, - 120, 116, 39, 217, 25, 208, 176, 49, 242, 138, 67, 112, + 11, 67, 98, 193, 214, 56, 66, 244, 193, 131, 252, 190, 5, 52, 29, 96, 160, 27, 222, 78, 91, + 150, 54, 85, 81, 249, 14, 74, 213, 181, 254, 120, ]; assert_eq!(root_hash.as_slice(), expected_app_hash,); @@ -5036,8 +6492,8 @@ fn test_withdrawals_query_by_owner_id() { .expect("there is always a root hash"); let expected_app_hash = vec![ - 144, 177, 24, 41, 104, 174, 220, 135, 164, 0, 240, 215, 42, 60, 249, 142, 150, 169, 135, - 72, 151, 35, 238, 131, 164, 229, 106, 83, 198, 109, 65, 211, + 27, 172, 224, 121, 173, 248, 170, 255, 202, 209, 7, 83, 203, 185, 208, 102, 157, 75, 55, + 21, 217, 212, 91, 174, 144, 146, 135, 92, 97, 156, 166, 6, ]; assert_eq!(root_hash.as_slice(), expected_app_hash); @@ -5116,8 +6572,8 @@ fn test_withdrawals_query_start_after_query_by_owner_id() { .expect("there is always a root hash"); let expected_app_hash = vec![ - 144, 177, 24, 41, 104, 174, 220, 135, 164, 0, 240, 215, 42, 60, 249, 142, 150, 169, 135, - 72, 151, 35, 238, 131, 164, 229, 106, 83, 198, 109, 65, 211, + 27, 172, 224, 121, 173, 248, 170, 255, 202, 209, 7, 83, 203, 185, 208, 102, 157, 75, 55, + 21, 217, 212, 91, 174, 144, 146, 135, 92, 97, 156, 166, 6, ]; assert_eq!(root_hash.as_slice(), expected_app_hash); @@ -5217,8 +6673,8 @@ fn test_withdrawals_query_start_after_query_by_owner_id_desc() { .expect("there is always a root hash"); let expected_app_hash = vec![ - 144, 177, 24, 41, 104, 174, 220, 135, 164, 0, 240, 215, 42, 60, 249, 142, 150, 169, 135, - 72, 151, 35, 238, 131, 164, 229, 106, 83, 198, 109, 65, 211, + 27, 172, 224, 121, 173, 248, 170, 255, 202, 209, 7, 83, 203, 185, 208, 102, 157, 75, 55, + 21, 217, 212, 91, 174, 144, 146, 135, 92, 97, 156, 166, 6, ]; assert_eq!(root_hash.as_slice(), expected_app_hash); diff --git a/packages/rs-drive/tests/query_tests_history.rs b/packages/rs-drive/tests/query_tests_history.rs index c14dfeca9e..1aa1b98fe4 100644 --- a/packages/rs-drive/tests/query_tests_history.rs +++ b/packages/rs-drive/tests/query_tests_history.rs @@ -161,15 +161,14 @@ pub fn setup( count: usize, restrict_to_inserts: Option>, seed: u64, + platform_version: &PlatformVersion, ) -> (Drive, DataContract) { let drive_config = DriveConfig::default(); - let platform_version = PlatformVersion::latest(); - let epoch_change_fee_version_test: Lazy = Lazy::new(|| BTreeMap::from([(0, FeeVersion::first())])); - let drive = setup_drive(Some(drive_config)); + let drive = setup_drive(Some(drive_config), None); let db_transaction = drive.grove.start_transaction(); @@ -187,7 +186,10 @@ pub fn setup( &drive, "tests/supporting_files/contract/family/family-contract-with-history.json", None, + None, + None::, Some(&db_transaction), + Some(platform_version), ); let block_times: Vec = vec![0, 15, 100, 1000]; @@ -250,15 +252,15 @@ pub fn setup( #[test] fn test_setup() { let range_inserts = vec![0, 2]; - setup(10, Some(range_inserts), 73509); + let platform_version = PlatformVersion::latest(); + setup(10, Some(range_inserts), 73509, platform_version); } #[cfg(feature = "server")] #[test] -fn test_query_historical() { - let (drive, contract) = setup(10, None, 73509); - - let platform_version = PlatformVersion::latest(); +fn test_query_historical_first_platform_version() { + let platform_version = PlatformVersion::first(); + let (drive, contract) = setup(10, None, 73509, platform_version); let epoch_change_fee_version_test: Lazy = Lazy::new(|| BTreeMap::from([(0, FeeVersion::first())])); @@ -1644,3 +1646,1394 @@ fn test_query_historical() { ] ); } + +#[cfg(feature = "server")] +#[test] +fn test_query_historical_latest_platform_version() { + let platform_version = PlatformVersion::latest(); + let (drive, contract) = setup(10, None, 73509, platform_version); + + let epoch_change_fee_version_test: Lazy = + Lazy::new(|| BTreeMap::from([(0, FeeVersion::first())])); + + let db_transaction = drive.grove.start_transaction(); + + let root_hash = drive + .grove + .root_hash(Some(&db_transaction), &platform_version.drive.grove_version) + .unwrap() + .expect("there is always a root hash"); + assert_eq!( + root_hash.as_slice(), + vec![ + 5, 227, 59, 163, 38, 58, 181, 91, 23, 56, 47, 52, 138, 63, 5, 54, 205, 249, 205, 225, + 78, 225, 195, 2, 104, 6, 11, 77, 56, 69, 113, 237, + ] + ); + + let all_names = [ + "Adey".to_string(), + "Briney".to_string(), + "Cammi".to_string(), + "Celinda".to_string(), + "Dalia".to_string(), + "Gilligan".to_string(), + "Kevina".to_string(), + "Meta".to_string(), + "Noellyn".to_string(), + "Prissie".to_string(), + ]; + + // A query getting all elements by firstName + + let query_value = json!({ + "where": [ + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, Some(&db_transaction), platform_version) + .expect("proof should be executed"); + let names: Vec = results + .into_iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + assert_eq!(names, all_names); + + // A query getting all people who's first name is Chris (which should exist) + + let query_value = json!({ + "where": [ + ["firstName", "==", "Adey"] + ] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + // A query getting all people who's first name is Adey and lastName Randolf + + let query_value = json!({ + "where": [ + ["firstName", "==", "Adey"], + ["lastName", "==", "Randolf"] + ], + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + let document = Document::from_bytes( + results.first().unwrap().as_slice(), + person_document_type, + platform_version, + ) + .expect("we should be able to deserialize the cbor"); + let last_name = document + .get("lastName") + .expect("we should be able to get the last name") + .as_text() + .expect("last name must be a string"); + + assert_eq!(last_name, "Randolf"); + + // A query getting all people who's first name is in a range with a single element Adey, + // order by lastName (this should exist) + + let query_value = json!({ + "where": [ + ["firstName", "in", ["Adey"]] + ], + "orderBy": [ + ["firstName", "asc"], + ["lastName", "asc"] + ] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + // A query getting all people who's first name is Adey, order by lastName (which should exist) + + let query_value = json!({ + "where": [ + ["firstName", "==", "Adey"] + ], + "orderBy": [ + ["lastName", "asc"] + ] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + let document = Document::from_bytes( + results.first().unwrap().as_slice(), + person_document_type, + platform_version, + ) + .expect("we should be able to deserialize the cbor"); + let last_name = document + .get("lastName") + .expect("we should be able to get the last name") + .as_text() + .expect("last name must be a string"); + + assert_eq!(last_name, "Randolf"); + + // A query getting all people who's first name is Chris (which is not exist) + + let query_value = json!({ + "where": [ + ["firstName", "==", "Chris"] + ] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 0); + + // A query getting a middle name + + let query_value = json!({ + "where": [ + ["middleName", "==", "Briggs"] + ] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + None, + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + // A query getting all people who's first name is before Chris + + let query_value = json!({ + "where": [ + ["firstName", "<", "Chris"] + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .into_iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + let expected_names_before_chris = [ + "Adey".to_string(), + "Briney".to_string(), + "Cammi".to_string(), + "Celinda".to_string(), + ]; + assert_eq!(names, expected_names_before_chris); + + // A query getting all people who's first name is before Chris + + let query_value = json!({ + "where": [ + ["firstName", "StartsWith", "C"] + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .into_iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + let expected_names_before_chris = ["Cammi".to_string(), "Celinda".to_string()]; + assert_eq!(names, expected_names_before_chris); + + // A query getting all people who's first name is between Chris and Noellyn included + + let query_value = json!({ + "where": [ + ["firstName", ">", "Chris"], + ["firstName", "<=", "Noellyn"] + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + assert_eq!(results.len(), 5); + + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + let expected_between_names = [ + "Dalia".to_string(), + "Gilligan".to_string(), + "Kevina".to_string(), + "Meta".to_string(), + "Noellyn".to_string(), + ]; + + assert_eq!(names, expected_between_names); + + // A query getting all people who's first name is between Chris and Noellyn included + // However here there will be a startAt of the ID of Kevina + + // Let's first get the ID of Kevina + let ids: HashMap> = results + .into_iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let name = name_value + .as_text() + .expect("the first name should be a string") + .to_string(); + (name, document.id().to_vec()) + }) + .collect(); + + let kevina_id = ids + .get("Kevina") + .expect("We should be able to get back Kevina's Id"); + let kevina_encoded_id = bs58::encode(kevina_id).into_string(); + + let query_value = json!({ + "where": [ + ["firstName", ">", "Chris"], + ["firstName", "<=", "Noellyn"] + ], + "startAt": kevina_encoded_id, //Kevina + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + assert_eq!(results.len(), 3); + + let reduced_names_after: Vec = results + .into_iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + let expected_reduced_names = [ + "Kevina".to_string(), + "Meta".to_string(), + "Noellyn".to_string(), + ]; + + assert_eq!(reduced_names_after, expected_reduced_names); + + // Now lets try startsAfter + + let query_value = json!({ + "where": [ + ["firstName", ">", "Chris"], + ["firstName", "<=", "Noellyn"] + ], + "startAfter": kevina_encoded_id, //Kevina + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + assert_eq!(results.len(), 2); + + let reduced_names_after: Vec = results + .into_iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + let expected_reduced_names = ["Meta".to_string(), "Noellyn".to_string()]; + + assert_eq!(reduced_names_after, expected_reduced_names); + + // A query getting back elements having specific names + + let query_value = json!({ + "where": [ + ["firstName", "in", names] + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .into_iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + assert_eq!(names, expected_between_names); + + let query_value = json!({ + "where": [ + ["firstName", "in", names] + ], + "limit": 100, + "orderBy": [ + ["firstName", "desc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .clone() + .into_iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + let ages: Vec = results + .into_iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let age_value = document + .get("age") + .expect("we should be able to get the age"); + let age: u64 = age_value + .to_integer() + .expect("the age should be put in an u64"); + age + }) + .collect(); + + let expected_reversed_between_names = [ + "Noellyn".to_string(), // 40 + "Meta".to_string(), // 69 + "Kevina".to_string(), // 58 + "Gilligan".to_string(), // 59 + "Dalia".to_string(), // 78 + ]; + + assert_eq!(names, expected_reversed_between_names); + + let expected_ages = [40, 69, 58, 59, 78]; + + assert_eq!(ages, expected_ages); + + // A query getting back elements having specific names and over a certain age + + let query_value = json!({ + "where": [ + ["firstName", "in", names], + ["age", ">=", 45] + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"], + ["age", "desc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + // Kevina is 55, and is excluded from this test + let expected_names_45_over = [ + "Dalia".to_string(), + "Gilligan".to_string(), + "Kevina".to_string(), + "Meta".to_string(), + ]; + + assert_eq!(names, expected_names_45_over); + + // A query getting back elements having specific names and over a certain age + + let query_value = json!({ + "where": [ + ["firstName", "in", names], + ["age", ">", 58] + ], + "limit": 100, + "orderBy": [ + ["firstName", "asc"], + ["age", "desc"] + ] + }); + let where_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + let query = DriveDocumentQuery::from_cbor( + where_cbor.as_slice(), + &contract, + person_document_type, + &drive.config, + ) + .expect("query should be built"); + let (results, _, _) = query + .execute_raw_results_no_proof(&drive, None, None, platform_version) + .expect("proof should be executed"); + let names: Vec = results + .iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let first_name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let first_name = first_name_value + .as_text() + .expect("the first name should be a string"); + String::from(first_name) + }) + .collect(); + + // Kevina is 48 so she should be now excluded, Dalia is 68, Gilligan is 49 and Meta is 59 + + let expected_names_over_48 = [ + "Dalia".to_string(), + "Gilligan".to_string(), + "Meta".to_string(), + ]; + + assert_eq!(names, expected_names_over_48); + + let ages: HashMap = results + .into_iter() + .map(|result| { + let document = + Document::from_bytes(result.as_slice(), person_document_type, platform_version) + .expect("we should be able to deserialize the cbor"); + let name_value = document + .get("firstName") + .expect("we should be able to get the first name"); + let name = name_value + .as_text() + .expect("the first name should be a string") + .to_string(); + let age_value = document + .get("age") + .expect("we should be able to get the age"); + let age: u8 = age_value.to_integer().expect("age should be an integer"); + (name, age) + }) + .collect(); + + let meta_age = ages + .get("Meta") + .expect("we should be able to get Kevina as she is 48"); + + assert_eq!(*meta_age, 69); + + // fetching by $id + let mut rng = rand::rngs::StdRng::seed_from_u64(84594); + let id_bytes = bs58::decode("ATxXeP5AvY4aeUFA6WRo7uaBKTBgPQCjTrgtNpCMNVRD") + .into_vec() + .expect("this should decode"); + + let owner_id_bytes = bs58::decode("BYR3zJgXDuz1BYAkEagwSjVqTcE1gbqEojd6RwAGuMzj") + .into_vec() + .expect("this should decode"); + + let fixed_person = Person { + id: id_bytes, + owner_id: owner_id_bytes, + first_name: String::from("Wisdom"), + middle_name: String::from("Madabuchukwu"), + last_name: String::from("Ogwu"), + message: Some(String::from("Oh no")), + age: rng.gen_range(0..85), + }; + let serialized_person = serde_json::to_value(fixed_person).expect("serialized person"); + let person_cbor = cbor_serializer::serializable_value_to_cbor(&serialized_person, Some(0)) + .expect("expected to serialize to cbor"); + let document = Document::from_cbor(person_cbor.as_slice(), None, None, platform_version) + .expect("document should be properly deserialized"); + + let document_type = contract + .document_type_for_name("person") + .expect("expected to get document type"); + + let storage_flags = Some(Cow::Owned(StorageFlags::SingleEpoch(0))); + + drive + .add_document_for_contract( + DocumentAndContractInfo { + owned_document_info: OwnedDocumentInfo { + document_info: DocumentRefInfo((&document, storage_flags)), + owner_id: None, + }, + contract: &contract, + document_type, + }, + true, + BlockInfo::genesis(), + true, + Some(&db_transaction), + platform_version, + Some(&epoch_change_fee_version_test), + ) + .expect("document should be inserted"); + + let id_two_bytes = bs58::decode("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179") + .into_vec() + .expect("should decode"); + let owner_id_bytes = bs58::decode("Di8dtJXv3L2YnzDNUN4w5rWLPSsSAzv6hLMMQbg3eyVA") + .into_vec() + .expect("this should decode"); + let next_person = Person { + id: id_two_bytes, + owner_id: owner_id_bytes, + first_name: String::from("Wdskdfslgjfdlj"), + middle_name: String::from("Mdsfdsgsdl"), + last_name: String::from("dkfjghfdk"), + message: Some(String::from("Bad name")), + age: rng.gen_range(0..85), + }; + let serialized_person = serde_json::to_value(next_person).expect("serialized person"); + let person_cbor = cbor_serializer::serializable_value_to_cbor(&serialized_person, Some(0)) + .expect("expected to serialize to cbor"); + let document = Document::from_cbor(person_cbor.as_slice(), None, None, platform_version) + .expect("document should be properly deserialized"); + + let document_type = contract + .document_type_for_name("person") + .expect("expected to get document type"); + + let storage_flags = Some(Cow::Owned(StorageFlags::SingleEpoch(0))); + + drive + .add_document_for_contract( + DocumentAndContractInfo { + owned_document_info: OwnedDocumentInfo { + document_info: DocumentRefInfo((&document, storage_flags)), + owner_id: None, + }, + contract: &contract, + document_type, + }, + true, + BlockInfo::genesis(), + true, + Some(&db_transaction), + platform_version, + None, + ) + .expect("document should be inserted"); + + let query_value = json!({ + "where": [ + ["$id", "in", vec![String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179")]], + ], + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + let query_value = json!({ + "where": [ + ["$id", "==", "6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179"] + ] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + let query_value = json!({ + "where": [ + ["$id", "==", "6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179"] + ], + "blockTime": 300 + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + // fetching by $id with order by + + let query_value = json!({ + "where": [ + ["$id", "in", [String::from("ATxXeP5AvY4aeUFA6WRo7uaBKTBgPQCjTrgtNpCMNVRD"), String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179")]], + ], + "orderBy": [["$id", "asc"]], + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 2); + + let last_person = Document::from_bytes( + results.first().unwrap().as_slice(), + person_document_type, + platform_version, + ) + .expect("we should be able to deserialize the cbor"); + + assert_eq!( + last_person.id().to_vec(), + vec![ + 76, 161, 17, 201, 152, 232, 129, 48, 168, 13, 49, 10, 218, 53, 118, 136, 165, 198, 189, + 116, 116, 22, 133, 92, 104, 165, 186, 249, 94, 81, 45, 20 + ] + .as_slice() + ); + + // fetching by $id with order by desc + + let query_value = json!({ + "where": [ + ["$id", "in", [String::from("ATxXeP5AvY4aeUFA6WRo7uaBKTBgPQCjTrgtNpCMNVRD"), String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179")]], + ], + "orderBy": [["$id", "desc"]], + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 2); + + let last_person = Document::from_bytes( + results.first().unwrap().as_slice(), + person_document_type, + platform_version, + ) + .expect("we should be able to deserialize the cbor"); + + assert_eq!( + last_person.id().to_vec(), + vec![ + 140, 161, 17, 201, 152, 232, 129, 48, 168, 13, 49, 10, 218, 53, 118, 136, 165, 198, + 189, 116, 116, 22, 133, 92, 104, 165, 186, 249, 94, 81, 45, 20 + ] + .as_slice() + ); + + // + // // fetching with empty where and orderBy + // + let query_value = json!({}); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 12); + + // + // // fetching with empty where and orderBy $id desc + // + let query_value = json!({ + "orderBy": [["$id", "desc"]] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 12); + + let last_person = Document::from_bytes( + results.first().unwrap().as_slice(), + person_document_type, + platform_version, + ) + .expect("we should be able to deserialize the cbor"); + + assert_eq!( + last_person.id().to_vec(), + vec![ + 249, 170, 70, 122, 181, 31, 35, 176, 175, 131, 70, 150, 250, 223, 194, 203, 175, 200, + 107, 252, 199, 227, 154, 105, 89, 57, 38, 85, 236, 192, 254, 88 + ] + .as_slice() + ); + + let message_value = last_person.get("message").unwrap(); + + let message = message_value + .as_text() + .expect("the message should be a string") + .to_string(); + + assert_eq!( + message, + String::from("“Since it’s the customer that pays our salary, our responsibility is to make the product they want, when they want it, and deliv") + ); + + // + // // fetching with empty where and orderBy $id desc with a blockTime + // + let query_value = json!({ + "orderBy": [["$id", "desc"]], + "blockTime": 300 + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect_err("not yet implemented"); + + // assert_eq!(results.len(), 12); + // + // let last_person = Document::from_bytes(results.first().unwrap().as_slice(), person_document_type, platform_version) + // .expect("we should be able to deserialize the cbor"); + // + // assert_eq!( + // last_person.id, + // vec![ + // 249, 170, 70, 122, 181, 31, 35, 176, 175, 131, 70, 150, 250, 223, 194, 203, 175, 200, + // 107, 252, 199, 227, 154, 105, 89, 57, 38, 85, 236, 192, 254, 88 + // ] + // .as_slice() + // ); + // + // let message_value = last_person.get("message").unwrap(); + // + // let message = message_value + // .as_text() + // .expect("the message should be a string") + // .to_string(); + // + // assert_eq!( + // message, + // String::from("“Since it’s the customer that pays our salary, our responsibility is to make the product they want, when they want it, and deliver quality that satisfies them.” Retired factory worker, Kiyoshi Tsutsumi (Osono et al 2008, 136)") + // ); + + // + // // fetching with ownerId in a set of values + // + let query_value = json!({ + "where": [ + ["$ownerId", "in", ["BYR3zJgXDuz1BYAkEagwSjVqTcE1gbqEojd6RwAGuMzj", "Di8dtJXv3L2YnzDNUN4w5rWLPSsSAzv6hLMMQbg3eyVA"]] + ], + "orderBy": [["$ownerId", "desc"]] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 2); + + // + // // fetching with ownerId equal and orderBy + // + let query_value = json!({ + "where": [ + ["$ownerId", "==", "BYR3zJgXDuz1BYAkEagwSjVqTcE1gbqEojd6RwAGuMzj"] + ], + "orderBy": [["$ownerId", "asc"]] + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 1); + + // query empty contract with nested path queries + + let dashpay_contract = json_document_to_contract( + "tests/supporting_files/contract/dashpay/dashpay-contract.json", + false, + platform_version, + ) + .expect("expected to get cbor document"); + + drive + .apply_contract( + &dashpay_contract, + BlockInfo::default(), + true, + StorageFlags::optional_default_as_cow(), + Some(&db_transaction), + platform_version, + ) + .expect("expected to apply contract successfully"); + + let query_value = json!({ + "where": [ + ["$ownerId", "==", "BYR3zJgXDuz1BYAkEagwSjVqTcE1gbqEojd6RwAGuMzj"], + ["toUserId", "==", "BYR3zJgXDuz1BYAkEagwSjVqTcE1gbqEojd6RwAGuMzj"], + ], + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let (results, _, _) = drive + .query_documents_cbor_from_contract( + &dashpay_contract, + dashpay_contract + .document_type_for_name("contactRequest") + .expect("should have contact document type"), + &query_cbor, + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ) + .expect("query should be executed"); + + assert_eq!(results.len(), 0); + + // using non existing document in startAt + + let query_value = json!({ + "where": [ + ["$id", "in", [String::from("ATxXeP5AvY4aeUFA6WRo7uaBKTBgPQCjTrgtNpCMNVRD"), String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179")]], + ], + "startAt": String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF178"), + "orderBy": [["$id", "asc"]], + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let result = drive.query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ); + + assert!( + matches!(result, Err(Error::Query(QuerySyntaxError::StartDocumentNotFound(message))) if message == "startAt document not found") + ); + + // using non-existing document in startAfter + + let query_value = json!({ + "where": [ + ["$id", "in", [String::from("ATxXeP5AvY4aeUFA6WRo7uaBKTBgPQCjTrgtNpCMNVRD"), String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF179")]], + ], + "startAfter": String::from("6A8SGgdmj2NtWCYoYDPDpbsYkq2MCbgi6Lx4ALLfF178"), + "orderBy": [["$id", "asc"]], + }); + + let query_cbor = cbor_serializer::serializable_value_to_cbor(&query_value, None) + .expect("expected to serialize to cbor"); + + let person_document_type = contract + .document_type_for_name("person") + .expect("contract should have a person document type"); + + let result = drive.query_documents_cbor_from_contract( + &contract, + person_document_type, + query_cbor.as_slice(), + None, + Some(&db_transaction), + Some(platform_version.protocol_version), + ); + + assert!( + matches!(result, Err(Error::Query(QuerySyntaxError::StartDocumentNotFound(message))) if message == "startAfter document not found") + ); + + // validate eventual root hash + + let root_hash = drive + .grove + .root_hash(Some(&db_transaction), &platform_version.drive.grove_version) + .unwrap() + .expect("there is always a root hash"); + assert_eq!( + root_hash.as_slice(), + vec![ + 203, 160, 200, 71, 200, 156, 249, 93, 201, 35, 171, 6, 57, 176, 159, 104, 26, 253, 141, + 193, 153, 0, 212, 9, 207, 239, 250, 51, 68, 228, 210, 164 + ] + ); +} diff --git a/packages/rs-drive/tests/supporting_files/contract/tokens/token-example-contract.json b/packages/rs-drive/tests/supporting_files/contract/tokens/token-example-contract.json new file mode 100644 index 0000000000..2a47ff22bc --- /dev/null +++ b/packages/rs-drive/tests/supporting_files/contract/tokens/token-example-contract.json @@ -0,0 +1,23 @@ +{ + "$format_version": "0", + "id": "AcYUCSvAmUwryNsQqkqqD1o3BnFuzepGtR3Mhh2swLk6", + "ownerId": "HLfavpy1B2mVHnpYYDKDVM76eWJRqvPfuuASy7cyJBXC", + "version": 1, + "tokens": { + "flurgon": { + "shouldCapitalize": true, + "pluralForm": "flurgons", + "maintainer": "GQcEb4CaXEXtPUpnJyHUt78jDij6etgEXUKyect7ZRSm", + "initialSupply": 100000000000, + "decimals": 8, + "transferable": true, + "maxSupply": 100000000000, + "roles": { + "maintainer": { + "canMint": true, + "canBurn": true + } + } + } + } +} diff --git a/packages/rs-platform-version/Cargo.toml b/packages/rs-platform-version/Cargo.toml index 1364598fc1..e7e66db2df 100644 --- a/packages/rs-platform-version/Cargo.toml +++ b/packages/rs-platform-version/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" thiserror = { version = "1.0.63" } bincode = { version = "2.0.0-rc.3" } versioned-feature-core = { git = "https://github.com/dashpay/versioned-feature-core", version = "1.0.0" } -grovedb-version = { version = "2.2.1" } +grovedb-version = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" } once_cell = "1.19.0" [features] diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/mod.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/mod.rs index 91fd85cbae..6f74987f92 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/mod.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/mod.rs @@ -1,5 +1,6 @@ use versioned_feature_core::{FeatureVersion, FeatureVersionBounds}; pub mod v1; +pub mod v2; #[derive(Clone, Debug, Default)] pub struct DPPContractVersions { diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/v2.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/v2.rs new file mode 100644 index 0000000000..5dd797e201 --- /dev/null +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/v2.rs @@ -0,0 +1,54 @@ +use crate::version::dpp_versions::dpp_contract_versions::{ + DPPContractVersions, DataContractMethodVersions, DocumentTypeClassMethodVersions, + DocumentTypeIndexVersions, DocumentTypeMethodVersions, DocumentTypeSchemaVersions, + DocumentTypeVersions, RecursiveSchemaValidatorVersions, +}; +use versioned_feature_core::FeatureVersionBounds; + +pub const CONTRACT_VERSIONS_V2: DPPContractVersions = DPPContractVersions { + max_serialized_size: 65000, + contract_serialization_version: FeatureVersionBounds { + min_version: 0, + max_version: 1, + default_current_version: 1, //changed + }, + contract_structure_version: 1, //changed + 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: 1, //changed to allow contracts with only tokens + }, + 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, + }, + }, +}; diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_serialization_versions/mod.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_serialization_versions/mod.rs index 3ad838e5de..8d69f6f8b6 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_serialization_versions/mod.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_serialization_versions/mod.rs @@ -1,6 +1,7 @@ use versioned_feature_core::FeatureVersionBounds; pub mod v1; +pub mod v2; #[derive(Clone, Debug, Default)] pub struct DPPStateTransitionSerializationVersions { @@ -13,7 +14,7 @@ pub struct DPPStateTransitionSerializationVersions { pub masternode_vote_state_transition: FeatureVersionBounds, pub contract_create_state_transition: FeatureVersionBounds, pub contract_update_state_transition: FeatureVersionBounds, - pub documents_batch_state_transition: FeatureVersionBounds, + pub batch_state_transition: FeatureVersionBounds, pub document_base_state_transition: FeatureVersionBounds, pub document_create_state_transition: DocumentFeatureVersionBounds, pub document_replace_state_transition: DocumentFeatureVersionBounds, diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_serialization_versions/v1.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_serialization_versions/v1.rs index 917b8405f0..944e613c26 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_serialization_versions/v1.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_serialization_versions/v1.rs @@ -50,7 +50,7 @@ pub const STATE_TRANSITION_SERIALIZATION_VERSIONS_V1: DPPStateTransitionSerializ max_version: 0, default_current_version: 0, }, - documents_batch_state_transition: FeatureVersionBounds { + batch_state_transition: FeatureVersionBounds { min_version: 0, max_version: 0, default_current_version: 0, diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_serialization_versions/v2.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_serialization_versions/v2.rs new file mode 100644 index 0000000000..1df489c45e --- /dev/null +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_state_transition_serialization_versions/v2.rs @@ -0,0 +1,105 @@ +use crate::version::dpp_versions::dpp_state_transition_serialization_versions::{ + DPPStateTransitionSerializationVersions, DocumentFeatureVersionBounds, +}; +use versioned_feature_core::FeatureVersionBounds; + +pub const STATE_TRANSITION_SERIALIZATION_VERSIONS_V2: DPPStateTransitionSerializationVersions = + DPPStateTransitionSerializationVersions { + 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, + }, + batch_state_transition: FeatureVersionBounds { + min_version: 0, + max_version: 1, + default_current_version: 1, + }, + 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, + }, + }, + }; diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_token_versions/mod.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_token_versions/mod.rs new file mode 100644 index 0000000000..2fa2f4f905 --- /dev/null +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_token_versions/mod.rs @@ -0,0 +1,9 @@ +pub mod v1; + +use versioned_feature_core::FeatureVersion; + +#[derive(Clone, Debug, Default)] +pub struct DPPTokenVersions { + pub identity_token_info_default_structure_version: FeatureVersion, + pub identity_token_status_default_structure_version: FeatureVersion, +} diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_token_versions/v1.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_token_versions/v1.rs new file mode 100644 index 0000000000..d36fdbf9a2 --- /dev/null +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_token_versions/v1.rs @@ -0,0 +1,6 @@ +use crate::version::dpp_versions::dpp_token_versions::DPPTokenVersions; + +pub const TOKEN_VERSIONS_V1: DPPTokenVersions = DPPTokenVersions { + identity_token_info_default_structure_version: 0, + identity_token_status_default_structure_version: 0, +}; diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/mod.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/mod.rs index ebaa11678f..c794e0ae1b 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/mod.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/mod.rs @@ -15,6 +15,7 @@ pub struct DPPValidationVersions { pub struct DataContractValidationVersions { pub validate: FeatureVersion, pub validate_config_update: FeatureVersion, + pub validate_token_config_update: FeatureVersion, pub validate_index_definitions: FeatureVersion, pub validate_index_naming_duplicates: FeatureVersion, pub validate_not_defined_properties: FeatureVersion, diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v1.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v1.rs index e698694e62..38dd978bf0 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v1.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v1.rs @@ -13,6 +13,7 @@ pub const DPP_VALIDATION_VERSIONS_V1: DPPValidationVersions = DPPValidationVersi data_contract: DataContractValidationVersions { validate: 0, validate_config_update: 0, + validate_token_config_update: 0, validate_index_definitions: 0, validate_index_naming_duplicates: 0, validate_not_defined_properties: 0, diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v2.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v2.rs index 7122390711..dcc7727e15 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v2.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v2.rs @@ -13,6 +13,7 @@ pub const DPP_VALIDATION_VERSIONS_V2: DPPValidationVersions = DPPValidationVersi data_contract: DataContractValidationVersions { validate: 0, validate_config_update: 0, + validate_token_config_update: 0, validate_index_definitions: 0, validate_index_naming_duplicates: 0, validate_not_defined_properties: 0, diff --git a/packages/rs-platform-version/src/version/dpp_versions/mod.rs b/packages/rs-platform-version/src/version/dpp_versions/mod.rs index e51203512c..c58be60aec 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/mod.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/mod.rs @@ -9,6 +9,7 @@ pub mod dpp_state_transition_conversion_versions; pub mod dpp_state_transition_method_versions; pub mod dpp_state_transition_serialization_versions; pub mod dpp_state_transition_versions; +pub mod dpp_token_versions; pub mod dpp_validation_versions; pub mod dpp_voting_versions; @@ -23,6 +24,7 @@ use dpp_state_transition_conversion_versions::DPPStateTransitionConversionVersio use dpp_state_transition_method_versions::DPPStateTransitionMethodVersions; use dpp_state_transition_serialization_versions::DPPStateTransitionSerializationVersions; use dpp_state_transition_versions::DPPStateTransitionVersions; +use dpp_token_versions::DPPTokenVersions; use dpp_validation_versions::DPPValidationVersions; use dpp_voting_versions::DPPVotingVersions; @@ -39,6 +41,7 @@ pub struct DPPVersion { pub document_versions: DPPDocumentVersions, pub identity_versions: DPPIdentityVersions, pub voting_versions: DPPVotingVersions, + pub token_versions: DPPTokenVersions, pub asset_lock_versions: DPPAssetLockVersions, pub methods: DPPMethodVersions, pub factory_versions: DPPFactoryVersions, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/mod.rs index 8d671176f4..18afbf4a15 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/mod.rs @@ -5,6 +5,7 @@ pub mod v2; pub mod v3; pub mod v4; pub mod v5; +pub mod v6; #[derive(Clone, Debug, Default)] pub struct DriveAbciMethodVersions { @@ -13,6 +14,7 @@ pub struct DriveAbciMethodVersions { pub core_based_updates: DriveAbciCoreBasedUpdatesMethodVersions, pub protocol_upgrade: DriveAbciProtocolUpgradeMethodVersions, pub block_fee_processing: DriveAbciBlockFeeProcessingMethodVersions, + pub tokens_processing: DriveAbciTokensProcessingMethodVersions, pub core_chain_lock: DriveAbciCoreChainLockMethodVersionsAndConstants, pub core_instant_send_lock: DriveAbciCoreInstantSendLockMethodVersions, pub fee_pool_inwards_distribution: DriveAbciFeePoolInwardsDistributionMethodVersions, @@ -76,7 +78,12 @@ pub struct DriveAbciInitializationMethodVersions { #[derive(Clone, Debug, Default)] pub struct DriveAbciBlockFeeProcessingMethodVersions { pub add_process_epoch_change_operations: FeatureVersion, - pub process_block_fees: FeatureVersion, + pub process_block_fees_and_validate_sum_trees: FeatureVersion, +} + +#[derive(Clone, Debug, Default)] +pub struct DriveAbciTokensProcessingMethodVersions { + pub validate_token_aggregated_balance: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v1.rs index e6e1c63a40..922358607b 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v1.rs @@ -8,7 +8,8 @@ use crate::version::drive_abci_versions::drive_abci_method_versions::{ DriveAbciIdentityCreditWithdrawalMethodVersions, DriveAbciInitializationMethodVersions, DriveAbciMasternodeIdentitiesUpdatesMethodVersions, DriveAbciMethodVersions, DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, - DriveAbciStateTransitionProcessingMethodVersions, DriveAbciVotingMethodVersions, + DriveAbciStateTransitionProcessingMethodVersions, DriveAbciTokensProcessingMethodVersions, + DriveAbciVotingMethodVersions, }; pub const DRIVE_ABCI_METHOD_VERSIONS_V1: DriveAbciMethodVersions = DriveAbciMethodVersions { @@ -52,7 +53,10 @@ pub const DRIVE_ABCI_METHOD_VERSIONS_V1: DriveAbciMethodVersions = DriveAbciMeth }, block_fee_processing: DriveAbciBlockFeeProcessingMethodVersions { add_process_epoch_change_operations: 0, - process_block_fees: 0, + process_block_fees_and_validate_sum_trees: 0, + }, + tokens_processing: DriveAbciTokensProcessingMethodVersions { + validate_token_aggregated_balance: 0, }, core_chain_lock: DriveAbciCoreChainLockMethodVersionsAndConstants { choose_quorum: 0, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v2.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v2.rs index 1e355fa6a2..fa1db35686 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v2.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v2.rs @@ -8,7 +8,8 @@ use crate::version::drive_abci_versions::drive_abci_method_versions::{ DriveAbciIdentityCreditWithdrawalMethodVersions, DriveAbciInitializationMethodVersions, DriveAbciMasternodeIdentitiesUpdatesMethodVersions, DriveAbciMethodVersions, DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, - DriveAbciStateTransitionProcessingMethodVersions, DriveAbciVotingMethodVersions, + DriveAbciStateTransitionProcessingMethodVersions, DriveAbciTokensProcessingMethodVersions, + DriveAbciVotingMethodVersions, }; pub const DRIVE_ABCI_METHOD_VERSIONS_V2: DriveAbciMethodVersions = DriveAbciMethodVersions { @@ -53,7 +54,10 @@ pub const DRIVE_ABCI_METHOD_VERSIONS_V2: DriveAbciMethodVersions = DriveAbciMeth }, block_fee_processing: DriveAbciBlockFeeProcessingMethodVersions { add_process_epoch_change_operations: 0, - process_block_fees: 0, + process_block_fees_and_validate_sum_trees: 0, + }, + tokens_processing: DriveAbciTokensProcessingMethodVersions { + validate_token_aggregated_balance: 0, }, core_chain_lock: DriveAbciCoreChainLockMethodVersionsAndConstants { choose_quorum: 0, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v3.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v3.rs index 2b48e7a034..c6439e23fd 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v3.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v3.rs @@ -8,7 +8,8 @@ use crate::version::drive_abci_versions::drive_abci_method_versions::{ DriveAbciIdentityCreditWithdrawalMethodVersions, DriveAbciInitializationMethodVersions, DriveAbciMasternodeIdentitiesUpdatesMethodVersions, DriveAbciMethodVersions, DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, - DriveAbciStateTransitionProcessingMethodVersions, DriveAbciVotingMethodVersions, + DriveAbciStateTransitionProcessingMethodVersions, DriveAbciTokensProcessingMethodVersions, + DriveAbciVotingMethodVersions, }; pub const DRIVE_ABCI_METHOD_VERSIONS_V3: DriveAbciMethodVersions = DriveAbciMethodVersions { @@ -52,7 +53,10 @@ pub const DRIVE_ABCI_METHOD_VERSIONS_V3: DriveAbciMethodVersions = DriveAbciMeth }, block_fee_processing: DriveAbciBlockFeeProcessingMethodVersions { add_process_epoch_change_operations: 0, - process_block_fees: 0, + process_block_fees_and_validate_sum_trees: 0, + }, + tokens_processing: DriveAbciTokensProcessingMethodVersions { + validate_token_aggregated_balance: 0, }, core_chain_lock: DriveAbciCoreChainLockMethodVersionsAndConstants { choose_quorum: 0, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v4.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v4.rs index bedfb591c3..b3d961563c 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v4.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v4.rs @@ -8,7 +8,8 @@ use crate::version::drive_abci_versions::drive_abci_method_versions::{ DriveAbciIdentityCreditWithdrawalMethodVersions, DriveAbciInitializationMethodVersions, DriveAbciMasternodeIdentitiesUpdatesMethodVersions, DriveAbciMethodVersions, DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, - DriveAbciStateTransitionProcessingMethodVersions, DriveAbciVotingMethodVersions, + DriveAbciStateTransitionProcessingMethodVersions, DriveAbciTokensProcessingMethodVersions, + DriveAbciVotingMethodVersions, }; pub const DRIVE_ABCI_METHOD_VERSIONS_V4: DriveAbciMethodVersions = DriveAbciMethodVersions { @@ -52,7 +53,10 @@ pub const DRIVE_ABCI_METHOD_VERSIONS_V4: DriveAbciMethodVersions = DriveAbciMeth }, block_fee_processing: DriveAbciBlockFeeProcessingMethodVersions { add_process_epoch_change_operations: 0, - process_block_fees: 0, + process_block_fees_and_validate_sum_trees: 0, + }, + tokens_processing: DriveAbciTokensProcessingMethodVersions { + validate_token_aggregated_balance: 0, }, core_chain_lock: DriveAbciCoreChainLockMethodVersionsAndConstants { choose_quorum: 0, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v5.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v5.rs index 8b9e7b1eae..1490bd06ed 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v5.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v5.rs @@ -8,7 +8,8 @@ use crate::version::drive_abci_versions::drive_abci_method_versions::{ DriveAbciIdentityCreditWithdrawalMethodVersions, DriveAbciInitializationMethodVersions, DriveAbciMasternodeIdentitiesUpdatesMethodVersions, DriveAbciMethodVersions, DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, - DriveAbciStateTransitionProcessingMethodVersions, DriveAbciVotingMethodVersions, + DriveAbciStateTransitionProcessingMethodVersions, DriveAbciTokensProcessingMethodVersions, + DriveAbciVotingMethodVersions, }; pub const DRIVE_ABCI_METHOD_VERSIONS_V5: DriveAbciMethodVersions = DriveAbciMethodVersions { @@ -52,7 +53,10 @@ pub const DRIVE_ABCI_METHOD_VERSIONS_V5: DriveAbciMethodVersions = DriveAbciMeth }, block_fee_processing: DriveAbciBlockFeeProcessingMethodVersions { add_process_epoch_change_operations: 0, - process_block_fees: 0, + process_block_fees_and_validate_sum_trees: 0, + }, + tokens_processing: DriveAbciTokensProcessingMethodVersions { + validate_token_aggregated_balance: 0, }, core_chain_lock: DriveAbciCoreChainLockMethodVersionsAndConstants { choose_quorum: 0, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.rs new file mode 100644 index 0000000000..8e29725ed6 --- /dev/null +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.rs @@ -0,0 +1,126 @@ +use crate::version::drive_abci_versions::drive_abci_method_versions::{ + DriveAbciBlockEndMethodVersions, DriveAbciBlockFeeProcessingMethodVersions, + DriveAbciBlockStartMethodVersions, DriveAbciCoreBasedUpdatesMethodVersions, + DriveAbciCoreChainLockMethodVersionsAndConstants, DriveAbciCoreInstantSendLockMethodVersions, + DriveAbciEngineMethodVersions, DriveAbciEpochMethodVersions, + DriveAbciFeePoolInwardsDistributionMethodVersions, + DriveAbciFeePoolOutwardsDistributionMethodVersions, + DriveAbciIdentityCreditWithdrawalMethodVersions, DriveAbciInitializationMethodVersions, + DriveAbciMasternodeIdentitiesUpdatesMethodVersions, DriveAbciMethodVersions, + DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, + DriveAbciStateTransitionProcessingMethodVersions, DriveAbciTokensProcessingMethodVersions, + DriveAbciVotingMethodVersions, +}; + +// Introduced in Protocol version 8 for tokens +pub const DRIVE_ABCI_METHOD_VERSIONS_V6: DriveAbciMethodVersions = DriveAbciMethodVersions { + engine: DriveAbciEngineMethodVersions { + init_chain: 0, + check_tx: 0, + run_block_proposal: 0, + finalize_block_proposal: 0, + consensus_params_update: 1, + }, + initialization: DriveAbciInitializationMethodVersions { + initial_core_height_and_time: 0, + create_genesis_state: 1, // register the additional contracts (tokens and wallet utils) + }, + 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_owner_identity_owner_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: 1, + create_voter_identity: 0, + disable_identity_keys: 0, + update_masternode_identities: 0, + update_operator_identity: 0, + update_owner_withdrawal_address: 1, + update_voter_identity: 0, + }, + }, + protocol_upgrade: DriveAbciProtocolUpgradeMethodVersions { + check_for_desired_protocol_upgrade: 1, + upgrade_protocol_version_on_epoch_change: 0, + perform_events_on_first_block_of_protocol_change: Some(0), + protocol_version_upgrade_percentage_needed: 67, + }, + block_fee_processing: DriveAbciBlockFeeProcessingMethodVersions { + add_process_epoch_change_operations: 0, + process_block_fees_and_validate_sum_trees: 1, + }, + tokens_processing: DriveAbciTokensProcessingMethodVersions { + validate_token_aggregated_balance: 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: 1, + update_broadcasted_withdrawal_statuses: 0, + rebroadcast_expired_withdrawal_documents: 1, + append_signatures_and_broadcast_withdrawal_transactions: 0, + cleanup_expired_locks_of_withdrawal_amounts: 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: 1, + 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: 2, + }, + platform_state_storage: DriveAbciPlatformStateStorageMethodVersions { + fetch_platform_state: 0, + store_platform_state: 0, + }, +}; diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs index 8b010c9c3d..7faf75df46 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs @@ -10,10 +10,12 @@ pub struct DriveAbciQueryVersions { pub document_query: FeatureVersionBounds, pub prefunded_specialized_balances: DriveAbciQueryPrefundedSpecializedBalancesVersions, pub identity_based_queries: DriveAbciQueryIdentityVersions, + pub token_queries: DriveAbciQueryTokenVersions, pub validator_queries: DriveAbciQueryValidatorVersions, pub data_contract_based_queries: DriveAbciQueryDataContractVersions, pub voting_based_queries: DriveAbciQueryVotingVersions, pub system: DriveAbciQuerySystemVersions, + pub group_queries: DriveAbciQueryGroupVersions, } #[derive(Clone, Debug, Default)] @@ -21,6 +23,21 @@ pub struct DriveAbciQueryPrefundedSpecializedBalancesVersions { pub balance: FeatureVersionBounds, } +#[derive(Clone, Debug, Default)] +pub struct DriveAbciQueryTokenVersions { + pub identity_token_balances: FeatureVersionBounds, + pub identities_token_balances: FeatureVersionBounds, + pub identities_token_infos: FeatureVersionBounds, + pub identity_token_infos: FeatureVersionBounds, + pub token_statuses: FeatureVersionBounds, +} + +#[derive(Clone, Debug, Default)] +pub struct DriveAbciQueryGroupVersions { + pub group_info: FeatureVersionBounds, + pub group_infos: FeatureVersionBounds, +} + #[derive(Clone, Debug, Default)] pub struct DriveAbciQueryIdentityVersions { pub identity: FeatureVersionBounds, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs index b6af08405c..e4bb8e03fb 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs @@ -1,7 +1,8 @@ use crate::version::drive_abci_versions::drive_abci_query_versions::{ - DriveAbciQueryDataContractVersions, DriveAbciQueryIdentityVersions, - DriveAbciQueryPrefundedSpecializedBalancesVersions, DriveAbciQuerySystemVersions, - DriveAbciQueryValidatorVersions, DriveAbciQueryVersions, DriveAbciQueryVotingVersions, + DriveAbciQueryDataContractVersions, DriveAbciQueryGroupVersions, + DriveAbciQueryIdentityVersions, DriveAbciQueryPrefundedSpecializedBalancesVersions, + DriveAbciQuerySystemVersions, DriveAbciQueryTokenVersions, DriveAbciQueryValidatorVersions, + DriveAbciQueryVersions, DriveAbciQueryVotingVersions, }; use versioned_feature_core::FeatureVersionBounds; @@ -72,6 +73,33 @@ pub const DRIVE_ABCI_QUERY_VERSIONS_V1: DriveAbciQueryVersions = DriveAbciQueryV default_current_version: 0, }, }, + token_queries: DriveAbciQueryTokenVersions { + identity_token_balances: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identities_token_balances: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identities_token_infos: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_token_infos: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + token_statuses: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, validator_queries: DriveAbciQueryValidatorVersions { proposed_block_counts_by_evonode_ids: FeatureVersionBounds { min_version: 0, @@ -165,4 +193,16 @@ pub const DRIVE_ABCI_QUERY_VERSIONS_V1: DriveAbciQueryVersions = DriveAbciQueryV default_current_version: 0, }, }, + group_queries: DriveAbciQueryGroupVersions { + group_info: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + group_infos: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, }; diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs index 71d54cdb7c..0fe429b592 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs @@ -46,7 +46,7 @@ pub struct DriveAbciStateTransitionValidationVersions { pub masternode_vote_state_transition: DriveAbciStateTransitionValidationVersion, pub contract_create_state_transition: DriveAbciStateTransitionValidationVersion, pub contract_update_state_transition: DriveAbciStateTransitionValidationVersion, - pub documents_batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions, + pub batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions, } #[derive(Clone, Debug, Default)] @@ -98,6 +98,21 @@ pub struct DriveAbciDocumentsStateTransitionValidationVersions { pub document_transfer_transition_state_validation: FeatureVersion, pub document_purchase_transition_state_validation: FeatureVersion, pub document_update_price_transition_state_validation: FeatureVersion, + pub token_mint_transition_structure_validation: FeatureVersion, + pub token_burn_transition_structure_validation: FeatureVersion, + pub token_transfer_transition_structure_validation: FeatureVersion, + pub token_issuance_transition_state_validation: FeatureVersion, + pub token_burn_transition_state_validation: FeatureVersion, + pub token_transfer_transition_state_validation: FeatureVersion, + pub token_base_transition_structure_validation: FeatureVersion, + pub token_freeze_transition_structure_validation: FeatureVersion, + pub token_unfreeze_transition_structure_validation: FeatureVersion, + pub token_freeze_transition_state_validation: FeatureVersion, + pub token_unfreeze_transition_state_validation: FeatureVersion, + pub token_destroy_frozen_funds_transition_structure_validation: FeatureVersion, + pub token_destroy_frozen_funds_transition_state_validation: FeatureVersion, + pub token_emergency_action_transition_structure_validation: FeatureVersion, + pub token_emergency_action_transition_state_validation: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v1.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v1.rs index 20820165d1..11dc69053f 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v1.rs @@ -97,7 +97,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V1: DriveAbciValidationVersions = state: 0, transform_into_action: 0, }, - documents_batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions { + batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions { balance_pre_check: 0, basic_structure: 0, advanced_structure: 0, @@ -129,6 +129,21 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V1: DriveAbciValidationVersions = document_transfer_transition_state_validation: 0, document_purchase_transition_state_validation: 0, document_update_price_transition_state_validation: 0, + token_mint_transition_structure_validation: 0, + token_burn_transition_structure_validation: 0, + token_transfer_transition_structure_validation: 0, + token_issuance_transition_state_validation: 0, + token_burn_transition_state_validation: 0, + token_transfer_transition_state_validation: 0, + token_base_transition_structure_validation: 0, + token_freeze_transition_structure_validation: 0, + token_unfreeze_transition_structure_validation: 0, + token_freeze_transition_state_validation: 0, + token_unfreeze_transition_state_validation: 0, + token_destroy_frozen_funds_transition_structure_validation: 0, + token_destroy_frozen_funds_transition_state_validation: 0, + token_emergency_action_transition_structure_validation: 0, + token_emergency_action_transition_state_validation: 0, }, }, has_nonce_validation: 0, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v2.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v2.rs index 7cd1b59353..2a08f59b38 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v2.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v2.rs @@ -97,7 +97,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V2: DriveAbciValidationVersions = state: 0, transform_into_action: 0, }, - documents_batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions { + batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions { balance_pre_check: 0, basic_structure: 0, advanced_structure: 0, @@ -129,6 +129,21 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V2: DriveAbciValidationVersions = document_transfer_transition_state_validation: 0, document_purchase_transition_state_validation: 0, document_update_price_transition_state_validation: 0, + token_mint_transition_structure_validation: 0, + token_burn_transition_structure_validation: 0, + token_transfer_transition_structure_validation: 0, + token_issuance_transition_state_validation: 0, + token_burn_transition_state_validation: 0, + token_transfer_transition_state_validation: 0, + token_base_transition_structure_validation: 0, + token_freeze_transition_structure_validation: 0, + token_unfreeze_transition_structure_validation: 0, + token_freeze_transition_state_validation: 0, + token_unfreeze_transition_state_validation: 0, + token_destroy_frozen_funds_transition_structure_validation: 0, + token_destroy_frozen_funds_transition_state_validation: 0, + token_emergency_action_transition_structure_validation: 0, + token_emergency_action_transition_state_validation: 0, }, }, has_nonce_validation: 0, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v3.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v3.rs index 42f4068cdd..d706f0d838 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v3.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v3.rs @@ -97,7 +97,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V3: DriveAbciValidationVersions = state: 0, transform_into_action: 0, }, - documents_batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions { + batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions { balance_pre_check: 0, basic_structure: 0, advanced_structure: 0, @@ -129,6 +129,21 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V3: DriveAbciValidationVersions = document_transfer_transition_state_validation: 0, document_purchase_transition_state_validation: 0, document_update_price_transition_state_validation: 0, + token_mint_transition_structure_validation: 0, + token_burn_transition_structure_validation: 0, + token_transfer_transition_structure_validation: 0, + token_issuance_transition_state_validation: 0, + token_burn_transition_state_validation: 0, + token_transfer_transition_state_validation: 0, + token_base_transition_structure_validation: 0, + token_freeze_transition_structure_validation: 0, + token_unfreeze_transition_structure_validation: 0, + token_freeze_transition_state_validation: 0, + token_unfreeze_transition_state_validation: 0, + token_destroy_frozen_funds_transition_structure_validation: 0, + token_destroy_frozen_funds_transition_state_validation: 0, + token_emergency_action_transition_structure_validation: 0, + token_emergency_action_transition_state_validation: 0, }, }, has_nonce_validation: 0, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v4.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v4.rs index 8a1659106d..0faa2b63f6 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v4.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v4.rs @@ -100,7 +100,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V4: DriveAbciValidationVersions = state: 0, transform_into_action: 0, }, - documents_batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions { + batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions { balance_pre_check: 0, basic_structure: 0, advanced_structure: 0, @@ -132,6 +132,21 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V4: DriveAbciValidationVersions = document_transfer_transition_state_validation: 0, document_purchase_transition_state_validation: 0, document_update_price_transition_state_validation: 0, + token_mint_transition_structure_validation: 0, + token_burn_transition_structure_validation: 0, + token_transfer_transition_structure_validation: 0, + token_issuance_transition_state_validation: 0, + token_burn_transition_state_validation: 0, + token_transfer_transition_state_validation: 0, + token_base_transition_structure_validation: 0, + token_freeze_transition_structure_validation: 0, + token_unfreeze_transition_structure_validation: 0, + token_freeze_transition_state_validation: 0, + token_unfreeze_transition_state_validation: 0, + token_destroy_frozen_funds_transition_structure_validation: 0, + token_destroy_frozen_funds_transition_state_validation: 0, + token_emergency_action_transition_structure_validation: 0, + token_emergency_action_transition_state_validation: 0, }, }, has_nonce_validation: 1, // <---- changed this diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v5.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v5.rs index d48857faba..b5d4d8c3aa 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v5.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v5.rs @@ -101,7 +101,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V5: DriveAbciValidationVersions = state: 0, transform_into_action: 0, }, - documents_batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions { + batch_state_transition: DriveAbciDocumentsStateTransitionValidationVersions { balance_pre_check: 0, basic_structure: 0, advanced_structure: 0, @@ -133,6 +133,21 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V5: DriveAbciValidationVersions = document_transfer_transition_state_validation: 0, document_purchase_transition_state_validation: 0, document_update_price_transition_state_validation: 0, + token_mint_transition_structure_validation: 0, + token_burn_transition_structure_validation: 0, + token_transfer_transition_structure_validation: 0, + token_issuance_transition_state_validation: 0, + token_burn_transition_state_validation: 0, + token_transfer_transition_state_validation: 0, + token_base_transition_structure_validation: 0, + token_freeze_transition_structure_validation: 0, + token_unfreeze_transition_structure_validation: 0, + token_freeze_transition_state_validation: 0, + token_unfreeze_transition_state_validation: 0, + token_destroy_frozen_funds_transition_structure_validation: 0, + token_destroy_frozen_funds_transition_state_validation: 0, + token_emergency_action_transition_structure_validation: 0, + token_emergency_action_transition_state_validation: 0, }, }, has_nonce_validation: 1, diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_contract_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_contract_method_versions/mod.rs index 18cf2d3a4f..a216992f69 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_contract_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_contract_method_versions/mod.rs @@ -1,6 +1,7 @@ use versioned_feature_core::FeatureVersion; pub mod v1; +pub mod v2; #[derive(Clone, Debug, Default)] pub struct DriveContractMethodVersions { diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_contract_method_versions/v2.rs b/packages/rs-platform-version/src/version/drive_versions/drive_contract_method_versions/v2.rs new file mode 100644 index 0000000000..5197624ade --- /dev/null +++ b/packages/rs-platform-version/src/version/drive_versions/drive_contract_method_versions/v2.rs @@ -0,0 +1,33 @@ +use crate::version::drive_versions::drive_contract_method_versions::{ + DriveContractApplyMethodVersions, DriveContractCostsMethodVersions, + DriveContractGetMethodVersions, DriveContractInsertMethodVersions, DriveContractMethodVersions, + DriveContractProveMethodVersions, DriveContractUpdateMethodVersions, +}; + +pub const DRIVE_CONTRACT_METHOD_VERSIONS_V2: DriveContractMethodVersions = + 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: 1, // <--- changed to v1 (for token insertion + }, + update: DriveContractUpdateMethodVersions { update_contract: 1 }, // <--- changed to v1 (for token insertion) + 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, + }, + }; diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/mod.rs new file mode 100644 index 0000000000..20ebc59466 --- /dev/null +++ b/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/mod.rs @@ -0,0 +1,38 @@ +use grovedb_version::version::FeatureVersion; + +pub mod v1; + +#[derive(Clone, Debug, Default)] +pub struct DriveGroupMethodVersions { + pub fetch: DriveGroupFetchMethodVersions, + pub prove: DriveGroupProveMethodVersions, + pub insert: DriveGroupInsertMethodVersions, + pub cost_estimation: DriveGroupCostEstimationMethodVersions, +} + +#[derive(Clone, Debug, Default)] +pub struct DriveGroupFetchMethodVersions { + pub fetch_action_id_signers_power: FeatureVersion, + pub fetch_action_id_info: FeatureVersion, + pub fetch_action_id_info_keep_serialized: FeatureVersion, + pub fetch_action_id_has_signer: FeatureVersion, + pub fetch_group_info: FeatureVersion, + pub fetch_group_infos: FeatureVersion, +} + +#[derive(Clone, Debug, Default)] +pub struct DriveGroupProveMethodVersions { + pub prove_group_info: FeatureVersion, + pub prove_group_infos: FeatureVersion, +} + +#[derive(Clone, Debug, Default)] +pub struct DriveGroupInsertMethodVersions { + pub add_new_groups: FeatureVersion, + pub add_group_action: FeatureVersion, +} + +#[derive(Clone, Debug, Default)] +pub struct DriveGroupCostEstimationMethodVersions { + pub for_add_group_action: FeatureVersion, +} diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/v1.rs new file mode 100644 index 0000000000..365678957b --- /dev/null +++ b/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/v1.rs @@ -0,0 +1,26 @@ +use crate::version::drive_versions::drive_group_method_versions::{ + DriveGroupCostEstimationMethodVersions, DriveGroupFetchMethodVersions, + DriveGroupInsertMethodVersions, DriveGroupMethodVersions, DriveGroupProveMethodVersions, +}; + +pub const DRIVE_GROUP_METHOD_VERSIONS_V1: DriveGroupMethodVersions = DriveGroupMethodVersions { + fetch: DriveGroupFetchMethodVersions { + fetch_action_id_signers_power: 0, + fetch_action_id_info: 0, + fetch_action_id_info_keep_serialized: 0, + fetch_action_id_has_signer: 0, + fetch_group_info: 0, + fetch_group_infos: 0, + }, + prove: DriveGroupProveMethodVersions { + prove_group_info: 0, + prove_group_infos: 0, + }, + insert: DriveGroupInsertMethodVersions { + add_new_groups: 0, + add_group_action: 0, + }, + cost_estimation: DriveGroupCostEstimationMethodVersions { + for_add_group_action: 0, + }, +}; diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_grove_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_grove_method_versions/mod.rs index c61b52f250..71d7fc8b00 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_grove_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_grove_method_versions/mod.rs @@ -33,6 +33,10 @@ pub struct DriveGroveBasicMethodVersions { pub grove_get_proved_path_query_with_conditional: FeatureVersion, pub grove_get_sum_tree_total_value: FeatureVersion, pub grove_has_raw: FeatureVersion, + pub grove_get_raw_item: FeatureVersion, + pub grove_get_optional_sum_tree_total_value: FeatureVersion, + pub grove_get_raw_optional_item: FeatureVersion, + pub grove_get_big_sum_tree_total_value: FeatureVersion, } #[derive(Clone, Debug, Default)] @@ -40,6 +44,7 @@ pub struct DriveGroveBatchMethodVersions { pub batch_insert_empty_tree: FeatureVersion, pub batch_insert_empty_tree_if_not_exists: FeatureVersion, pub batch_insert_empty_tree_if_not_exists_check_existing_operations: FeatureVersion, + pub batch_insert_sum_item_if_not_exists: FeatureVersion, pub batch_insert_sum_item_or_add_to_if_already_exists: FeatureVersion, pub batch_insert: FeatureVersion, pub batch_insert_if_not_exists: FeatureVersion, @@ -51,6 +56,7 @@ pub struct DriveGroveBatchMethodVersions { pub batch_remove_raw: FeatureVersion, pub batch_delete_up_tree_while_empty: FeatureVersion, pub batch_refresh_reference: FeatureVersion, + pub batch_insert_empty_sum_tree: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_grove_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_grove_method_versions/v1.rs index 6dc9b44503..0fa2d7d09c 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_grove_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_grove_method_versions/v1.rs @@ -26,11 +26,16 @@ pub const DRIVE_GROVE_METHOD_VERSIONS_V1: DriveGroveMethodVersions = DriveGroveM grove_get_proved_path_query_with_conditional: 0, grove_get_sum_tree_total_value: 0, grove_has_raw: 0, + grove_get_raw_item: 0, + grove_get_optional_sum_tree_total_value: 0, + grove_get_raw_optional_item: 0, + grove_get_big_sum_tree_total_value: 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_sum_item_if_not_exists: 0, batch_insert_sum_item_or_add_to_if_already_exists: 0, batch_insert: 0, batch_insert_if_not_exists: 0, @@ -42,6 +47,7 @@ pub const DRIVE_GROVE_METHOD_VERSIONS_V1: DriveGroveMethodVersions = DriveGroveM batch_remove_raw: 0, batch_delete_up_tree_while_empty: 0, batch_refresh_reference: 0, + batch_insert_empty_sum_tree: 0, }, apply: DriveGroveApplyMethodVersions { grove_apply_operation: 0, diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/mod.rs index c44788e4c3..958724c7a8 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/mod.rs @@ -58,6 +58,8 @@ pub struct DriveIdentityContractInfoMethodVersions { pub struct DriveIdentityCostEstimationMethodVersions { pub for_authentication_keys_security_level_in_key_reference_tree: FeatureVersion, pub for_balances: FeatureVersion, + pub for_token_balances: FeatureVersion, + pub for_token_total_supply: FeatureVersion, pub for_contract_info: FeatureVersion, pub for_contract_info_group: FeatureVersion, pub for_contract_info_group_keys: FeatureVersion, @@ -67,6 +69,7 @@ pub struct DriveIdentityCostEstimationMethodVersions { pub for_purpose_in_key_reference_tree: FeatureVersion, pub for_root_key_reference_tree: FeatureVersion, pub for_update_revision: FeatureVersion, + pub for_token_identity_infos: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/v1.rs index 098f38ab7c..385078e380 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_identity_method_versions/v1.rs @@ -119,6 +119,8 @@ pub const DRIVE_IDENTITY_METHOD_VERSIONS_V1: DriveIdentityMethodVersions = cost_estimation: DriveIdentityCostEstimationMethodVersions { for_authentication_keys_security_level_in_key_reference_tree: 0, for_balances: 0, + for_token_balances: 0, + for_token_total_supply: 0, for_contract_info: 0, for_contract_info_group: 0, for_contract_info_group_keys: 0, @@ -128,6 +130,7 @@ pub const DRIVE_IDENTITY_METHOD_VERSIONS_V1: DriveIdentityMethodVersions = for_purpose_in_key_reference_tree: 0, for_root_key_reference_tree: 0, for_update_revision: 0, + for_token_identity_infos: 0, }, withdrawals: DriveIdentityWithdrawalMethodVersions { document: DriveIdentityWithdrawalDocumentMethodVersions { diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/mod.rs index c482548908..58fa89dddd 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/mod.rs @@ -20,6 +20,9 @@ pub struct DriveStateTransitionActionConvertToHighLevelOperationsMethodVersions pub document_replace_transition: FeatureVersion, pub document_transfer_transition: FeatureVersion, pub document_update_price_transition: FeatureVersion, + pub token_burn_transition: FeatureVersion, + pub token_mint_transition: FeatureVersion, + pub token_transfer_transition: FeatureVersion, pub documents_batch_transition: FeatureVersion, pub identity_create_transition: FeatureVersion, pub identity_credit_transfer_transition: FeatureVersion, @@ -30,6 +33,10 @@ pub struct DriveStateTransitionActionConvertToHighLevelOperationsMethodVersions pub bump_identity_data_contract_nonce: FeatureVersion, pub bump_identity_nonce: FeatureVersion, pub partially_use_asset_lock: FeatureVersion, + pub token_freeze_transition: FeatureVersion, + pub token_unfreeze_transition: FeatureVersion, + pub token_emergency_action_transition: FeatureVersion, + pub token_destroy_frozen_funds_transition: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/v1.rs index 45e732c99c..772b880711 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/v1.rs @@ -22,6 +22,9 @@ pub const DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V1: DriveStateTransitionMethodV document_replace_transition: 0, document_transfer_transition: 0, document_update_price_transition: 0, + token_burn_transition: 0, + token_mint_transition: 0, + token_transfer_transition: 0, documents_batch_transition: 0, identity_create_transition: 0, identity_credit_transfer_transition: 0, @@ -32,5 +35,9 @@ pub const DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V1: DriveStateTransitionMethodV bump_identity_data_contract_nonce: 0, bump_identity_nonce: 0, partially_use_asset_lock: 0, + token_freeze_transition: 0, + token_unfreeze_transition: 0, + token_emergency_action_transition: 0, + token_destroy_frozen_funds_transition: 0, }, }; diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs new file mode 100644 index 0000000000..e10ff81316 --- /dev/null +++ b/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs @@ -0,0 +1,50 @@ +use versioned_feature_core::FeatureVersion; + +pub mod v1; + +#[derive(Clone, Debug, Default)] +pub struct DriveTokenMethodVersions { + pub fetch: DriveTokenFetchMethodVersions, + pub prove: DriveTokenProveMethodVersions, + pub update: DriveTokenUpdateMethodVersions, + pub calculate_total_tokens_balance: FeatureVersion, +} + +#[derive(Clone, Debug, Default)] +pub struct DriveTokenFetchMethodVersions { + pub identity_token_balance: FeatureVersion, + pub identity_token_balances: FeatureVersion, + pub identities_token_balances: FeatureVersion, + pub identity_token_info: FeatureVersion, + pub identity_token_infos: FeatureVersion, + pub identities_token_infos: FeatureVersion, + pub token_statuses: FeatureVersion, + pub token_status: FeatureVersion, +} + +#[derive(Clone, Debug, Default)] +pub struct DriveTokenProveMethodVersions { + pub identity_token_balance: FeatureVersion, + pub identity_token_balances: FeatureVersion, + pub identities_token_balances: FeatureVersion, + pub identity_token_info: FeatureVersion, + pub identity_token_infos: FeatureVersion, + pub identities_token_infos: FeatureVersion, + pub token_statuses: FeatureVersion, +} + +#[derive(Clone, Debug, Default)] +pub struct DriveTokenUpdateMethodVersions { + pub create_token_trees: FeatureVersion, + pub burn: FeatureVersion, + pub mint: FeatureVersion, + pub transfer: FeatureVersion, + pub add_to_token_total_supply: FeatureVersion, + pub remove_from_token_total_supply: FeatureVersion, + pub remove_from_identity_token_balance: FeatureVersion, + pub add_to_identity_token_balance: FeatureVersion, + pub add_transaction_history_operations: FeatureVersion, + pub freeze: FeatureVersion, + pub unfreeze: FeatureVersion, + pub apply_status: FeatureVersion, +} diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs new file mode 100644 index 0000000000..9b8f9d83ad --- /dev/null +++ b/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs @@ -0,0 +1,41 @@ +use crate::version::drive_versions::drive_token_method_versions::{ + DriveTokenFetchMethodVersions, DriveTokenMethodVersions, DriveTokenProveMethodVersions, + DriveTokenUpdateMethodVersions, +}; + +pub const DRIVE_TOKEN_METHOD_VERSIONS_V1: DriveTokenMethodVersions = DriveTokenMethodVersions { + fetch: DriveTokenFetchMethodVersions { + identity_token_balance: 0, + identity_token_balances: 0, + identities_token_balances: 0, + identity_token_info: 0, + identity_token_infos: 0, + identities_token_infos: 0, + token_statuses: 0, + token_status: 0, + }, + prove: DriveTokenProveMethodVersions { + identity_token_balance: 0, + identity_token_balances: 0, + identities_token_balances: 0, + identity_token_info: 0, + identity_token_infos: 0, + identities_token_infos: 0, + token_statuses: 0, + }, + update: DriveTokenUpdateMethodVersions { + create_token_trees: 0, + burn: 0, + mint: 0, + transfer: 0, + add_to_token_total_supply: 0, + remove_from_token_total_supply: 0, + remove_from_identity_token_balance: 0, + add_to_identity_token_balance: 0, + add_transaction_history_operations: 0, + freeze: 0, + unfreeze: 0, + apply_status: 0, + }, + calculate_total_tokens_balance: 0, +}; diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs index 39d4255136..e23fd54276 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs @@ -7,6 +7,7 @@ pub struct DriveVerifyMethodVersions { pub contract: DriveVerifyContractMethodVersions, pub document: DriveVerifyDocumentMethodVersions, pub identity: DriveVerifyIdentityMethodVersions, + pub token: DriveVerifyTokenMethodVersions, pub single_document: DriveVerifySingleDocumentMethodVersions, pub system: DriveVerifySystemMethodVersions, pub voting: DriveVerifyVoteMethodVersions, @@ -42,6 +43,13 @@ pub struct DriveVerifyIdentityMethodVersions { pub verify_identity_revision_for_identity_id: FeatureVersion, } +#[derive(Clone, Debug, Default)] +pub struct DriveVerifyTokenMethodVersions { + pub verify_token_balances_for_identity_ids: FeatureVersion, + pub verify_token_balances_for_identity_id: FeatureVersion, + pub verify_token_infos_for_identity_ids: FeatureVersion, +} + #[derive(Clone, Debug, Default)] pub struct DriveVerifyVoteMethodVersions { pub verify_masternode_vote: FeatureVersion, diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs index 4c40371f83..56813f3b0b 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs @@ -2,7 +2,7 @@ use crate::version::drive_versions::drive_verify_method_versions::{ DriveVerifyContractMethodVersions, DriveVerifyDocumentMethodVersions, DriveVerifyIdentityMethodVersions, DriveVerifyMethodVersions, DriveVerifySingleDocumentMethodVersions, DriveVerifyStateTransitionMethodVersions, - DriveVerifySystemMethodVersions, DriveVerifyVoteMethodVersions, + DriveVerifySystemMethodVersions, DriveVerifyTokenMethodVersions, DriveVerifyVoteMethodVersions, }; pub const DRIVE_VERIFY_METHOD_VERSIONS_V1: DriveVerifyMethodVersions = DriveVerifyMethodVersions { @@ -29,6 +29,11 @@ pub const DRIVE_VERIFY_METHOD_VERSIONS_V1: DriveVerifyMethodVersions = DriveVeri verify_identities_contract_keys: 0, verify_identity_revision_for_identity_id: 0, }, + token: DriveVerifyTokenMethodVersions { + verify_token_balances_for_identity_ids: 0, + verify_token_balances_for_identity_id: 0, + verify_token_infos_for_identity_ids: 0, + }, single_document: DriveVerifySingleDocumentMethodVersions { verify_proof: 0, verify_proof_keep_serialized: 0, diff --git a/packages/rs-platform-version/src/version/drive_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/mod.rs index 262ac9407a..dd5c1b1a15 100644 --- a/packages/rs-platform-version/src/version/drive_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/mod.rs @@ -2,10 +2,12 @@ use crate::version::FeatureVersion; use drive_contract_method_versions::DriveContractMethodVersions; use drive_credit_pool_method_versions::DriveCreditPoolMethodVersions; use drive_document_method_versions::DriveDocumentMethodVersions; +use drive_group_method_versions::DriveGroupMethodVersions; use drive_grove_method_versions::DriveGroveMethodVersions; use drive_identity_method_versions::DriveIdentityMethodVersions; use drive_state_transition_method_versions::DriveStateTransitionMethodVersions; use drive_structure_version::DriveStructureVersion; +use drive_token_method_versions::DriveTokenMethodVersions; use drive_verify_method_versions::DriveVerifyMethodVersions; use drive_vote_method_versions::DriveVoteMethodVersions; use grovedb_version::version::GroveVersion; @@ -13,15 +15,18 @@ use grovedb_version::version::GroveVersion; pub mod drive_contract_method_versions; pub mod drive_credit_pool_method_versions; pub mod drive_document_method_versions; +pub mod drive_group_method_versions; pub mod drive_grove_method_versions; pub mod drive_identity_method_versions; pub mod drive_state_transition_method_versions; pub mod drive_structure_version; +pub mod drive_token_method_versions; pub mod drive_verify_method_versions; pub mod drive_vote_method_versions; pub mod v1; pub mod v2; pub mod v3; +pub mod v4; #[derive(Clone, Debug, Default)] pub struct DriveVersion { @@ -46,6 +51,7 @@ pub struct DriveMethodVersions { pub asset_lock: DriveAssetLockMethodVersions, pub verify: DriveVerifyMethodVersions, pub identity: DriveIdentityMethodVersions, + pub token: DriveTokenMethodVersions, pub platform_system: DrivePlatformSystemMethodVersions, pub operations: DriveOperationsMethodVersion, pub batch_operations: DriveBatchOperationsMethodVersion, @@ -53,6 +59,7 @@ pub struct DriveMethodVersions { pub prove: DriveProveMethodVersions, pub state_transitions: DriveStateTransitionMethodVersions, pub platform_state: DrivePlatformStateMethodVersions, + pub group: DriveGroupMethodVersions, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/v1.rs index 3ba9dc974f..1daae27b5b 100644 --- a/packages/rs-platform-version/src/version/drive_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/v1.rs @@ -1,10 +1,12 @@ use crate::version::drive_versions::drive_contract_method_versions::v1::DRIVE_CONTRACT_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_credit_pool_method_versions::v1::CREDIT_POOL_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_document_method_versions::v1::DRIVE_DOCUMENT_METHOD_VERSIONS_V1; +use crate::version::drive_versions::drive_group_method_versions::v1::DRIVE_GROUP_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_grove_method_versions::v1::DRIVE_GROVE_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_identity_method_versions::v1::DRIVE_IDENTITY_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_state_transition_method_versions::v1::DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_structure_version::v1::DRIVE_STRUCTURE_V1; +use crate::version::drive_versions::drive_token_method_versions::v1::DRIVE_TOKEN_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_verify_method_versions::v1::DRIVE_VERIFY_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_vote_method_versions::v1::DRIVE_VOTE_METHOD_VERSIONS_V1; use crate::version::drive_versions::{ @@ -61,6 +63,7 @@ pub const DRIVE_VERSION_V1: DriveVersion = DriveVersion { }, verify: DRIVE_VERIFY_METHOD_VERSIONS_V1, identity: DRIVE_IDENTITY_METHOD_VERSIONS_V1, + token: DRIVE_TOKEN_METHOD_VERSIONS_V1, platform_system: DrivePlatformSystemMethodVersions { estimation_costs: DriveSystemEstimationCostsMethodVersions { for_total_system_credits_update: 0, @@ -95,6 +98,7 @@ pub const DRIVE_VERSION_V1: DriveVersion = DriveVersion { estimated_cost_for_prefunded_specialized_balance_update: 0, empty_prefunded_specialized_balance: 0, }, + group: DRIVE_GROUP_METHOD_VERSIONS_V1, }, grove_methods: DRIVE_GROVE_METHOD_VERSIONS_V1, grove_version: GROVE_V1, diff --git a/packages/rs-platform-version/src/version/drive_versions/v2.rs b/packages/rs-platform-version/src/version/drive_versions/v2.rs index 0881f6ca55..b76e79c7f9 100644 --- a/packages/rs-platform-version/src/version/drive_versions/v2.rs +++ b/packages/rs-platform-version/src/version/drive_versions/v2.rs @@ -1,10 +1,12 @@ use crate::version::drive_versions::drive_contract_method_versions::v1::DRIVE_CONTRACT_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_credit_pool_method_versions::v1::CREDIT_POOL_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_document_method_versions::v1::DRIVE_DOCUMENT_METHOD_VERSIONS_V1; +use crate::version::drive_versions::drive_group_method_versions::v1::DRIVE_GROUP_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_grove_method_versions::v1::DRIVE_GROVE_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_identity_method_versions::v1::DRIVE_IDENTITY_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_state_transition_method_versions::v1::DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_structure_version::v1::DRIVE_STRUCTURE_V1; +use crate::version::drive_versions::drive_token_method_versions::v1::DRIVE_TOKEN_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_verify_method_versions::v1::DRIVE_VERIFY_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_vote_method_versions::v2::DRIVE_VOTE_METHOD_VERSIONS_V2; use crate::version::drive_versions::{ @@ -61,6 +63,7 @@ pub const DRIVE_VERSION_V2: DriveVersion = DriveVersion { }, verify: DRIVE_VERIFY_METHOD_VERSIONS_V1, identity: DRIVE_IDENTITY_METHOD_VERSIONS_V1, + token: DRIVE_TOKEN_METHOD_VERSIONS_V1, platform_system: DrivePlatformSystemMethodVersions { estimation_costs: DriveSystemEstimationCostsMethodVersions { for_total_system_credits_update: 0, @@ -95,6 +98,7 @@ pub const DRIVE_VERSION_V2: DriveVersion = DriveVersion { estimated_cost_for_prefunded_specialized_balance_update: 0, empty_prefunded_specialized_balance: 0, }, + group: DRIVE_GROUP_METHOD_VERSIONS_V1, }, grove_methods: DRIVE_GROVE_METHOD_VERSIONS_V1, grove_version: GROVE_V1, diff --git a/packages/rs-platform-version/src/version/drive_versions/v3.rs b/packages/rs-platform-version/src/version/drive_versions/v3.rs index 2f3efb3729..4af61e282e 100644 --- a/packages/rs-platform-version/src/version/drive_versions/v3.rs +++ b/packages/rs-platform-version/src/version/drive_versions/v3.rs @@ -1,10 +1,12 @@ use crate::version::drive_versions::drive_contract_method_versions::v1::DRIVE_CONTRACT_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_credit_pool_method_versions::v1::CREDIT_POOL_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_document_method_versions::v1::DRIVE_DOCUMENT_METHOD_VERSIONS_V1; +use crate::version::drive_versions::drive_group_method_versions::v1::DRIVE_GROUP_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_grove_method_versions::v1::DRIVE_GROVE_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_identity_method_versions::v1::DRIVE_IDENTITY_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_state_transition_method_versions::v1::DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_structure_version::v1::DRIVE_STRUCTURE_V1; +use crate::version::drive_versions::drive_token_method_versions::v1::DRIVE_TOKEN_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_verify_method_versions::v1::DRIVE_VERIFY_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_vote_method_versions::v2::DRIVE_VOTE_METHOD_VERSIONS_V2; use crate::version::drive_versions::{ @@ -61,6 +63,7 @@ pub const DRIVE_VERSION_V3: DriveVersion = DriveVersion { }, verify: DRIVE_VERIFY_METHOD_VERSIONS_V1, identity: DRIVE_IDENTITY_METHOD_VERSIONS_V1, + token: DRIVE_TOKEN_METHOD_VERSIONS_V1, platform_system: DrivePlatformSystemMethodVersions { estimation_costs: DriveSystemEstimationCostsMethodVersions { for_total_system_credits_update: 0, @@ -95,6 +98,7 @@ pub const DRIVE_VERSION_V3: DriveVersion = DriveVersion { estimated_cost_for_prefunded_specialized_balance_update: 0, empty_prefunded_specialized_balance: 0, }, + group: DRIVE_GROUP_METHOD_VERSIONS_V1, }, grove_methods: DRIVE_GROVE_METHOD_VERSIONS_V1, grove_version: GROVE_V1, diff --git a/packages/rs-platform-version/src/version/drive_versions/v4.rs b/packages/rs-platform-version/src/version/drive_versions/v4.rs new file mode 100644 index 0000000000..34af21d7d2 --- /dev/null +++ b/packages/rs-platform-version/src/version/drive_versions/v4.rs @@ -0,0 +1,105 @@ +use crate::version::drive_versions::drive_contract_method_versions::v2::DRIVE_CONTRACT_METHOD_VERSIONS_V2; +use crate::version::drive_versions::drive_credit_pool_method_versions::v1::CREDIT_POOL_METHOD_VERSIONS_V1; +use crate::version::drive_versions::drive_document_method_versions::v1::DRIVE_DOCUMENT_METHOD_VERSIONS_V1; +use crate::version::drive_versions::drive_group_method_versions::v1::DRIVE_GROUP_METHOD_VERSIONS_V1; +use crate::version::drive_versions::drive_grove_method_versions::v1::DRIVE_GROVE_METHOD_VERSIONS_V1; +use crate::version::drive_versions::drive_identity_method_versions::v1::DRIVE_IDENTITY_METHOD_VERSIONS_V1; +use crate::version::drive_versions::drive_state_transition_method_versions::v1::DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V1; +use crate::version::drive_versions::drive_structure_version::v1::DRIVE_STRUCTURE_V1; +use crate::version::drive_versions::drive_token_method_versions::v1::DRIVE_TOKEN_METHOD_VERSIONS_V1; +use crate::version::drive_versions::drive_verify_method_versions::v1::DRIVE_VERIFY_METHOD_VERSIONS_V1; +use crate::version::drive_versions::drive_vote_method_versions::v2::DRIVE_VOTE_METHOD_VERSIONS_V2; +use crate::version::drive_versions::{ + DriveAssetLockMethodVersions, DriveBalancesMethodVersions, DriveBatchOperationsMethodVersion, + DriveEstimatedCostsMethodVersions, DriveFeesMethodVersions, DriveFetchMethodVersions, + DriveInitializationMethodVersions, DriveMethodVersions, DriveOperationsMethodVersion, + DrivePlatformStateMethodVersions, DrivePlatformSystemMethodVersions, + DrivePrefundedSpecializedMethodVersions, DriveProtocolUpgradeVersions, + DriveProveMethodVersions, DriveSystemEstimationCostsMethodVersions, DriveVersion, +}; +use grovedb_version::version::v2::GROVE_V2; + +pub const DRIVE_VERSION_V4: DriveVersion = DriveVersion { + structure: DRIVE_STRUCTURE_V1, + methods: DriveMethodVersions { + initialization: DriveInitializationMethodVersions { + create_initial_state_structure: 1, // changed here to 1 to add token sum trees + }, + credit_pools: CREDIT_POOL_METHOD_VERSIONS_V1, + 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: DRIVE_DOCUMENT_METHOD_VERSIONS_V1, + vote: DRIVE_VOTE_METHOD_VERSIONS_V2, + contract: DRIVE_CONTRACT_METHOD_VERSIONS_V2, // changed in v4 + 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: DRIVE_VERIFY_METHOD_VERSIONS_V1, + identity: DRIVE_IDENTITY_METHOD_VERSIONS_V1, + token: DRIVE_TOKEN_METHOD_VERSIONS_V1, + 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: DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V1, + 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: 1, + deduct_from_prefunded_specialized_balance: 1, + deduct_from_prefunded_specialized_balance_operations: 0, + estimated_cost_for_prefunded_specialized_balance_update: 0, + empty_prefunded_specialized_balance: 0, + }, + group: DRIVE_GROUP_METHOD_VERSIONS_V1, + }, + grove_methods: DRIVE_GROVE_METHOD_VERSIONS_V1, + grove_version: GROVE_V2, //changed in V4 +}; diff --git a/packages/rs-platform-version/src/version/fee/processing/mod.rs b/packages/rs-platform-version/src/version/fee/processing/mod.rs index a4f33696c0..715e060c4a 100644 --- a/packages/rs-platform-version/src/version/fee/processing/mod.rs +++ b/packages/rs-platform-version/src/version/fee/processing/mod.rs @@ -9,6 +9,7 @@ pub struct FeeProcessingVersion { pub fetch_identity_revision_processing_cost: u64, pub fetch_identity_balance_and_revision_processing_cost: u64, pub fetch_identity_cost_per_look_up_key_by_id: u64, + pub fetch_identity_token_balance_processing_cost: u64, pub fetch_prefunded_specialized_balance_processing_cost: u64, pub fetch_single_identity_key_processing_cost: u64, pub validate_key_structure: u64, @@ -39,6 +40,9 @@ impl From for FeeProcessingVersi .fetch_identity_balance_and_revision_processing_cost, fetch_identity_cost_per_look_up_key_by_id: old .fetch_identity_cost_per_look_up_key_by_id, + fetch_identity_token_balance_processing_cost: FEE_VERSION1 + .processing + .fetch_identity_token_balance_processing_cost, fetch_prefunded_specialized_balance_processing_cost: old .fetch_prefunded_specialized_balance_processing_cost, fetch_single_identity_key_processing_cost: old diff --git a/packages/rs-platform-version/src/version/fee/processing/v1.rs b/packages/rs-platform-version/src/version/fee/processing/v1.rs index b6ba5ca998..fae3ec4939 100644 --- a/packages/rs-platform-version/src/version/fee/processing/v1.rs +++ b/packages/rs-platform-version/src/version/fee/processing/v1.rs @@ -5,6 +5,7 @@ pub const FEE_PROCESSING_VERSION1: FeeProcessingVersion = FeeProcessingVersion { fetch_identity_revision_processing_cost: 9000, fetch_identity_balance_and_revision_processing_cost: 15000, fetch_identity_cost_per_look_up_key_by_id: 9000, + fetch_identity_token_balance_processing_cost: 10000, fetch_prefunded_specialized_balance_processing_cost: 10000, fetch_single_identity_key_processing_cost: 10000, perform_network_threshold_signing: 100000000, // 1mDash (2.5 cents at 25$/Dash) 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 e1371648ff..26c64a4d7c 100644 --- a/packages/rs-platform-version/src/version/mocks/v2_test.rs +++ b/packages/rs-platform-version/src/version/mocks/v2_test.rs @@ -10,14 +10,16 @@ use crate::version::dpp_versions::dpp_state_transition_conversion_versions::v1:: use crate::version::dpp_versions::dpp_state_transition_method_versions::v1::STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_serialization_versions::v1::STATE_TRANSITION_SERIALIZATION_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_versions::v1::STATE_TRANSITION_VERSIONS_V1; +use crate::version::dpp_versions::dpp_token_versions::v1::TOKEN_VERSIONS_V1; use crate::version::dpp_versions::dpp_validation_versions::v2::DPP_VALIDATION_VERSIONS_V2; use crate::version::dpp_versions::dpp_voting_versions::v2::VOTING_VERSION_V2; use crate::version::dpp_versions::DPPVersion; use crate::version::drive_abci_versions::drive_abci_method_versions::v1::DRIVE_ABCI_METHOD_VERSIONS_V1; use crate::version::drive_abci_versions::drive_abci_query_versions::{ - DriveAbciQueryDataContractVersions, DriveAbciQueryIdentityVersions, - DriveAbciQueryPrefundedSpecializedBalancesVersions, DriveAbciQuerySystemVersions, - DriveAbciQueryValidatorVersions, DriveAbciQueryVersions, DriveAbciQueryVotingVersions, + DriveAbciQueryDataContractVersions, DriveAbciQueryGroupVersions, + DriveAbciQueryIdentityVersions, DriveAbciQueryPrefundedSpecializedBalancesVersions, + DriveAbciQuerySystemVersions, DriveAbciQueryTokenVersions, DriveAbciQueryValidatorVersions, + DriveAbciQueryVersions, DriveAbciQueryVotingVersions, }; use crate::version::drive_abci_versions::drive_abci_structure_versions::v1::DRIVE_ABCI_STRUCTURE_VERSIONS_V1; use crate::version::drive_abci_versions::drive_abci_validation_versions::v1::DRIVE_ABCI_VALIDATION_VERSIONS_V1; @@ -26,10 +28,12 @@ use crate::version::drive_abci_versions::DriveAbciVersion; use crate::version::drive_versions::drive_contract_method_versions::v1::DRIVE_CONTRACT_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_credit_pool_method_versions::v1::CREDIT_POOL_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_document_method_versions::v1::DRIVE_DOCUMENT_METHOD_VERSIONS_V1; +use crate::version::drive_versions::drive_group_method_versions::v1::DRIVE_GROUP_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_grove_method_versions::v1::DRIVE_GROVE_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_identity_method_versions::v1::DRIVE_IDENTITY_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_state_transition_method_versions::v1::DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_structure_version::v1::DRIVE_STRUCTURE_V1; +use crate::version::drive_versions::drive_token_method_versions::v1::DRIVE_TOKEN_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_verify_method_versions::v1::DRIVE_VERIFY_METHOD_VERSIONS_V1; use crate::version::drive_versions::drive_vote_method_versions::v1::DRIVE_VOTE_METHOD_VERSIONS_V1; use crate::version::drive_versions::{ @@ -95,6 +99,7 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { }, verify: DRIVE_VERIFY_METHOD_VERSIONS_V1, identity: DRIVE_IDENTITY_METHOD_VERSIONS_V1, + token: DRIVE_TOKEN_METHOD_VERSIONS_V1, platform_system: DrivePlatformSystemMethodVersions { estimation_costs: DriveSystemEstimationCostsMethodVersions { for_total_system_credits_update: 0, @@ -129,6 +134,7 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { estimated_cost_for_prefunded_specialized_balance_update: 0, empty_prefunded_specialized_balance: 0, }, + group: DRIVE_GROUP_METHOD_VERSIONS_V1, }, grove_methods: DRIVE_GROVE_METHOD_VERSIONS_V1, grove_version: GROVE_V1, @@ -205,6 +211,33 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { default_current_version: 0, }, }, + token_queries: DriveAbciQueryTokenVersions { + identity_token_balances: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identities_token_balances: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identities_token_infos: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + identity_token_infos: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + token_statuses: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, validator_queries: DriveAbciQueryValidatorVersions { proposed_block_counts_by_evonode_ids: FeatureVersionBounds { min_version: 0, @@ -298,6 +331,18 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { default_current_version: 0, }, }, + group_queries: DriveAbciQueryGroupVersions { + group_info: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + group_infos: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + }, }, }, dpp: DPPVersion { @@ -311,6 +356,7 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { document_versions: DOCUMENT_VERSIONS_V1, identity_versions: IDENTITY_VERSIONS_V1, voting_versions: VOTING_VERSION_V2, + token_versions: TOKEN_VERSIONS_V1, asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1, methods: DPP_METHOD_VERSIONS_V1, factory_versions: DPP_FACTORY_VERSIONS_V1, 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 4c54dfbfef..3a8964266d 100644 --- a/packages/rs-platform-version/src/version/mocks/v3_test.rs +++ b/packages/rs-platform-version/src/version/mocks/v3_test.rs @@ -10,6 +10,7 @@ use crate::version::dpp_versions::dpp_state_transition_conversion_versions::v2:: use crate::version::dpp_versions::dpp_state_transition_method_versions::v1::STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_serialization_versions::v1::STATE_TRANSITION_SERIALIZATION_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_versions::v1::STATE_TRANSITION_VERSIONS_V1; +use crate::version::dpp_versions::dpp_token_versions::v1::TOKEN_VERSIONS_V1; use crate::version::dpp_versions::dpp_validation_versions::v2::DPP_VALIDATION_VERSIONS_V2; use crate::version::dpp_versions::dpp_voting_versions::v2::VOTING_VERSION_V2; use crate::version::dpp_versions::DPPVersion; @@ -23,7 +24,8 @@ use crate::version::drive_abci_versions::drive_abci_method_versions::{ DriveAbciIdentityCreditWithdrawalMethodVersions, DriveAbciInitializationMethodVersions, DriveAbciMasternodeIdentitiesUpdatesMethodVersions, DriveAbciMethodVersions, DriveAbciPlatformStateStorageMethodVersions, DriveAbciProtocolUpgradeMethodVersions, - DriveAbciStateTransitionProcessingMethodVersions, DriveAbciVotingMethodVersions, + DriveAbciStateTransitionProcessingMethodVersions, DriveAbciTokensProcessingMethodVersions, + DriveAbciVotingMethodVersions, }; use crate::version::drive_abci_versions::drive_abci_query_versions::v1::DRIVE_ABCI_QUERY_VERSIONS_V1; use crate::version::drive_abci_versions::drive_abci_structure_versions::v1::DRIVE_ABCI_STRUCTURE_VERSIONS_V1; @@ -85,7 +87,10 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { }, block_fee_processing: DriveAbciBlockFeeProcessingMethodVersions { add_process_epoch_change_operations: 0, - process_block_fees: 0, + process_block_fees_and_validate_sum_trees: 0, + }, + tokens_processing: DriveAbciTokensProcessingMethodVersions { + validate_token_aggregated_balance: 0, }, core_chain_lock: DriveAbciCoreChainLockMethodVersionsAndConstants { choose_quorum: 0, @@ -167,6 +172,7 @@ pub const TEST_PLATFORM_V3: PlatformVersion = PlatformVersion { document_versions: DOCUMENT_VERSIONS_V1, identity_versions: IDENTITY_VERSIONS_V1, voting_versions: VOTING_VERSION_V2, + token_versions: TOKEN_VERSIONS_V1, asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1, methods: DPP_METHOD_VERSIONS_V1, factory_versions: DPP_FACTORY_VERSIONS_V1, diff --git a/packages/rs-platform-version/src/version/mod.rs b/packages/rs-platform-version/src/version/mod.rs index 430317100c..5718d916d0 100644 --- a/packages/rs-platform-version/src/version/mod.rs +++ b/packages/rs-platform-version/src/version/mod.rs @@ -1,5 +1,5 @@ mod protocol_version; -use crate::version::v8::PROTOCOL_VERSION_8; +use crate::version::v9::PROTOCOL_VERSION_9; pub use protocol_version::*; mod consensus_versions; @@ -20,8 +20,9 @@ pub mod v5; pub mod v6; pub mod v7; pub mod v8; +pub mod v9; pub type ProtocolVersion = u32; -pub const LATEST_VERSION: ProtocolVersion = PROTOCOL_VERSION_8; +pub const LATEST_VERSION: ProtocolVersion = PROTOCOL_VERSION_9; 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 520ceef97a..d25532718f 100644 --- a/packages/rs-platform-version/src/version/protocol_version.rs +++ b/packages/rs-platform-version/src/version/protocol_version.rs @@ -23,6 +23,8 @@ use crate::version::v5::PLATFORM_V5; use crate::version::v6::PLATFORM_V6; use crate::version::v7::PLATFORM_V7; use crate::version::v8::PLATFORM_V8; +use crate::version::v9::PLATFORM_V9; + use crate::version::ProtocolVersion; pub use versioned_feature_core::*; @@ -47,6 +49,7 @@ pub const PLATFORM_VERSIONS: &[PlatformVersion] = &[ PLATFORM_V6, PLATFORM_V7, PLATFORM_V8, + PLATFORM_V9, ]; #[cfg(feature = "mock-versions")] @@ -55,7 +58,7 @@ 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_V8; +pub const LATEST_PLATFORM_VERSION: &PlatformVersion = &PLATFORM_V9; pub const DESIRED_PLATFORM_VERSION: &PlatformVersion = LATEST_PLATFORM_VERSION; diff --git a/packages/rs-platform-version/src/version/v1.rs b/packages/rs-platform-version/src/version/v1.rs index f7803b32c5..5f32d406fa 100644 --- a/packages/rs-platform-version/src/version/v1.rs +++ b/packages/rs-platform-version/src/version/v1.rs @@ -10,6 +10,7 @@ use crate::version::dpp_versions::dpp_state_transition_conversion_versions::v1:: use crate::version::dpp_versions::dpp_state_transition_method_versions::v1::STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_serialization_versions::v1::STATE_TRANSITION_SERIALIZATION_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_versions::v1::STATE_TRANSITION_VERSIONS_V1; +use crate::version::dpp_versions::dpp_token_versions::v1::TOKEN_VERSIONS_V1; use crate::version::dpp_versions::dpp_validation_versions::v1::DPP_VALIDATION_VERSIONS_V1; use crate::version::dpp_versions::dpp_voting_versions::v1::VOTING_VERSION_V1; use crate::version::dpp_versions::DPPVersion; @@ -49,6 +50,7 @@ pub const PLATFORM_V1: PlatformVersion = PlatformVersion { document_versions: DOCUMENT_VERSIONS_V1, identity_versions: IDENTITY_VERSIONS_V1, voting_versions: VOTING_VERSION_V1, + token_versions: TOKEN_VERSIONS_V1, asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1, methods: DPP_METHOD_VERSIONS_V1, factory_versions: DPP_FACTORY_VERSIONS_V1, diff --git a/packages/rs-platform-version/src/version/v2.rs b/packages/rs-platform-version/src/version/v2.rs index 6e1ed40094..f97bee4139 100644 --- a/packages/rs-platform-version/src/version/v2.rs +++ b/packages/rs-platform-version/src/version/v2.rs @@ -10,6 +10,7 @@ use crate::version::dpp_versions::dpp_state_transition_conversion_versions::v1:: use crate::version::dpp_versions::dpp_state_transition_method_versions::v1::STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_serialization_versions::v1::STATE_TRANSITION_SERIALIZATION_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_versions::v1::STATE_TRANSITION_VERSIONS_V1; +use crate::version::dpp_versions::dpp_token_versions::v1::TOKEN_VERSIONS_V1; use crate::version::dpp_versions::dpp_validation_versions::v2::DPP_VALIDATION_VERSIONS_V2; use crate::version::dpp_versions::dpp_voting_versions::v1::VOTING_VERSION_V1; use crate::version::dpp_versions::DPPVersion; @@ -49,6 +50,7 @@ pub const PLATFORM_V2: PlatformVersion = PlatformVersion { document_versions: DOCUMENT_VERSIONS_V1, identity_versions: IDENTITY_VERSIONS_V1, voting_versions: VOTING_VERSION_V1, + token_versions: TOKEN_VERSIONS_V1, asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1, methods: DPP_METHOD_VERSIONS_V1, factory_versions: DPP_FACTORY_VERSIONS_V1, diff --git a/packages/rs-platform-version/src/version/v3.rs b/packages/rs-platform-version/src/version/v3.rs index f3856bc1e6..c92b8ab225 100644 --- a/packages/rs-platform-version/src/version/v3.rs +++ b/packages/rs-platform-version/src/version/v3.rs @@ -10,6 +10,7 @@ use crate::version::dpp_versions::dpp_state_transition_conversion_versions::v2:: use crate::version::dpp_versions::dpp_state_transition_method_versions::v1::STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_serialization_versions::v1::STATE_TRANSITION_SERIALIZATION_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_versions::v2::STATE_TRANSITION_VERSIONS_V2; +use crate::version::dpp_versions::dpp_token_versions::v1::TOKEN_VERSIONS_V1; use crate::version::dpp_versions::dpp_validation_versions::v2::DPP_VALIDATION_VERSIONS_V2; use crate::version::dpp_versions::dpp_voting_versions::v2::VOTING_VERSION_V2; use crate::version::dpp_versions::DPPVersion; @@ -56,6 +57,7 @@ pub const PLATFORM_V3: PlatformVersion = PlatformVersion { document_versions: DOCUMENT_VERSIONS_V1, identity_versions: IDENTITY_VERSIONS_V1, voting_versions: VOTING_VERSION_V2, + token_versions: TOKEN_VERSIONS_V1, asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1, methods: DPP_METHOD_VERSIONS_V1, factory_versions: DPP_FACTORY_VERSIONS_V1, diff --git a/packages/rs-platform-version/src/version/v4.rs b/packages/rs-platform-version/src/version/v4.rs index d0b5894374..a6086b01ef 100644 --- a/packages/rs-platform-version/src/version/v4.rs +++ b/packages/rs-platform-version/src/version/v4.rs @@ -10,6 +10,7 @@ use crate::version::dpp_versions::dpp_state_transition_conversion_versions::v2:: use crate::version::dpp_versions::dpp_state_transition_method_versions::v1::STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_serialization_versions::v1::STATE_TRANSITION_SERIALIZATION_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_versions::v2::STATE_TRANSITION_VERSIONS_V2; +use crate::version::dpp_versions::dpp_token_versions::v1::TOKEN_VERSIONS_V1; use crate::version::dpp_versions::dpp_validation_versions::v2::DPP_VALIDATION_VERSIONS_V2; use crate::version::dpp_versions::dpp_voting_versions::v2::VOTING_VERSION_V2; use crate::version::dpp_versions::DPPVersion; @@ -51,6 +52,7 @@ pub const PLATFORM_V4: PlatformVersion = PlatformVersion { document_versions: DOCUMENT_VERSIONS_V1, identity_versions: IDENTITY_VERSIONS_V1, voting_versions: VOTING_VERSION_V2, + token_versions: TOKEN_VERSIONS_V1, asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1, methods: DPP_METHOD_VERSIONS_V1, factory_versions: DPP_FACTORY_VERSIONS_V1, diff --git a/packages/rs-platform-version/src/version/v5.rs b/packages/rs-platform-version/src/version/v5.rs index 988531b3d0..1679fff28a 100644 --- a/packages/rs-platform-version/src/version/v5.rs +++ b/packages/rs-platform-version/src/version/v5.rs @@ -10,6 +10,7 @@ use crate::version::dpp_versions::dpp_state_transition_conversion_versions::v2:: use crate::version::dpp_versions::dpp_state_transition_method_versions::v1::STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_serialization_versions::v1::STATE_TRANSITION_SERIALIZATION_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_versions::v2::STATE_TRANSITION_VERSIONS_V2; +use crate::version::dpp_versions::dpp_token_versions::v1::TOKEN_VERSIONS_V1; use crate::version::dpp_versions::dpp_validation_versions::v2::DPP_VALIDATION_VERSIONS_V2; use crate::version::dpp_versions::dpp_voting_versions::v2::VOTING_VERSION_V2; use crate::version::dpp_versions::DPPVersion; @@ -51,6 +52,7 @@ pub const PLATFORM_V5: PlatformVersion = PlatformVersion { document_versions: DOCUMENT_VERSIONS_V1, identity_versions: IDENTITY_VERSIONS_V1, voting_versions: VOTING_VERSION_V2, + token_versions: TOKEN_VERSIONS_V1, asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1, methods: DPP_METHOD_VERSIONS_V1, factory_versions: DPP_FACTORY_VERSIONS_V1, diff --git a/packages/rs-platform-version/src/version/v6.rs b/packages/rs-platform-version/src/version/v6.rs index b282d1b752..3ae597d99f 100644 --- a/packages/rs-platform-version/src/version/v6.rs +++ b/packages/rs-platform-version/src/version/v6.rs @@ -10,6 +10,7 @@ use crate::version::dpp_versions::dpp_state_transition_conversion_versions::v2:: use crate::version::dpp_versions::dpp_state_transition_method_versions::v1::STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_serialization_versions::v1::STATE_TRANSITION_SERIALIZATION_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_versions::v2::STATE_TRANSITION_VERSIONS_V2; +use crate::version::dpp_versions::dpp_token_versions::v1::TOKEN_VERSIONS_V1; use crate::version::dpp_versions::dpp_validation_versions::v2::DPP_VALIDATION_VERSIONS_V2; use crate::version::dpp_versions::dpp_voting_versions::v2::VOTING_VERSION_V2; use crate::version::dpp_versions::DPPVersion; @@ -50,6 +51,7 @@ pub const PLATFORM_V6: PlatformVersion = PlatformVersion { document_versions: DOCUMENT_VERSIONS_V1, identity_versions: IDENTITY_VERSIONS_V1, voting_versions: VOTING_VERSION_V2, + token_versions: TOKEN_VERSIONS_V1, asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1, methods: DPP_METHOD_VERSIONS_V1, factory_versions: DPP_FACTORY_VERSIONS_V1, diff --git a/packages/rs-platform-version/src/version/v7.rs b/packages/rs-platform-version/src/version/v7.rs index 0857a94ae9..1c1824b320 100644 --- a/packages/rs-platform-version/src/version/v7.rs +++ b/packages/rs-platform-version/src/version/v7.rs @@ -10,6 +10,7 @@ use crate::version::dpp_versions::dpp_state_transition_conversion_versions::v2:: use crate::version::dpp_versions::dpp_state_transition_method_versions::v1::STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_serialization_versions::v1::STATE_TRANSITION_SERIALIZATION_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_versions::v2::STATE_TRANSITION_VERSIONS_V2; +use crate::version::dpp_versions::dpp_token_versions::v1::TOKEN_VERSIONS_V1; use crate::version::dpp_versions::dpp_validation_versions::v2::DPP_VALIDATION_VERSIONS_V2; use crate::version::dpp_versions::dpp_voting_versions::v2::VOTING_VERSION_V2; use crate::version::dpp_versions::DPPVersion; @@ -50,6 +51,7 @@ pub const PLATFORM_V7: PlatformVersion = PlatformVersion { document_versions: DOCUMENT_VERSIONS_V1, identity_versions: IDENTITY_VERSIONS_V1, voting_versions: VOTING_VERSION_V2, + token_versions: TOKEN_VERSIONS_V1, asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1, methods: DPP_METHOD_VERSIONS_V1, factory_versions: DPP_FACTORY_VERSIONS_V1, diff --git a/packages/rs-platform-version/src/version/v8.rs b/packages/rs-platform-version/src/version/v8.rs index 7e86606215..9b6e7eff5a 100644 --- a/packages/rs-platform-version/src/version/v8.rs +++ b/packages/rs-platform-version/src/version/v8.rs @@ -10,6 +10,7 @@ use crate::version::dpp_versions::dpp_state_transition_conversion_versions::v2:: use crate::version::dpp_versions::dpp_state_transition_method_versions::v1::STATE_TRANSITION_METHOD_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_serialization_versions::v1::STATE_TRANSITION_SERIALIZATION_VERSIONS_V1; use crate::version::dpp_versions::dpp_state_transition_versions::v2::STATE_TRANSITION_VERSIONS_V2; +use crate::version::dpp_versions::dpp_token_versions::v1::TOKEN_VERSIONS_V1; use crate::version::dpp_versions::dpp_validation_versions::v2::DPP_VALIDATION_VERSIONS_V2; use crate::version::dpp_versions::dpp_voting_versions::v2::VOTING_VERSION_V2; use crate::version::dpp_versions::DPPVersion; @@ -54,6 +55,7 @@ pub const PLATFORM_V8: PlatformVersion = PlatformVersion { document_versions: DOCUMENT_VERSIONS_V1, identity_versions: IDENTITY_VERSIONS_V1, voting_versions: VOTING_VERSION_V2, + token_versions: TOKEN_VERSIONS_V1, asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1, // We changed `daily_withdrawal_limit` to v1 to increase daily withdrawal limit // to 2000 Dash. diff --git a/packages/rs-platform-version/src/version/v9.rs b/packages/rs-platform-version/src/version/v9.rs new file mode 100644 index 0000000000..e8713306d2 --- /dev/null +++ b/packages/rs-platform-version/src/version/v9.rs @@ -0,0 +1,66 @@ +use crate::version::consensus_versions::ConsensusVersions; +use crate::version::dpp_versions::dpp_asset_lock_versions::v1::DPP_ASSET_LOCK_VERSIONS_V1; +use crate::version::dpp_versions::dpp_contract_versions::v2::CONTRACT_VERSIONS_V2; +use crate::version::dpp_versions::dpp_costs_versions::v1::DPP_COSTS_VERSIONS_V1; +use crate::version::dpp_versions::dpp_document_versions::v1::DOCUMENT_VERSIONS_V1; +use crate::version::dpp_versions::dpp_factory_versions::v1::DPP_FACTORY_VERSIONS_V1; +use crate::version::dpp_versions::dpp_identity_versions::v1::IDENTITY_VERSIONS_V1; +use crate::version::dpp_versions::dpp_method_versions::v1::DPP_METHOD_VERSIONS_V1; +use crate::version::dpp_versions::dpp_state_transition_conversion_versions::v2::STATE_TRANSITION_CONVERSION_VERSIONS_V2; +use crate::version::dpp_versions::dpp_state_transition_method_versions::v1::STATE_TRANSITION_METHOD_VERSIONS_V1; +use crate::version::dpp_versions::dpp_state_transition_serialization_versions::v2::STATE_TRANSITION_SERIALIZATION_VERSIONS_V2; +use crate::version::dpp_versions::dpp_state_transition_versions::v2::STATE_TRANSITION_VERSIONS_V2; +use crate::version::dpp_versions::dpp_token_versions::v1::TOKEN_VERSIONS_V1; +use crate::version::dpp_versions::dpp_validation_versions::v2::DPP_VALIDATION_VERSIONS_V2; +use crate::version::dpp_versions::dpp_voting_versions::v2::VOTING_VERSION_V2; +use crate::version::dpp_versions::DPPVersion; +use crate::version::drive_abci_versions::drive_abci_method_versions::v6::DRIVE_ABCI_METHOD_VERSIONS_V6; +use crate::version::drive_abci_versions::drive_abci_query_versions::v1::DRIVE_ABCI_QUERY_VERSIONS_V1; +use crate::version::drive_abci_versions::drive_abci_structure_versions::v1::DRIVE_ABCI_STRUCTURE_VERSIONS_V1; +use crate::version::drive_abci_versions::drive_abci_validation_versions::v4::DRIVE_ABCI_VALIDATION_VERSIONS_V4; +use crate::version::drive_abci_versions::drive_abci_withdrawal_constants::v2::DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V2; +use crate::version::drive_abci_versions::DriveAbciVersion; +use crate::version::drive_versions::v4::DRIVE_VERSION_V4; +use crate::version::fee::v1::FEE_VERSION1; +use crate::version::protocol_version::PlatformVersion; +use crate::version::system_data_contract_versions::v1::SYSTEM_DATA_CONTRACT_VERSIONS_V1; +use crate::version::system_limits::v1::SYSTEM_LIMITS_V1; +use crate::version::ProtocolVersion; + +pub const PROTOCOL_VERSION_9: ProtocolVersion = 9; + +/// This version adds token support. +//todo: make changes +pub const PLATFORM_V9: PlatformVersion = PlatformVersion { + protocol_version: PROTOCOL_VERSION_9, + drive: DRIVE_VERSION_V4, // changed (for data contract insert) + drive_abci: DriveAbciVersion { + structs: DRIVE_ABCI_STRUCTURE_VERSIONS_V1, + methods: DRIVE_ABCI_METHOD_VERSIONS_V6, // changed because of the genesis state + validation_and_processing: DRIVE_ABCI_VALIDATION_VERSIONS_V4, + withdrawal_constants: DRIVE_ABCI_WITHDRAWAL_CONSTANTS_V2, + query: DRIVE_ABCI_QUERY_VERSIONS_V1, + }, + dpp: DPPVersion { + costs: DPP_COSTS_VERSIONS_V1, + validation: DPP_VALIDATION_VERSIONS_V2, + state_transition_serialization_versions: STATE_TRANSITION_SERIALIZATION_VERSIONS_V2, // changed + state_transition_conversion_versions: STATE_TRANSITION_CONVERSION_VERSIONS_V2, + state_transition_method_versions: STATE_TRANSITION_METHOD_VERSIONS_V1, + state_transitions: STATE_TRANSITION_VERSIONS_V2, + contract_versions: CONTRACT_VERSIONS_V2, // changed + document_versions: DOCUMENT_VERSIONS_V1, + identity_versions: IDENTITY_VERSIONS_V1, + voting_versions: VOTING_VERSION_V2, + token_versions: TOKEN_VERSIONS_V1, + asset_lock_versions: DPP_ASSET_LOCK_VERSIONS_V1, + methods: DPP_METHOD_VERSIONS_V1, + factory_versions: DPP_FACTORY_VERSIONS_V1, + }, + system_data_contracts: SYSTEM_DATA_CONTRACT_VERSIONS_V1, + fee_version: FEE_VERSION1, + system_limits: SYSTEM_LIMITS_V1, + consensus: ConsensusVersions { + tenderdash_consensus_version: 1, + }, +}; diff --git a/packages/rs-sdk/src/platform/transition/purchase_document.rs b/packages/rs-sdk/src/platform/transition/purchase_document.rs index 530c1c6b83..8423bd66d0 100644 --- a/packages/rs-sdk/src/platform/transition/purchase_document.rs +++ b/packages/rs-sdk/src/platform/transition/purchase_document.rs @@ -9,8 +9,8 @@ use dpp::fee::Credits; use dpp::identity::signer::Signer; use dpp::identity::IdentityPublicKey; use dpp::prelude::Identifier; -use dpp::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; +use dpp::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; +use dpp::state_transition::batch_transition::BatchTransition; use dpp::state_transition::StateTransition; #[async_trait::async_trait] @@ -65,7 +65,7 @@ impl PurchaseDocument for Document { let settings = settings.unwrap_or_default(); - let transition = DocumentsBatchTransition::new_document_purchase_transition_from_document( + let transition = BatchTransition::new_document_purchase_transition_from_document( self.clone(), document_type.as_ref(), purchaser_id, diff --git a/packages/rs-sdk/src/platform/transition/put_document.rs b/packages/rs-sdk/src/platform/transition/put_document.rs index 3ef5c5c864..a18b9143ea 100644 --- a/packages/rs-sdk/src/platform/transition/put_document.rs +++ b/packages/rs-sdk/src/platform/transition/put_document.rs @@ -7,8 +7,8 @@ use dpp::data_contract::document_type::DocumentType; use dpp::document::{Document, DocumentV0Getters}; use dpp::identity::signer::Signer; use dpp::identity::IdentityPublicKey; -use dpp::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; +use dpp::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; +use dpp::state_transition::batch_transition::BatchTransition; use dpp::state_transition::StateTransition; #[async_trait::async_trait] @@ -60,7 +60,7 @@ impl PutDocument for Document { let settings = settings.unwrap_or_default(); - let transition = DocumentsBatchTransition::new_document_creation_transition_from_document( + let transition = BatchTransition::new_document_creation_transition_from_document( self.clone(), document_type.as_ref(), document_state_transition_entropy, diff --git a/packages/rs-sdk/src/platform/transition/transfer_document.rs b/packages/rs-sdk/src/platform/transition/transfer_document.rs index 2106141ae3..bd4a87e2dd 100644 --- a/packages/rs-sdk/src/platform/transition/transfer_document.rs +++ b/packages/rs-sdk/src/platform/transition/transfer_document.rs @@ -8,8 +8,8 @@ use dpp::data_contract::document_type::DocumentType; use dpp::document::{Document, DocumentV0Getters}; use dpp::identity::signer::Signer; use dpp::identity::IdentityPublicKey; -use dpp::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; +use dpp::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; +use dpp::state_transition::batch_transition::BatchTransition; use dpp::state_transition::StateTransition; use rs_dapi_client::{DapiRequest, IntoInner}; @@ -62,7 +62,7 @@ impl TransferDocument for Document { let settings = settings.unwrap_or_default(); - let transition = DocumentsBatchTransition::new_document_transfer_transition_from_document( + let transition = BatchTransition::new_document_transfer_transition_from_document( self.clone(), document_type.as_ref(), recipient_id, diff --git a/packages/rs-sdk/src/platform/transition/update_price_of_document.rs b/packages/rs-sdk/src/platform/transition/update_price_of_document.rs index 99a5642bf9..e0bb06e0ef 100644 --- a/packages/rs-sdk/src/platform/transition/update_price_of_document.rs +++ b/packages/rs-sdk/src/platform/transition/update_price_of_document.rs @@ -9,8 +9,9 @@ use dpp::document::{Document, DocumentV0Getters}; use dpp::fee::Credits; use dpp::identity::signer::Signer; use dpp::identity::IdentityPublicKey; -use dpp::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; +use dpp::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; +use dpp::state_transition::batch_transition::BatchTransition; +use dpp::state_transition::proof_result::StateTransitionProofResult; use dpp::state_transition::StateTransition; #[async_trait::async_trait] @@ -62,20 +63,19 @@ impl UpdatePriceOfDocument for Document { let settings = settings.unwrap_or_default(); - let transition = - DocumentsBatchTransition::new_document_update_price_transition_from_document( - self.clone(), - document_type.as_ref(), - price, - &identity_public_key, - new_identity_contract_nonce, - settings.user_fee_increase.unwrap_or_default(), - signer, - sdk.version(), - None, - None, - None, - )?; + let transition = BatchTransition::new_document_update_price_transition_from_document( + self.clone(), + document_type.as_ref(), + price, + &identity_public_key, + new_identity_contract_nonce, + settings.user_fee_increase.unwrap_or_default(), + signer, + sdk.version(), + None, + None, + None, + )?; // response is empty for a broadcast, result comes from the stream wait for state transition result transition.broadcast(sdk, Some(settings)).await?; diff --git a/packages/rs-sdk/src/platform/transition/waitable.rs b/packages/rs-sdk/src/platform/transition/waitable.rs index a63acb0949..c17436776d 100644 --- a/packages/rs-sdk/src/platform/transition/waitable.rs +++ b/packages/rs-sdk/src/platform/transition/waitable.rs @@ -43,7 +43,7 @@ impl Waitable for Document { state_transition: StateTransition, settings: Option, ) -> Result { - let doc_id = if let StateTransition::DocumentsBatch(transition) = &state_transition { + let doc_id = if let StateTransition::Batch(transition) = &state_transition { let ids = transition.modified_data_ids(); if ids.len() != 1 { return Err(Error::Protocol( diff --git a/packages/search-contract/.eslintrc b/packages/search-contract/.eslintrc new file mode 100644 index 0000000000..cb6c7636b6 --- /dev/null +++ b/packages/search-contract/.eslintrc @@ -0,0 +1,18 @@ +{ + "extends": "airbnb-base", + "rules": { + "no-plusplus": 0, + "eol-last": [ + "error", + "always" + ], + "class-methods-use-this": "off", + "curly": [ + "error", + "all" + ] + }, + "globals": { + "BigInt": true + } +} diff --git a/packages/search-contract/.mocharc.yml b/packages/search-contract/.mocharc.yml new file mode 100644 index 0000000000..164b941c1b --- /dev/null +++ b/packages/search-contract/.mocharc.yml @@ -0,0 +1,2 @@ +require: test/bootstrap.js +recursive: true diff --git a/packages/search-contract/Cargo.toml b/packages/search-contract/Cargo.toml new file mode 100644 index 0000000000..3625f97a47 --- /dev/null +++ b/packages/search-contract/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "token-history-contract" +description = "Token history data contract schema and tools" +version = "1.6.2" +edition = "2021" +rust-version.workspace = true +license = "MIT" + +[dependencies] +thiserror = "1.0.64" +platform-version = { path = "../rs-platform-version" } +serde_json = { version = "1.0" } +platform-value = { path = "../rs-platform-value" } diff --git a/packages/search-contract/LICENSE b/packages/search-contract/LICENSE new file mode 100644 index 0000000000..3be9583375 --- /dev/null +++ b/packages/search-contract/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2019 Dash Core Group, Inc. + +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. diff --git a/packages/search-contract/README.md b/packages/search-contract/README.md new file mode 100644 index 0000000000..6f6caf4d9d --- /dev/null +++ b/packages/search-contract/README.md @@ -0,0 +1,26 @@ +# Search Contract + +[![Build Status](https://github.com/dashpay/platform/actions/workflows/release.yml/badge.svg)](https://github.com/dashpay/platform/actions/workflows/release.yml) +[![NPM version](https://img.shields.io/npm/v/@dashevo/wallet-contract.svg?style=flat-square)](https://npmjs.org/package/@dashevo/wallet-contract) + +JSON Contracts for Searching Data Contracts + +## Table of Contents + +- [Install](#install) +- [Contributing](#contributing) +- [License](#license) + +## Install + +```sh +npm install @dashevo/search-contract +``` + +## Contributing + +Feel free to dive in! [Open an issue](https://github.com/dashpay/platform/issues/new/choose) or submit PRs. + +## License + +[MIT](LICENSE) © Dash Core Group, Inc. diff --git a/packages/search-contract/lib/systemIds.js b/packages/search-contract/lib/systemIds.js new file mode 100644 index 0000000000..7335d3d163 --- /dev/null +++ b/packages/search-contract/lib/systemIds.js @@ -0,0 +1,4 @@ +module.exports = { + ownerId: '11111111111111111111111111111111', + contractId: '8v8CoKCDdBcQu1Y7GDNJjR7a5vkMmgpXycJURkaUhfU9', +}; diff --git a/packages/search-contract/package.json b/packages/search-contract/package.json new file mode 100644 index 0000000000..82782f0d62 --- /dev/null +++ b/packages/search-contract/package.json @@ -0,0 +1,29 @@ +{ + "name": "@dashevo/search-contract", + "version": "1.6.2", + "description": "A contract that allows searching for contracts", + "scripts": { + "lint": "eslint .", + "test": "yarn run test:unit", + "test:unit": "mocha 'test/unit/**/*.spec.js'" + }, + "contributors": [ + { + "name": "Samuel Westrich", + "email": "sam@dash.org", + "url": "https://github.com/quantumexplorer" + } + ], + "license": "MIT", + "devDependencies": { + "@dashevo/wasm-dpp": "workspace:*", + "chai": "^4.3.10", + "dirty-chai": "^2.0.1", + "eslint": "^8.53.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-plugin-import": "^2.29.0", + "mocha": "^10.2.0", + "sinon": "^17.0.1", + "sinon-chai": "^3.7.0" + } +} diff --git a/packages/search-contract/schema/v1/search-contract-documents.json b/packages/search-contract/schema/v1/search-contract-documents.json new file mode 100644 index 0000000000..f146ecb3e6 --- /dev/null +++ b/packages/search-contract/schema/v1/search-contract-documents.json @@ -0,0 +1,62 @@ +{ + "contract": { + "type": "object", + "documentsMutable": false, + "canBeDeleted": false, + "referenceType": "contract", + "creationRestrictionMode": 2, + "indices": [ + { + "name": "byKeyword", + "properties": [ + { + "keyword": "asc" + } + ] + } + ], + "properties": { + "keyword": { + "type": "string", + "minLength": 3, + "maxLength": 50, + "position": 0 + } + }, + "required": [ + "$contractId", + "keyword" + ], + "additionalProperties": false + }, + "token": { + "type": "object", + "documentsMutable": false, + "canBeDeleted": false, + "referenceType": "token", + "creationRestrictionMode": 2, + "indices": [ + { + "name": "byKeyword", + "properties": [ + { + "keyword": "asc" + } + ] + } + ], + "properties": { + "keyword": { + "type": "string", + "minLength": 3, + "maxLength": 50, + "position": 0 + } + }, + "required": [ + "$tokenId", + "keyword" + ], + "additionalProperties": false + } +} diff --git a/packages/search-contract/src/error.rs b/packages/search-contract/src/error.rs new file mode 100644 index 0000000000..d01bbcc91c --- /dev/null +++ b/packages/search-contract/src/error.rs @@ -0,0 +1,17 @@ +use platform_version::version::FeatureVersion; + +#[derive(thiserror::Error, Debug)] +pub enum Error { + /// Platform expected some specific versions + #[error("platform unknown version on {method}, received: {received}")] + UnknownVersionMismatch { + /// method + method: String, + /// the allowed versions for this method + known_versions: Vec, + /// requested core height + received: FeatureVersion, + }, + #[error("schema deserialize error: {0}")] + InvalidSchemaJson(#[from] serde_json::Error), +} diff --git a/packages/search-contract/src/lib.rs b/packages/search-contract/src/lib.rs new file mode 100644 index 0000000000..f7767ea6c2 --- /dev/null +++ b/packages/search-contract/src/lib.rs @@ -0,0 +1,37 @@ +mod error; +pub mod v1; + +pub use crate::error::Error; +use platform_value::{Identifier, IdentifierBytes32}; +use platform_version::version::PlatformVersion; +use serde_json::Value; + +pub const ID_BYTES: [u8; 32] = [ + 92, 20, 14, 101, 92, 2, 101, 187, 194, 168, 8, 113, 109, 225, 132, 121, 133, 19, 89, 24, 173, + 81, 205, 253, 11, 118, 102, 75, 169, 91, 163, 124, +]; + +pub const OWNER_ID_BYTES: [u8; 32] = [0; 32]; + +pub const ID: Identifier = Identifier(IdentifierBytes32(ID_BYTES)); +pub const OWNER_ID: Identifier = Identifier(IdentifierBytes32(OWNER_ID_BYTES)); +pub fn load_definitions(platform_version: &PlatformVersion) -> Result, Error> { + match platform_version.system_data_contracts.withdrawals { + 1 => Ok(None), + version => Err(Error::UnknownVersionMismatch { + method: "search_contract::load_definitions".to_string(), + known_versions: vec![1], + received: version, + }), + } +} +pub fn load_documents_schemas(platform_version: &PlatformVersion) -> Result { + match platform_version.system_data_contracts.withdrawals { + 1 => v1::load_documents_schemas(), + version => Err(Error::UnknownVersionMismatch { + method: "search_contract::load_documents_schemas".to_string(), + known_versions: vec![1], + received: version, + }), + } +} diff --git a/packages/search-contract/src/v1/mod.rs b/packages/search-contract/src/v1/mod.rs new file mode 100644 index 0000000000..e5d6a06771 --- /dev/null +++ b/packages/search-contract/src/v1/mod.rs @@ -0,0 +1,27 @@ +use crate::Error; +use serde_json::Value; + +pub mod document_types { + pub mod contract { + pub const NAME: &str = "contract"; + + pub mod properties { + pub const KEY_INDEX: &str = "byKeyword"; + } + } + + pub mod token { + pub const NAME: &str = "token"; + + pub mod properties { + pub const KEY_INDEX: &str = "byKeyword"; + } + } +} + +pub fn load_documents_schemas() -> Result { + serde_json::from_str(include_str!( + "../../schema/v1/search-contract-documents.json" + )) + .map_err(Error::InvalidSchemaJson) +} diff --git a/packages/search-contract/test/.eslintrc b/packages/search-contract/test/.eslintrc new file mode 100644 index 0000000000..720ced7385 --- /dev/null +++ b/packages/search-contract/test/.eslintrc @@ -0,0 +1,12 @@ +{ + "env": { + "node": true, + "mocha": true + }, + "rules": { + "import/no-extraneous-dependencies": "off" + }, + "globals": { + "expect": true + } +} diff --git a/packages/search-contract/test/bootstrap.js b/packages/search-contract/test/bootstrap.js new file mode 100644 index 0000000000..7af04f464d --- /dev/null +++ b/packages/search-contract/test/bootstrap.js @@ -0,0 +1,30 @@ +const sinon = require('sinon'); +const sinonChai = require('sinon-chai'); + +const { expect, use } = require('chai'); +const dirtyChai = require('dirty-chai'); + +const { + default: loadWasmDpp, +} = require('@dashevo/wasm-dpp'); + +use(dirtyChai); +use(sinonChai); + +exports.mochaHooks = { + beforeAll: loadWasmDpp, + + beforeEach() { + if (!this.sinon) { + this.sinon = sinon.createSandbox(); + } else { + this.sinon.restore(); + } + }, + + afterEach() { + this.sinon.restore(); + }, +}; + +global.expect = expect; diff --git a/packages/search-contract/test/unit/searchContract.spec.js b/packages/search-contract/test/unit/searchContract.spec.js new file mode 100644 index 0000000000..2fd94a879b --- /dev/null +++ b/packages/search-contract/test/unit/searchContract.spec.js @@ -0,0 +1,187 @@ +const crypto = require('crypto'); + +const { + DashPlatformProtocol, + JsonSchemaError, +} = require('@dashevo/wasm-dpp'); +const generateRandomIdentifier = require('@dashevo/wasm-dpp/lib/test/utils/generateRandomIdentifierAsync'); + +const { expect } = require('chai'); +const walletContractDocumentsSchema = require('../../schema/v1/search-contract-documents.json'); + +const expectJsonSchemaError = (validationResult, errorCount = 1) => { + const errors = validationResult.getErrors(); + expect(errors) + .to + .have + .length(errorCount); + + const error = validationResult.getErrors()[0]; + expect(error) + .to + .be + .instanceof(JsonSchemaError); + + return error; +}; + +describe('Search Contract', () => { + let dpp; + let dataContract; + let identityId; + + beforeEach(async () => { + dpp = new DashPlatformProtocol( + { generate: () => crypto.randomBytes(32) }, + ); + + identityId = await generateRandomIdentifier(); + + dataContract = dpp.dataContract.create(identityId, BigInt(1), walletContractDocumentsSchema); + }); + + it('should have a valid contract definition', async () => { + expect(() => dpp.dataContract.create(identityId, BigInt(1), walletContractDocumentsSchema)) + .to + .not + .throw(); + }); + + describe('documents', () => { + describe('txMetadata', () => { + let rawTxMetadataDocument; + + beforeEach(() => { + rawTxMetadataDocument = { + keyIndex: 0, + encryptionKeyIndex: 100, + encryptedMetadata: crypto.randomBytes(64), + }; + }); + + describe('keyIndex', () => { + it('should be defined', async () => { + delete rawTxMetadataDocument.keyIndex; + + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + + expect(error.keyword) + .to + .equal('required'); + expect(error.params.missingProperty) + .to + .equal('keyIndex'); + }); + + it('should be a non-negative integer', async () => { + rawTxMetadataDocument.keyIndex = -1; + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minimum'); + }); + }); + + describe('encryptionKeyIndex', () => { + it('should be defined', async () => { + delete rawTxMetadataDocument.encryptionKeyIndex; + + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + + expect(error.keyword) + .to + .equal('required'); + expect(error.params.missingProperty) + .to + .equal('encryptionKeyIndex'); + }); + + it('should be a non-negative integer', async () => { + rawTxMetadataDocument.encryptionKeyIndex = -1; + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minimum'); + }); + }); + + describe('encryptedMetadata', () => { + it('should be defined', async () => { + delete rawTxMetadataDocument.encryptedMetadata; + + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + + expect(error.keyword) + .to + .equal('required'); + expect(error.params.missingProperty) + .to + .equal('encryptedMetadata'); + }); + + it('should be not shorter than 32 bytes', async () => { + rawTxMetadataDocument.encryptedMetadata = crypto.randomBytes(31); + + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + + expect(error.keyword) + .to + .equal('minItems'); + expect(error.instancePath) + .to + .equal('/encryptedMetadata'); + }); + + it('should be not longer than 4096 bytes', async () => { + rawTxMetadataDocument.encryptedMetadata = crypto.randomBytes(4097); + + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + + expect(error.keyword) + .to + .equal('maxItems'); + expect(error.instancePath) + .to + .equal('/encryptedMetadata'); + }); + }); + + it('should not have additional properties', async () => { + rawTxMetadataDocument.someOtherProperty = 42; + + const document = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + + expect(error.keyword) + .to + .equal('additionalProperties'); + expect(error.params.additionalProperties) + .to + .deep + .equal(['someOtherProperty']); + }); + + it('should be valid', async () => { + const txMetadata = dpp.document.create(dataContract, identityId, 'txMetadata', rawTxMetadataDocument); + + const result = await txMetadata.validate(dpp.protocolVersion); + + expect(result.isValid()) + .to + .be + .true(); + }); + }); + }); +}); diff --git a/packages/strategy-tests/src/lib.rs b/packages/strategy-tests/src/lib.rs index efdb702a48..6d5d3e5161 100644 --- a/packages/strategy-tests/src/lib.rs +++ b/packages/strategy-tests/src/lib.rs @@ -37,34 +37,38 @@ use dpp::state_transition::StateTransition; use dpp::version::PlatformVersion; use drive::drive::identity::key::fetch::{IdentityKeysRequest, KeyRequestType}; +use bincode::{Decode, Encode}; use dpp::data_contract::accessors::v0::{DataContractV0Getters, DataContractV0Setters}; +use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; +use dpp::data_contract::document_type::DocumentType; +use dpp::fee::Credits; +use dpp::identifier::Identifier; +use dpp::identity::accessors::IdentityGettersV0; +use dpp::platform_value::{BinaryData, Bytes32, Value}; +use dpp::state_transition::batch_transition::batched_transition::document_delete_transition::DocumentDeleteTransitionV0; +use dpp::state_transition::batch_transition::batched_transition::document_replace_transition::DocumentReplaceTransitionV0; +use dpp::state_transition::batch_transition::batched_transition::document_transfer_transition::DocumentTransferTransitionV0; +use dpp::state_transition::batch_transition::batched_transition::{ + DocumentDeleteTransition, DocumentReplaceTransition, DocumentTransferTransition, +}; +use dpp::state_transition::batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; +use dpp::state_transition::batch_transition::document_create_transition::{ + DocumentCreateTransition, DocumentCreateTransitionV0, +}; +use dpp::state_transition::batch_transition::{BatchTransition, BatchTransitionV0}; +use dpp::state_transition::data_contract_create_transition::methods::v0::DataContractCreateTransitionMethodsV0; use dpp::state_transition::data_contract_update_transition::methods::DataContractUpdateTransitionMethodsV0; +use dpp::ProtocolError::{PlatformDeserializationError, PlatformSerializationError}; +use dpp::{dash_to_duffs, ProtocolError}; use operations::{DataContractUpdateAction, DataContractUpdateOp}; use platform_version::TryFromPlatformVersioned; use rand::prelude::StdRng; use rand::seq::{IteratorRandom, SliceRandom}; use rand::Rng; -use transitions::create_identity_credit_transfer_transition; +use simple_signer::signer::SimpleSigner; use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; use std::ops::RangeInclusive; -use bincode::{Decode, Encode}; -use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; -use dpp::identifier::Identifier; -use dpp::data_contract::document_type::DocumentType; -use dpp::fee::Credits; -use dpp::identity::accessors::IdentityGettersV0; -use dpp::platform_value::{BinaryData, Bytes32, Value}; -use dpp::{dash_to_duffs, ProtocolError}; -use dpp::ProtocolError::{PlatformDeserializationError, PlatformSerializationError}; -use dpp::state_transition::documents_batch_transition::document_base_transition::v0::DocumentBaseTransitionV0; -use dpp::state_transition::documents_batch_transition::document_create_transition::{DocumentCreateTransition, DocumentCreateTransitionV0}; -use dpp::state_transition::documents_batch_transition::document_transition::document_delete_transition::DocumentDeleteTransitionV0; -use dpp::state_transition::documents_batch_transition::document_transition::document_replace_transition::DocumentReplaceTransitionV0; -use dpp::state_transition::documents_batch_transition::{DocumentsBatchTransition, DocumentsBatchTransitionV0}; -use dpp::state_transition::documents_batch_transition::document_transition::{DocumentDeleteTransition, DocumentReplaceTransition, DocumentTransferTransition}; -use dpp::state_transition::data_contract_create_transition::methods::v0::DataContractCreateTransitionMethodsV0; -use dpp::state_transition::documents_batch_transition::document_transition::document_transfer_transition::DocumentTransferTransitionV0; -use simple_signer::signer::SimpleSigner; +use transitions::create_identity_credit_transfer_transition; pub mod frequency; pub mod operations; @@ -720,8 +724,8 @@ impl Strategy { } .into(); - let document_batch_transition: DocumentsBatchTransition = - DocumentsBatchTransitionV0 { + let document_batch_transition: BatchTransition = + BatchTransitionV0 { owner_id: identity.id(), transitions: vec![document_create_transition.into()], user_fee_increase: 0, @@ -846,8 +850,8 @@ impl Strategy { } .into(); - let document_batch_transition: DocumentsBatchTransition = - DocumentsBatchTransitionV0 { + let document_batch_transition: BatchTransition = + BatchTransitionV0 { owner_id: identity.id(), transitions: vec![document_create_transition.into()], user_fee_increase: 0, @@ -936,15 +940,14 @@ impl Strategy { } .into(); - let document_batch_transition: DocumentsBatchTransition = - DocumentsBatchTransitionV0 { - owner_id: identity.id(), - transitions: vec![document_delete_transition.into()], - user_fee_increase: 0, - signature_public_key_id: 1, - signature: BinaryData::default(), - } - .into(); + let document_batch_transition: BatchTransition = BatchTransitionV0 { + owner_id: identity.id(), + transitions: vec![document_delete_transition.into()], + user_fee_increase: 0, + signature_public_key_id: 1, + signature: BinaryData::default(), + } + .into(); let mut document_batch_transition: StateTransition = document_batch_transition.into(); @@ -1034,15 +1037,14 @@ impl Strategy { } .into(); - let document_batch_transition: DocumentsBatchTransition = - DocumentsBatchTransitionV0 { - owner_id: identity.id, - transitions: vec![document_replace_transition.into()], - user_fee_increase: 0, - signature_public_key_id: 1, - signature: BinaryData::default(), - } - .into(); + let document_batch_transition: BatchTransition = BatchTransitionV0 { + owner_id: identity.id, + transitions: vec![document_replace_transition.into()], + user_fee_increase: 0, + signature_public_key_id: 1, + signature: BinaryData::default(), + } + .into(); let mut document_batch_transition: StateTransition = document_batch_transition.into(); @@ -1138,15 +1140,14 @@ impl Strategy { } .into(); - let document_batch_transition: DocumentsBatchTransition = - DocumentsBatchTransitionV0 { - owner_id: identity.id, - transitions: vec![document_transfer_transition.into()], - user_fee_increase: 0, - signature_public_key_id: 1, - signature: BinaryData::default(), - } - .into(); + let document_batch_transition: BatchTransition = BatchTransitionV0 { + owner_id: identity.id, + transitions: vec![document_transfer_transition.into()], + user_fee_increase: 0, + signature_public_key_id: 1, + signature: BinaryData::default(), + } + .into(); let mut document_batch_transition: StateTransition = document_batch_transition.into(); @@ -1919,28 +1920,22 @@ mod tests { let mut simple_signer = SimpleSigner::default(); - let (identity1, keys) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity1, keys) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys); - let (identity2, keys) = - Identity::random_identity_with_main_keys_with_private_key::>( - 2, - &mut rng, - platform_version, - ) - .unwrap(); + let (mut identity2, keys) = Identity::random_identity_with_main_keys_with_private_key::< + Vec<_>, + >(2, &mut rng, platform_version) + .unwrap(); simple_signer.add_keys(keys); let start_identities = create_state_transitions_for_identities( - vec![identity1, identity2], + vec![&mut identity1, &mut identity2], &(dash_to_duffs!(1)..=dash_to_duffs!(1)), &mut simple_signer, &mut rng, diff --git a/packages/strategy-tests/src/operations.rs b/packages/strategy-tests/src/operations.rs index d35fc9f503..4dcebb9f62 100644 --- a/packages/strategy-tests/src/operations.rs +++ b/packages/strategy-tests/src/operations.rs @@ -8,7 +8,7 @@ use dpp::data_contract::document_type::random_document::{ use dpp::data_contract::document_type::v0::random_document_type::RandomDocumentTypeParameters; use dpp::data_contract::document_type::DocumentType; use dpp::data_contract::serialized_version::DataContractInSerializationFormat; -use dpp::data_contract::{DataContract as Contract, DataContract}; +use dpp::data_contract::{DataContract as Contract, DataContract, TokenContractPosition}; use dpp::fee::Credits; use dpp::identifier::Identifier; use dpp::identity::IdentityPublicKey; @@ -17,6 +17,7 @@ use dpp::serialization::{ PlatformDeserializableWithPotentialValidationFromVersionedStructure, PlatformSerializableWithPlatformVersion, }; +use dpp::tokens::token_event::TokenEvent; use dpp::voting::vote_choices::resource_vote_choice::ResourceVoteChoice; use dpp::ProtocolError; use dpp::ProtocolError::{PlatformDeserializationError, PlatformSerializationError}; @@ -29,6 +30,106 @@ use rand::prelude::StdRng; use std::collections::BTreeMap; use std::ops::{Range, RangeInclusive}; +#[derive(Clone, Debug, PartialEq)] +pub struct TokenOp { + pub contract: Contract, + pub token_id: Identifier, + pub token_pos: TokenContractPosition, + pub use_identity_with_id: Option, + pub action: TokenEvent, +} + +#[derive(Clone, Debug, Encode, Decode)] +pub struct TokenOpInSerializationFormat { + pub contract: DataContractInSerializationFormat, + pub token_id: Identifier, + pub token_pos: TokenContractPosition, + pub use_identity_with_id: Option, + pub action: TokenEvent, +} + +impl PlatformSerializableWithPlatformVersion for TokenOp { + type Error = ProtocolError; + + fn serialize_to_bytes_with_platform_version( + &self, + platform_version: &PlatformVersion, + ) -> Result, ProtocolError> { + self.clone() + .serialize_consume_to_bytes_with_platform_version(platform_version) + } + + fn serialize_consume_to_bytes_with_platform_version( + self, + platform_version: &PlatformVersion, + ) -> Result, ProtocolError> { + let TokenOp { + contract, + token_id, + token_pos, + use_identity_with_id, + action, + } = self; + let data_contract_serialization_format: DataContractInSerializationFormat = + contract.try_into_platform_versioned(platform_version)?; + + let document_op = TokenOpInSerializationFormat { + contract: data_contract_serialization_format, + token_id, + token_pos, + use_identity_with_id, + action, + }; + let config = bincode::config::standard() + .with_big_endian() + .with_no_limit(); + bincode::encode_to_vec(document_op, config).map_err(|e| { + PlatformSerializationError(format!("unable to serialize DocumentOp: {}", e)) + }) + } +} + +impl PlatformDeserializableWithPotentialValidationFromVersionedStructure for TokenOp { + fn versioned_deserialize( + data: &[u8], + full_validation: bool, + platform_version: &PlatformVersion, + ) -> Result + where + Self: Sized, + { + let config = bincode::config::standard() + .with_big_endian() + .with_no_limit(); + let token_op_in_serialization_format: TokenOpInSerializationFormat = + bincode::borrow_decode_from_slice(data, config) + .map_err(|e| { + PlatformDeserializationError(format!("unable to deserialize DocumentOp: {}", e)) + })? + .0; + let TokenOpInSerializationFormat { + contract, + token_id, + token_pos, + use_identity_with_id, + action, + } = token_op_in_serialization_format; + let data_contract = DataContract::try_from_platform_versioned( + contract, + full_validation, + &mut vec![], + platform_version, + )?; + Ok(TokenOp { + contract: data_contract, + token_id, + token_pos, + use_identity_with_id, + action, + }) + } +} + #[derive(Clone, Debug, PartialEq, Encode, Decode)] pub enum DocumentAction { DocumentActionInsertRandom(DocumentFieldFillType, DocumentFieldFillSize), @@ -514,6 +615,7 @@ pub enum OperationType { ContractUpdate(DataContractUpdateOp), IdentityTransfer(Option), ResourceVote(ResourceVoteOp), + Token(TokenOp), } #[derive(Clone, Debug, Encode, Decode)] @@ -526,6 +628,7 @@ enum OperationTypeInSerializationFormat { ContractUpdate(Vec), IdentityTransfer(Option), ResourceVote(ResourceVoteOpSerializable), + Token(Vec), } impl PlatformSerializableWithPlatformVersion for OperationType { @@ -578,6 +681,11 @@ impl PlatformSerializableWithPlatformVersion for OperationType { resource_vote_op.try_into_platform_versioned(platform_version)?; OperationTypeInSerializationFormat::ResourceVote(vote_op_in_serialization_format) } + OperationType::Token(token_op) => { + let token_op_in_serialization_format = + token_op.serialize_consume_to_bytes_with_platform_version(platform_version)?; + OperationTypeInSerializationFormat::Token(token_op_in_serialization_format) + } }; let config = bincode::config::standard() .with_big_endian() @@ -642,6 +750,14 @@ impl PlatformDeserializableWithPotentialValidationFromVersionedStructure for Ope let vote_op = resource_vote_op.try_into_platform_versioned(platform_version)?; OperationType::ResourceVote(vote_op) } + OperationTypeInSerializationFormat::Token(serialized_token_op) => { + let token_op = TokenOp::versioned_deserialize( + serialized_token_op.as_slice(), + full_validation, + platform_version, + )?; + OperationType::Token(token_op) + } }) } } diff --git a/packages/strategy-tests/src/transitions.rs b/packages/strategy-tests/src/transitions.rs index c77b51e290..d3607d179a 100644 --- a/packages/strategy-tests/src/transitions.rs +++ b/packages/strategy-tests/src/transitions.rs @@ -1018,16 +1018,19 @@ pub fn create_identities_state_transitions( /// - When unable to generate random cryptographic keys. /// - When failing to transform an identity into its corresponding state transition. /// - Conversion and encoding errors related to the cryptographic data. -pub fn create_state_transitions_for_identities( - identities: Vec, +pub fn create_state_transitions_for_identities<'a, I>( + identities: I, amount_range: &AmountRange, signer: &SimpleSigner, rng: &mut StdRng, platform_version: &PlatformVersion, -) -> Vec<(Identity, StateTransition)> { +) -> Vec<(Identity, StateTransition)> +where + I: IntoIterator, +{ identities .into_iter() - .map(|mut identity| { + .map(|identity| { let (_, pk) = ECDSA_SECP256K1 .random_public_and_private_key_data(rng, platform_version) .unwrap(); @@ -1051,7 +1054,7 @@ pub fn create_state_transitions_for_identities( .expect("expected to transform identity into identity create transition"); identity.set_id(identity_create_transition.owner_id()); - (identity, identity_create_transition) + (identity.clone(), identity_create_transition) }) .collect() } diff --git a/packages/token-history-contract/.eslintrc b/packages/token-history-contract/.eslintrc new file mode 100644 index 0000000000..cb6c7636b6 --- /dev/null +++ b/packages/token-history-contract/.eslintrc @@ -0,0 +1,18 @@ +{ + "extends": "airbnb-base", + "rules": { + "no-plusplus": 0, + "eol-last": [ + "error", + "always" + ], + "class-methods-use-this": "off", + "curly": [ + "error", + "all" + ] + }, + "globals": { + "BigInt": true + } +} diff --git a/packages/token-history-contract/.mocharc.yml b/packages/token-history-contract/.mocharc.yml new file mode 100644 index 0000000000..164b941c1b --- /dev/null +++ b/packages/token-history-contract/.mocharc.yml @@ -0,0 +1,2 @@ +require: test/bootstrap.js +recursive: true diff --git a/packages/token-history-contract/Cargo.toml b/packages/token-history-contract/Cargo.toml new file mode 100644 index 0000000000..3625f97a47 --- /dev/null +++ b/packages/token-history-contract/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "token-history-contract" +description = "Token history data contract schema and tools" +version = "1.6.2" +edition = "2021" +rust-version.workspace = true +license = "MIT" + +[dependencies] +thiserror = "1.0.64" +platform-version = { path = "../rs-platform-version" } +serde_json = { version = "1.0" } +platform-value = { path = "../rs-platform-value" } diff --git a/packages/token-history-contract/LICENSE b/packages/token-history-contract/LICENSE new file mode 100644 index 0000000000..3be9583375 --- /dev/null +++ b/packages/token-history-contract/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2019 Dash Core Group, Inc. + +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. diff --git a/packages/token-history-contract/README.md b/packages/token-history-contract/README.md new file mode 100644 index 0000000000..ce6b5a6233 --- /dev/null +++ b/packages/token-history-contract/README.md @@ -0,0 +1,26 @@ +# Wallet Utils Contract + +[![Build Status](https://github.com/dashpay/platform/actions/workflows/release.yml/badge.svg)](https://github.com/dashpay/platform/actions/workflows/release.yml) +[![NPM version](https://img.shields.io/npm/v/@dashevo/wallet-contract.svg?style=flat-square)](https://npmjs.org/package/@dashevo/wallet-contract) + +JSON Contracts for Dash Wallet apps + +## Table of Contents + +- [Install](#install) +- [Contributing](#contributing) +- [License](#license) + +## Install + +```sh +npm install @dashevo/wallet-contract +``` + +## Contributing + +Feel free to dive in! [Open an issue](https://github.com/dashpay/platform/issues/new/choose) or submit PRs. + +## License + +[MIT](LICENSE) © Dash Core Group, Inc. diff --git a/packages/token-history-contract/lib/systemIds.js b/packages/token-history-contract/lib/systemIds.js new file mode 100644 index 0000000000..a89ad1ed75 --- /dev/null +++ b/packages/token-history-contract/lib/systemIds.js @@ -0,0 +1,4 @@ +module.exports = { + ownerId: '11111111111111111111111111111111', + contractId: 'BqzxK9UQdAeXbE7zY78uq6MfWWk3TrXZWfstnMoHZGh1', +}; diff --git a/packages/token-history-contract/package.json b/packages/token-history-contract/package.json new file mode 100644 index 0000000000..def4552747 --- /dev/null +++ b/packages/token-history-contract/package.json @@ -0,0 +1,29 @@ +{ + "name": "@dashevo/token-history-contract", + "version": "1.8.0-dev.2", + "description": "The token history contract", + "scripts": { + "lint": "eslint .", + "test": "yarn run test:unit", + "test:unit": "mocha 'test/unit/**/*.spec.js'" + }, + "contributors": [ + { + "name": "Samuel Westrich", + "email": "sam@dash.org", + "url": "https://github.com/quantumexplorer" + } + ], + "license": "MIT", + "devDependencies": { + "@dashevo/wasm-dpp": "workspace:*", + "chai": "^4.3.10", + "dirty-chai": "^2.0.1", + "eslint": "^8.53.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-plugin-import": "^2.29.0", + "mocha": "^10.2.0", + "sinon": "^17.0.1", + "sinon-chai": "^3.7.0" + } +} diff --git a/packages/token-history-contract/schema/v1/token-history-contract-documents.json b/packages/token-history-contract/schema/v1/token-history-contract-documents.json new file mode 100644 index 0000000000..0946d7a29e --- /dev/null +++ b/packages/token-history-contract/schema/v1/token-history-contract-documents.json @@ -0,0 +1,580 @@ +{ + "burn": { + "type": "object", + "documentsMutable": false, + "canBeDeleted": false, + "creationRestrictionMode": 2, + "indices": [ + { + "name": "byDate", + "properties": [ + { + "tokenId": "asc" + }, + { + "$createdAt": "asc" + } + ] + }, + { + "name": "byAmount", + "properties": [ + { + "tokenId": "asc" + }, + { + "amount": "asc" + } + ] + }, + { + "name": "byOwnerId", + "properties": [ + { + "tokenId": "asc" + }, + { + "$ownerId": "asc" + }, + { + "$createdAt": "asc" + } + ] + } + ], + "properties": { + "tokenId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The token ID", + "position": 0, + "contentMediaType": "application/x.dash.dpp.identifier" + }, + "amount": { + "type": "integer", + "minimum": 0, + "description": "The amount that was burned", + "position": 1 + }, + "note": { + "type": "string", + "maxLength": 2048, + "description": "An optional explanation of why this burn took place", + "position": 2 + } + }, + "required": [ + "tokenId", + "amount", + "$createdAt", + "$createdAtBlockHeight" + ], + "additionalProperties": false + }, + "mint": { + "type": "object", + "documentsMutable": false, + "canBeDeleted": false, + "creationRestrictionMode": 2, + "indices": [ + { + "name": "byDate", + "properties": [ + { + "tokenId": "asc" + }, + { + "$createdAt": "asc" + } + ] + }, + { + "name": "byAmount", + "properties": [ + { + "tokenId": "asc" + }, + { + "amount": "asc" + } + ] + }, + { + "name": "byOwnerId", + "properties": [ + { + "tokenId": "asc" + }, + { + "$ownerId": "asc" + }, + { + "$createdAt": "asc" + } + ] + }, + { + "name": "byRecipientId", + "properties": [ + { + "tokenId": "asc" + }, + { + "recipientId": "asc" + }, + { + "$createdAt": "asc" + } + ] + } + ], + "properties": { + "tokenId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The token ID", + "position": 0, + "contentMediaType": "application/x.dash.dpp.identifier" + }, + "recipientId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The token ID", + "position": 1, + "contentMediaType": "application/x.dash.dpp.identifier" + }, + "amount": { + "type": "integer", + "minimum": 0, + "description": "The amount that was burned", + "position": 2 + }, + "note": { + "type": "string", + "maxLength": 2048, + "description": "An optional explanation of why this mint took place", + "position": 3 + } + }, + "required": [ + "tokenId", + "amount", + "recipientId", + "$createdAt", + "$createdAtBlockHeight" + ], + "additionalProperties": false + }, + "transfer": { + "type": "object", + "documentsMutable": false, + "canBeDeleted": false, + "creationRestrictionMode": 2, + "indices": [ + { + "name": "byDate", + "properties": [ + { + "tokenId": "asc" + }, + { + "$createdAt": "asc" + } + ] + }, + { + "name": "byAmount", + "properties": [ + { + "tokenId": "asc" + }, + { + "amount": "asc" + } + ] + }, + { + "name": "from", + "properties": [ + { + "tokenId": "asc" + }, + { + "$ownerId": "asc" + }, + { + "$createdAt": "asc" + } + ] + }, + { + "name": "to", + "properties": [ + { + "tokenId": "asc" + }, + { + "toIdentityId": "asc" + }, + { + "$createdAt": "asc" + } + ] + } + ], + "properties": { + "tokenId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The token ID", + "position": 0, + "contentMediaType": "application/x.dash.dpp.identifier" + }, + "amount": { + "type": "integer", + "minimum": 0, + "description": "The amount that was burned", + "position": 1 + }, + "toIdentityId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The identity or the group Id", + "position": 2, + "contentMediaType": "application/x.dash.dpp.identifier" + }, + "encryptedPersonalNote": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 2048, + "description": "An optional encrypted explanation of why this transfer took place only meant for the sender", + "position": 3 + }, + "encryptedSharedNote": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 2048, + "description": "An optional encrypted explanation of why this transfer took place shared between the sender and the receiver", + "position": 4 + }, + "publicNote": { + "type": "string", + "maxLength": 2048, + "description": "An optional public explanation of why this transfer took place", + "position": 5 + }, + "senderKeyIndex": { + "type": "integer", + "minimum": 0, + "description": "Used with the encrypted shared note", + "position": 6 + }, + "recipientKeyIndex": { + "type": "integer", + "minimum": 0, + "description": "Used with the encrypted shared note", + "position": 7 + }, + "rootEncryptionKeyIndex": { + "type": "integer", + "minimum": 0, + "description": "Used with the encrypted private note", + "position": 8 + }, + "derivationEncryptionKeyIndex": { + "type": "integer", + "minimum": 0, + "description": "Used with the encrypted private note", + "position": 9 + } + }, + "required": [ + "tokenId", + "amount", + "toIdentityId", + "$createdAt", + "$createdAtBlockHeight" + ], + "additionalProperties": false + }, + "freeze": { + "type": "object", + "documentsMutable": false, + "canBeDeleted": false, + "creationRestrictionMode": 2, + "indices": [ + { + "name": "byOwnerId", + "properties": [ + { + "tokenId": "asc" + }, + { + "$ownerId": "asc" + }, + { + "$createdAt": "asc" + } + ] + }, + { + "name": "byFrozenIdentityId", + "properties": [ + { + "tokenId": "asc" + }, + { + "frozenIdentityId": "asc" + }, + { + "$createdAt": "asc" + } + ] + } + ], + "properties": { + "tokenId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The token ID", + "position": 0, + "contentMediaType": "application/x.dash.dpp.identifier" + }, + "frozenIdentityId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The identity Id of the frozen token account", + "position": 1, + "contentMediaType": "application/x.dash.dpp.identifier" + } + }, + "required": [ + "tokenId", + "frozenIdentityId", + "$createdAt", + "$createdAtBlockHeight" + ], + "additionalProperties": false + }, + "unfreeze": { + "type": "object", + "documentsMutable": false, + "canBeDeleted": false, + "creationRestrictionMode": 2, + "indices": [ + { + "name": "byOwnerId", + "properties": [ + { + "tokenId": "asc" + }, + { + "$ownerId": "asc" + }, + { + "$createdAt": "asc" + } + ] + }, + { + "name": "byFrozenIdentityId", + "properties": [ + { + "tokenId": "asc" + }, + { + "frozenIdentityId": "asc" + }, + { + "$createdAt": "asc" + } + ] + } + ], + "properties": { + "tokenId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The token ID", + "position": 0 + }, + "frozenIdentityId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The identity Id of the frozen token account", + "position": 1 + } + }, + "required": [ + "tokenId", + "frozenIdentityId", + "$createdAt", + "$createdAtBlockHeight" + ], + "additionalProperties": false + }, + "destroyFrozenFunds": { + "type": "object", + "documentsMutable": false, + "canBeDeleted": false, + "creationRestrictionMode": 2, + "indices": [ + { + "name": "byOwnerId", + "properties": [ + { + "tokenId": "asc" + }, + { + "$ownerId": "asc" + }, + { + "$createdAt": "asc" + } + ] + }, + { + "name": "byAmount", + "properties": [ + { + "tokenId": "asc" + }, + { + "amount": "asc" + } + ] + }, + { + "name": "byFrozenIdentityId", + "properties": [ + { + "tokenId": "asc" + }, + { + "frozenIdentityId": "asc" + }, + { + "$createdAt": "asc" + } + ] + } + ], + "properties": { + "tokenId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The token ID", + "position": 0, + "contentMediaType": "application/x.dash.dpp.identifier" + }, + "frozenIdentityId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The identity Id of the frozen token account", + "position": 1, + "contentMediaType": "application/x.dash.dpp.identifier" + }, + "amount": { + "type": "integer", + "minimum": 0, + "description": "The amount that was frost burned", + "position": 2 + } + }, + "required": [ + "tokenId", + "frozenIdentityId", + "amount", + "$createdAt", + "$createdAtBlockHeight" + ], + "additionalProperties": false + }, + "emergencyAction": { + "type": "object", + "documentsMutable": false, + "canBeDeleted": false, + "creationRestrictionMode": 2, + "indices": [ + { + "name": "byOwnerId", + "properties": [ + { + "tokenId": "asc" + }, + { + "$ownerId": "asc" + }, + { + "action": "asc" + }, + { + "$createdAt": "asc" + } + ] + }, + { + "name": "byAction", + "properties": [ + { + "tokenId": "asc" + }, + { + "action": "asc" + }, + { + "$createdAt": "asc" + } + ] + } + ], + "properties": { + "tokenId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The token ID", + "position": 0, + "contentMediaType": "application/x.dash.dpp.identifier" + }, + "action": { + "type": "integer", + "minimum": 0, + "description": "The action we are performing", + "position": 1 + } + }, + "required": [ + "tokenId", + "action", + "$createdAt", + "$createdAtBlockHeight" + ], + "additionalProperties": false + } +} diff --git a/packages/token-history-contract/src/error.rs b/packages/token-history-contract/src/error.rs new file mode 100644 index 0000000000..d01bbcc91c --- /dev/null +++ b/packages/token-history-contract/src/error.rs @@ -0,0 +1,17 @@ +use platform_version::version::FeatureVersion; + +#[derive(thiserror::Error, Debug)] +pub enum Error { + /// Platform expected some specific versions + #[error("platform unknown version on {method}, received: {received}")] + UnknownVersionMismatch { + /// method + method: String, + /// the allowed versions for this method + known_versions: Vec, + /// requested core height + received: FeatureVersion, + }, + #[error("schema deserialize error: {0}")] + InvalidSchemaJson(#[from] serde_json::Error), +} diff --git a/packages/token-history-contract/src/lib.rs b/packages/token-history-contract/src/lib.rs new file mode 100644 index 0000000000..70dafcc26f --- /dev/null +++ b/packages/token-history-contract/src/lib.rs @@ -0,0 +1,37 @@ +mod error; +pub mod v1; + +pub use crate::error::Error; +use platform_value::{Identifier, IdentifierBytes32}; +use platform_version::version::PlatformVersion; +use serde_json::Value; + +pub const ID_BYTES: [u8; 32] = [ + 92, 20, 14, 101, 92, 2, 101, 187, 194, 168, 8, 113, 109, 225, 132, 121, 133, 19, 89, 24, 173, + 81, 205, 253, 11, 118, 102, 75, 169, 91, 163, 124, +]; + +pub const OWNER_ID_BYTES: [u8; 32] = [0; 32]; + +pub const ID: Identifier = Identifier(IdentifierBytes32(ID_BYTES)); +pub const OWNER_ID: Identifier = Identifier(IdentifierBytes32(OWNER_ID_BYTES)); +pub fn load_definitions(platform_version: &PlatformVersion) -> Result, Error> { + match platform_version.system_data_contracts.withdrawals { + 1 => Ok(None), + version => Err(Error::UnknownVersionMismatch { + method: "wallet_contract::load_definitions".to_string(), + known_versions: vec![1], + received: version, + }), + } +} +pub fn load_documents_schemas(platform_version: &PlatformVersion) -> Result { + match platform_version.system_data_contracts.withdrawals { + 1 => v1::load_documents_schemas(), + version => Err(Error::UnknownVersionMismatch { + method: "wallet_contract::load_documents_schemas".to_string(), + known_versions: vec![1], + received: version, + }), + } +} diff --git a/packages/token-history-contract/src/v1/mod.rs b/packages/token-history-contract/src/v1/mod.rs new file mode 100644 index 0000000000..ddd4fa1115 --- /dev/null +++ b/packages/token-history-contract/src/v1/mod.rs @@ -0,0 +1,21 @@ +use crate::Error; +use serde_json::Value; + +pub mod document_types { + pub mod tx_metadata { + pub const NAME: &str = "tx_metadata"; + + pub mod properties { + pub const KEY_INDEX: &str = "keyIndex"; + pub const ENCRYPTION_KEY_INDEX: &str = "encryptionKeyIndex"; + pub const ENCRYPTED_METADATA: &str = "encryptedMetadata"; + } + } +} + +pub fn load_documents_schemas() -> Result { + serde_json::from_str(include_str!( + "../../schema/v1/token-history-contract-documents.json" + )) + .map_err(Error::InvalidSchemaJson) +} diff --git a/packages/token-history-contract/test/.eslintrc b/packages/token-history-contract/test/.eslintrc new file mode 100644 index 0000000000..720ced7385 --- /dev/null +++ b/packages/token-history-contract/test/.eslintrc @@ -0,0 +1,12 @@ +{ + "env": { + "node": true, + "mocha": true + }, + "rules": { + "import/no-extraneous-dependencies": "off" + }, + "globals": { + "expect": true + } +} diff --git a/packages/token-history-contract/test/bootstrap.js b/packages/token-history-contract/test/bootstrap.js new file mode 100644 index 0000000000..7af04f464d --- /dev/null +++ b/packages/token-history-contract/test/bootstrap.js @@ -0,0 +1,30 @@ +const sinon = require('sinon'); +const sinonChai = require('sinon-chai'); + +const { expect, use } = require('chai'); +const dirtyChai = require('dirty-chai'); + +const { + default: loadWasmDpp, +} = require('@dashevo/wasm-dpp'); + +use(dirtyChai); +use(sinonChai); + +exports.mochaHooks = { + beforeAll: loadWasmDpp, + + beforeEach() { + if (!this.sinon) { + this.sinon = sinon.createSandbox(); + } else { + this.sinon.restore(); + } + }, + + afterEach() { + this.sinon.restore(); + }, +}; + +global.expect = expect; diff --git a/packages/token-history-contract/test/unit/tokenHistoryContract.spec.js b/packages/token-history-contract/test/unit/tokenHistoryContract.spec.js new file mode 100644 index 0000000000..3900303dd1 --- /dev/null +++ b/packages/token-history-contract/test/unit/tokenHistoryContract.spec.js @@ -0,0 +1,451 @@ +const crypto = require('crypto'); +const { + DashPlatformProtocol, + JsonSchemaError, +} = require('@dashevo/wasm-dpp'); +const generateRandomIdentifier = require('@dashevo/wasm-dpp/lib/test/utils/generateRandomIdentifierAsync'); +const { expect } = require('chai'); +const tokenHistoryContractDocumentsSchema = require('../../schema/v1/token-history-contract-documents.json'); + +const expectJsonSchemaError = (validationResult, errorCount = 1) => { + const errors = validationResult.getErrors(); + expect(errors) + .to + .have + .length(errorCount); + + const error = validationResult.getErrors()[0]; + expect(error) + .to + .be + .instanceof(JsonSchemaError); + + return error; +}; + +describe('Token History Contract', () => { + let dpp; + let dataContract; + let identityId; + + beforeEach(async () => { + dpp = new DashPlatformProtocol({ generate: () => crypto.randomBytes(32) }); + identityId = await generateRandomIdentifier(); + dataContract = dpp.dataContract.create(identityId, BigInt(1), tokenHistoryContractDocumentsSchema); + }); + + it('should have a valid contract definition', async () => { + expect(() => dpp.dataContract.create(identityId, BigInt(1), tokenHistoryContractDocumentsSchema)) + .to + .not + .throw(); + }); + + describe('documents', () => { + describe('burn', () => { + let rawBurnDocument; + + beforeEach(() => { + rawBurnDocument = { + tokenId: crypto.randomBytes(32), + amount: 100, + note: 'Burning tokens', + $createdAt: Math.ceil(Date.now() / 1000), + $createdAtBlockHeight: 42, + }; + }); + + describe('tokenId', () => { + it('should be defined', async () => { + delete rawBurnDocument.tokenId; + const document = dpp.document.create(dataContract, identityId, 'burn', rawBurnDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('required'); + expect(error.params.missingProperty).to.equal('tokenId'); + }); + + it('should be 32 bytes', async () => { + rawBurnDocument.tokenId = crypto.randomBytes(31); + const document = dpp.document.create(dataContract, identityId, 'burn', rawBurnDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minItems'); + expect(error.instancePath).to.equal('/tokenId'); + }); + }); + + describe('amount', () => { + it('should be defined', async () => { + delete rawBurnDocument.amount; + const document = dpp.document.create(dataContract, identityId, 'burn', rawBurnDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('required'); + expect(error.params.missingProperty).to.equal('amount'); + }); + + it('should be a non-negative integer', async () => { + rawBurnDocument.amount = -1; + const document = dpp.document.create(dataContract, identityId, 'burn', rawBurnDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minimum'); + }); + }); + + describe('$createdAt / $createdAtBlockHeight', () => { + it('should be defined', async () => { + delete rawBurnDocument.$createdAt; + const document = dpp.document.create(dataContract, identityId, 'burn', rawBurnDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('required'); + expect(error.params.missingProperty).to.equal('$createdAt'); + }); + }); + + it('should not have additional properties', async () => { + rawBurnDocument.extraProp = 123; + const document = dpp.document.create(dataContract, identityId, 'burn', rawBurnDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('additionalProperties'); + expect(error.params.additionalProperties).to.deep.equal(['extraProp']); + }); + + it('should be valid', async () => { + const document = dpp.document.create(dataContract, identityId, 'burn', rawBurnDocument); + const validationResult = await document.validate(dpp.protocolVersion); + expect(validationResult.isValid()).to.be.true(); + }); + }); + + describe('mint', () => { + let rawMintDocument; + + beforeEach(() => { + rawMintDocument = { + tokenId: crypto.randomBytes(32), + recipientId: crypto.randomBytes(32), + amount: 1000, + note: 'Minting tokens', + $createdAt: Math.ceil(Date.now() / 1000), + $createdAtBlockHeight: 50, + }; + }); + + describe('tokenId', () => { + it('should be 32 bytes', async () => { + rawMintDocument.tokenId = crypto.randomBytes(31); + const document = dpp.document.create(dataContract, identityId, 'mint', rawMintDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minItems'); + expect(error.instancePath).to.equal('/tokenId'); + }); + }); + + describe('recipientId', () => { + it('should be defined', async () => { + delete rawMintDocument.recipientId; + const document = dpp.document.create(dataContract, identityId, 'mint', rawMintDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('required'); + expect(error.params.missingProperty).to.equal('recipientId'); + }); + + it('should be 32 bytes', async () => { + rawMintDocument.recipientId = crypto.randomBytes(31); + const document = dpp.document.create(dataContract, identityId, 'mint', rawMintDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minItems'); + expect(error.instancePath).to.equal('/recipientId'); + }); + }); + + describe('amount', () => { + it('should be a non-negative integer', async () => { + rawMintDocument.amount = -1; + const document = dpp.document.create(dataContract, identityId, 'mint', rawMintDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minimum'); + }); + }); + + it('should not have additional properties', async () => { + rawMintDocument.extraField = 'foo'; + const document = dpp.document.create(dataContract, identityId, 'mint', rawMintDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('additionalProperties'); + expect(error.params.additionalProperties).to.deep.equal(['extraField']); + }); + + it('should be valid', async () => { + const document = dpp.document.create(dataContract, identityId, 'mint', rawMintDocument); + const validationResult = await document.validate(dpp.protocolVersion); + expect(validationResult.isValid()).to.be.true(); + }); + }); + + describe('transfer', () => { + let rawTransferDocument; + + beforeEach(() => { + rawTransferDocument = { + tokenId: crypto.randomBytes(32), + amount: 10, + toIdentityId: crypto.randomBytes(32), + publicNote: 'Transfer tokens', + encryptedPersonalNote: crypto.randomBytes(32), + encryptedSharedNote: crypto.randomBytes(32), + senderKeyIndex: 0, + recipientKeyIndex: 1, + rootEncryptionKeyIndex: 2, + derivationEncryptionKeyIndex: 3, + $createdAt: Math.ceil(Date.now() / 1000), + $createdAtBlockHeight: 100, + }; + }); + + describe('tokenId', () => { + it('should be 32 bytes', async () => { + rawTransferDocument.tokenId = crypto.randomBytes(31); + const document = dpp.document.create(dataContract, identityId, 'transfer', rawTransferDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minItems'); + expect(error.instancePath).to.equal('/tokenId'); + }); + }); + + describe('amount', () => { + it('should be a non-negative integer', async () => { + rawTransferDocument.amount = -1; + const document = dpp.document.create(dataContract, identityId, 'transfer', rawTransferDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minimum'); + }); + }); + + describe('toIdentityId', () => { + it('should be defined', async () => { + delete rawTransferDocument.toIdentityId; + const document = dpp.document.create(dataContract, identityId, 'transfer', rawTransferDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('required'); + expect(error.params.missingProperty).to.equal('toIdentityId'); + }); + }); + + it('should not have additional properties', async () => { + rawTransferDocument.foo = 'bar'; + const document = dpp.document.create(dataContract, identityId, 'transfer', rawTransferDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('additionalProperties'); + expect(error.params.additionalProperties).to.deep.equal(['foo']); + }); + + it('should be valid', async () => { + const document = dpp.document.create(dataContract, identityId, 'transfer', rawTransferDocument); + const validationResult = await document.validate(dpp.protocolVersion); + expect(validationResult.isValid()).to.be.true(); + }); + }); + + describe('freeze', () => { + let rawFreezeDocument; + + beforeEach(() => { + rawFreezeDocument = { + tokenId: crypto.randomBytes(32), + frozenIdentityId: crypto.randomBytes(32), + $createdAt: Math.ceil(Date.now() / 1000), + $createdAtBlockHeight: 123, + }; + }); + + describe('tokenId', () => { + it('should be defined', async () => { + delete rawFreezeDocument.tokenId; + const document = dpp.document.create(dataContract, identityId, 'freeze', rawFreezeDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('required'); + expect(error.params.missingProperty).to.equal('tokenId'); + }); + }); + + describe('frozenIdentityId', () => { + it('should be 32 bytes', async () => { + rawFreezeDocument.frozenIdentityId = crypto.randomBytes(31); + const document = dpp.document.create(dataContract, identityId, 'freeze', rawFreezeDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minItems'); + expect(error.instancePath).to.equal('/frozenIdentityId'); + }); + }); + + it('should not have additional properties', async () => { + rawFreezeDocument.something = true; + const document = dpp.document.create(dataContract, identityId, 'freeze', rawFreezeDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('additionalProperties'); + expect(error.params.additionalProperties).to.deep.equal(['something']); + }); + + it('should be valid', async () => { + const document = dpp.document.create(dataContract, identityId, 'freeze', rawFreezeDocument); + const validationResult = await document.validate(dpp.protocolVersion); + expect(validationResult.isValid()).to.be.true(); + }); + }); + + describe('unfreeze', () => { + let rawUnfreezeDocument; + + beforeEach(() => { + rawUnfreezeDocument = { + tokenId: crypto.randomBytes(32), + frozenIdentityId: crypto.randomBytes(32), + $createdAt: Math.ceil(Date.now() / 1000), + $createdAtBlockHeight: 150, + }; + }); + + describe('tokenId', () => { + it('should be 32 bytes', async () => { + rawUnfreezeDocument.tokenId = crypto.randomBytes(33); + const document = dpp.document.create(dataContract, identityId, 'unfreeze', rawUnfreezeDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('maxItems'); + expect(error.instancePath).to.equal('/tokenId'); + }); + }); + + it('should not have additional properties', async () => { + rawUnfreezeDocument.foo = 'bar'; + const document = dpp.document.create(dataContract, identityId, 'unfreeze', rawUnfreezeDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('additionalProperties'); + expect(error.params.additionalProperties).to.deep.equal(['foo']); + }); + + it('should be valid', async () => { + const document = dpp.document.create(dataContract, identityId, 'unfreeze', rawUnfreezeDocument); + const validationResult = await document.validate(dpp.protocolVersion); + expect(validationResult.isValid()).to.be.true(); + }); + }); + + describe('destroyFrozenFunds', () => { + let rawDestroyFrozenFundsDocument; + + beforeEach(() => { + rawDestroyFrozenFundsDocument = { + tokenId: crypto.randomBytes(32), + frozenIdentityId: crypto.randomBytes(32), + amount: 500, + $createdAt: Math.ceil(Date.now() / 1000), + $createdAtBlockHeight: 222, + }; + }); + + describe('frozenIdentityId', () => { + it('should be 32 bytes', async () => { + rawDestroyFrozenFundsDocument.frozenIdentityId = crypto.randomBytes(31); + const document = dpp.document.create(dataContract, identityId, 'destroyFrozenFunds', rawDestroyFrozenFundsDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minItems'); + expect(error.instancePath).to.equal('/frozenIdentityId'); + }); + }); + + describe('amount', () => { + it('should be non-negative', async () => { + rawDestroyFrozenFundsDocument.amount = -1; + const document = dpp.document.create(dataContract, identityId, 'destroyFrozenFunds', rawDestroyFrozenFundsDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minimum'); + }); + }); + + it('should not have additional properties', async () => { + rawDestroyFrozenFundsDocument.bar = 123; + const document = dpp.document.create(dataContract, identityId, 'destroyFrozenFunds', rawDestroyFrozenFundsDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('additionalProperties'); + expect(error.params.additionalProperties).to.deep.equal(['bar']); + }); + + it('should be valid', async () => { + const document = dpp.document.create(dataContract, identityId, 'destroyFrozenFunds', rawDestroyFrozenFundsDocument); + const validationResult = await document.validate(dpp.protocolVersion); + expect(validationResult.isValid()).to.be.true(); + }); + }); + + describe('emergencyAction', () => { + let rawEmergencyActionDocument; + + beforeEach(() => { + rawEmergencyActionDocument = { + tokenId: crypto.randomBytes(32), + action: 1, + $createdAt: Math.ceil(Date.now() / 1000), + $createdAtBlockHeight: 300, + }; + }); + + describe('tokenId', () => { + it('should be defined', async () => { + delete rawEmergencyActionDocument.tokenId; + const document = dpp.document.create(dataContract, identityId, 'emergencyAction', rawEmergencyActionDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('required'); + expect(error.params.missingProperty).to.equal('tokenId'); + }); + }); + + describe('action', () => { + it('should be non-negative', async () => { + rawEmergencyActionDocument.action = -5; + const document = dpp.document.create(dataContract, identityId, 'emergencyAction', rawEmergencyActionDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('minimum'); + }); + }); + + it('should not have additional properties', async () => { + rawEmergencyActionDocument.xyz = 999; + const document = dpp.document.create(dataContract, identityId, 'emergencyAction', rawEmergencyActionDocument); + const validationResult = document.validate(dpp.protocolVersion); + const error = expectJsonSchemaError(validationResult); + expect(error.keyword).to.equal('additionalProperties'); + expect(error.params.additionalProperties).to.deep.equal(['xyz']); + }); + + it('should be valid', async () => { + const document = dpp.document.create(dataContract, identityId, 'emergencyAction', rawEmergencyActionDocument); + const validationResult = await document.validate(dpp.protocolVersion); + expect(validationResult.isValid()).to.be.true(); + }); + }); + }); +}); \ No newline at end of file diff --git a/packages/wasm-dpp/src/document/document_facade.rs b/packages/wasm-dpp/src/document/document_facade.rs index 609794eaa9..6255dfe2df 100644 --- a/packages/wasm-dpp/src/document/document_facade.rs +++ b/packages/wasm-dpp/src/document/document_facade.rs @@ -4,7 +4,7 @@ use wasm_bindgen::{prelude::*, JsValue}; use crate::document::factory::DocumentFactoryWASM; use crate::{DataContractWasm, ExtendedDocumentWasm}; -use crate::document::state_transition::document_batch_transition::DocumentsBatchTransitionWasm; +use crate::document::state_transition::batch_transition::BatchTransitionWasm; #[derive(Clone)] #[wasm_bindgen(js_name=DocumentFacade)] @@ -96,7 +96,7 @@ impl DocumentFacadeWasm { &self, documents: &JsValue, nonce_counter_value: &js_sys::Object, //IdentityID/ContractID -> nonce - ) -> Result { + ) -> Result { self.factory .create_state_transition(documents, nonce_counter_value) } diff --git a/packages/wasm-dpp/src/document/errors/document_already_exists_error.rs b/packages/wasm-dpp/src/document/errors/document_already_exists_error.rs index 111d138b8d..a4b028f726 100644 --- a/packages/wasm-dpp/src/document/errors/document_already_exists_error.rs +++ b/packages/wasm-dpp/src/document/errors/document_already_exists_error.rs @@ -1,5 +1,5 @@ // use crate::document::state_transition::document_batch_transition::document_transition::from_document_transition_to_js_value; -use dpp::state_transition::documents_batch_transition::document_transition::DocumentTransition; +use dpp::state_transition::batch_transition::batched_transition::document_transition::DocumentTransition; use thiserror::Error; use super::*; diff --git a/packages/wasm-dpp/src/document/errors/document_not_provided_error.rs b/packages/wasm-dpp/src/document/errors/document_not_provided_error.rs index 769f1853c4..bc52033244 100644 --- a/packages/wasm-dpp/src/document/errors/document_not_provided_error.rs +++ b/packages/wasm-dpp/src/document/errors/document_not_provided_error.rs @@ -1,5 +1,5 @@ // use crate::document::state_transition::document_batch_transition::document_transition::from_document_transition_to_js_value; -use dpp::state_transition::documents_batch_transition::document_transition::DocumentTransition; +use dpp::state_transition::batch_transition::batched_transition::document_transition::DocumentTransition; use thiserror::Error; use super::*; diff --git a/packages/wasm-dpp/src/document/errors/invalid_document_action_error.rs b/packages/wasm-dpp/src/document/errors/invalid_document_action_error.rs index 0496d71c07..78eb5d5d05 100644 --- a/packages/wasm-dpp/src/document/errors/invalid_document_action_error.rs +++ b/packages/wasm-dpp/src/document/errors/invalid_document_action_error.rs @@ -1,9 +1,9 @@ // use crate::document::state_transition::document_batch_transition::document_transition::from_document_transition_to_js_value; -use dpp::state_transition::documents_batch_transition::document_transition::DocumentTransition; +use dpp::state_transition::batch_transition::batched_transition::document_transition::DocumentTransition; use thiserror::Error; use super::*; -use dpp::state_transition::documents_batch_transition::document_transition::action_type::TransitionActionTypeGetter; +use dpp::state_transition::batch_transition::batched_transition::document_transition_action_type::DocumentTransitionActionTypeGetter; #[wasm_bindgen] #[derive(Error, Debug)] diff --git a/packages/wasm-dpp/src/document/factory.rs b/packages/wasm-dpp/src/document/factory.rs index 0b927a6080..639aaa2324 100644 --- a/packages/wasm-dpp/src/document/factory.rs +++ b/packages/wasm-dpp/src/document/factory.rs @@ -14,11 +14,11 @@ use dpp::document::Document; use dpp::prelude::ExtendedDocument; use dpp::identifier::Identifier; -use dpp::state_transition::documents_batch_transition::document_transition::action_type::DocumentTransitionActionType; +use dpp::state_transition::batch_transition::batched_transition::document_transition_action_type::DocumentTransitionActionType; use dpp::version::PlatformVersion; use std::convert::TryFrom; -use crate::document_batch_transition::DocumentsBatchTransitionWasm; +use crate::batch_transition::BatchTransitionWasm; use crate::entropy_generator::ExternalEntropyGenerator; use crate::{ identifier::identifier_from_js_value, @@ -109,7 +109,7 @@ impl DocumentFactoryWASM { &self, documents: &JsValue, nonce_counter_value: &js_sys::Object, //IdentityID/ContractID -> nonce - ) -> Result { + ) -> Result { let mut nonce_counter = BTreeMap::new(); let mut contract_ids_to_check = HashSet::<&Identifier>::new(); diff --git a/packages/wasm-dpp/src/document/state_transition/batch_transition/batched_transition/mod.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/batched_transition/mod.rs new file mode 100644 index 0000000000..d83ae4d473 --- /dev/null +++ b/packages/wasm-dpp/src/document/state_transition/batch_transition/batched_transition/mod.rs @@ -0,0 +1,18 @@ +use dpp::state_transition::batch_transition::batched_transition::BatchedTransition; +use wasm_bindgen::prelude::wasm_bindgen; + +#[wasm_bindgen(js_name=BatchedTransition)] +#[derive(Debug, Clone)] +pub struct BatchedTransitionWasm(BatchedTransition); + +impl From for BatchedTransitionWasm { + fn from(t: BatchedTransition) -> Self { + BatchedTransitionWasm(t) + } +} + +impl From for BatchedTransition { + fn from(t: BatchedTransitionWasm) -> Self { + t.0 + } +} diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_create_transition.rs similarity index 98% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_create_transition.rs index 8cf7b5d0b9..4a5218e30e 100644 --- a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_create_transition.rs +++ b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_create_transition.rs @@ -1,6 +1,6 @@ use dpp::prelude::Revision; -use dpp::state_transition::documents_batch_transition::document_create_transition::DocumentCreateTransition; +use dpp::state_transition::batch_transition::document_create_transition::DocumentCreateTransition; use dpp::document::INITIAL_REVISION; diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_delete_transition.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_delete_transition.rs similarity index 100% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_delete_transition.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_delete_transition.rs diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_replace_transition.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_replace_transition.rs similarity index 100% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/document_replace_transition.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_replace_transition.rs diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/mod.rs similarity index 90% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/mod.rs index a26d579d7d..d256c15c60 100644 --- a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/document_transition/mod.rs +++ b/packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/mod.rs @@ -7,13 +7,12 @@ mod document_create_transition; // pub use document_replace_transition::*; use dpp::platform_value::Value; -use dpp::state_transition::documents_batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; -use dpp::state_transition::documents_batch_transition::document_transition::action_type::TransitionActionTypeGetter; -use dpp::state_transition::documents_batch_transition::document_transition::DocumentTransitionV0Methods; -use dpp::{ - state_transition::documents_batch_transition::document_transition::DocumentTransition, - util::json_value::JsonValueExt, ProtocolError, +use dpp::state_transition::batch_transition::batched_transition::document_transition::{ + DocumentTransition, DocumentTransitionV0Methods, }; +use dpp::state_transition::batch_transition::batched_transition::document_transition_action_type::DocumentTransitionActionTypeGetter; +use dpp::state_transition::batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; +use dpp::{util::json_value::JsonValueExt, ProtocolError}; use serde::Serialize; use serde_json::Value as JsonValue; use wasm_bindgen::prelude::*; diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/mod.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/mod.rs similarity index 89% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/mod.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/mod.rs index d0ebb9ae56..6dfadbf985 100644 --- a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/mod.rs +++ b/packages/wasm-dpp/src/document/state_transition/batch_transition/mod.rs @@ -12,9 +12,8 @@ use dpp::consensus::signature::SignatureError; use dpp::consensus::ConsensusError; use dpp::platform_value::BinaryData; use dpp::serialization::PlatformSerializable; -use dpp::state_transition::documents_batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; -use dpp::state_transition::documents_batch_transition::document_transition::DocumentTransition; -use dpp::state_transition::documents_batch_transition::DocumentsBatchTransition; +use dpp::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +use dpp::state_transition::batch_transition::BatchTransition; use dpp::state_transition::StateTransition; use wasm_bindgen::prelude::*; @@ -26,17 +25,21 @@ use crate::{ IdentityPublicKeyWasm, }; -use document_transition::DocumentTransitionWasm; -use dpp::state_transition::documents_batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; +use dpp::ed25519_dalek::ed25519::signature::SignerMut; +use dpp::state_transition::batch_transition::batched_transition::BatchedTransition; +use dpp::state_transition::batch_transition::methods::v0::DocumentsBatchTransitionMethodsV0; +use crate::batch_transition::batched_transition::BatchedTransitionWasm; use dpp::state_transition::StateTransitionIdentitySigned; +mod batched_transition; pub mod document_transition; +mod token_transition; // pub mod validation; #[derive(Clone, Debug)] -#[wasm_bindgen(js_name = DocumentsBatchTransition)] -pub struct DocumentsBatchTransitionWasm(DocumentsBatchTransition); +#[wasm_bindgen(js_name = BatchTransition)] +pub struct BatchTransitionWasm(BatchTransition); #[derive(Debug, Serialize, Deserialize, Default, Clone, Copy)] #[serde(rename_all = "camelCase")] @@ -47,8 +50,8 @@ pub struct ToObjectOptions { skip_identifiers_conversion: bool, } -#[wasm_bindgen(js_class=DocumentsBatchTransition)] -impl DocumentsBatchTransitionWasm { +#[wasm_bindgen(js_class=BatchTransition)] +impl BatchTransitionWasm { // #[wasm_bindgen(constructor)] // pub fn from_object( // js_raw_transition: JsValue, @@ -90,7 +93,7 @@ impl DocumentsBatchTransitionWasm { #[wasm_bindgen(js_name=getType)] pub fn get_type(&self) -> u8 { - StateTransitionType::DocumentsBatch.into() + StateTransitionType::Batch.into() } #[wasm_bindgen(js_name=getOwnerId)] @@ -101,10 +104,9 @@ impl DocumentsBatchTransitionWasm { #[wasm_bindgen(js_name=getTransitions)] pub fn get_transitions(&self) -> js_sys::Array { let array = js_sys::Array::new(); - let transitions = self.0.transitions(); - for tr in transitions.iter().cloned() { - let transition: DocumentTransitionWasm = tr.into(); + for tr in self.0.transitions_iter() { + let transition: BatchedTransitionWasm = tr.to_owned_transition().into(); array.push(&transition.into()); } @@ -115,8 +117,8 @@ impl DocumentsBatchTransitionWasm { pub fn set_transitions(&mut self, js_transitions: Array) -> Result<(), JsValue> { let mut transitions = vec![]; for js_transition in js_transitions.iter() { - let transition: DocumentTransition = js_transition - .to_wasm::("DocumentTransition")? + let transition: BatchedTransition = js_transition + .to_wasm::("BatchedTransition")? .to_owned() .into(); transitions.push(transition) @@ -276,7 +278,7 @@ impl DocumentsBatchTransitionWasm { let bls_adapter = BlsAdapter(bls); // TODO: come up with a better way to set signature to the binding. - let mut state_transition = StateTransition::DocumentsBatch(self.0.clone()); + let mut state_transition = StateTransition::Batch(self.0.clone()); state_transition .sign( &identity_public_key.to_owned().into(), @@ -322,7 +324,7 @@ impl DocumentsBatchTransitionWasm { ) -> Result { let bls_adapter = BlsAdapter(bls); - let verification_result = StateTransition::DocumentsBatch(self.0.clone()) + let verification_result = StateTransition::Batch(self.0.clone()) .verify_signature(&identity_public_key.to_owned().into(), &bls_adapter); match verification_result { @@ -402,10 +404,9 @@ impl DocumentsBatchTransitionWasm { #[wasm_bindgen(js_name=toBuffer)] pub fn to_buffer(&self) -> Result { - let bytes = PlatformSerializable::serialize_to_bytes(&StateTransition::DocumentsBatch( - self.0.clone(), - )) - .with_js_error()?; + let bytes = + PlatformSerializable::serialize_to_bytes(&StateTransition::Batch(self.0.clone())) + .with_js_error()?; Ok(Buffer::from_bytes(&bytes)) } @@ -423,14 +424,14 @@ impl DocumentsBatchTransitionWasm { // } } -impl From for DocumentsBatchTransitionWasm { - fn from(t: DocumentsBatchTransition) -> Self { - DocumentsBatchTransitionWasm(t) +impl From for BatchTransitionWasm { + fn from(t: BatchTransition) -> Self { + BatchTransitionWasm(t) } } -impl From for DocumentsBatchTransition { - fn from(t: DocumentsBatchTransitionWasm) -> Self { +impl From for BatchTransition { + fn from(t: BatchTransitionWasm) -> Self { t.0 } } diff --git a/packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/mod.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/mod.rs new file mode 100644 index 0000000000..7b10fb55c1 --- /dev/null +++ b/packages/wasm-dpp/src/document/state_transition/batch_transition/token_transition/mod.rs @@ -0,0 +1,18 @@ +use dpp::state_transition::batch_transition::batched_transition::token_transition::TokenTransition; +use wasm_bindgen::prelude::wasm_bindgen; + +#[wasm_bindgen(js_name=TokenTransition)] +#[derive(Debug, Clone)] +pub struct TokenTransitionWasm(TokenTransition); + +impl From for TokenTransitionWasm { + fn from(t: TokenTransition) -> Self { + TokenTransitionWasm(t) + } +} + +impl From for TokenTransition { + fn from(t: TokenTransitionWasm) -> Self { + t.0 + } +} diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/basic/find_duplicates_by_id.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/validation/basic/find_duplicates_by_id.rs similarity index 100% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/basic/find_duplicates_by_id.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/validation/basic/find_duplicates_by_id.rs diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/basic/find_duplicates_by_indices.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/validation/basic/find_duplicates_by_indices.rs similarity index 100% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/basic/find_duplicates_by_indices.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/validation/basic/find_duplicates_by_indices.rs diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/basic/mod.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/validation/basic/mod.rs similarity index 100% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/basic/mod.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/validation/basic/mod.rs diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/basic/validate_documents_batch_transition_basic.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/validation/basic/validate_documents_batch_transition_basic.rs similarity index 100% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/basic/validate_documents_batch_transition_basic.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/validation/basic/validate_documents_batch_transition_basic.rs diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/basic/validate_partial_compound_indices.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/validation/basic/validate_partial_compound_indices.rs similarity index 100% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/basic/validate_partial_compound_indices.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/validation/basic/validate_partial_compound_indices.rs diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/mod.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/validation/mod.rs similarity index 100% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/mod.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/validation/mod.rs diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/state/fetch_extended_documents.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/validation/state/fetch_extended_documents.rs similarity index 100% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/state/fetch_extended_documents.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/validation/state/fetch_extended_documents.rs diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/state/mod.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/validation/state/mod.rs similarity index 100% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/state/mod.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/validation/state/mod.rs diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/state/validate_documents_batch_transitions_state.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/validation/state/validate_documents_batch_transitions_state.rs similarity index 100% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/state/validate_documents_batch_transitions_state.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/validation/state/validate_documents_batch_transitions_state.rs diff --git a/packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/state/validate_documents_uniqueness_by_indices.rs b/packages/wasm-dpp/src/document/state_transition/batch_transition/validation/state/validate_documents_uniqueness_by_indices.rs similarity index 100% rename from packages/wasm-dpp/src/document/state_transition/document_batch_transition/validation/state/validate_documents_uniqueness_by_indices.rs rename to packages/wasm-dpp/src/document/state_transition/batch_transition/validation/state/validate_documents_uniqueness_by_indices.rs diff --git a/packages/wasm-dpp/src/document/state_transition/mod.rs b/packages/wasm-dpp/src/document/state_transition/mod.rs index 7db6d118e0..03238bee69 100644 --- a/packages/wasm-dpp/src/document/state_transition/mod.rs +++ b/packages/wasm-dpp/src/document/state_transition/mod.rs @@ -1 +1 @@ -pub mod document_batch_transition; +pub mod batch_transition; diff --git a/packages/wasm-dpp/src/errors/consensus/consensus_error.rs b/packages/wasm-dpp/src/errors/consensus/consensus_error.rs index 627b65a267..c3105e3187 100644 --- a/packages/wasm-dpp/src/errors/consensus/consensus_error.rs +++ b/packages/wasm-dpp/src/errors/consensus/consensus_error.rs @@ -61,10 +61,12 @@ use dpp::consensus::state::data_trigger::DataTriggerError::{ DataTriggerConditionError, DataTriggerExecutionError, DataTriggerInvalidResultError, }; use wasm_bindgen::{JsError, JsValue}; -use dpp::consensus::basic::data_contract::{ContestedUniqueIndexOnMutableDocumentTypeError, ContestedUniqueIndexWithUniqueIndexError, InvalidDocumentTypeRequiredSecurityLevelError, UnknownDocumentCreationRestrictionModeError, UnknownSecurityLevelError, UnknownStorageKeyRequirementsError, UnknownTradeModeError, UnknownTransferableTypeError}; +use dpp::consensus::basic::data_contract::{ContestedUniqueIndexOnMutableDocumentTypeError, ContestedUniqueIndexWithUniqueIndexError, DataContractTokenConfigurationUpdateError, InvalidDocumentTypeRequiredSecurityLevelError, InvalidTokenBaseSupplyError, NonContiguousContractGroupPositionsError, NonContiguousContractTokenPositionsError, UnknownDocumentCreationRestrictionModeError, UnknownSecurityLevelError, UnknownStorageKeyRequirementsError, UnknownTradeModeError, UnknownTransferableTypeError}; use dpp::consensus::basic::document::{ContestedDocumentsTemporarilyNotAllowedError, DocumentCreationNotAllowedError, DocumentFieldMaxSizeExceededError, MaxDocumentsTransitionsExceededError, MissingPositionsInDocumentTypePropertiesError}; +use dpp::consensus::basic::group::GroupActionNotAllowedOnTransitionError; use dpp::consensus::basic::identity::{DataContractBoundsNotPresentError, DisablingKeyIdAlsoBeingAddedInSameTransitionError, InvalidIdentityCreditWithdrawalTransitionAmountError, InvalidIdentityUpdateTransitionDisableKeysError, InvalidIdentityUpdateTransitionEmptyError, TooManyMasterPublicKeyError, WithdrawalOutputScriptNotAllowedWhenSigningWithOwnerKeyError}; use dpp::consensus::basic::overflow_error::OverflowError; +use dpp::consensus::basic::token::{ChoosingTokenMintRecipientNotAllowedError, ContractHasNoTokensError, DestinationIdentityForTokenMintingNotSetError, InvalidActionIdError, InvalidGroupPositionError, InvalidTokenIdError, InvalidTokenPositionError, TokenTransferToOurselfError}; 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; @@ -73,12 +75,15 @@ use dpp::consensus::state::document::document_contest_not_joinable_error::Docume use dpp::consensus::state::document::document_contest_not_paid_for_error::DocumentContestNotPaidForError; use dpp::consensus::state::document::document_incorrect_purchase_price_error::DocumentIncorrectPurchasePriceError; use dpp::consensus::state::document::document_not_for_sale_error::DocumentNotForSaleError; +use dpp::consensus::state::group::{GroupActionAlreadyCompletedError, GroupActionAlreadySignedByIdentityError, GroupActionDoesNotExistError, IdentityNotMemberOfGroupError}; use dpp::consensus::state::identity::identity_public_key_already_exists_for_unique_contract_bounds_error::IdentityPublicKeyAlreadyExistsForUniqueContractBoundsError; use dpp::consensus::state::identity::master_public_key_update_error::MasterPublicKeyUpdateError; use dpp::consensus::state::identity::missing_transfer_key_error::MissingTransferKeyError; use dpp::consensus::state::identity::no_transfer_key_for_core_withdrawal_available_error::NoTransferKeyForCoreWithdrawalAvailableError; +use dpp::consensus::state::identity::RecipientIdentityDoesNotExistError; use dpp::consensus::state::prefunded_specialized_balances::prefunded_specialized_balance_insufficient_error::PrefundedSpecializedBalanceInsufficientError; use dpp::consensus::state::prefunded_specialized_balances::prefunded_specialized_balance_not_found_error::PrefundedSpecializedBalanceNotFoundError; +use dpp::consensus::state::token::{IdentityDoesNotHaveEnoughTokenBalanceError, IdentityTokenAccountNotFrozenError, IdentityTokenAccountFrozenError, UnauthorizedTokenActionError}; use dpp::consensus::state::voting::masternode_incorrect_voter_identity_id_error::MasternodeIncorrectVoterIdentityIdError; use dpp::consensus::state::voting::masternode_incorrect_voting_address_error::MasternodeIncorrectVotingAddressError; use dpp::consensus::state::voting::masternode_not_found_error::MasternodeNotFoundError; @@ -308,6 +313,33 @@ pub fn from_state_error(state_error: &StateError) -> JsValue { StateError::DocumentContestNotPaidForError(e) => { generic_consensus_error!(DocumentContestNotPaidForError, e).into() } + StateError::RecipientIdentityDoesNotExistError(e) => { + generic_consensus_error!(RecipientIdentityDoesNotExistError, e).into() + } + StateError::IdentityDoesNotHaveEnoughTokenBalanceError(e) => { + generic_consensus_error!(IdentityDoesNotHaveEnoughTokenBalanceError, e).into() + } + StateError::UnauthorizedTokenActionError(e) => { + generic_consensus_error!(UnauthorizedTokenActionError, e).into() + } + StateError::IdentityTokenAccountFrozenError(e) => { + generic_consensus_error!(IdentityTokenAccountFrozenError, e).into() + } + StateError::IdentityNotMemberOfGroupError(e) => { + generic_consensus_error!(IdentityNotMemberOfGroupError, e).into() + } + StateError::GroupActionDoesNotExistError(e) => { + generic_consensus_error!(GroupActionDoesNotExistError, e).into() + } + StateError::GroupActionAlreadyCompletedError(e) => { + generic_consensus_error!(GroupActionAlreadyCompletedError, e).into() + } + StateError::GroupActionAlreadySignedByIdentityError(e) => { + generic_consensus_error!(GroupActionAlreadySignedByIdentityError, e).into() + } + StateError::IdentityTokenAccountNotFrozenError(e) => { + generic_consensus_error!(IdentityTokenAccountNotFrozenError, e).into() + } } } @@ -571,6 +603,49 @@ fn from_basic_error(basic_error: &BasicError) -> JsValue { ) .into() } + BasicError::DataContractTokenConfigurationUpdateError(e) => { + generic_consensus_error!(DataContractTokenConfigurationUpdateError, e).into() + } + BasicError::InvalidTokenIdError(e) => { + generic_consensus_error!(InvalidTokenIdError, e).into() + } + + BasicError::InvalidTokenPositionError(e) => { + generic_consensus_error!(InvalidTokenPositionError, e).into() + } + + BasicError::ContractHasNoTokensError(e) => { + generic_consensus_error!(ContractHasNoTokensError, e).into() + } + + BasicError::InvalidGroupPositionError(e) => { + generic_consensus_error!(InvalidGroupPositionError, e).into() + } + + BasicError::InvalidActionIdError(e) => { + generic_consensus_error!(InvalidActionIdError, e).into() + } + BasicError::NonContiguousContractTokenPositionsError(e) => { + generic_consensus_error!(NonContiguousContractTokenPositionsError, e).into() + } + BasicError::NonContiguousContractGroupPositionsError(e) => { + generic_consensus_error!(NonContiguousContractGroupPositionsError, e).into() + } + BasicError::InvalidTokenBaseSupplyError(e) => { + generic_consensus_error!(InvalidTokenBaseSupplyError, e).into() + } + BasicError::TokenTransferToOurselfError(e) => { + generic_consensus_error!(TokenTransferToOurselfError, e).into() + } + BasicError::DestinationIdentityForTokenMintingNotSetError(e) => { + generic_consensus_error!(DestinationIdentityForTokenMintingNotSetError, e).into() + } + BasicError::ChoosingTokenMintRecipientNotAllowedError(e) => { + generic_consensus_error!(ChoosingTokenMintRecipientNotAllowedError, e).into() + } + BasicError::GroupActionNotAllowedOnTransitionError(e) => { + generic_consensus_error!(GroupActionNotAllowedOnTransitionError, e).into() + } } } diff --git a/packages/wasm-dpp/src/identity/state_transition/transition_types.rs b/packages/wasm-dpp/src/identity/state_transition/transition_types.rs index 1a4942726e..1fa4ee3dd9 100644 --- a/packages/wasm-dpp/src/identity/state_transition/transition_types.rs +++ b/packages/wasm-dpp/src/identity/state_transition/transition_types.rs @@ -19,7 +19,7 @@ impl From for StateTransitionTypeWasm { fn from(state_transition_type: StateTransitionType) -> Self { match state_transition_type { StateTransitionType::DataContractCreate => StateTransitionTypeWasm::DataContractCreate, - StateTransitionType::DocumentsBatch => StateTransitionTypeWasm::DocumentsBatch, + StateTransitionType::Batch => StateTransitionTypeWasm::DocumentsBatch, StateTransitionType::IdentityCreate => StateTransitionTypeWasm::IdentityCreate, StateTransitionType::IdentityTopUp => StateTransitionTypeWasm::IdentityTopUp, StateTransitionType::DataContractUpdate => StateTransitionTypeWasm::DataContractUpdate, diff --git a/packages/wasm-dpp/src/state_transition/state_transition_factory.rs b/packages/wasm-dpp/src/state_transition/state_transition_factory.rs index 8b3f8bfa86..2ba1a0e025 100644 --- a/packages/wasm-dpp/src/state_transition/state_transition_factory.rs +++ b/packages/wasm-dpp/src/state_transition/state_transition_factory.rs @@ -1,5 +1,5 @@ +use crate::batch_transition::BatchTransitionWasm; use crate::data_contract::{DataContractCreateTransitionWasm, DataContractUpdateTransitionWasm}; -use crate::document_batch_transition::DocumentsBatchTransitionWasm; use crate::errors::from_dpp_err; use crate::identity::state_transition::{ IdentityCreateTransitionWasm, IdentityCreditTransferTransitionWasm, @@ -56,9 +56,7 @@ impl StateTransitionFactoryWasm { StateTransition::IdentityCreditWithdrawal(st) => { Ok(IdentityCreditWithdrawalTransitionWasm::from(st).into()) } - StateTransition::DocumentsBatch(st) => { - Ok(DocumentsBatchTransitionWasm::from(st).into()) - } + StateTransition::Batch(st) => Ok(BatchTransitionWasm::from(st).into()), StateTransition::MasternodeVote(st) => { Ok(MasternodeVoteTransitionWasm::from(st).into()) } From 022030275eda1221166c7336071c335e419d1175 Mon Sep 17 00:00:00 2001 From: QuantumExplorer Date: Sun, 19 Jan 2025 14:43:51 +0700 Subject: [PATCH 2/6] feat(platform): proof verification for many queries and a few more queries (#2431) --- Cargo.lock | 18 +- .../protos/platform/v0/platform.proto | 31 ++ packages/rs-dpp/src/balances/credits.rs | 3 + packages/rs-dpp/src/balances/mod.rs | 1 + .../total_single_token_balance/mod.rs | 49 +++ .../v0/mod.rs | 2 +- packages/rs-drive-abci/src/query/service.rs | 31 +- .../src/query/token_queries/mod.rs | 1 + .../query/token_queries/token_status/mod.rs | 2 +- .../token_queries/token_total_supply/mod.rs | 59 +++ .../token_total_supply/v0/mod.rs | 81 ++++ packages/rs-drive/Cargo.toml | 12 +- .../v0/mod.rs | 2 +- .../fetch_identity_token_balances/v0/mod.rs | 22 +- .../prove_identity_token_balances/v0/mod.rs | 359 +++++++++++++++++- .../src/drive/tokens/balance/queries.rs | 50 ++- .../calculate_total_tokens_balance/mod.rs | 12 +- .../calculate_total_tokens_balance/v0/mod.rs | 8 +- .../info/fetch_identity_token_infos/v0/mod.rs | 22 +- .../info/prove_identity_token_infos/v0/mod.rs | 262 ++++++++++++- .../rs-drive/src/drive/tokens/info/queries.rs | 42 +- .../status/fetch_token_statuses/v0/mod.rs | 18 +- .../status/prove_token_statuses/v0/mod.rs | 201 +++++++++- .../mod.rs | 74 ++++ .../v0/mod.rs | 75 ++++ .../system/fetch_token_total_supply/mod.rs | 69 ++++ .../system/fetch_token_total_supply/v0/mod.rs | 72 ++++ .../rs-drive/src/drive/tokens/system/mod.rs | 3 + .../mod.rs | 40 ++ .../v0/mod.rs | 257 +++++++++++++ packages/rs-drive/src/error/proof.rs | 8 + packages/rs-drive/src/verify/tokens/mod.rs | 4 + .../mod.rs | 75 ++++ .../v0/mod.rs | 72 ++++ .../verify_token_infos_for_identity_id/mod.rs | 74 ++++ .../v0/mod.rs | 74 ++++ .../tokens/verify_token_statuses/mod.rs | 68 ++++ .../tokens/verify_token_statuses/v0/mod.rs | 65 ++++ .../mod.rs | 69 ++++ .../v0/mod.rs | 73 ++++ packages/rs-platform-version/Cargo.toml | 2 +- .../drive_abci_query_versions/mod.rs | 1 + .../drive_abci_query_versions/v1.rs | 5 + .../drive_token_method_versions/mod.rs | 3 + .../drive_token_method_versions/v1.rs | 3 + .../drive_verify_method_versions/mod.rs | 3 + .../drive_verify_method_versions/v1.rs | 3 + .../src/version/mocks/v2_test.rs | 5 + 48 files changed, 2354 insertions(+), 131 deletions(-) create mode 100644 packages/rs-dpp/src/balances/total_single_token_balance/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/token_total_supply/mod.rs create mode 100644 packages/rs-drive-abci/src/query/token_queries/token_total_supply/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/fetch_token_total_aggregated_identity_balances/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/fetch_token_total_aggregated_identity_balances/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/mod.rs create mode 100644 packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/v0/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_id/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_id/v0/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_id/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_id/v0/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_statuses/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_statuses/v0/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_total_supply_and_aggregated_identity_balance/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_total_supply_and_aggregated_identity_balance/v0/mod.rs diff --git a/Cargo.lock b/Cargo.lock index 930e2769ba..5964aaa3fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2099,7 +2099,7 @@ dependencies = [ [[package]] name = "grovedb" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" +source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" dependencies = [ "axum", "bincode", @@ -2130,7 +2130,7 @@ dependencies = [ [[package]] name = "grovedb-costs" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" +source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" dependencies = [ "integer-encoding", "intmap", @@ -2140,7 +2140,7 @@ dependencies = [ [[package]] name = "grovedb-epoch-based-storage-flags" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" +source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" dependencies = [ "grovedb-costs", "hex", @@ -2152,7 +2152,7 @@ dependencies = [ [[package]] name = "grovedb-merk" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" +source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" dependencies = [ "bincode", "blake3", @@ -2175,7 +2175,7 @@ dependencies = [ [[package]] name = "grovedb-path" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" +source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" dependencies = [ "hex", ] @@ -2183,7 +2183,7 @@ dependencies = [ [[package]] name = "grovedb-storage" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" +source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" dependencies = [ "blake3", "grovedb-costs", @@ -2202,7 +2202,7 @@ dependencies = [ [[package]] name = "grovedb-version" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" +source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" dependencies = [ "thiserror 2.0.11", "versioned-feature-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2211,7 +2211,7 @@ dependencies = [ [[package]] name = "grovedb-visualize" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" +source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" dependencies = [ "hex", "itertools 0.14.0", @@ -2220,7 +2220,7 @@ dependencies = [ [[package]] name = "grovedbg-types" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=d8ae2d95f56381b4d104d3983b2f11ae3a968dc7#d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" +source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" dependencies = [ "serde", "serde_with 3.9.0", diff --git a/packages/dapi-grpc/protos/platform/v0/platform.proto b/packages/dapi-grpc/protos/platform/v0/platform.proto index 81da114443..76b2cce105 100644 --- a/packages/dapi-grpc/protos/platform/v0/platform.proto +++ b/packages/dapi-grpc/protos/platform/v0/platform.proto @@ -60,7 +60,9 @@ service Platform { rpc getIdentityTokenInfos(GetIdentityTokenInfosRequest) returns (GetIdentityTokenInfosResponse); rpc getIdentitiesTokenInfos(GetIdentitiesTokenInfosRequest) returns (GetIdentitiesTokenInfosResponse); rpc getTokenStatuses(GetTokenStatusesRequest) returns (GetTokenStatusesResponse); + rpc getTokenTotalSupply(GetTokenTotalSupplyRequest) returns (GetTokenTotalSupplyResponse); rpc getGroupInfo(GetGroupInfoRequest) returns (GetGroupInfoResponse); + rpc getGroupInfos(GetGroupInfosRequest) returns (GetGroupInfosResponse); // rpc getActiveGroupActions(GetActiveGroupActionsRequest) returns (GetActiveGroupActionsResponse); // rpc getClosedGroupActions(GetClosedGroupActionsRequest) returns (GetClosedGroupActionsResponse); } @@ -1398,6 +1400,35 @@ message GetTokenStatusesResponse { } } +message GetTokenTotalSupplyRequest { + message GetTokenTotalSupplyRequestV0 { + bytes token_id = 1; + bool prove = 2; + } + oneof version { + GetTokenTotalSupplyRequestV0 v0 = 1; + } +} + +message GetTokenTotalSupplyResponse { + message GetTokenTotalSupplyResponseV0 { + message TokenTotalSupplyEntry { + bytes token_id = 1; + uint64 total_aggregated_amount_in_user_accounts = 2; + uint64 total_system_amount = 3; + } + + oneof result { + TokenTotalSupplyEntry token_total_supply = 1; + Proof proof = 2; + } + ResponseMetadata metadata = 3; + } + oneof version { + GetTokenTotalSupplyResponseV0 v0 = 1; + } +} + message GetGroupInfoRequest { message GetGroupInfoRequestV0 { bytes contract_id = 1; diff --git a/packages/rs-dpp/src/balances/credits.rs b/packages/rs-dpp/src/balances/credits.rs index 4376686a96..c69a02668f 100644 --- a/packages/rs-dpp/src/balances/credits.rs +++ b/packages/rs-dpp/src/balances/credits.rs @@ -22,6 +22,9 @@ pub type Credits = u64; /// Token Amount type pub type TokenAmount = u64; +/// Signed Token Amount type +pub type SignedTokenAmount = i64; + /// Sum token amount pub type SumTokenAmount = i128; diff --git a/packages/rs-dpp/src/balances/mod.rs b/packages/rs-dpp/src/balances/mod.rs index c0f505ac78..6878bd6d8b 100644 --- a/packages/rs-dpp/src/balances/mod.rs +++ b/packages/rs-dpp/src/balances/mod.rs @@ -1,4 +1,5 @@ pub mod total_credits_balance; pub mod credits; +pub mod total_single_token_balance; pub mod total_tokens_balance; diff --git a/packages/rs-dpp/src/balances/total_single_token_balance/mod.rs b/packages/rs-dpp/src/balances/total_single_token_balance/mod.rs new file mode 100644 index 0000000000..e7b0eb0c8c --- /dev/null +++ b/packages/rs-dpp/src/balances/total_single_token_balance/mod.rs @@ -0,0 +1,49 @@ +use crate::balances::credits::SignedTokenAmount; +use crate::ProtocolError; +use std::fmt; + +/// A structure where the token supply and the aggregated token account balances should always be equal +#[derive(Copy, Clone, Debug)] +pub struct TotalSingleTokenBalance { + /// the token supply + pub token_supply: SignedTokenAmount, + /// the sum of all user account balances + pub aggregated_token_account_balances: SignedTokenAmount, +} + +impl fmt::Display for TotalSingleTokenBalance { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + writeln!(f, "TotalSingleTokenBalance {{")?; + writeln!(f, " token_supply: {},", self.token_supply)?; + writeln!( + f, + " aggregated_token_account_balances: {}", + self.aggregated_token_account_balances + )?; + write!(f, "}}") + } +} +impl TotalSingleTokenBalance { + /// Is the outcome okay? basically do the values match up + /// Errors in case of overflow + pub fn ok(&self) -> Result { + let TotalSingleTokenBalance { + token_supply, + aggregated_token_account_balances, + } = *self; + + if token_supply < 0 { + return Err(ProtocolError::Generic( + "Token in platform are less than 0".to_string(), + )); + } + + if aggregated_token_account_balances < 0 { + return Err(ProtocolError::Generic( + "Token in aggregated identity balances are less than 0".to_string(), + )); + } + + Ok(token_supply == aggregated_token_account_balances) + } +} diff --git a/packages/rs-drive-abci/src/execution/platform_events/tokens/validate_token_aggregated_balance/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/tokens/validate_token_aggregated_balance/v0/mod.rs index 072d8dfc7e..b4538389f2 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/tokens/validate_token_aggregated_balance/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/tokens/validate_token_aggregated_balance/v0/mod.rs @@ -16,7 +16,7 @@ impl Platform { // Verify sum trees let token_balance = self .drive - .calculate_total_tokens_balance(Some(transaction), &platform_version.drive) + .calculate_total_tokens_balance(Some(transaction), platform_version) .map_err(Error::Drive)?; if !token_balance.ok()? { diff --git a/packages/rs-drive-abci/src/query/service.rs b/packages/rs-drive-abci/src/query/service.rs index 9ce866c7cf..7ac860eac1 100644 --- a/packages/rs-drive-abci/src/query/service.rs +++ b/packages/rs-drive-abci/src/query/service.rs @@ -22,7 +22,8 @@ use dapi_grpc::platform::v0::{ GetDocumentsRequest, GetDocumentsResponse, GetEpochsInfoRequest, GetEpochsInfoResponse, GetEvonodesProposedEpochBlocksByIdsRequest, GetEvonodesProposedEpochBlocksByRangeRequest, GetEvonodesProposedEpochBlocksResponse, GetGroupInfoRequest, GetGroupInfoResponse, - GetIdentitiesBalancesRequest, GetIdentitiesBalancesResponse, GetIdentitiesContractKeysRequest, + GetGroupInfosRequest, GetGroupInfosResponse, GetIdentitiesBalancesRequest, + GetIdentitiesBalancesResponse, GetIdentitiesContractKeysRequest, GetIdentitiesContractKeysResponse, GetIdentitiesTokenBalancesRequest, GetIdentitiesTokenBalancesResponse, GetIdentitiesTokenInfosRequest, GetIdentitiesTokenInfosResponse, GetIdentityBalanceAndRevisionRequest, @@ -37,8 +38,8 @@ use dapi_grpc::platform::v0::{ GetProtocolVersionUpgradeStateRequest, GetProtocolVersionUpgradeStateResponse, GetProtocolVersionUpgradeVoteStatusRequest, GetProtocolVersionUpgradeVoteStatusResponse, GetStatusRequest, GetStatusResponse, GetTokenStatusesRequest, GetTokenStatusesResponse, - GetTotalCreditsInPlatformRequest, GetTotalCreditsInPlatformResponse, - GetVotePollsByEndDateRequest, GetVotePollsByEndDateResponse, + GetTokenTotalSupplyRequest, GetTokenTotalSupplyResponse, GetTotalCreditsInPlatformRequest, + GetTotalCreditsInPlatformResponse, GetVotePollsByEndDateRequest, GetVotePollsByEndDateResponse, WaitForStateTransitionResultRequest, WaitForStateTransitionResultResponse, }; use dapi_grpc::tonic::{Code, Request, Response, Status}; @@ -675,6 +676,18 @@ impl PlatformService for QueryService { .await } + async fn get_token_total_supply( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_token_total_supply, + "get_token_total_supply", + ) + .await + } + async fn get_group_info( &self, request: Request, @@ -687,6 +700,18 @@ impl PlatformService for QueryService { .await } + async fn get_group_infos( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_group_infos, + "get_group_infos", + ) + .await + } + // async fn get_active_group_actions( // &self, // request: Request, diff --git a/packages/rs-drive-abci/src/query/token_queries/mod.rs b/packages/rs-drive-abci/src/query/token_queries/mod.rs index 70f261b383..fe97942dd1 100644 --- a/packages/rs-drive-abci/src/query/token_queries/mod.rs +++ b/packages/rs-drive-abci/src/query/token_queries/mod.rs @@ -3,3 +3,4 @@ mod identities_token_infos; mod identity_token_balances; mod identity_token_infos; mod token_status; +mod token_total_supply; diff --git a/packages/rs-drive-abci/src/query/token_queries/token_status/mod.rs b/packages/rs-drive-abci/src/query/token_queries/token_status/mod.rs index 555fce502d..ba68930d0d 100644 --- a/packages/rs-drive-abci/src/query/token_queries/token_status/mod.rs +++ b/packages/rs-drive-abci/src/query/token_queries/token_status/mod.rs @@ -20,7 +20,7 @@ impl Platform { let Some(version) = version else { return Ok(QueryValidationResult::new_with_error( QueryError::DecodingError( - "could not decode identity token infos query".to_string(), + "could not decode identity token statuses query".to_string(), ), )); }; diff --git a/packages/rs-drive-abci/src/query/token_queries/token_total_supply/mod.rs b/packages/rs-drive-abci/src/query/token_queries/token_total_supply/mod.rs new file mode 100644 index 0000000000..2100f9bfe7 --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/token_total_supply/mod.rs @@ -0,0 +1,59 @@ +use crate::error::query::QueryError; +use crate::error::Error; +use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::PlatformState; +use crate::query::QueryValidationResult; +use dapi_grpc::platform::v0::get_token_total_supply_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_token_total_supply_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{GetTokenTotalSupplyRequest, GetTokenTotalSupplyResponse}; +use dpp::version::PlatformVersion; +mod v0; + +impl Platform { + /// Querying of token total supply + pub fn query_token_total_supply( + &self, + GetTokenTotalSupplyRequest { version }: GetTokenTotalSupplyRequest, + 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 token total supply query".to_string(), + ), + )); + }; + + let feature_version_bounds = &platform_version + .drive_abci + .query + .token_queries + .token_total_supply; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "token_total_supply".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_token_total_supply_v0(request_v0, platform_state, platform_version)?; + Ok(result.map(|response_v0| GetTokenTotalSupplyResponse { + version: Some(ResponseVersion::V0(response_v0)), + })) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/token_queries/token_total_supply/v0/mod.rs b/packages/rs-drive-abci/src/query/token_queries/token_total_supply/v0/mod.rs new file mode 100644 index 0000000000..d24a553308 --- /dev/null +++ b/packages/rs-drive-abci/src/query/token_queries/token_total_supply/v0/mod.rs @@ -0,0 +1,81 @@ +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_token_total_supply_request::GetTokenTotalSupplyRequestV0; +use dapi_grpc::platform::v0::get_token_total_supply_response::get_token_total_supply_response_v0::TokenTotalSupplyEntry; +use dapi_grpc::platform::v0::get_token_total_supply_response::{ + get_token_total_supply_response_v0, GetTokenTotalSupplyResponseV0, +}; +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_token_total_supply_v0( + &self, + GetTokenTotalSupplyRequestV0 { token_id, prove }: GetTokenTotalSupplyRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let token_id: [u8; 32] = + check_validation_result_with_data!(token_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "token_id must be a valid identifier (32 bytes long)".to_string(), + ) + })); + + let response = if prove { + let proof = check_validation_result_with_data!(self + .drive + .prove_token_total_supply_and_aggregated_identity_balances( + token_id, + None, + platform_version, + )); + + GetTokenTotalSupplyResponseV0 { + result: Some(get_token_total_supply_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let Some(token_total_aggregated_identity_balances) = self + .drive + .fetch_token_total_aggregated_identity_balances(token_id, None, platform_version)? + else { + return Ok(QueryValidationResult::new_with_error(QueryError::NotFound( + format!("Token {} not found", Identifier::new(token_id)), + ))); + }; + + let Some(token_total_supply) = + self.drive + .fetch_token_total_supply(token_id, None, platform_version)? + else { + return Ok(QueryValidationResult::new_with_error(QueryError::NotFound( + format!("Token {} total supply not found", Identifier::new(token_id)), + ))); + }; + + GetTokenTotalSupplyResponseV0 { + result: Some( + get_token_total_supply_response_v0::Result::TokenTotalSupply( + TokenTotalSupplyEntry { + token_id: token_id.to_vec(), + total_aggregated_amount_in_user_accounts: + token_total_aggregated_identity_balances, + total_system_amount: token_total_supply, + }, + ), + ), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive/Cargo.toml b/packages/rs-drive/Cargo.toml index 9b140c4e55..be5ae7dedb 100644 --- a/packages/rs-drive/Cargo.toml +++ b/packages/rs-drive/Cargo.toml @@ -52,12 +52,12 @@ enum-map = { version = "2.0.3", optional = true } intmap = { version = "3.0.1", features = ["serde"], optional = true } chrono = { version = "0.4.35", optional = true } itertools = { version = "0.13", optional = true } -grovedb = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7", optional = true, default-features = false } -grovedb-costs = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7", optional = true } -grovedb-path = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" } -grovedb-storage = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7", optional = true } -grovedb-version = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" } -grovedb-epoch-based-storage-flags = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" } +grovedb = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0", optional = true, default-features = false } +grovedb-costs = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0", optional = true } +grovedb-path = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" } +grovedb-storage = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0", optional = true } +grovedb-version = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" } +grovedb-epoch-based-storage-flags = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" } [dev-dependencies] criterion = "0.5" diff --git a/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded/v0/mod.rs b/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded/v0/mod.rs index aff3c4d5fc..7dd930ddc6 100644 --- a/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded/v0/mod.rs +++ b/packages/rs-drive/src/drive/shared/shared_estimation_costs/add_estimation_costs_for_contested_document_tree_levels_up_to_contract_document_type_excluded/v0/mod.rs @@ -82,7 +82,7 @@ impl Drive { KeyInfoPath::from_known_path(vote_contested_resource_tree_path()), EstimatedLayerInformation { tree_type: TreeType::NormalTree, - // active poll "p", with "e" and "i" first so it should be on the second layer of the merk + // active poll "p", with "e" and "i" first, so it should be on the second layer of the merk estimated_layer_count: EstimatedLevel(1, false), estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), }, diff --git a/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balances/v0/mod.rs b/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balances/v0/mod.rs index 8084608b81..5d5692630b 100644 --- a/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balances/v0/mod.rs +++ b/packages/rs-drive/src/drive/tokens/balance/fetch_identity_token_balances/v0/mod.rs @@ -1,4 +1,3 @@ -use crate::drive::tokens::paths::{tokens_root_path_vec, TOKEN_BALANCES_KEY}; use crate::drive::Drive; use crate::error::drive::DriveError; use crate::error::Error; @@ -6,7 +5,7 @@ use crate::fees::op::LowLevelDriveOperation; use dpp::balances::credits::TokenAmount; use dpp::version::PlatformVersion; use grovedb::Element::SumItem; -use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; +use grovedb::TransactionArg; use std::collections::BTreeMap; impl Drive { @@ -34,20 +33,7 @@ impl Drive { drive_operations: &mut Vec, platform_version: &PlatformVersion, ) -> Result>, Error> { - let tokens_root = tokens_root_path_vec(); - - let mut query = Query::new(); - - for token_id in token_ids { - query.insert_key(token_id.to_vec()); - } - - query.set_subquery_path(vec![vec![TOKEN_BALANCES_KEY], identity_id.to_vec()]); - - let path_query = PathQuery::new( - tokens_root, - SizedQuery::new(query, Some(token_ids.len() as u16), None), - ); + let path_query = Drive::token_balances_for_identity_id_query(token_ids, identity_id); self.grove_get_raw_path_query_with_optional( &path_query, @@ -59,9 +45,9 @@ impl Drive { .into_iter() .map(|(path, _, element)| { let token_id: [u8; 32] = path - .get(1) + .get(2) .ok_or(Error::Drive(DriveError::CorruptedDriveState( - "returned path item should always have a second part at index 1".to_string(), + "returned path item should always have a third part at index 2".to_string(), )))? .clone() .try_into() diff --git a/packages/rs-drive/src/drive/tokens/balance/prove_identity_token_balances/v0/mod.rs b/packages/rs-drive/src/drive/tokens/balance/prove_identity_token_balances/v0/mod.rs index 621e42c370..fad0b5357b 100644 --- a/packages/rs-drive/src/drive/tokens/balance/prove_identity_token_balances/v0/mod.rs +++ b/packages/rs-drive/src/drive/tokens/balance/prove_identity_token_balances/v0/mod.rs @@ -1,9 +1,8 @@ -use crate::drive::tokens::paths::{tokens_root_path_vec, TOKEN_BALANCES_KEY}; use crate::drive::Drive; use crate::error::Error; use crate::fees::op::LowLevelDriveOperation; use dpp::version::PlatformVersion; -use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; +use grovedb::TransactionArg; impl Drive { pub(super) fn prove_identity_token_balances_v0( @@ -30,20 +29,7 @@ impl Drive { drive_operations: &mut Vec, platform_version: &PlatformVersion, ) -> Result, Error> { - let tokens_root = tokens_root_path_vec(); - - let mut query = Query::new(); - - for token_id in token_ids { - query.insert_key(token_id.to_vec()); - } - - query.set_subquery_path(vec![vec![TOKEN_BALANCES_KEY], identity_id.to_vec()]); - - let path_query = PathQuery::new( - tokens_root, - SizedQuery::new(query, Some(token_ids.len() as u16), None), - ); + let path_query = Self::token_balances_for_identity_id_query(token_ids, identity_id); self.grove_get_proved_path_query( &path_query, @@ -53,3 +39,344 @@ impl Drive { ) } } + +#[cfg(test)] +mod tests { + use super::*; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::balances::credits::TokenAmount; + use dpp::block::block_info::BlockInfo; + use dpp::data_contract::accessors::v1::DataContractV1Getters; + use dpp::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; + use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; + use dpp::data_contract::config::v0::DataContractConfigV0; + use dpp::data_contract::config::DataContractConfig; + use dpp::data_contract::v1::DataContractV1; + use dpp::identity::accessors::IdentityGettersV0; + use dpp::identity::Identity; + use dpp::prelude::DataContract; + use dpp::version::PlatformVersion; + use std::collections::BTreeMap; + + #[test] + fn should_prove_multiple_token_balances_for_single_identity() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_id = identity.id().to_buffer(); + + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([ + ( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ), + ( + 1, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ), + ]), + }); + + let token_id_1 = contract.token_id(0).expect("expected token at position 0"); + let token_id_2 = contract.token_id(1).expect("expected token at position 1"); + + drive + .add_new_identity( + identity.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add an identity"); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + drive + .token_mint( + token_id_1.to_buffer(), + identity.id().to_buffer(), + 5000, + true, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to mint token 1"); + + let token_balance_1 = drive + .fetch_identity_token_balance( + token_id_1.to_buffer(), + identity_id, + None, + platform_version, + ) + .expect("should not error when fetching token balance"); + + assert_eq!(token_balance_1, Some(5000)); + + drive + .token_mint( + token_id_2.to_buffer(), + identity.id().to_buffer(), + 10000, + true, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to mint token 2"); + + let token_balance_2 = drive + .fetch_identity_token_balance( + token_id_2.to_buffer(), + identity_id, + None, + platform_version, + ) + .expect("should not error when fetching token balance"); + + assert_eq!(token_balance_2, Some(10000)); + + let token_balances = drive + .fetch_identity_token_balances( + &[token_id_1.to_buffer(), token_id_2.to_buffer()], + identity_id, + None, + platform_version, + ) + .expect("should not error when fetching token balances"); + + assert_eq!( + token_balances, + BTreeMap::from([ + (token_id_1.to_buffer(), Some(5000)), + (token_id_2.to_buffer(), Some(10000)), + ]) + ); + + let proof = drive + .prove_identity_token_balances_v0( + &[token_id_1.to_buffer(), token_id_2.to_buffer()], + identity_id, + None, + platform_version, + ) + .expect("should not error when proving token balances"); + + let proved_identity_balance: BTreeMap<[u8; 32], Option> = + Drive::verify_token_balances_for_identity_id( + proof.as_slice(), + &[token_id_1.to_buffer(), token_id_2.to_buffer()], + identity.id().to_buffer(), + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + assert_eq!( + proved_identity_balance, + BTreeMap::from([ + (token_id_1.to_buffer(), Some(5000)), + (token_id_2.to_buffer(), Some(10000)), + ]) + ); + } + + #[test] + fn should_prove_no_token_balances_for_single_identity() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_id = identity.id().to_buffer(); + + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + + let token_id = contract.token_id(0).expect("expected token at position 0"); + + drive + .add_new_identity( + identity.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add an identity"); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + let proof = drive + .prove_identity_token_balances_v0( + &[token_id.to_buffer()], + identity_id, + None, + platform_version, + ) + .expect("should not error when proving token balances"); + + let proved_identity_balance: BTreeMap<[u8; 32], Option> = + Drive::verify_token_balances_for_identity_id( + proof.as_slice(), + &[token_id.to_buffer()], + identity.id().to_buffer(), + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + assert_eq!( + proved_identity_balance, + BTreeMap::from([(token_id.to_buffer(), None)]) + ); + } + + #[test] + fn should_prove_no_token_balances_for_non_existent_identity() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + // Create a random identity ID that is not added to the drive + let non_existent_identity_id = [1u8; 32]; // An example of a non-existent identity ID + + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + + let token_id = contract.token_id(0).expect("expected token at position 0"); + + // Insert the contract but no identities + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Attempt to prove token balances for a non-existent identity + let proof_result = drive.prove_identity_token_balances_v0( + &[token_id.to_buffer()], + non_existent_identity_id, + None, + platform_version, + ); + + // Ensure proof generation succeeds even for non-existent identities + assert!(proof_result.is_ok(), "proof generation should succeed"); + + let proof = proof_result.expect("expected valid proof"); + + // Verify the proof + let proved_identity_balance: BTreeMap<[u8; 32], Option> = + Drive::verify_token_balances_for_identity_id( + proof.as_slice(), + &[token_id.to_buffer()], + non_existent_identity_id, + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Verify the balance is `None` for the non-existent identity + assert_eq!( + proved_identity_balance, + BTreeMap::from([(token_id.to_buffer(), None)]), + "expected no balances for non-existent identity" + ); + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/queries.rs b/packages/rs-drive/src/drive/tokens/balance/queries.rs index d15202311a..a02a3216db 100644 --- a/packages/rs-drive/src/drive/tokens/balance/queries.rs +++ b/packages/rs-drive/src/drive/tokens/balance/queries.rs @@ -1,7 +1,12 @@ -use crate::drive::tokens::paths::token_balances_path_vec; +use crate::drive::balances::total_tokens_root_supply_path_vec; +use crate::drive::tokens::paths::{ + token_balances_path_vec, token_balances_root_path_vec, tokens_root_path_vec, TOKEN_BALANCES_KEY, +}; use crate::drive::Drive; +use crate::error::Error; use crate::query::{Query, QueryItem}; use grovedb::{PathQuery, SizedQuery}; +use platform_version::version::PlatformVersion; use std::ops::RangeFull; impl Drive { @@ -32,6 +37,27 @@ impl Drive { } } + /// The query getting token balances for a single identity and many tokens + pub fn token_balances_for_identity_id_query( + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + ) -> PathQuery { + let tokens_root = token_balances_root_path_vec(); + + let mut query = Query::new(); + + for token_id in token_ids { + query.insert_key(token_id.to_vec()); + } + + query.set_subquery_path(vec![identity_id.to_vec()]); + + PathQuery::new( + tokens_root, + SizedQuery::new(query, Some(token_ids.len() as u16), None), + ) + } + /// The query getting token balances for identities in a range pub fn token_balances_for_range_query( token_id: [u8; 32], @@ -69,4 +95,26 @@ impl Drive { }, } } + + /// The query getting token balances for identities in a range + pub fn token_total_supply_and_aggregated_identity_balances_query( + token_id: [u8; 32], + platform_version: &PlatformVersion, + ) -> Result { + let path_holding_total_token_supply = total_tokens_root_supply_path_vec(); + let token_supply_query = + PathQuery::new_single_key(path_holding_total_token_supply, token_id.to_vec()); + let tokens_root_path = token_balances_root_path_vec(); + let token_aggregated_identity_balances_query = + PathQuery::new_single_key(tokens_root_path, token_id.to_vec()); + let mut path_query = PathQuery::merge( + vec![ + &token_aggregated_identity_balances_query, + &token_supply_query, + ], + &platform_version.drive.grove_version, + )?; + path_query.query.limit = Some(2); + Ok(path_query) + } } diff --git a/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/mod.rs b/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/mod.rs index 8799421a9d..60b85c9dbb 100644 --- a/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/mod.rs +++ b/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/mod.rs @@ -6,6 +6,7 @@ use crate::error::Error; use dpp::balances::total_tokens_balance::TotalTokensBalance; use dpp::version::drive_versions::DriveVersion; use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; impl Drive { /// Calculates the total credits balance. @@ -28,10 +29,15 @@ impl Drive { pub fn calculate_total_tokens_balance( &self, transaction: TransactionArg, - drive_version: &DriveVersion, + platform_version: &PlatformVersion, ) -> Result { - match drive_version.methods.token.calculate_total_tokens_balance { - 0 => self.calculate_total_tokens_balance_v0(transaction, drive_version), + match platform_version + .drive + .methods + .token + .calculate_total_tokens_balance + { + 0 => self.calculate_total_tokens_balance_v0(transaction, platform_version), version => Err(Error::Drive(DriveError::UnknownVersionMismatch { method: "calculate_total_tokens_balance".to_string(), known_versions: vec![0], diff --git a/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/v0/mod.rs b/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/v0/mod.rs index 6cefd4ce28..6d4acc6169 100644 --- a/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/v0/mod.rs +++ b/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/v0/mod.rs @@ -5,8 +5,8 @@ use crate::drive::Drive; use crate::error::Error; use crate::util::grove_operations::DirectQueryType; use dpp::balances::total_tokens_balance::TotalTokensBalance; -use dpp::version::drive_versions::DriveVersion; use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; impl Drive { /// Verify that the sum tree identity credits + pool credits + refunds are equal to the @@ -15,7 +15,7 @@ impl Drive { pub(super) fn calculate_total_tokens_balance_v0( &self, transaction: TransactionArg, - drive_version: &DriveVersion, + platform_version: &PlatformVersion, ) -> Result { let mut drive_operations = vec![]; let path_holding_total_credits = misc_path(); @@ -25,7 +25,7 @@ impl Drive { DirectQueryType::StatefulDirectQuery, transaction, &mut drive_operations, - drive_version, + &platform_version.drive, )?; let tokens_root_path = tokens_root_path(); @@ -36,7 +36,7 @@ impl Drive { DirectQueryType::StatefulDirectQuery, transaction, &mut drive_operations, - drive_version, + &platform_version.drive, )?; Ok(TotalTokensBalance { diff --git a/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/v0/mod.rs b/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/v0/mod.rs index 6779f88038..21ab3474ba 100644 --- a/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/v0/mod.rs +++ b/packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/v0/mod.rs @@ -1,4 +1,3 @@ -use crate::drive::tokens::paths::{tokens_root_path_vec, TOKEN_IDENTITY_INFO_KEY}; use crate::drive::Drive; use crate::error::drive::DriveError; use crate::error::Error; @@ -7,7 +6,7 @@ use dpp::serialization::PlatformDeserializable; use dpp::tokens::info::IdentityTokenInfo; use dpp::version::PlatformVersion; use grovedb::Element::Item; -use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; +use grovedb::TransactionArg; use std::collections::BTreeMap; impl Drive { @@ -35,20 +34,7 @@ impl Drive { drive_operations: &mut Vec, platform_version: &PlatformVersion, ) -> Result>, Error> { - let tokens_root = tokens_root_path_vec(); - - let mut query = Query::new(); - - for token_id in token_ids { - query.insert_key(token_id.to_vec()); - } - - query.set_subquery_path(vec![vec![TOKEN_IDENTITY_INFO_KEY], identity_id.to_vec()]); - - let path_query = PathQuery::new( - tokens_root, - SizedQuery::new(query, Some(token_ids.len() as u16), None), - ); + let path_query = Drive::token_infos_for_identity_id_query(token_ids, identity_id); self.grove_get_raw_path_query_with_optional( &path_query, @@ -60,9 +46,9 @@ impl Drive { .into_iter() .map(|(path, _, element)| { let token_id: [u8; 32] = path - .get(1) + .get(2) .ok_or(Error::Drive(DriveError::CorruptedDriveState( - "returned path item should always have a second part at index 1".to_string(), + "returned path item should always have a third part at index 2".to_string(), )))? .clone() .try_into() diff --git a/packages/rs-drive/src/drive/tokens/info/prove_identity_token_infos/v0/mod.rs b/packages/rs-drive/src/drive/tokens/info/prove_identity_token_infos/v0/mod.rs index a0e4e71ac9..e6d7247d86 100644 --- a/packages/rs-drive/src/drive/tokens/info/prove_identity_token_infos/v0/mod.rs +++ b/packages/rs-drive/src/drive/tokens/info/prove_identity_token_infos/v0/mod.rs @@ -1,9 +1,8 @@ -use crate::drive::tokens::paths::{tokens_root_path_vec, TOKEN_IDENTITY_INFO_KEY}; use crate::drive::Drive; use crate::error::Error; use crate::fees::op::LowLevelDriveOperation; use dpp::version::PlatformVersion; -use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; +use grovedb::TransactionArg; impl Drive { pub(super) fn prove_identity_token_infos_v0( @@ -30,20 +29,7 @@ impl Drive { drive_operations: &mut Vec, platform_version: &PlatformVersion, ) -> Result, Error> { - let tokens_root = tokens_root_path_vec(); - - let mut query = Query::new(); - - for token_id in token_ids { - query.insert_key(token_id.to_vec()); - } - - query.set_subquery_path(vec![vec![TOKEN_IDENTITY_INFO_KEY], identity_id.to_vec()]); - - let path_query = PathQuery::new( - tokens_root, - SizedQuery::new(query, Some(token_ids.len() as u16), None), - ); + let path_query = Self::token_infos_for_identity_id_query(token_ids, identity_id); self.grove_get_proved_path_query( &path_query, @@ -53,3 +39,247 @@ impl Drive { ) } } + +#[cfg(test)] +mod tests { + use super::*; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::block::block_info::BlockInfo; + use dpp::data_contract::accessors::v1::DataContractV1Getters; + use dpp::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; + use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; + use dpp::data_contract::config::v0::DataContractConfigV0; + use dpp::data_contract::config::DataContractConfig; + use dpp::data_contract::v1::DataContractV1; + use dpp::identity::accessors::IdentityGettersV0; + use dpp::identity::Identity; + use dpp::prelude::DataContract; + use dpp::tokens::info::v0::IdentityTokenInfoV0; + use dpp::tokens::info::IdentityTokenInfo; + use dpp::version::PlatformVersion; + use std::collections::BTreeMap; + + #[test] + fn should_prove_token_infos_with_one_token_frozen() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + // Create a random identity + let identity = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_id = identity.id().to_buffer(); + + // Create a data contract with multiple tokens + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([ + ( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ), + ( + 1, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ), + ]), + }); + + let token_id_1 = contract.token_id(0).expect("expected token at position 0"); + let token_id_2 = contract.token_id(1).expect("expected token at position 1"); + + drive + .add_new_identity( + identity.clone(), + false, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add an identity"); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Freeze one token for the identity + drive + .token_freeze( + token_id_1, + identity.id(), + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to freeze token"); + + let fetched_token_info_1 = drive + .fetch_identity_token_info(token_id_1.to_buffer(), identity_id, None, platform_version) + .expect("expected to fetch token info"); + + assert_eq!( + fetched_token_info_1, + Some(IdentityTokenInfo::V0(IdentityTokenInfoV0 { frozen: true })) + ); + + let fetched_token_info_2 = drive + .fetch_identity_token_info(token_id_2.to_buffer(), identity_id, None, platform_version) + .expect("expected to fetch token info"); + + assert_eq!(fetched_token_info_2, None); + + // Fetch identity token infos before proving + let fetched_token_infos = drive + .fetch_identity_token_infos( + &[token_id_1.to_buffer(), token_id_2.to_buffer()], + identity_id, + None, + platform_version, + ) + .expect("expected to fetch token infos"); + + // Verify fetched token infos + assert_eq!( + fetched_token_infos, + BTreeMap::from([ + ( + token_id_1.to_buffer(), + Some(IdentityTokenInfo::V0(IdentityTokenInfoV0 { frozen: true })), + ), + (token_id_2.to_buffer(), None,), + ]), + "unexpected fetched token infos" + ); + + // Generate proof + let proof = drive + .prove_identity_token_infos_v0( + &[token_id_1.to_buffer(), token_id_2.to_buffer()], + identity_id, + None, + platform_version, + ) + .expect("should not error when proving token infos"); + + // Verify proof + let proved_token_infos: BTreeMap<[u8; 32], Option> = + Drive::verify_token_infos_for_identity_id( + proof.as_slice(), + &[token_id_1.to_buffer(), token_id_2.to_buffer()], + identity_id, + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert proved token infos match the fetched ones + assert_eq!( + proved_token_infos, + BTreeMap::from([ + ( + token_id_1.to_buffer(), + Some(IdentityTokenInfo::V0(IdentityTokenInfoV0 { frozen: true })), + ), + (token_id_2.to_buffer(), None,), + ]), + "unexpected fetched token infos" + ); + } + + #[test] + fn should_prove_no_token_infos_for_non_existent_identity() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let non_existent_identity_id = [0u8; 32]; // An identity that doesn't exist in the database + + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + + let token_id = contract.token_id(0).expect("expected token at position 0"); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + let proof = drive + .prove_identity_token_infos_v0( + &[token_id.to_buffer()], + non_existent_identity_id, + None, + platform_version, + ) + .expect("should not error when proving token infos for non-existent identity"); + + let proved_token_infos: BTreeMap<[u8; 32], Option> = + Drive::verify_token_infos_for_identity_id( + proof.as_slice(), + &[token_id.to_buffer()], + non_existent_identity_id, + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert that no token infos exist for the non-existent identity + assert_eq!( + proved_token_infos, + BTreeMap::from([(token_id.to_buffer(), None)]) + ); + } +} diff --git a/packages/rs-drive/src/drive/tokens/info/queries.rs b/packages/rs-drive/src/drive/tokens/info/queries.rs index 3b2303932d..c4e80a5af1 100644 --- a/packages/rs-drive/src/drive/tokens/info/queries.rs +++ b/packages/rs-drive/src/drive/tokens/info/queries.rs @@ -1,4 +1,7 @@ -use crate::drive::tokens::paths::token_identity_infos_path_vec; +use crate::drive::tokens::paths::{ + token_identity_infos_path_vec, token_identity_infos_root_path_vec, + token_statuses_root_path_vec, tokens_root_path_vec, TOKEN_STATUS_INFO_KEY, +}; use crate::drive::Drive; use crate::query::{Query, QueryItem}; use grovedb::{PathQuery, SizedQuery}; @@ -32,6 +35,43 @@ impl Drive { } } + /// The query getting a token infos for one identity + pub fn token_infos_for_identity_id_query( + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + ) -> PathQuery { + let tokens_root = token_identity_infos_root_path_vec(); + + let mut query = Query::new(); + + for token_id in token_ids { + query.insert_key(token_id.to_vec()); + } + + query.set_subquery_path(vec![identity_id.to_vec()]); + + PathQuery::new( + tokens_root, + SizedQuery::new(query, Some(token_ids.len() as u16), None), + ) + } + + /// The query getting a token statuses + pub fn token_statuses_query(token_ids: &[[u8; 32]]) -> PathQuery { + let tokens_root = token_statuses_root_path_vec(); + + let mut query = Query::new(); + + for token_id in token_ids { + query.insert_key(token_id.to_vec()); + } + + PathQuery::new( + tokens_root, + SizedQuery::new(query, Some(token_ids.len() as u16), None), + ) + } + /// The query getting token infos for identities in a range pub fn token_infos_for_range_query( token_id: [u8; 32], diff --git a/packages/rs-drive/src/drive/tokens/status/fetch_token_statuses/v0/mod.rs b/packages/rs-drive/src/drive/tokens/status/fetch_token_statuses/v0/mod.rs index 486ebde128..8a9e1f23c3 100644 --- a/packages/rs-drive/src/drive/tokens/status/fetch_token_statuses/v0/mod.rs +++ b/packages/rs-drive/src/drive/tokens/status/fetch_token_statuses/v0/mod.rs @@ -1,4 +1,3 @@ -use crate::drive::tokens::paths::{tokens_root_path_vec, TOKEN_STATUS_INFO_KEY}; use crate::drive::Drive; use crate::error::drive::DriveError; use crate::error::Error; @@ -7,7 +6,7 @@ use dpp::serialization::PlatformDeserializable; use dpp::tokens::status::TokenStatus; use dpp::version::PlatformVersion; use grovedb::Element::Item; -use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; +use grovedb::TransactionArg; use std::collections::BTreeMap; impl Drive { @@ -32,20 +31,7 @@ impl Drive { drive_operations: &mut Vec, platform_version: &PlatformVersion, ) -> Result>, Error> { - let tokens_root = tokens_root_path_vec(); - - let mut query = Query::new(); - - for token_id in token_ids { - query.insert_key(token_id.to_vec()); - } - - query.set_subquery_path(vec![vec![TOKEN_STATUS_INFO_KEY]]); - - let path_query = PathQuery::new( - tokens_root, - SizedQuery::new(query, Some(token_ids.len() as u16), None), - ); + let path_query = Drive::token_statuses_query(token_ids); self.grove_get_raw_path_query_with_optional( &path_query, diff --git a/packages/rs-drive/src/drive/tokens/status/prove_token_statuses/v0/mod.rs b/packages/rs-drive/src/drive/tokens/status/prove_token_statuses/v0/mod.rs index baae7936be..07b6fef19c 100644 --- a/packages/rs-drive/src/drive/tokens/status/prove_token_statuses/v0/mod.rs +++ b/packages/rs-drive/src/drive/tokens/status/prove_token_statuses/v0/mod.rs @@ -1,9 +1,8 @@ -use crate::drive::tokens::paths::{tokens_root_path_vec, TOKEN_IDENTITY_INFO_KEY}; use crate::drive::Drive; use crate::error::Error; use crate::fees::op::LowLevelDriveOperation; use dpp::version::PlatformVersion; -use grovedb::{PathQuery, Query, SizedQuery, TransactionArg}; +use grovedb::TransactionArg; impl Drive { pub(super) fn prove_token_statuses_v0( @@ -27,20 +26,7 @@ impl Drive { drive_operations: &mut Vec, platform_version: &PlatformVersion, ) -> Result, Error> { - let tokens_root = tokens_root_path_vec(); - - let mut query = Query::new(); - - for token_id in token_ids { - query.insert_key(token_id.to_vec()); - } - - query.set_subquery_path(vec![vec![TOKEN_IDENTITY_INFO_KEY]]); - - let path_query = PathQuery::new( - tokens_root, - SizedQuery::new(query, Some(token_ids.len() as u16), None), - ); + let path_query = Self::token_statuses_query(token_ids); self.grove_get_proved_path_query( &path_query, @@ -50,3 +36,186 @@ impl Drive { ) } } + +#[cfg(test)] +mod tests { + use super::*; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::block::block_info::BlockInfo; + use dpp::data_contract::accessors::v1::DataContractV1Getters; + use dpp::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; + use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; + use dpp::data_contract::config::v0::DataContractConfigV0; + use dpp::data_contract::config::DataContractConfig; + use dpp::data_contract::v1::DataContractV1; + use dpp::prelude::DataContract; + use dpp::tokens::status::v0::TokenStatusV0; + use dpp::tokens::status::TokenStatus; + use dpp::version::PlatformVersion; + use std::collections::BTreeMap; + + #[test] + fn should_prove_token_statuses_for_multiple_tokens() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + // Create a data contract with multiple tokens + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([ + ( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ), + ( + 1, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ), + ]), + }); + + let token_id_1 = contract.token_id(0).expect("expected token at position 0"); + let token_id_2 = contract.token_id(1).expect("expected token at position 1"); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Freeze the first token + drive + .token_apply_status( + token_id_1.to_buffer(), + TokenStatus::new(true, platform_version).expect("expected token status"), + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to freeze token"); + + let fetched_token_info_1 = drive + .fetch_token_status(token_id_1.to_buffer(), None, platform_version) + .expect("expected to fetch token status"); + + assert_eq!( + fetched_token_info_1, + Some(TokenStatus::V0(TokenStatusV0 { paused: true })) + ); + + let fetched_token_info_2 = drive + .fetch_token_status(token_id_2.to_buffer(), None, platform_version) + .expect("expected to fetch token status"); + + assert_eq!(fetched_token_info_2, None); + + // Fetch token statuses before proving + let fetched_token_statuses = drive + .fetch_token_statuses( + &[token_id_1.to_buffer(), token_id_2.to_buffer()], + None, + platform_version, + ) + .expect("expected to fetch token statuses"); + + // Verify fetched token statuses + assert_eq!( + fetched_token_statuses, + BTreeMap::from([ + ( + token_id_1.to_buffer(), + Some(TokenStatus::V0(TokenStatusV0 { paused: true })), + ), + (token_id_2.to_buffer(), None,), + ]), + "unexpected fetched token infos" + ); + + // Generate proof + let proof = drive + .prove_token_statuses( + &[token_id_1.to_buffer(), token_id_2.to_buffer()], + None, + platform_version, + ) + .expect("should not error when proving token statuses"); + + // Verify proof + let proved_token_statuses: BTreeMap<[u8; 32], Option> = + Drive::verify_token_statuses( + proof.as_slice(), + &[token_id_1.to_buffer(), token_id_2.to_buffer()], + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert the token statuses match expected values + assert_eq!( + proved_token_statuses, + BTreeMap::from([ + ( + token_id_1.to_buffer(), + Some(TokenStatus::V0(TokenStatusV0 { paused: true })) + ), + (token_id_2.to_buffer(), None), + ]), + "unexpected token statuses" + ); + } + + #[test] + fn should_prove_no_token_statuses_for_non_existent_tokens() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let non_existent_token_id = [0u8; 32]; // A token ID that doesn't exist in the database + + // Generate proof + let proof = drive + .prove_token_statuses_v0(&[non_existent_token_id], None, platform_version) + .expect("should not error when proving token statuses for non-existent tokens"); + + // Verify proof + let proved_token_statuses: BTreeMap<[u8; 32], Option> = + Drive::verify_token_statuses( + proof.as_slice(), + &[non_existent_token_id], + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert that the token status is `None` for the non-existent token + assert_eq!( + proved_token_statuses, + BTreeMap::from([(non_existent_token_id, None)]), + "unexpected token statuses for non-existent tokens" + ); + } +} diff --git a/packages/rs-drive/src/drive/tokens/system/fetch_token_total_aggregated_identity_balances/mod.rs b/packages/rs-drive/src/drive/tokens/system/fetch_token_total_aggregated_identity_balances/mod.rs new file mode 100644 index 0000000000..aac5a63ff6 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/fetch_token_total_aggregated_identity_balances/mod.rs @@ -0,0 +1,74 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::balances::credits::TokenAmount; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Fetches token's total aggregated_identity_balances + pub fn fetch_token_total_aggregated_identity_balances( + &self, + token_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .fetch + .token_total_aggregated_identity_balances + { + 0 => self.fetch_token_total_aggregated_identity_balances_v0( + token_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_token_total_aggregated_identity_balances".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds the operations of fetching the token total aggregated_identity_balances + pub fn fetch_token_total_aggregated_identity_balances_add_to_operations( + &self, + token_id: [u8; 32], + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .fetch + .token_total_aggregated_identity_balances + { + 0 => self.fetch_token_total_aggregated_identity_balances_add_to_operations_v0( + token_id, + estimated_costs_only_with_layer_info, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_token_total_aggregated_identity_balances_add_to_operations" + .to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/system/fetch_token_total_aggregated_identity_balances/v0/mod.rs b/packages/rs-drive/src/drive/tokens/system/fetch_token_total_aggregated_identity_balances/v0/mod.rs new file mode 100644 index 0000000000..035091d052 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/fetch_token_total_aggregated_identity_balances/v0/mod.rs @@ -0,0 +1,75 @@ +use crate::drive::tokens::paths::token_balances_root_path; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use crate::util::grove_operations::QueryTarget::QueryTargetValue; +use dpp::balances::credits::TokenAmount; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; +use std::collections::HashMap; + +impl Drive { + pub(super) fn fetch_token_total_aggregated_identity_balances_v0( + &self, + token_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut drive_operations = vec![]; + + self.fetch_token_total_aggregated_identity_balances_add_to_operations_v0( + token_id, + &mut None, + transaction, + &mut drive_operations, + platform_version, + ) + } + + pub(super) fn fetch_token_total_aggregated_identity_balances_add_to_operations_v0( + &self, + token_id: [u8; 32], + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + // If we only estimate, add estimation costs + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info { + // Add your estimation logic similar to add_to_system_credits_operations_v0 + // For example: + Self::add_estimation_costs_for_token_balances( + token_id, + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + + let direct_query_type = if estimated_costs_only_with_layer_info.is_none() { + DirectQueryType::StatefulDirectQuery + } else { + DirectQueryType::StatelessDirectQuery { + in_tree_type: TreeType::BigSumTree, + query_target: QueryTargetValue(8), + } + }; + + let tokens_root_path = token_balances_root_path(); + + let total_token_aggregated_identity_balances_in_platform = self + .grove_get_raw_value_u64_from_encoded_var_vec( + (&tokens_root_path).into(), + &token_id, + direct_query_type, + transaction, + drive_operations, + &platform_version.drive, + )?; + + Ok(total_token_aggregated_identity_balances_in_platform) + } +} diff --git a/packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/mod.rs b/packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/mod.rs new file mode 100644 index 0000000000..fac0478a0e --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/mod.rs @@ -0,0 +1,69 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::balances::credits::TokenAmount; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Fetches token's total supply + pub fn fetch_token_total_supply( + &self, + token_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .fetch + .token_total_supply + { + 0 => self.fetch_token_total_supply_v0(token_id, transaction, platform_version), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_token_total_supply".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Adds the operations of fetching the token total supply + pub fn fetch_token_total_supply_add_to_operations( + &self, + token_id: [u8; 32], + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .fetch + .token_total_supply + { + 0 => self.fetch_token_total_supply_add_to_operations_v0( + token_id, + estimated_costs_only_with_layer_info, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_token_total_supply_add_to_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/v0/mod.rs b/packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/v0/mod.rs new file mode 100644 index 0000000000..2d92c49bf3 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/v0/mod.rs @@ -0,0 +1,72 @@ +use crate::drive::balances::total_tokens_root_supply_path; +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use crate::util::grove_operations::DirectQueryType; +use crate::util::grove_operations::QueryTarget::QueryTargetValue; +use dpp::balances::credits::TokenAmount; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; +use std::collections::HashMap; + +impl Drive { + pub(super) fn fetch_token_total_supply_v0( + &self, + token_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let mut drive_operations = vec![]; + + self.fetch_token_total_supply_add_to_operations_v0( + token_id, + &mut None, + transaction, + &mut drive_operations, + platform_version, + ) + } + + pub(super) fn fetch_token_total_supply_add_to_operations_v0( + &self, + token_id: [u8; 32], + estimated_costs_only_with_layer_info: &mut Option< + HashMap, + >, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + // If we only estimate, add estimation costs + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info { + // Add your estimation logic similar to add_to_system_credits_operations_v0 + // For example: + Self::add_estimation_costs_for_token_total_supply( + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + + let direct_query_type = if estimated_costs_only_with_layer_info.is_none() { + DirectQueryType::StatefulDirectQuery + } else { + DirectQueryType::StatelessDirectQuery { + in_tree_type: TreeType::BigSumTree, + query_target: QueryTargetValue(8), + } + }; + + let path_holding_total_token_supply = total_tokens_root_supply_path(); + let total_token_supply_in_platform = self.grove_get_raw_value_u64_from_encoded_var_vec( + (&path_holding_total_token_supply).into(), + &token_id, + direct_query_type, + transaction, + drive_operations, + &platform_version.drive, + )?; + + Ok(total_token_supply_in_platform) + } +} diff --git a/packages/rs-drive/src/drive/tokens/system/mod.rs b/packages/rs-drive/src/drive/tokens/system/mod.rs index 8d0f456d61..e9fcbd0c30 100644 --- a/packages/rs-drive/src/drive/tokens/system/mod.rs +++ b/packages/rs-drive/src/drive/tokens/system/mod.rs @@ -1,3 +1,6 @@ mod add_to_token_total_supply; mod create_token_trees; +mod fetch_token_total_aggregated_identity_balances; +mod fetch_token_total_supply; +mod prove_token_total_supply_and_aggregated_identity_balances; mod remove_from_token_total_supply; diff --git a/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/mod.rs b/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/mod.rs new file mode 100644 index 0000000000..26f2ad535f --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/mod.rs @@ -0,0 +1,40 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::balances::credits::TokenAmount; +use dpp::version::PlatformVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::{EstimatedLayerInformation, TransactionArg}; +use std::collections::HashMap; + +impl Drive { + /// Proves token's total supply and aggregated identity balances + pub fn prove_token_total_supply_and_aggregated_identity_balances( + &self, + token_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .token + .prove + .total_supply_and_aggregated_identity_balances + { + 0 => self.prove_token_total_supply_and_aggregated_identity_balances_v0( + token_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_token_total_supply_and_aggregated_identity_balances".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/v0/mod.rs b/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/v0/mod.rs new file mode 100644 index 0000000000..7dde90d7ef --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/v0/mod.rs @@ -0,0 +1,257 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn prove_token_total_supply_and_aggregated_identity_balances_v0( + &self, + token_id: [u8; 32], + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.prove_token_total_supply_and_aggregated_identity_balances_add_operations_v0( + token_id, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn prove_token_total_supply_and_aggregated_identity_balances_add_operations_v0( + &self, + token_id: [u8; 32], + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let combined_path_query = Drive::token_total_supply_and_aggregated_identity_balances_query( + token_id, + platform_version, + )?; + self.grove_get_proved_path_query( + &combined_path_query, + transaction, + drive_operations, + &platform_version.drive, + ) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::block::block_info::BlockInfo; + use dpp::data_contract::accessors::v1::DataContractV1Getters; + use dpp::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; + use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; + use dpp::data_contract::config::v0::DataContractConfigV0; + use dpp::data_contract::config::DataContractConfig; + use dpp::data_contract::v1::DataContractV1; + use dpp::prelude::DataContract; + use dpp::version::PlatformVersion; + use std::collections::BTreeMap; + + #[test] + fn should_prove_token_total_supply_and_aggregated_identity_balances() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + // Create a data contract with a token + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + + let token_id = contract.token_id(0).expect("expected token at position 0"); + + // Insert contract into Drive + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Mint tokens for identity accounts + let identity_1 = [1u8; 32]; + let identity_2 = [2u8; 32]; + + drive + .token_mint( + token_id.to_buffer(), + identity_1, + 50_000, + true, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to mint tokens for identity 1"); + + drive + .token_mint( + token_id.to_buffer(), + identity_2, + 50_000, + true, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to mint tokens for identity 2"); + + // Prove token total supply and aggregated identity balances + let proof = drive + .prove_token_total_supply_and_aggregated_identity_balances( + token_id.to_buffer(), + None, + platform_version, + ) + .expect("should not error when proving total supply and balances"); + + // Verify proof + let (root_hash, total_single_token_balance) = + Drive::verify_token_total_supply_and_aggregated_identity_balance( + proof.as_slice(), + token_id.to_buffer(), + false, + platform_version, + ) + .expect("expected proof verification to succeed"); + + // Assert root hash is not empty + assert!(!root_hash.is_empty(), "expected a valid root hash"); + + // Assert total supply matches aggregated identity balances + // The contract was created with 100k, then 50k to each identity + assert_eq!( + total_single_token_balance.token_supply, 200_000, + "unexpected token supply" + ); + assert_eq!( + total_single_token_balance.aggregated_token_account_balances, 200_000, + "unexpected aggregated token account balances" + ); + + // Assert that the total balance is valid + assert!( + total_single_token_balance + .ok() + .expect("expected total balance to be valid"), + "unexpected total balance validation failure" + ); + } + + #[test] + fn should_prove_token_total_supply_and_aggregated_identity_balances_for_empty_token() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + // Create a data contract with a token + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + + let token_id = contract.token_id(0).expect("expected token at position 0"); + + // Insert contract into Drive + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Prove token total supply and aggregated identity balances for a token with no supply + let proof = drive + .prove_token_total_supply_and_aggregated_identity_balances_v0( + token_id.to_buffer(), + None, + platform_version, + ) + .expect("should not error when proving total supply and balances"); + + // Verify proof + let (root_hash, total_single_token_balance) = + Drive::verify_token_total_supply_and_aggregated_identity_balance( + proof.as_slice(), + token_id.to_buffer(), + false, + platform_version, + ) + .expect("expected proof verification to succeed"); + + // Assert root hash is not empty + assert!(!root_hash.is_empty(), "expected a valid root hash"); + + // Assert total supply matches aggregated identity balances + assert_eq!( + total_single_token_balance.token_supply, 0, + "unexpected token supply" + ); + assert_eq!( + total_single_token_balance.aggregated_token_account_balances, 0, + "unexpected aggregated token account balances" + ); + + // Assert that the total balance is valid + assert!( + total_single_token_balance + .ok() + .expect("expected total balance to be valid"), + "unexpected total balance validation failure" + ); + } +} diff --git a/packages/rs-drive/src/error/proof.rs b/packages/rs-drive/src/error/proof.rs index 504aa11f55..b2c14a57ed 100644 --- a/packages/rs-drive/src/error/proof.rs +++ b/packages/rs-drive/src/error/proof.rs @@ -30,6 +30,13 @@ pub enum ProofError { #[error("incorrect proof error: {0}")] IncorrectProof(String), + /// The proof returned is said to be valid, data is what we asked for, but is not what was + /// expected, for example we ask for token balance, and we get that the token does not exist. + /// UnexpectedResultProof is most likely is a User error. + /// IncorrectProof is most likely a system error. + #[error("unexpected result in proof error: {0}")] + UnexpectedResultProof(String), + /// The transition we are trying to prove was executed is invalid #[error("invalid transition error: {0}")] InvalidTransition(String), @@ -85,5 +92,6 @@ fn get_error_code(error: &ProofError) -> u32 { ProofError::ErrorRetrievingContract(_) => 6010, ProofError::InvalidMetadata(_) => 6011, ProofError::MissingContextRequirement(_) => 6012, + ProofError::UnexpectedResultProof(_) => 6013, } } diff --git a/packages/rs-drive/src/verify/tokens/mod.rs b/packages/rs-drive/src/verify/tokens/mod.rs index 9110a47eed..91e8d10e09 100644 --- a/packages/rs-drive/src/verify/tokens/mod.rs +++ b/packages/rs-drive/src/verify/tokens/mod.rs @@ -1,2 +1,6 @@ +mod verify_token_balances_for_identity_id; mod verify_token_balances_for_identity_ids; +mod verify_token_infos_for_identity_id; mod verify_token_infos_for_identity_ids; +mod verify_token_statuses; +mod verify_token_total_supply_and_aggregated_identity_balance; diff --git a/packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_id/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_id/mod.rs new file mode 100644 index 0000000000..dd2c088859 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_id/mod.rs @@ -0,0 +1,75 @@ +mod v0; + +use crate::drive::Drive; +use dpp::balances::credits::TokenAmount; + +use crate::error::drive::DriveError; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the balances of tokens held by a specific identity using a cryptographic proof. + /// + /// This method checks the cryptographic proof to verify the balances of a list of tokens + /// associated with the given identity ID. It dispatches to version-specific implementations + /// based on the platform version. + /// + /// # Parameters + /// - `proof`: The cryptographic proof to verify. + /// - `token_ids`: A list of token IDs to verify (each a 32-byte array). + /// - `identity_id`: The unique identifier of the identity (32-byte array). + /// - `verify_subset_of_proof`: Whether to verify only a subset of the proof. + /// - `platform_version`: The current platform version. + /// + /// # Returns + /// - `Ok((RootHash, T))`: + /// - `RootHash`: The verified root hash of the database. + /// - `T`: A collection of `(token ID, token balance)` pairs. + /// + /// # Errors + /// - `Error::Drive(DriveError::UnknownVersionMismatch)`: + /// - Occurs when the platform version does not match any known version for this method. + /// - `Error::Proof(ProofError::WrongElementCount)`: + /// - If the number of elements in the proof does not match the number of token IDs. + /// - `Error::Proof(ProofError::IncorrectValueSize)`: + /// - If the token ID size or proof value size is invalid. + /// - `Error::Proof(ProofError::InvalidSumItemValue)`: + /// - If the proof element does not represent a valid sum item. + /// - `Error::Proof(ProofError::InvalidItemType)`: + /// - If the proof element is not a sum item as expected for balances. + pub fn verify_token_balances_for_identity_id< + T: FromIterator<(I, Option)>, + I: From<[u8; 32]>, + >( + proof: &[u8], + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + match platform_version + .drive + .methods + .verify + .token + .verify_token_balances_for_identity_id + { + 0 => Self::verify_token_balances_for_identity_id_v0( + proof, + token_ids, + identity_id, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_token_balances_for_identity_id".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_id/v0/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_id/v0/mod.rs new file mode 100644 index 0000000000..a894346132 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_balances_for_identity_id/v0/mod.rs @@ -0,0 +1,72 @@ +use crate::drive::Drive; +use grovedb::Element::SumItem; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::balances::credits::TokenAmount; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_token_balances_for_identity_id_v0< + T: FromIterator<(I, Option)>, + I: From<[u8; 32]>, + >( + proof: &[u8], + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + let path_query = Self::token_balances_for_identity_id_query(token_ids, identity_id); + let (root_hash, proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + } else { + GroveDb::verify_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + }; + if proved_key_values.len() == token_ids.len() { + let values = proved_key_values + .into_iter() + .map(|proved_key_value| { + let token_id: [u8; 32] = proved_key_value + .0 + .get(2) + .ok_or(Error::Proof(ProofError::IncorrectValueSize( + "path should have at least 3 elements in returned proof", + )))? + .clone() + .try_into() + .map_err(|_| { + Error::Proof(ProofError::IncorrectValueSize("token id size")) + })?; + match proved_key_value.2 { + Some(SumItem(value, ..)) => { + Ok((token_id.into(), Some(value as TokenAmount))) + } + None => Ok((token_id.into(), None)), + _ => Err(Error::Proof(ProofError::IncorrectValueSize( + "proof did not point to a sum item", + ))), + } + }) + .collect::>()?; + Ok((root_hash, values)) + } else { + Err(Error::Proof(ProofError::WrongElementCount { + expected: token_ids.len(), + got: proved_key_values.len(), + })) + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_id/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_id/mod.rs new file mode 100644 index 0000000000..e0a39d6263 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_id/mod.rs @@ -0,0 +1,74 @@ +mod v0; + +use crate::drive::Drive; +use dpp::tokens::info::IdentityTokenInfo; + +use crate::error::drive::DriveError; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies token information for a specific identity using a cryptographic proof. + /// + /// This method retrieves information about the specified tokens for a given identity ID from the + /// cryptographic proof. It dispatches to version-specific implementations based on the platform version. + /// + /// # Parameters + /// - `proof`: The cryptographic proof to verify. + /// - `token_ids`: A list of token IDs to verify (each a 32-byte array). + /// - `identity_id`: The unique identifier of the identity (32-byte array). + /// - `verify_subset_of_proof`: Whether to verify only a subset of the proof. + /// - `platform_version`: The current platform version. + /// + /// # Returns + /// - `Ok((RootHash, T))`: + /// - `RootHash`: The verified root hash of the database. + /// - `T`: A collection of `(token ID, token info)` pairs. + /// + /// # Errors + /// - `Error::Drive(DriveError::UnknownVersionMismatch)`: + /// - Occurs when the platform version does not match any known version for this method. + /// - `Error::Proof(ProofError::WrongElementCount)`: + /// - If the number of elements in the proof does not match the number of token IDs. + /// - `Error::Proof(ProofError::IncorrectValueSize)`: + /// - If the token ID size or proof value size is invalid. + /// - `Error::Proof(ProofError::DeserializationFailed)`: + /// - If the token info cannot be deserialized from the proof. + /// - `Error::Proof(ProofError::InvalidItemType)`: + /// - If the proof element is not an expected item type (e.g., `Item`). + pub fn verify_token_infos_for_identity_id< + T: FromIterator<(I, Option)>, + I: From<[u8; 32]>, + >( + proof: &[u8], + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + match platform_version + .drive + .methods + .verify + .token + .verify_token_infos_for_identity_id + { + 0 => Self::verify_token_infos_for_identity_id_v0( + proof, + token_ids, + identity_id, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_token_infos_for_identity_id".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_id/v0/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_id/v0/mod.rs new file mode 100644 index 0000000000..e94d164d31 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_infos_for_identity_id/v0/mod.rs @@ -0,0 +1,74 @@ +use crate::drive::Drive; +use grovedb::Element::Item; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::serialization::PlatformDeserializable; +use dpp::tokens::info::IdentityTokenInfo; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_token_infos_for_identity_id_v0< + T: FromIterator<(I, Option)>, + I: From<[u8; 32]>, + >( + proof: &[u8], + token_ids: &[[u8; 32]], + identity_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + let path_query = Self::token_infos_for_identity_id_query(token_ids, identity_id); + let (root_hash, proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + } else { + GroveDb::verify_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + }; + if proved_key_values.len() == token_ids.len() { + let values = proved_key_values + .into_iter() + .map(|proved_key_value| { + let token_id: [u8; 32] = proved_key_value + .0 + .get(2) + .ok_or(Error::Proof(ProofError::IncorrectProof( + "path should have at least 3 elements in returned proof".to_string(), + )))? + .clone() + .try_into() + .map_err(|_| { + Error::Proof(ProofError::IncorrectValueSize("token id size")) + })?; + match proved_key_value.2 { + Some(Item(value, ..)) => Ok(( + token_id.into(), + Some(IdentityTokenInfo::deserialize_from_bytes(&value)?), + )), + None => Ok((token_id.into(), None)), + _ => Err(Error::Proof(ProofError::IncorrectProof( + "proof did not point to an item as expected for token info".to_string(), + ))), + } + }) + .collect::>()?; + Ok((root_hash, values)) + } else { + Err(Error::Proof(ProofError::WrongElementCount { + expected: token_ids.len(), + got: proved_key_values.len(), + })) + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_statuses/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_statuses/mod.rs new file mode 100644 index 0000000000..7b7e9b8287 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_statuses/mod.rs @@ -0,0 +1,68 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use dpp::tokens::info::IdentityTokenInfo; +use dpp::tokens::status::TokenStatus; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the statuses of multiple tokens using a cryptographic proof. + /// + /// This method validates the cryptographic proof to retrieve the statuses of the specified token IDs. + /// It dispatches to version-specific implementations based on the provided platform version. + /// + /// # Parameters + /// - `proof`: The cryptographic proof to verify. + /// - `token_ids`: A list of token IDs to verify (each a 32-byte array). + /// - `verify_subset_of_proof`: Whether to verify only a subset of the proof. + /// - `platform_version`: The current platform version. + /// + /// # Returns + /// - `Ok((RootHash, T))`: + /// - `RootHash`: The verified root hash of the database. + /// - `T`: A collection of `(token ID, token status)` pairs. + /// + /// # Errors + /// - `Error::Drive(DriveError::UnknownVersionMismatch)`: + /// - Occurs when the platform version does not match any known version for this method. + /// - `Error::Proof(ProofError::WrongElementCount)`: + /// - If the number of elements in the proof does not match the number of token IDs. + /// - `Error::Proof(ProofError::IncorrectValueSize)`: + /// - If the token ID size or proof value size is invalid. + /// - `Error::Proof(ProofError::DeserializationFailed)`: + /// - If the token status cannot be deserialized from the proof. + /// - `Error::Proof(ProofError::InvalidItemType)`: + /// - If the proof element is not an expected item type (e.g., `Item`). + pub fn verify_token_statuses)>, I: From<[u8; 32]>>( + proof: &[u8], + token_ids: &[[u8; 32]], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + match platform_version + .drive + .methods + .verify + .token + .verify_token_statuses + { + 0 => Self::verify_token_statuses_v0( + proof, + token_ids, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_token_statuses".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_statuses/v0/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_statuses/v0/mod.rs new file mode 100644 index 0000000000..aa6ad189c0 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_statuses/v0/mod.rs @@ -0,0 +1,65 @@ +use crate::drive::Drive; +use grovedb::Element::Item; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::serialization::PlatformDeserializable; +use dpp::tokens::status::TokenStatus; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_token_statuses_v0< + T: FromIterator<(I, Option)>, + I: From<[u8; 32]>, + >( + proof: &[u8], + token_ids: &[[u8; 32]], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + let path_query = Self::token_statuses_query(token_ids); + let (root_hash, proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + } else { + GroveDb::verify_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + }; + if proved_key_values.len() == token_ids.len() { + let values = proved_key_values + .into_iter() + .map(|proved_key_value| { + let token_id: [u8; 32] = proved_key_value.1.try_into().map_err(|_| { + Error::Proof(ProofError::IncorrectValueSize("token id size")) + })?; + match proved_key_value.2 { + Some(Item(value, ..)) => Ok(( + token_id.into(), + Some(TokenStatus::deserialize_from_bytes(&value)?), + )), + None => Ok((token_id.into(), None)), + _ => Err(Error::Proof(ProofError::IncorrectValueSize( + "proof did not point to an item as expected for token info", + ))), + } + }) + .collect::>()?; + Ok((root_hash, values)) + } else { + Err(Error::Proof(ProofError::WrongElementCount { + expected: token_ids.len(), + got: proved_key_values.len(), + })) + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_total_supply_and_aggregated_identity_balance/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_total_supply_and_aggregated_identity_balance/mod.rs new file mode 100644 index 0000000000..1c2b950104 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_total_supply_and_aggregated_identity_balance/mod.rs @@ -0,0 +1,69 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use dpp::balances::credits::TokenAmount; +use dpp::balances::total_single_token_balance::TotalSingleTokenBalance; +use dpp::balances::total_tokens_balance::TotalTokensBalance; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the total token supply and aggregated identity balances for a given token. + /// + /// This method checks the cryptographic proof to verify the total supply of a token and the + /// aggregated balances of identities associated with that token. It dispatches to version-specific + /// implementations based on the provided platform version. + /// + /// # Parameters + /// - `proof`: The cryptographic proof to verify. + /// - `token_id`: The unique identifier of the token (32-byte array). + /// - `verify_subset_of_proof`: Whether to verify only a subset of the proof. + /// - `platform_version`: The current platform version. + /// + /// # Returns + /// - `Ok((RootHash, TotalSingleTokenBalance))`: + /// - `RootHash`: The verified root hash of the database. + /// - `TotalSingleTokenBalance`: The total supply and aggregated identity balances of the token. + /// + /// # Errors + /// - `Error::Drive(DriveError::UnknownVersionMismatch)`: + /// - Occurs when the platform version does not match any known version for this method. + /// - `Error::Proof(ProofError::UnexpectedResultProof)`: + /// - If the token does not exist in the proof. + /// - If the token's supply is not found in the proof. + /// - `Error::Proof(ProofError::WrongElementCount)`: + /// - If the proof does not contain exactly two expected elements (total supply and aggregated balances). + /// - `Error::Proof(ProofError::InvalidSumItemValue)`: + /// - If the retrieved proof element is not a valid sum item. + pub fn verify_token_total_supply_and_aggregated_identity_balance( + proof: &[u8], + token_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, TotalSingleTokenBalance), Error> { + match platform_version + .drive + .methods + .verify + .token + .verify_token_total_supply_and_aggregated_identity_balance + { + 0 => Self::verify_token_total_supply_and_aggregated_identity_balance_v0( + proof, + token_id, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_token_total_supply_and_aggregated_identity_balance".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_total_supply_and_aggregated_identity_balance/v0/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_total_supply_and_aggregated_identity_balance/v0/mod.rs new file mode 100644 index 0000000000..5fd81f013f --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_total_supply_and_aggregated_identity_balance/v0/mod.rs @@ -0,0 +1,73 @@ +use crate::drive::Drive; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::balances::total_single_token_balance::TotalSingleTokenBalance; +use dpp::prelude::Identifier; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_token_total_supply_and_aggregated_identity_balance_v0( + proof: &[u8], + token_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, TotalSingleTokenBalance), Error> { + let path_query = Self::token_total_supply_and_aggregated_identity_balances_query( + token_id, + platform_version, + )?; + let (root_hash, proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + } else { + GroveDb::verify_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + }; + if proved_key_values.len() == 2 { + let ( + _aggregated_identity_balances_path, + _aggregated_identity_balances_key, + Some(aggregated_identity_balances_element), + ) = proved_key_values.get(0).unwrap() + else { + return Err(Error::Proof(ProofError::UnexpectedResultProof(format!( + "Token {} most likely does not exist", + Identifier::new(token_id) + )))); + }; + let (_total_supply_path, _total_supply_key, Some(total_supply_element)) = + proved_key_values.get(1).unwrap() + else { + return Err(Error::Proof(ProofError::UnexpectedResultProof(format!( + "Token {} has no known supply", + Identifier::new(token_id) + )))); + }; + + Ok(( + root_hash, + TotalSingleTokenBalance { + token_supply: total_supply_element.as_sum_item_value()?, + aggregated_token_account_balances: aggregated_identity_balances_element + .as_sum_tree_value()?, + }, + )) + } else { + Err(Error::Proof(ProofError::WrongElementCount { + expected: 2, + got: proved_key_values.len(), + })) + } + } +} diff --git a/packages/rs-platform-version/Cargo.toml b/packages/rs-platform-version/Cargo.toml index e7e66db2df..f7b1c45da6 100644 --- a/packages/rs-platform-version/Cargo.toml +++ b/packages/rs-platform-version/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" thiserror = { version = "1.0.63" } bincode = { version = "2.0.0-rc.3" } versioned-feature-core = { git = "https://github.com/dashpay/versioned-feature-core", version = "1.0.0" } -grovedb-version = { git = "https://github.com/dashpay/grovedb", rev= "d8ae2d95f56381b4d104d3983b2f11ae3a968dc7" } +grovedb-version = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" } once_cell = "1.19.0" [features] diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs index 7faf75df46..bb2e8559b7 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs @@ -30,6 +30,7 @@ pub struct DriveAbciQueryTokenVersions { pub identities_token_infos: FeatureVersionBounds, pub identity_token_infos: FeatureVersionBounds, pub token_statuses: FeatureVersionBounds, + pub token_total_supply: FeatureVersionBounds, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs index e4bb8e03fb..2db3bde39c 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs @@ -99,6 +99,11 @@ pub const DRIVE_ABCI_QUERY_VERSIONS_V1: DriveAbciQueryVersions = DriveAbciQueryV max_version: 0, default_current_version: 0, }, + token_total_supply: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, }, validator_queries: DriveAbciQueryValidatorVersions { proposed_block_counts_by_evonode_ids: FeatureVersionBounds { diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs index e10ff81316..e7341f1f6f 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/mod.rs @@ -20,6 +20,8 @@ pub struct DriveTokenFetchMethodVersions { pub identities_token_infos: FeatureVersion, pub token_statuses: FeatureVersion, pub token_status: FeatureVersion, + pub token_total_supply: FeatureVersion, + pub token_total_aggregated_identity_balances: FeatureVersion, } #[derive(Clone, Debug, Default)] @@ -31,6 +33,7 @@ pub struct DriveTokenProveMethodVersions { pub identity_token_infos: FeatureVersion, pub identities_token_infos: FeatureVersion, pub token_statuses: FeatureVersion, + pub total_supply_and_aggregated_identity_balances: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs index 9b8f9d83ad..0d552a4313 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_token_method_versions/v1.rs @@ -13,6 +13,8 @@ pub const DRIVE_TOKEN_METHOD_VERSIONS_V1: DriveTokenMethodVersions = DriveTokenM identities_token_infos: 0, token_statuses: 0, token_status: 0, + token_total_supply: 0, + token_total_aggregated_identity_balances: 0, }, prove: DriveTokenProveMethodVersions { identity_token_balance: 0, @@ -22,6 +24,7 @@ pub const DRIVE_TOKEN_METHOD_VERSIONS_V1: DriveTokenMethodVersions = DriveTokenM identity_token_infos: 0, identities_token_infos: 0, token_statuses: 0, + total_supply_and_aggregated_identity_balances: 0, }, update: DriveTokenUpdateMethodVersions { create_token_trees: 0, diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs index e23fd54276..5b2309458d 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs @@ -48,6 +48,9 @@ pub struct DriveVerifyTokenMethodVersions { pub verify_token_balances_for_identity_ids: FeatureVersion, pub verify_token_balances_for_identity_id: FeatureVersion, pub verify_token_infos_for_identity_ids: FeatureVersion, + pub verify_token_infos_for_identity_id: FeatureVersion, + pub verify_token_statuses: FeatureVersion, + pub verify_token_total_supply_and_aggregated_identity_balance: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs index 56813f3b0b..0daa0cdd0b 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs @@ -33,6 +33,9 @@ pub const DRIVE_VERIFY_METHOD_VERSIONS_V1: DriveVerifyMethodVersions = DriveVeri verify_token_balances_for_identity_ids: 0, verify_token_balances_for_identity_id: 0, verify_token_infos_for_identity_ids: 0, + verify_token_infos_for_identity_id: 0, + verify_token_statuses: 0, + verify_token_total_supply_and_aggregated_identity_balance: 0, }, single_document: DriveVerifySingleDocumentMethodVersions { verify_proof: 0, diff --git a/packages/rs-platform-version/src/version/mocks/v2_test.rs b/packages/rs-platform-version/src/version/mocks/v2_test.rs index 26c64a4d7c..9dc5f2d253 100644 --- a/packages/rs-platform-version/src/version/mocks/v2_test.rs +++ b/packages/rs-platform-version/src/version/mocks/v2_test.rs @@ -237,6 +237,11 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { max_version: 0, default_current_version: 0, }, + token_total_supply: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, }, validator_queries: DriveAbciQueryValidatorVersions { proposed_block_counts_by_evonode_ids: FeatureVersionBounds { From e5964b8585a1ac83eced9536c074470eb133051b Mon Sep 17 00:00:00 2001 From: QuantumExplorer Date: Mon, 20 Jan 2025 23:31:50 +0700 Subject: [PATCH 3/6] feat: group queries (#2432) --- .../protos/platform/v0/platform.proto | 134 ++++- .../token_configuration/accessors/v0/mod.rs | 9 +- .../token_configuration/v0/accessors.rs | 9 +- .../token_configuration/v0/mod.rs | 10 +- .../rs-dpp/src/group/group_action_status.rs | 29 + packages/rs-dpp/src/group/mod.rs | 2 + .../v0/mod.rs | 5 +- .../group_queries/group_action_signers/mod.rs | 62 ++ .../group_action_signers/v0/mod.rs | 110 ++++ .../query/group_queries/group_actions/mod.rs | 59 ++ .../group_queries/group_actions/v0/mod.rs | 242 ++++++++ .../query/group_queries/group_info/v0/mod.rs | 2 +- .../query/group_queries/group_infos/v0/mod.rs | 2 +- .../src/query/group_queries/mod.rs | 2 + packages/rs-drive-abci/src/query/service.rs | 44 +- .../for_add_group_action/v0/mod.rs | 6 +- .../group/fetch/fetch_action_infos/mod.rs | 128 +++++ .../group/fetch/fetch_action_infos/v0/mod.rs | 86 +++ .../group/fetch/fetch_action_signers/mod.rs | 133 +++++ .../fetch/fetch_action_signers/v0/mod.rs | 78 +++ .../mod.rs | 16 +- .../v0/mod.rs | 4 +- .../rs-drive/src/drive/group/fetch/mod.rs | 4 +- .../rs-drive/src/drive/group/fetch/queries.rs | 87 ++- .../group/insert/add_group_action/v0/mod.rs | 6 +- packages/rs-drive/src/drive/group/paths.rs | 4 +- .../rs-drive/src/drive/group/prove/mod.rs | 2 + .../group/prove/prove_action_infos/mod.rs | 132 +++++ .../group/prove/prove_action_infos/v0/mod.rs | 536 ++++++++++++++++++ .../group/prove/prove_action_signers/mod.rs | 124 ++++ .../prove/prove_action_signers/v0/mod.rs | 479 ++++++++++++++++ .../drive/group/prove/prove_group_info/mod.rs | 5 +- .../group/prove/prove_group_info/v0/mod.rs | 154 +++++ .../group/prove/prove_group_infos/mod.rs | 2 - .../group/prove/prove_group_infos/v0/mod.rs | 317 +++++++++++ .../src/drive/tokens/balance/queries.rs | 4 +- .../calculate_total_tokens_balance/mod.rs | 1 - .../rs-drive/src/drive/tokens/info/queries.rs | 3 +- .../mod.rs | 6 +- .../v0/mod.rs | 4 +- packages/rs-drive/src/verify/group/mod.rs | 4 + .../verify/group/verify_action_signers/mod.rs | 78 +++ .../group/verify_action_signers/v0/mod.rs | 72 +++ .../group/verify_active_action_infos/mod.rs | 81 +++ .../verify_active_action_infos/v0/mod.rs | 74 +++ .../src/verify/group/verify_group_info/mod.rs | 69 +++ .../verify/group/verify_group_info/v0/mod.rs | 57 ++ .../verify_group_infos_in_contract/mod.rs | 77 +++ .../verify_group_infos_in_contract/v0/mod.rs | 79 +++ packages/rs-drive/src/verify/mod.rs | 6 +- .../tokens/verify_token_statuses/mod.rs | 1 - .../mod.rs | 7 +- .../drive_abci_query_versions/mod.rs | 2 + .../drive_abci_query_versions/v1.rs | 10 + .../drive_group_method_versions/mod.rs | 6 +- .../drive_group_method_versions/v1.rs | 6 +- .../drive_verify_method_versions/mod.rs | 8 + .../drive_verify_method_versions/v1.rs | 7 +- .../src/version/mocks/v2_test.rs | 10 + 59 files changed, 3591 insertions(+), 105 deletions(-) create mode 100644 packages/rs-dpp/src/group/group_action_status.rs create mode 100644 packages/rs-drive-abci/src/query/group_queries/group_action_signers/mod.rs create mode 100644 packages/rs-drive-abci/src/query/group_queries/group_action_signers/v0/mod.rs create mode 100644 packages/rs-drive-abci/src/query/group_queries/group_actions/mod.rs create mode 100644 packages/rs-drive-abci/src/query/group_queries/group_actions/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_action_infos/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_action_infos/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_action_signers/mod.rs create mode 100644 packages/rs-drive/src/drive/group/fetch/fetch_action_signers/v0/mod.rs rename packages/rs-drive/src/drive/group/fetch/{fetch_action_id_info => fetch_active_action_info}/mod.rs (91%) rename packages/rs-drive/src/drive/group/fetch/{fetch_action_id_info => fetch_active_action_info}/v0/mod.rs (96%) create mode 100644 packages/rs-drive/src/drive/group/prove/prove_action_infos/mod.rs create mode 100644 packages/rs-drive/src/drive/group/prove/prove_action_infos/v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/prove/prove_action_signers/mod.rs create mode 100644 packages/rs-drive/src/drive/group/prove/prove_action_signers/v0/mod.rs create mode 100644 packages/rs-drive/src/verify/group/mod.rs create mode 100644 packages/rs-drive/src/verify/group/verify_action_signers/mod.rs create mode 100644 packages/rs-drive/src/verify/group/verify_action_signers/v0/mod.rs create mode 100644 packages/rs-drive/src/verify/group/verify_active_action_infos/mod.rs create mode 100644 packages/rs-drive/src/verify/group/verify_active_action_infos/v0/mod.rs create mode 100644 packages/rs-drive/src/verify/group/verify_group_info/mod.rs create mode 100644 packages/rs-drive/src/verify/group/verify_group_info/v0/mod.rs create mode 100644 packages/rs-drive/src/verify/group/verify_group_infos_in_contract/mod.rs create mode 100644 packages/rs-drive/src/verify/group/verify_group_infos_in_contract/v0/mod.rs diff --git a/packages/dapi-grpc/protos/platform/v0/platform.proto b/packages/dapi-grpc/protos/platform/v0/platform.proto index 76b2cce105..5a0d8842a6 100644 --- a/packages/dapi-grpc/protos/platform/v0/platform.proto +++ b/packages/dapi-grpc/protos/platform/v0/platform.proto @@ -63,8 +63,8 @@ service Platform { rpc getTokenTotalSupply(GetTokenTotalSupplyRequest) returns (GetTokenTotalSupplyResponse); rpc getGroupInfo(GetGroupInfoRequest) returns (GetGroupInfoResponse); rpc getGroupInfos(GetGroupInfosRequest) returns (GetGroupInfosResponse); -// rpc getActiveGroupActions(GetActiveGroupActionsRequest) returns (GetActiveGroupActionsResponse); -// rpc getClosedGroupActions(GetClosedGroupActionsRequest) returns (GetClosedGroupActionsResponse); + rpc getGroupActions(GetGroupActionsRequest) returns (GetGroupActionsResponse); + rpc getGroupActionSigners(GetGroupActionSignersRequest) returns (GetGroupActionSignersResponse); } // Proof message includes cryptographic proofs for validating responses @@ -1512,70 +1512,125 @@ message GetGroupInfosResponse { } } -message GetActiveGroupActionsRequest { - message GetActiveGroupActionsRequestV0 { +message GetGroupActionsRequest { + enum ActionStatus { + ACTIVE = 0; // Request the active actions + CLOSED = 1; // Request the closed actions + } + + message StartAtActionId { + bytes start_action_id = 1; + bool start_action_id_included = 2; + } + + message GetGroupActionsRequestV0 { bytes contract_id = 1; uint32 group_contract_position = 2; - bool prove = 3; + ActionStatus status = 3; + optional StartAtActionId start_at_action_id = 4; + optional uint32 count = 5; + bool prove = 6; } oneof version { - GetActiveGroupActionsRequestV0 v0 = 1; + GetGroupActionsRequestV0 v0 = 1; } } -message GetActiveGroupActionsResponse { - message GetActiveGroupActionsResponseV0 { +message GetGroupActionsResponse { + message GetGroupActionsResponseV0 { // Mint event message MintEvent { uint64 amount = 1; // Amount to mint bytes recipient_id = 2; // Recipient identifier - string public_note = 3; // Public note + optional string public_note = 3; // Public note } // Burn event message BurnEvent { uint64 amount = 1; // Amount to burn - string public_note = 2; // Public note + optional string public_note = 2; // Public note } // Freeze event message FreezeEvent { bytes frozen_id = 1; // Identifier of the frozen entity - string public_note = 2; // Public note + optional string public_note = 2; // Public note } // Unfreeze event message UnfreezeEvent { bytes frozen_id = 1; // Identifier of the unfrozen entity - string public_note = 2; // Public note + optional string public_note = 2; // Public note } // Destroy frozen funds event message DestroyFrozenFundsEvent { bytes frozen_id = 1; // Identifier of the frozen entity uint64 amount = 2; // Amount to destroy - string public_note = 3; // Public note + optional string public_note = 3; // Public note + } + + // Shared encrypted note + message SharedEncryptedNote { + uint32 sender_key_index = 1; // Sender key index + uint32 recipient_key_index = 2; // Recipient key index + bytes encrypted_data = 3; // Encrypted data + } + + // Personal encrypted note + message PersonalEncryptedNote { + uint32 root_encryption_key_index = 1; // Root encryption key index + uint32 derivation_encryption_key_index = 2; // Derivation encryption key index + bytes encrypted_data = 3; // Encrypted data } // Transfer event message TransferEvent { bytes recipient_id = 1; // Recipient identifier - string public_note = 2; // Public note - bytes shared_encrypted_note = 3; // Shared encrypted note - bytes personal_encrypted_note = 4; // Personal encrypted note + optional string public_note = 2; // Public note + optional SharedEncryptedNote shared_encrypted_note = 3; // Shared encrypted note + optional PersonalEncryptedNote personal_encrypted_note = 4; // Personal encrypted note uint64 amount = 5; // Amount transferred } // Emergency action event message EmergencyActionEvent { - string action_type = 1; // Emergency action type - string public_note = 2; // Public note + // Enum for emergency action types + enum ActionType { + PAUSE = 0; // Pause action + RESUME = 1; // Resume action + } + + ActionType action_type = 1; // Emergency action type + optional string public_note = 2; // Public note } // Event associated with this action message GroupActionEvent { oneof event_type { TokenEvent token_event = 1; // Token event details + DocumentEvent document_event = 2; + ContractEvent contract_event = 3; + } + } + + message DocumentEvent { + oneof type { + DocumentCreateEvent create = 1; // Create event details + } + } + + message DocumentCreateEvent { + bytes created_document = 1; + } + + message ContractUpdateEvent { + bytes updated_contract = 1; + } + + message ContractEvent { + oneof type { + ContractUpdateEvent update = 1; // Contract update event } } @@ -1608,6 +1663,47 @@ message GetActiveGroupActionsResponse { ResponseMetadata metadata = 3; } oneof version { - GetActiveGroupActionsResponseV0 v0 = 1; + GetGroupActionsResponseV0 v0 = 1; + } +} + + +message GetGroupActionSignersRequest { + enum ActionStatus { + ACTIVE = 0; // Request the active actions + CLOSED = 1; // Request the closed actions + } + + message GetGroupActionSignersRequestV0 { + bytes contract_id = 1; + uint32 group_contract_position = 2; + ActionStatus status = 3; + bytes action_id = 4; + bool prove = 5; + } + oneof version { + GetGroupActionSignersRequestV0 v0 = 1; + } +} + +message GetGroupActionSignersResponse { + message GetGroupActionSignersResponseV0 { + message GroupActionSigner { + bytes signer_id = 1; + uint32 power = 2; + } + message GroupActionSigners { + repeated GroupActionSigner signers = 1; + } + + oneof result { + GroupActionSigners group_action_signers = 1; + Proof proof = 2; + } + ResponseMetadata metadata = 3; + } + + oneof version { + GetGroupActionSignersResponseV0 v0 = 1; } } \ No newline at end of file diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/v0/mod.rs index 83fde97a8e..cc1de8cb81 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/v0/mod.rs @@ -1,3 +1,4 @@ +use crate::balances::credits::TokenAmount; use crate::data_contract::associated_token::token_configuration::v0::TokenConfigurationConventionV0; use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; use crate::data_contract::change_control_rules::ChangeControlRules; @@ -13,13 +14,13 @@ pub trait TokenConfigurationV0Getters { fn conventions_mut(&mut self) -> &mut TokenConfigurationConventionV0; /// Returns the base supply. - fn base_supply(&self) -> u64; + fn base_supply(&self) -> TokenAmount; /// Returns the base supply. fn keeps_history(&self) -> bool; fn start_as_paused(&self) -> bool; /// Returns the maximum supply. - fn max_supply(&self) -> Option; + fn max_supply(&self) -> Option; /// Returns the max supply change rules. fn max_supply_change_rules(&self) -> &ChangeControlRules; @@ -63,10 +64,10 @@ pub trait TokenConfigurationV0Setters { fn set_conventions(&mut self, conventions: TokenConfigurationConventionV0); /// Sets the base supply. - fn set_base_supply(&mut self, base_supply: u64); + fn set_base_supply(&mut self, base_supply: TokenAmount); /// Sets the maximum supply. - fn set_max_supply(&mut self, max_supply: Option); + fn set_max_supply(&mut self, max_supply: Option); /// Sets the max supply change rules. fn set_max_supply_change_rules(&mut self, rules: ChangeControlRules); diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/accessors.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/accessors.rs index d0115ead55..60312bd445 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/accessors.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/accessors.rs @@ -1,3 +1,4 @@ +use crate::balances::credits::TokenAmount; use crate::data_contract::associated_token::token_configuration::accessors::v0::{ TokenConfigurationV0Getters, TokenConfigurationV0Setters, }; @@ -22,7 +23,7 @@ impl TokenConfigurationV0Getters for TokenConfigurationV0 { } /// Returns the base supply. - fn base_supply(&self) -> u64 { + fn base_supply(&self) -> TokenAmount { self.base_supply } @@ -37,7 +38,7 @@ impl TokenConfigurationV0Getters for TokenConfigurationV0 { } /// Returns the maximum supply. - fn max_supply(&self) -> Option { + fn max_supply(&self) -> Option { self.max_supply } @@ -115,12 +116,12 @@ impl TokenConfigurationV0Setters for TokenConfigurationV0 { } /// Sets the base supply. - fn set_base_supply(&mut self, base_supply: u64) { + fn set_base_supply(&mut self, base_supply: TokenAmount) { self.base_supply = base_supply; } /// Sets the maximum supply. - fn set_max_supply(&mut self, max_supply: Option) { + fn set_max_supply(&mut self, max_supply: Option) { self.max_supply = max_supply; } diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs index 4aed4bdc11..a192c4ab43 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs @@ -1,5 +1,6 @@ mod accessors; +use crate::balances::credits::TokenAmount; use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; use crate::data_contract::change_control_rules::v0::ChangeControlRulesV0; use crate::data_contract::change_control_rules::ChangeControlRules; @@ -37,10 +38,10 @@ fn default_decimals() -> u16 { pub struct TokenConfigurationV0 { pub conventions: TokenConfigurationConventionV0, /// The supply at the creation of the token - pub base_supply: u64, + pub base_supply: TokenAmount, /// The maximum supply the token can ever have #[serde(default)] - pub max_supply: Option, + pub max_supply: Option, /// Do we keep history, default is true. #[serde(default = "default_keeps_history")] pub keeps_history: bool, @@ -217,4 +218,9 @@ impl TokenConfigurationV0 { main_control_group_can_be_modified: AuthorizedActionTakers::NoOne, } } + + pub fn with_base_supply(mut self, base_supply: TokenAmount) -> Self { + self.base_supply = base_supply; + self + } } diff --git a/packages/rs-dpp/src/group/group_action_status.rs b/packages/rs-dpp/src/group/group_action_status.rs new file mode 100644 index 0000000000..95a7e54dc1 --- /dev/null +++ b/packages/rs-dpp/src/group/group_action_status.rs @@ -0,0 +1,29 @@ +use anyhow::bail; + +#[derive(Debug, PartialEq, PartialOrd, Clone, Eq)] +pub enum GroupActionStatus { + ActionActive, + ActionClosed, +} + +impl TryFrom for GroupActionStatus { + type Error = anyhow::Error; + fn try_from(value: u8) -> Result { + match value { + 0 => Ok(Self::ActionActive), + 1 => Ok(Self::ActionClosed), + value => bail!("unrecognized action status: {}", value), + } + } +} + +impl TryFrom for GroupActionStatus { + type Error = anyhow::Error; + fn try_from(value: i32) -> Result { + match value { + 0 => Ok(Self::ActionActive), + 1 => Ok(Self::ActionClosed), + value => bail!("unrecognized action status: {}", value), + } + } +} diff --git a/packages/rs-dpp/src/group/mod.rs b/packages/rs-dpp/src/group/mod.rs index 1915d41c21..aba7606668 100644 --- a/packages/rs-dpp/src/group/mod.rs +++ b/packages/rs-dpp/src/group/mod.rs @@ -8,6 +8,8 @@ use serde::{Deserialize, Serialize}; pub mod action_event; pub mod group_action; +pub mod group_action_status; + #[derive(Debug, Clone, Copy, Encode, Decode, PartialEq)] pub enum GroupStateTransitionInfoStatus { GroupStateTransitionInfoProposer(GroupContractPosition), diff --git a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs index 4f65b48978..a0537bbd1b 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs @@ -21,10 +21,7 @@ use drive::drive::identity::withdrawals::paths::{ get_withdrawal_root_path, WITHDRAWAL_TRANSACTIONS_BROADCASTED_KEY, WITHDRAWAL_TRANSACTIONS_SUM_AMOUNT_TREE_KEY, }; -use drive::drive::prefunded_specialized_balances::{ - prefunded_specialized_balances_for_voting_path, - prefunded_specialized_balances_for_voting_path_vec, -}; +use drive::drive::prefunded_specialized_balances::prefunded_specialized_balances_for_voting_path_vec; use drive::drive::system::misc_path; use drive::drive::tokens::paths::{ tokens_root_path, TOKEN_BALANCES_KEY, TOKEN_IDENTITY_INFO_KEY, TOKEN_STATUS_INFO_KEY, diff --git a/packages/rs-drive-abci/src/query/group_queries/group_action_signers/mod.rs b/packages/rs-drive-abci/src/query/group_queries/group_action_signers/mod.rs new file mode 100644 index 0000000000..00d2210698 --- /dev/null +++ b/packages/rs-drive-abci/src/query/group_queries/group_action_signers/mod.rs @@ -0,0 +1,62 @@ +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_group_action_signers_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_group_action_signers_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{GetGroupActionSignersRequest, GetGroupActionSignersResponse}; +use dpp::version::PlatformVersion; +mod v0; + +impl Platform { + /// Querying of group action signers + pub fn query_group_action_signers( + &self, + GetGroupActionSignersRequest { version }: GetGroupActionSignersRequest, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let Some(version) = version else { + return Ok(QueryValidationResult::new_with_error( + QueryError::DecodingError( + "could not decode active group action signers query".to_string(), + ), + )); + }; + + let feature_version_bounds = &platform_version + .drive_abci + .query + .group_queries + .group_action_signers; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "group_action_signers".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_group_action_signers_v0( + request_v0, + platform_state, + platform_version, + )?; + Ok(result.map(|response_v0| GetGroupActionSignersResponse { + version: Some(ResponseVersion::V0(response_v0)), + })) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/group_queries/group_action_signers/v0/mod.rs b/packages/rs-drive-abci/src/query/group_queries/group_action_signers/v0/mod.rs new file mode 100644 index 0000000000..ed1ca8c424 --- /dev/null +++ b/packages/rs-drive-abci/src/query/group_queries/group_action_signers/v0/mod.rs @@ -0,0 +1,110 @@ +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_group_action_signers_request::GetGroupActionSignersRequestV0; +use dapi_grpc::platform::v0::get_group_action_signers_response::{ + get_group_action_signers_response_v0, GetGroupActionSignersResponseV0, +}; +use dapi_grpc::platform::v0::get_group_action_signers_response::get_group_action_signers_response_v0::{GroupActionSigner, GroupActionSigners}; +use dpp::check_validation_result_with_data; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; +use drive::error::query::QuerySyntaxError; + +impl Platform { + pub(super) fn query_group_action_signers_v0( + &self, + GetGroupActionSignersRequestV0 { + contract_id, + group_contract_position, + status, + action_id, + prove, + }: GetGroupActionSignersRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let config = &self.config.drive; + let contract_id: Identifier = + check_validation_result_with_data!(contract_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "contract id must be a valid identifier (32 bytes long)".to_string(), + ) + })); + + let action_id: Identifier = + check_validation_result_with_data!(action_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "action id must be a valid identifier (32 bytes long)".to_string(), + ) + })); + + if group_contract_position > u16::MAX as u32 { + return Ok(QueryValidationResult::new_with_error(QueryError::Query( + QuerySyntaxError::InvalidParameter(format!( + "group contract position {} can not be over u16::MAX", + group_contract_position + )), + ))); + } + + let group_status: GroupActionStatus = + check_validation_result_with_data!(status.try_into().map_err(|_| { + QueryError::InvalidArgument( + "group action status must be Active or Closed".to_string(), + ) + })); + + let response = if prove { + let proof = check_validation_result_with_data!(self.drive.prove_action_signers( + contract_id, + group_contract_position as GroupContractPosition, + group_status, + action_id, + None, + platform_version, + )); + + GetGroupActionSignersResponseV0 { + result: Some(get_group_action_signers_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let group_action_signers = self + .drive + .fetch_action_signers( + contract_id, + group_contract_position as GroupContractPosition, + group_status, + action_id, + None, + platform_version, + )? + .into_iter() + .map(|(signer_id, power)| GroupActionSigner { + signer_id: signer_id.to_vec(), + power, + }) + .collect(); + GetGroupActionSignersResponseV0 { + result: Some( + get_group_action_signers_response_v0::Result::GroupActionSigners( + GroupActionSigners { + signers: group_action_signers, + }, + ), + ), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive-abci/src/query/group_queries/group_actions/mod.rs b/packages/rs-drive-abci/src/query/group_queries/group_actions/mod.rs new file mode 100644 index 0000000000..51425507b7 --- /dev/null +++ b/packages/rs-drive-abci/src/query/group_queries/group_actions/mod.rs @@ -0,0 +1,59 @@ +use crate::error::query::QueryError; +use crate::error::Error; +use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::PlatformState; +use crate::query::QueryValidationResult; +use dapi_grpc::platform::v0::get_group_actions_request::Version as RequestVersion; +use dapi_grpc::platform::v0::get_group_actions_response::Version as ResponseVersion; +use dapi_grpc::platform::v0::{GetGroupActionsRequest, GetGroupActionsResponse}; +use dpp::version::PlatformVersion; +mod v0; + +impl Platform { + /// Querying of active group actions + pub fn query_group_actions( + &self, + GetGroupActionsRequest { version }: GetGroupActionsRequest, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let Some(version) = version else { + return Ok(QueryValidationResult::new_with_error( + QueryError::DecodingError( + "could not decode active group actions query".to_string(), + ), + )); + }; + + let feature_version_bounds = &platform_version + .drive_abci + .query + .group_queries + .group_actions; + + let feature_version = match &version { + RequestVersion::V0(_) => 0, + }; + if !feature_version_bounds.check_version(feature_version) { + return Ok(QueryValidationResult::new_with_error( + QueryError::UnsupportedQueryVersion( + "group_actions".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_group_actions_v0(request_v0, platform_state, platform_version)?; + Ok(result.map(|response_v0| GetGroupActionsResponse { + version: Some(ResponseVersion::V0(response_v0)), + })) + } + } + } +} diff --git a/packages/rs-drive-abci/src/query/group_queries/group_actions/v0/mod.rs b/packages/rs-drive-abci/src/query/group_queries/group_actions/v0/mod.rs new file mode 100644 index 0000000000..ef664f87f6 --- /dev/null +++ b/packages/rs-drive-abci/src/query/group_queries/group_actions/v0/mod.rs @@ -0,0 +1,242 @@ +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_group_actions_request::GetGroupActionsRequestV0; +use dapi_grpc::platform::v0::get_group_actions_response::get_group_actions_response_v0::{ + emergency_action_event, group_action_event, token_event, BurnEvent, DestroyFrozenFundsEvent, + EmergencyActionEvent, FreezeEvent, GroupActionEntry, GroupActionEvent, GroupActions, MintEvent, + PersonalEncryptedNote, SharedEncryptedNote, TokenEvent as TokenEventResponse, TransferEvent, + UnfreezeEvent, +}; +use dapi_grpc::platform::v0::get_group_actions_response::{ + get_group_actions_response_v0, GetGroupActionsResponseV0, +}; +use dpp::check_validation_result_with_data; +use dpp::data_contract::GroupContractPosition; +use dpp::group::action_event; +use dpp::group::group_action::GroupAction; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use dpp::tokens::emergency_action::TokenEmergencyAction; +use dpp::tokens::token_event::TokenEvent; +use dpp::validation::ValidationResult; +use dpp::version::PlatformVersion; +use drive::error::query::QuerySyntaxError; + +impl Platform { + pub(super) fn query_group_actions_v0( + &self, + GetGroupActionsRequestV0 { + contract_id, + group_contract_position, + status, + start_at_action_id, + count, + prove, + }: GetGroupActionsRequestV0, + platform_state: &PlatformState, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let config = &self.config.drive; + let contract_id: Identifier = + check_validation_result_with_data!(contract_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "contract id must be a valid identifier (32 bytes long)".to_string(), + ) + })); + + if group_contract_position > u16::MAX as u32 { + return Ok(QueryValidationResult::new_with_error(QueryError::Query( + QuerySyntaxError::InvalidParameter(format!( + "group contract position {} can not be over u16::MAX", + group_contract_position + )), + ))); + } + + let limit = count + .map_or(Some(config.default_query_limit), |limit_value| { + if limit_value == 0 + || limit_value > u16::MAX as u32 + || limit_value as u16 > config.default_query_limit + { + None + } else { + Some(limit_value as u16) + } + }) + .ok_or(drive::error::Error::Query(QuerySyntaxError::InvalidLimit( + format!("limit greater than max limit {}", config.max_query_limit), + )))?; + + let maybe_start_at_action_id = match start_at_action_id { + None => None, + Some(start_at_action_id) => { + let start_at_action_id_identifier: Identifier = + check_validation_result_with_data!(start_at_action_id + .start_action_id + .try_into() + .map_err(|_| { + QueryError::InvalidArgument( + "start at action id must be a valid identifier (32 bytes long)" + .to_string(), + ) + })); + Some(( + start_at_action_id_identifier, + start_at_action_id.start_action_id_included, + )) + } + }; + + let group_status: GroupActionStatus = + check_validation_result_with_data!(status.try_into().map_err(|_| { + QueryError::InvalidArgument( + "group action status must be Active or Closed".to_string(), + ) + })); + + let response = if prove { + let proof = check_validation_result_with_data!(self.drive.prove_action_infos( + contract_id, + group_contract_position as GroupContractPosition, + group_status, + maybe_start_at_action_id, + Some(limit), + None, + platform_version, + )); + + GetGroupActionsResponseV0 { + result: Some(get_group_actions_response_v0::Result::Proof( + self.response_proof_v0(platform_state, proof), + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + } else { + let group_actions = self + .drive + .fetch_action_infos( + contract_id, + group_contract_position as GroupContractPosition, + group_status, + maybe_start_at_action_id, + Some(limit), + None, + platform_version, + )? + .into_iter() + .map(|(action_id, group_action)| { + // Convert the fetched GroupAction into a GroupActionEntry + GroupActionEntry { + action_id: action_id.to_vec(), + event: Some(GroupActionEvent { + event_type: Some(match group_action { + GroupAction::V0(group_action_v0) => match group_action_v0.event { + action_event::GroupActionEvent::TokenEvent(token_event) => match token_event { + TokenEvent::Mint(amount, recipient_id, public_note) => { + group_action_event::EventType::TokenEvent(TokenEventResponse { + r#type: Some(token_event::Type::Mint(MintEvent { + amount: amount as u64, + recipient_id: recipient_id.to_vec(), + public_note, + })), + }) + } + TokenEvent::Burn(amount, public_note) => { + group_action_event::EventType::TokenEvent(TokenEventResponse { + r#type: Some(token_event::Type::Burn(BurnEvent { + amount: amount as u64, + public_note, + })), + }) + } + TokenEvent::Freeze(frozen_id, public_note) => { + group_action_event::EventType::TokenEvent(TokenEventResponse { + r#type: Some(token_event::Type::Freeze(FreezeEvent { + frozen_id: frozen_id.to_vec(), + public_note, + })), + }) + } + TokenEvent::Unfreeze(frozen_id, public_note) => { + group_action_event::EventType::TokenEvent(TokenEventResponse { + r#type: Some(token_event::Type::Unfreeze(UnfreezeEvent { + frozen_id: frozen_id.to_vec(), + public_note, + })), + }) + } + TokenEvent::DestroyFrozenFunds(frozen_id, amount, public_note) => { + group_action_event::EventType::TokenEvent(TokenEventResponse { + r#type: Some(token_event::Type::DestroyFrozenFunds( + DestroyFrozenFundsEvent { + frozen_id: frozen_id.to_vec(), + amount, + public_note, + }, + )), + }) + } + TokenEvent::Transfer( + recipient_id, + public_note, + shared_encrypted_note, + personal_encrypted_note, + amount, + ) => { + group_action_event::EventType::TokenEvent(TokenEventResponse { + r#type: Some(token_event::Type::Transfer(TransferEvent { + recipient_id: recipient_id.to_vec(), + public_note, + shared_encrypted_note: shared_encrypted_note + .map(|(sender_key_index, recipient_key_index, note)| { + SharedEncryptedNote { + sender_key_index, + recipient_key_index, + encrypted_data: note, + } + }), + personal_encrypted_note: personal_encrypted_note + .map(|(root_encryption_key_index, derivation_encryption_key_index, note)| { + PersonalEncryptedNote { + root_encryption_key_index, + derivation_encryption_key_index, + encrypted_data: note, + } + }), + amount: amount as u64, + })), + }) + }, + TokenEvent::EmergencyAction(action, public_note) => { + group_action_event::EventType::TokenEvent(TokenEventResponse { + r#type: Some(token_event::Type::EmergencyAction(EmergencyActionEvent { + action_type: match action { + TokenEmergencyAction::Pause => emergency_action_event::ActionType::Pause.into(), + TokenEmergencyAction::Resume => emergency_action_event::ActionType::Resume.into(), + }, + public_note, + })), + }) + } + }, + }, + }), + }), + } + }) + .collect(); + GetGroupActionsResponseV0 { + result: Some(get_group_actions_response_v0::Result::GroupActions( + GroupActions { group_actions }, + )), + metadata: Some(self.response_metadata_v0(platform_state)), + } + }; + + Ok(QueryValidationResult::new_with_data(response)) + } +} diff --git a/packages/rs-drive-abci/src/query/group_queries/group_info/v0/mod.rs b/packages/rs-drive-abci/src/query/group_queries/group_info/v0/mod.rs index a5175ac3cf..84c55bfc60 100644 --- a/packages/rs-drive-abci/src/query/group_queries/group_info/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/group_queries/group_info/v0/mod.rs @@ -31,7 +31,7 @@ impl Platform { let contract_id: Identifier = check_validation_result_with_data!(contract_id.try_into().map_err(|_| { QueryError::InvalidArgument( - "token_id must be a valid identifier (32 bytes long)".to_string(), + "contract id must be a valid identifier (32 bytes long)".to_string(), ) })); diff --git a/packages/rs-drive-abci/src/query/group_queries/group_infos/v0/mod.rs b/packages/rs-drive-abci/src/query/group_queries/group_infos/v0/mod.rs index 88787fef92..e9dc27aab4 100644 --- a/packages/rs-drive-abci/src/query/group_queries/group_infos/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/group_queries/group_infos/v0/mod.rs @@ -33,7 +33,7 @@ impl Platform { let contract_id: Identifier = check_validation_result_with_data!(contract_id.try_into().map_err(|_| { QueryError::InvalidArgument( - "token_id must be a valid identifier (32 bytes long)".to_string(), + "contract id must be a valid identifier (32 bytes long)".to_string(), ) })); diff --git a/packages/rs-drive-abci/src/query/group_queries/mod.rs b/packages/rs-drive-abci/src/query/group_queries/mod.rs index b9ae74339a..d720872115 100644 --- a/packages/rs-drive-abci/src/query/group_queries/mod.rs +++ b/packages/rs-drive-abci/src/query/group_queries/mod.rs @@ -1,2 +1,4 @@ +mod group_action_signers; +mod group_actions; mod group_info; mod group_infos; diff --git a/packages/rs-drive-abci/src/query/service.rs b/packages/rs-drive-abci/src/query/service.rs index 7ac860eac1..24f14039a5 100644 --- a/packages/rs-drive-abci/src/query/service.rs +++ b/packages/rs-drive-abci/src/query/service.rs @@ -10,8 +10,7 @@ use crate::utils::spawn_blocking_task_with_name_if_supported; use async_trait::async_trait; use dapi_grpc::platform::v0::platform_server::Platform as PlatformService; use dapi_grpc::platform::v0::{ - BroadcastStateTransitionRequest, BroadcastStateTransitionResponse, - GetActiveGroupActionsRequest, GetActiveGroupActionsResponse, GetConsensusParamsRequest, + BroadcastStateTransitionRequest, BroadcastStateTransitionResponse, GetConsensusParamsRequest, GetConsensusParamsResponse, GetContestedResourceIdentityVotesRequest, GetContestedResourceIdentityVotesResponse, GetContestedResourceVoteStateRequest, GetContestedResourceVoteStateResponse, GetContestedResourceVotersForIdentityRequest, @@ -21,9 +20,10 @@ use dapi_grpc::platform::v0::{ GetDataContractResponse, GetDataContractsRequest, GetDataContractsResponse, GetDocumentsRequest, GetDocumentsResponse, GetEpochsInfoRequest, GetEpochsInfoResponse, GetEvonodesProposedEpochBlocksByIdsRequest, GetEvonodesProposedEpochBlocksByRangeRequest, - GetEvonodesProposedEpochBlocksResponse, GetGroupInfoRequest, GetGroupInfoResponse, - GetGroupInfosRequest, GetGroupInfosResponse, GetIdentitiesBalancesRequest, - GetIdentitiesBalancesResponse, GetIdentitiesContractKeysRequest, + GetEvonodesProposedEpochBlocksResponse, GetGroupActionSignersRequest, + GetGroupActionSignersResponse, GetGroupActionsRequest, GetGroupActionsResponse, + GetGroupInfoRequest, GetGroupInfoResponse, GetGroupInfosRequest, GetGroupInfosResponse, + GetIdentitiesBalancesRequest, GetIdentitiesBalancesResponse, GetIdentitiesContractKeysRequest, GetIdentitiesContractKeysResponse, GetIdentitiesTokenBalancesRequest, GetIdentitiesTokenBalancesResponse, GetIdentitiesTokenInfosRequest, GetIdentitiesTokenInfosResponse, GetIdentityBalanceAndRevisionRequest, @@ -712,17 +712,29 @@ impl PlatformService for QueryService { .await } - // async fn get_active_group_actions( - // &self, - // request: Request, - // ) -> Result, Status> { - // self.handle_blocking_query( - // request, - // Platform::::query_active_group_actions, - // "get_active_group_actions", - // ) - // .await - // } + async fn get_group_actions( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_group_actions, + "get_group_actions", + ) + .await + } + + async fn get_group_action_signers( + &self, + request: Request, + ) -> Result, Status> { + self.handle_blocking_query( + request, + Platform::::query_group_action_signers, + "get_group_action_signers", + ) + .await + } } fn query_error_into_status(error: QueryError) -> Status { diff --git a/packages/rs-drive/src/drive/group/estimated_costs/for_add_group_action/v0/mod.rs b/packages/rs-drive/src/drive/group/estimated_costs/for_add_group_action/v0/mod.rs index 5923c6a14d..6a9a63b68e 100644 --- a/packages/rs-drive/src/drive/group/estimated_costs/for_add_group_action/v0/mod.rs +++ b/packages/rs-drive/src/drive/group/estimated_costs/for_add_group_action/v0/mod.rs @@ -1,8 +1,8 @@ use crate::drive::Drive; use crate::drive::group::paths::{ - group_action_path, group_action_root_path, group_action_signers_path, group_contract_path, - group_path, group_root_path, + group_action_path, group_action_signers_path, group_active_action_root_path, + group_contract_path, group_path, group_root_path, }; use crate::util::type_constants::DEFAULT_HASH_SIZE_U8; use dpp::data_contract::GroupContractPosition; @@ -127,7 +127,7 @@ impl Drive { ); estimated_costs_only_with_layer_info.insert( - KeyInfoPath::from_known_path(group_action_root_path( + KeyInfoPath::from_known_path(group_active_action_root_path( contract_id.as_slice(), &group_contract_position.to_be_bytes(), )), diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_infos/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_infos/mod.rs new file mode 100644 index 0000000000..6b02d74e94 --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_infos/mod.rs @@ -0,0 +1,128 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action::GroupAction; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use dpp::prelude::StartAtIncluded; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +mod v0; + +impl Drive { + /// Fetches the `GroupAction` for the given action ID and group contract position. + /// + /// This function queries the GroveDB to fetch `GroupAction`s associated with a specific + /// group contract position and `action_status`. The method selects the appropriate version of + /// `fetch_action_infos` based on the `platform_version` provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `group_contract_position`: The position of the group contract in the data structure. + /// - `action_status`: The status of the group actions to fetch. + /// - `start_action_id`: An optional starting action ID and inclusion flag. + /// - `limit`: An optional limit on the number of group actions to fetch. + /// - `transaction`: The transaction argument used for the query. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(GroupAction)`: The `GroupAction` for the specified action ID and contract position. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub fn fetch_action_infos( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + start_action_id: Option<(Identifier, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_infos + { + 0 => self.fetch_action_infos_v0( + contract_id, + group_contract_position, + action_status, + start_action_id, + limit, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_infos".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the `GroupAction` and adds corresponding operations to the drive for the given action ID and group contract position. + /// + /// This function is similar to `fetch_action_infos` but also adds operations to the drive for state changes or queries. + /// It fetches `GroupAction`s based on the specified `action_status`. Additionally, it supports cost estimation by interacting with the layer information if provided. + /// + /// # Parameters + /// - `contract_id`: The identifier of the contract that the action belongs to. + /// - `group_contract_position`: The position of the group contract in the data structure. + /// - `action_status`: The status of the group actions to fetch. + /// - `start_action_id`: An optional starting action ID and inclusion flag. + /// - `limit`: An optional limit on the number of group actions to fetch. + /// - `transaction`: The transaction argument used for the query. + /// - `drive_operations`: A mutable reference to a vector that stores low-level drive operations. + /// - `platform_version`: The version of the platform that determines the correct method version. + /// + /// # Returns + /// - `Ok(GroupAction)`: The `GroupAction` for the specified action ID and contract position, along with any added operations. + /// - `Err(Error)`: If an error occurs, a generic error is returned. + /// + /// # Errors + /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. + pub(crate) fn fetch_action_infos_and_add_operations( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + start_action_id: Option<(Identifier, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_infos + { + 0 => self.fetch_action_infos_and_add_operations_v0( + contract_id, + group_contract_position, + action_status, + start_action_id, + limit, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_infos_and_add_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_infos/v0/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_infos/v0/mod.rs new file mode 100644 index 0000000000..d8086476af --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_infos/v0/mod.rs @@ -0,0 +1,86 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action::GroupAction; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use dpp::prelude::StartAtIncluded; +use dpp::serialization::PlatformDeserializable; +use dpp::version::PlatformVersion; +use grovedb::query_result_type::QueryResultType; +use grovedb::Element::Item; +use grovedb::TransactionArg; +use std::collections::BTreeMap; + +impl Drive { + pub(super) fn fetch_action_infos_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + start_action_id: Option<(Identifier, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.fetch_action_infos_and_add_operations_v0( + contract_id, + group_contract_position, + action_status, + start_action_id, + limit, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn fetch_action_infos_and_add_operations_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + start_action_id: Option<(Identifier, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let path_query = Drive::group_action_infos_query( + contract_id.to_buffer(), + group_contract_position, + action_status, + start_action_id.map(|(s, i)| (s.to_buffer(), i)), + limit, + ); + + self.grove_get_raw_path_query( + &path_query, + transaction, + QueryResultType::QueryPathKeyElementTrioResultType, + drive_operations, + &platform_version.drive, + )? + .0 + .to_path_key_elements() + .into_iter() + .map(|(path, _, element)| { + let Some(last_path_component) = path.last() else { + return Err(Error::Drive(DriveError::CorruptedDriveState( + "we should always have a path not be empty".to_string(), + ))); + }; + let action_id = Identifier::from_bytes(last_path_component)?; + + match element { + Item(value, ..) => Ok((action_id, GroupAction::deserialize_from_bytes(&value)?)), + _ => Err(Error::Drive(DriveError::CorruptedDriveState( + "element should be an item representing the group action".to_string(), + ))), + } + }) + .collect() + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_signers/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_signers/mod.rs new file mode 100644 index 0000000000..0556350c6e --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_signers/mod.rs @@ -0,0 +1,133 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::group::GroupMemberPower; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +mod v0; + +impl Drive { + /// Fetches the signers and their respective powers for a specific action in a group. + /// + /// This method retrieves the list of signers for an action associated with a given contract, + /// group, and action status. It selects the appropriate version of the method based on the + /// provided platform version. + /// + /// # Arguments + /// + /// * `contract_id` - The identifier of the contract associated with the action. + /// * `group_contract_position` - The position of the group within the contract. + /// * `action_status` - The status of the action (e.g., active or closed). + /// * `action_id` - The identifier of the action for which to fetch signers. + /// * `transaction` - An optional transaction argument for database operations. + /// * `platform_version` - The platform version to determine which method version to call. + /// + /// # Returns + /// + /// A `Result` containing a `BTreeMap` where the keys are the signer identifiers and the values + /// are their respective powers, or an `Error` if the operation fails. + /// + /// # Errors + /// + /// This method returns an `Error` if: + /// * The platform version is unknown. + /// * An internal issue occurs during the fetching process. + pub fn fetch_action_signers( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + action_id: Identifier, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_signers + { + 0 => self.fetch_action_signers_v0( + contract_id, + group_contract_position, + action_status, + action_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_signers".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Fetches the signers and their respective powers for a specific action and adds the + /// associated operations for database queries. + /// + /// This method extends the functionality of `fetch_action_signers` by including additional + /// database operations that can be executed as part of a larger transaction. The appropriate + /// version of the method is selected based on the provided platform version. + /// + /// # Arguments + /// + /// * `contract_id` - The identifier of the contract associated with the action. + /// * `group_contract_position` - The position of the group within the contract. + /// * `action_status` - The status of the action (e.g., active or closed). + /// * `action_id` - The identifier of the action for which to fetch signers. + /// * `transaction` - An optional transaction argument for database operations. + /// * `drive_operations` - A mutable vector to which low-level database operations will be added. + /// * `platform_version` - The platform version to determine which method version to call. + /// + /// # Returns + /// + /// A `Result` containing a `BTreeMap` where the keys are the signer identifiers and the values + /// are their respective powers, or an `Error` if the operation fails. + /// + /// # Errors + /// + /// This method returns an `Error` if: + /// * The platform version is unknown. + /// * An internal issue occurs during the fetching process. + pub(crate) fn fetch_action_signers_and_add_operations( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + action_id: Identifier, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .group + .fetch + .fetch_action_signers + { + 0 => self.fetch_action_signers_and_add_operations_v0( + contract_id, + group_contract_position, + action_status, + action_id, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "fetch_action_signers_and_add_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_signers/v0/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_signers/v0/mod.rs new file mode 100644 index 0000000000..c0a64a9b63 --- /dev/null +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_signers/v0/mod.rs @@ -0,0 +1,78 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::group::GroupMemberPower; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use dpp::version::PlatformVersion; +use grovedb::query_result_type::QueryResultType; +use grovedb::Element::SumItem; +use grovedb::TransactionArg; +use std::collections::BTreeMap; + +impl Drive { + pub(super) fn fetch_action_signers_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + action_id: Identifier, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.fetch_action_signers_and_add_operations_v0( + contract_id, + group_contract_position, + action_status, + action_id, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn fetch_action_signers_and_add_operations_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + action_id: Identifier, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let path_query = Drive::group_action_signers_query( + contract_id.to_buffer(), + group_contract_position, + action_status, + action_id.to_buffer(), + ); + + self.grove_get_raw_path_query( + &path_query, + transaction, + QueryResultType::QueryKeyElementPairResultType, + drive_operations, + &platform_version.drive, + )? + .0 + .to_key_elements_btree_map() + .into_iter() + .map(|(key, element)| match element { + SumItem(value, ..) => Ok(( + key.try_into()?, + value.try_into().map_err(|e| { + Error::Drive(DriveError::CorruptedDriveState( + "signed power should be encodable on a u32 integer".to_string(), + )) + })?, + )), + _ => Err(Error::Drive(DriveError::CorruptedDriveState( + "element should be a sum item representing member signed power".to_string(), + ))), + }) + .collect() + } +} diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_active_action_info/mod.rs similarity index 91% rename from packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/mod.rs rename to packages/rs-drive/src/drive/group/fetch/fetch_active_action_info/mod.rs index 99c38f711e..7f99fad7f5 100644 --- a/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/mod.rs +++ b/packages/rs-drive/src/drive/group/fetch/fetch_active_action_info/mod.rs @@ -32,7 +32,7 @@ impl Drive { /// /// # Errors /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. - pub fn fetch_action_id_info( + pub fn fetch_active_action_info( &self, contract_id: Identifier, group_contract_position: GroupContractPosition, @@ -45,9 +45,9 @@ impl Drive { .methods .group .fetch - .fetch_action_id_info + .fetch_active_action_info { - 0 => self.fetch_action_id_info_v0( + 0 => self.fetch_active_action_info_v0( contract_id, group_contract_position, action_id, @@ -55,7 +55,7 @@ impl Drive { platform_version, ), version => Err(Error::Drive(DriveError::UnknownVersionMismatch { - method: "fetch_action_id_info".to_string(), + method: "fetch_active_action_info".to_string(), known_versions: vec![0], received: version, })), @@ -83,7 +83,7 @@ impl Drive { /// /// # Errors /// - `DriveError::UnknownVersionMismatch`: If the `platform_version` does not match any known versions. - pub(crate) fn fetch_action_id_info_and_add_operations( + pub(crate) fn fetch_active_action_info_and_add_operations( &self, contract_id: Identifier, group_contract_position: GroupContractPosition, @@ -100,9 +100,9 @@ impl Drive { .methods .group .fetch - .fetch_action_id_info + .fetch_active_action_info { - 0 => self.fetch_action_id_info_and_add_operations_v0( + 0 => self.fetch_active_action_info_and_add_operations_v0( contract_id, group_contract_position, action_id, @@ -112,7 +112,7 @@ impl Drive { platform_version, ), version => Err(Error::Drive(DriveError::UnknownVersionMismatch { - method: "fetch_action_id_signers_and_add_operations".to_string(), + method: "fetch_active_action_info_and_add_operations".to_string(), known_versions: vec![0], received: version, })), diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/v0/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_active_action_info/v0/mod.rs similarity index 96% rename from packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/v0/mod.rs rename to packages/rs-drive/src/drive/group/fetch/fetch_active_action_info/v0/mod.rs index 723e7312cd..1e807d289e 100644 --- a/packages/rs-drive/src/drive/group/fetch/fetch_action_id_info/v0/mod.rs +++ b/packages/rs-drive/src/drive/group/fetch/fetch_active_action_info/v0/mod.rs @@ -15,7 +15,7 @@ use grovedb::batch::KeyInfoPath; use grovedb::{EstimatedLayerInformation, TransactionArg, TreeType}; impl Drive { - pub(super) fn fetch_action_id_info_v0( + pub(super) fn fetch_active_action_info_v0( &self, contract_id: Identifier, group_contract_position: GroupContractPosition, @@ -45,7 +45,7 @@ impl Drive { Ok(group_action) } - pub(super) fn fetch_action_id_info_and_add_operations_v0( + pub(super) fn fetch_active_action_info_and_add_operations_v0( &self, contract_id: Identifier, group_contract_position: GroupContractPosition, diff --git a/packages/rs-drive/src/drive/group/fetch/mod.rs b/packages/rs-drive/src/drive/group/fetch/mod.rs index 8df377a7a9..32186f8a6e 100644 --- a/packages/rs-drive/src/drive/group/fetch/mod.rs +++ b/packages/rs-drive/src/drive/group/fetch/mod.rs @@ -1,7 +1,9 @@ mod fetch_action_id_has_signer; -mod fetch_action_id_info; mod fetch_action_id_info_keep_serialized; mod fetch_action_id_signers_power; +mod fetch_action_infos; +mod fetch_action_signers; +mod fetch_active_action_info; mod fetch_group_info; mod fetch_group_infos; mod queries; diff --git a/packages/rs-drive/src/drive/group/fetch/queries.rs b/packages/rs-drive/src/drive/group/fetch/queries.rs index 7dbd1223c5..e78e6cca88 100644 --- a/packages/rs-drive/src/drive/group/fetch/queries.rs +++ b/packages/rs-drive/src/drive/group/fetch/queries.rs @@ -1,7 +1,11 @@ -use crate::drive::group::paths::group_contract_path_vec; +use crate::drive::group::paths::{ + group_contract_path_vec, group_path_vec, ACTION_INFO_KEY, ACTION_SIGNERS_KEY, + GROUP_ACTIVE_ACTIONS_KEY, GROUP_CLOSED_ACTIONS_KEY, GROUP_INFO_KEY, +}; use crate::drive::Drive; use crate::query::{Query, QueryItem}; use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action_status::GroupActionStatus; use grovedb::{PathQuery, SizedQuery}; use std::ops::RangeFull; @@ -11,11 +15,10 @@ impl Drive { contract_id: [u8; 32], group_contract_position: GroupContractPosition, ) -> PathQuery { - let group_contract_path = group_contract_path_vec(&contract_id); - PathQuery::new_single_key( - group_contract_path, - group_contract_position.to_be_bytes().to_vec(), - ) + let group_path = group_path_vec(&contract_id, group_contract_position); + let mut path_query = PathQuery::new_single_key(group_path, GROUP_INFO_KEY.to_vec()); + path_query.query.limit = Some(1); + path_query } /// The query for the group infos inside a contract. @@ -35,6 +38,8 @@ impl Drive { } else { query.insert_item(QueryItem::RangeFull(RangeFull)) } + + query.set_subquery_key(GROUP_INFO_KEY.to_vec()); PathQuery { path: group_contract_path, query: SizedQuery { @@ -44,4 +49,74 @@ impl Drive { }, } } + + /// Gets the active group actions + pub fn group_action_infos_query( + contract_id: [u8; 32], + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + start_at: Option<([u8; 32], bool)>, + limit: Option, + ) -> PathQuery { + let mut group_actions_path = group_path_vec(&contract_id, group_contract_position); + match action_status { + GroupActionStatus::ActionActive => { + group_actions_path.push(GROUP_ACTIVE_ACTIONS_KEY.to_vec()) + } + GroupActionStatus::ActionClosed => { + group_actions_path.push(GROUP_CLOSED_ACTIONS_KEY.to_vec()) + } + } + let mut query = Query::new_with_direction(true); + 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)) + } + + query.set_subquery_key(ACTION_INFO_KEY.to_vec()); + + PathQuery { + path: group_actions_path, + query: SizedQuery { + query, + limit, + offset: None, + }, + } + } + + /// Gets the action signers query + pub fn group_action_signers_query( + contract_id: [u8; 32], + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + action_id: [u8; 32], + ) -> PathQuery { + let mut group_actions_path = group_path_vec(&contract_id, group_contract_position); + match action_status { + GroupActionStatus::ActionActive => { + group_actions_path.push(GROUP_ACTIVE_ACTIONS_KEY.to_vec()) + } + GroupActionStatus::ActionClosed => { + group_actions_path.push(GROUP_CLOSED_ACTIONS_KEY.to_vec()) + } + } + group_actions_path.push(action_id.to_vec()); + group_actions_path.push(ACTION_SIGNERS_KEY.to_vec()); + let query = Query::new_range_full(); + + PathQuery { + path: group_actions_path, + query: SizedQuery { + query, + limit: None, + offset: None, + }, + } + } } diff --git a/packages/rs-drive/src/drive/group/insert/add_group_action/v0/mod.rs b/packages/rs-drive/src/drive/group/insert/add_group_action/v0/mod.rs index f45e9ec03c..f7d1dea6d4 100644 --- a/packages/rs-drive/src/drive/group/insert/add_group_action/v0/mod.rs +++ b/packages/rs-drive/src/drive/group/insert/add_group_action/v0/mod.rs @@ -1,6 +1,6 @@ use crate::drive::group::paths::{ - group_action_path, group_action_root_path, group_action_signers_path_vec, ACTION_INFO_KEY, - ACTION_SIGNERS_KEY, + group_action_path, group_action_signers_path_vec, group_active_action_root_path, + ACTION_INFO_KEY, ACTION_SIGNERS_KEY, }; use crate::drive::Drive; use crate::error::Error; @@ -133,7 +133,7 @@ impl Drive { } let group_contract_position_bytes = group_contract_position.to_be_bytes().to_vec(); - let group_action_root_path = group_action_root_path( + let group_action_root_path = group_active_action_root_path( contract_id.as_slice(), group_contract_position_bytes.as_slice(), ); diff --git a/packages/rs-drive/src/drive/group/paths.rs b/packages/rs-drive/src/drive/group/paths.rs index 07449e982f..b4cbe64871 100644 --- a/packages/rs-drive/src/drive/group/paths.rs +++ b/packages/rs-drive/src/drive/group/paths.rs @@ -69,7 +69,7 @@ pub fn group_path_vec( /// Group action path -pub fn group_action_root_path<'a>( +pub fn group_active_action_root_path<'a>( contract_id: &'a [u8], group_contract_position_bytes: &'a [u8], ) -> [&'a [u8]; 4] { @@ -83,7 +83,7 @@ pub fn group_action_root_path<'a>( /// Group action path vector -pub fn group_action_root_path_vec( +pub fn group_active_action_root_path_vec( contract_id: &[u8], group_contract_position: GroupContractPosition, ) -> Vec> { diff --git a/packages/rs-drive/src/drive/group/prove/mod.rs b/packages/rs-drive/src/drive/group/prove/mod.rs index c6fa82c789..dc5360bb8c 100644 --- a/packages/rs-drive/src/drive/group/prove/mod.rs +++ b/packages/rs-drive/src/drive/group/prove/mod.rs @@ -1,2 +1,4 @@ +mod prove_action_infos; +mod prove_action_signers; mod prove_group_info; mod prove_group_infos; diff --git a/packages/rs-drive/src/drive/group/prove/prove_action_infos/mod.rs b/packages/rs-drive/src/drive/group/prove/prove_action_infos/mod.rs new file mode 100644 index 0000000000..f5b6cec806 --- /dev/null +++ b/packages/rs-drive/src/drive/group/prove/prove_action_infos/mod.rs @@ -0,0 +1,132 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use dpp::prelude::StartAtIncluded; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; + +mod v0; +impl Drive { + /// Generates a proof of active action information within a specific group of a contract. + /// + /// This method produces a cryptographic proof that validates and retrieves active action information + /// associated with a specific group in the given contract based on the `action_status`. The proof can be limited to a subset of actions + /// based on the `start_action_id` and `limit` parameters. It supports multiple versions for backward + /// compatibility and forwards the request to the appropriate versioned implementation. + /// + /// # Arguments + /// - `contract_id`: The identifier of the contract containing the group. + /// - `group_contract_position`: The position of the group within the contract whose actions are to be proven. + /// - `action_status`: The status of the group actions to prove. + /// - `start_action_id`: An optional starting action ID, combined with a [`StartAtIncluded`] flag to specify whether + /// the start position is inclusive. + /// - `limit`: An optional limit on the number of actions to include in the proof. + /// - `transaction`: The transaction context for the operation. + /// - `platform_version`: A reference to the platform version, used to determine the appropriate versioned implementation. + /// + /// # Returns + /// - `Ok(Vec)`: On success, returns a serialized proof as a vector of bytes. + /// - `Err(Error)`: If the operation fails, returns an [`Error`] indicating the cause of failure. + /// + /// # Errors + /// - [`Error::Drive(DriveError::UnknownVersionMismatch)`]: If the method is called with an unsupported platform version. + /// - Any other errors propagated from the versioned implementation. + pub fn prove_action_infos( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + start_action_id: Option<(Identifier, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .group + .prove + .prove_action_infos + { + 0 => self.prove_action_infos_v0( + contract_id, + group_contract_position, + action_status, + start_action_id, + limit, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_action_infos".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Generates a proof of active action information within a specific group of a contract and adds operations. + /// + /// This method extends the functionality of `prove_action_infos` by additionally allowing + /// operations to be added to a provided `drive_operations` list. It produces a cryptographic proof + /// of active action information associated with a specific group in the given contract based on the `action_status`, and supports + /// different versions for backward compatibility. + /// + /// # Arguments + /// - `contract_id`: The identifier of the contract containing the group. + /// - `group_contract_position`: The position of the group within the contract whose actions are to be proven. + /// - `action_status`: The status of the group actions to prove. + /// - `start_action_id`: An optional starting action ID, combined with a [`StartAtIncluded`] flag to specify whether + /// the start position is inclusive. + /// - `limit`: An optional limit on the number of actions to include in the proof. + /// - `transaction`: The transaction context for the operation. + /// - `drive_operations`: A mutable reference to a vector where additional low-level operations can be appended. + /// - `platform_version`: A reference to the platform version, used to determine the appropriate versioned implementation. + /// + /// # Returns + /// - `Ok(Vec)`: On success, returns a serialized proof as a vector of bytes. + /// - `Err(Error)`: If the operation fails, returns an [`Error`] indicating the cause of failure. + /// + /// # Errors + /// - [`Error::Drive(DriveError::UnknownVersionMismatch)`]: If the method is called with an unsupported platform version. + /// - Any other errors propagated from the versioned implementation. + pub(crate) fn prove_action_infos_operations( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + start_action_id: Option<(Identifier, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .group + .prove + .prove_action_infos + { + 0 => self.prove_action_infos_operations_v0( + contract_id, + group_contract_position, + action_status, + start_action_id, + limit, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_action_infos_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/prove/prove_action_infos/v0/mod.rs b/packages/rs-drive/src/drive/group/prove/prove_action_infos/v0/mod.rs new file mode 100644 index 0000000000..1deadafda5 --- /dev/null +++ b/packages/rs-drive/src/drive/group/prove/prove_action_infos/v0/mod.rs @@ -0,0 +1,536 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use dpp::prelude::StartAtIncluded; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + pub(super) fn prove_action_infos_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + start_action_id: Option<(Identifier, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.prove_action_infos_operations_v0( + contract_id, + group_contract_position, + action_status, + start_action_id, + limit, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn prove_action_infos_operations_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + start_action_id: Option<(Identifier, StartAtIncluded)>, + limit: Option, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let path_query = Drive::group_action_infos_query( + contract_id.to_buffer(), + group_contract_position, + action_status, + start_action_id.map(|(s, i)| (s.to_buffer(), i)), + limit, + ); + self.grove_get_proved_path_query( + &path_query, + transaction, + drive_operations, + &platform_version.drive, + ) + } +} +#[cfg(test)] +mod tests { + use super::*; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::block::block_info::BlockInfo; + use dpp::data_contract::accessors::v0::DataContractV0Getters; + use dpp::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; + use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; + use dpp::data_contract::config::v0::DataContractConfigV0; + use dpp::data_contract::config::DataContractConfig; + use dpp::data_contract::group::v0::GroupV0; + use dpp::data_contract::group::Group; + use dpp::data_contract::v1::DataContractV1; + use dpp::data_contract::DataContract; + use dpp::group::action_event::GroupActionEvent; + use dpp::group::group_action::v0::GroupActionV0; + use dpp::group::group_action::GroupAction; + use dpp::identifier::Identifier; + use dpp::identity::accessors::IdentityGettersV0; + use dpp::identity::Identity; + use dpp::tokens::token_event::TokenEvent; + use dpp::version::PlatformVersion; + use std::collections::BTreeMap; + + #[test] + fn should_prove_action_infos_with_multiple_actions() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity_1 = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_1_id = identity_1.id(); + + let identity_2 = Identity::random_identity(3, Some(506), platform_version) + .expect("expected a platform identity"); + + let identity_2_id = identity_2.id(); + + let identity_3 = Identity::random_identity(3, Some(9), platform_version) + .expect("expected a platform identity"); + + let identity_3_id = identity_3.id(); + + // Create a data contract with multiple tokens + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: BTreeMap::from([ + ( + 0, + Group::V0(GroupV0 { + members: [(identity_1_id, 1), (identity_2_id, 1)].into(), + required_power: 2, + }), + ), + ( + 1, + Group::V0(GroupV0 { + members: [(identity_1_id, 2), (identity_2_id, 1), (identity_3_id, 1)] + .into(), + required_power: 2, + }), + ), + ]), + tokens: BTreeMap::from([ + ( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ), + ( + 1, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ), + ]), + }); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Contract and group details + let contract_id = contract.id(); + let group_contract_position = 0; + + // Create actions + let action_id_1 = Identifier::random(); + let action_id_2 = Identifier::random(); + + let action_1 = GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(TokenEvent::Mint(100, identity_1_id, None)), + }); + + let action_2 = GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(TokenEvent::Burn(50, None)), + }); + + // Add actions using `add_group_action` + drive + .add_group_action( + contract_id, + group_contract_position, + Some(action_1.clone()), + action_id_1, + identity_1_id, + 1, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add action 1"); + + drive + .add_group_action( + contract_id, + group_contract_position, + Some(action_2.clone()), + action_id_2, + identity_2_id, + 1, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add action 2"); + + // Fetch actions directly + let fetched_actions = drive + .fetch_action_infos( + contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + None, + Some(10), + None, + platform_version, + ) + .expect("expected to fetch active actions"); + + assert_eq!( + fetched_actions, + BTreeMap::from([ + (action_id_1, action_1.clone()), + (action_id_2, action_2.clone()) + ]), + "unexpected fetched actions" + ); + + // Prove actions + let proof = drive + .prove_action_infos_v0( + contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + None, + Some(10), + None, + platform_version, + ) + .expect("should not error when proving active actions"); + + // Verify proof + let proved_actions: BTreeMap = + Drive::verify_action_infos_in_contract( + proof.as_slice(), + contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + None, + Some(10), + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert proved actions match fetched actions + assert_eq!(proved_actions, fetched_actions, "unexpected proved actions"); + } + + #[test] + fn should_prove_no_action_infos_for_non_existent_contract() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let non_existent_contract_id = Identifier::random(); + let group_contract_position = 0; + + // Prove actions for non-existent contract + let proof = drive + .prove_action_infos_v0( + non_existent_contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + None, + Some(10), + None, + platform_version, + ) + .expect("should not error when proving active actions for non-existent contract"); + + // Verify proof + let proved_actions: BTreeMap = + Drive::verify_action_infos_in_contract( + proof.as_slice(), + non_existent_contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + None, + Some(10), + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert no actions exist + assert_eq!( + proved_actions, + BTreeMap::new(), + "expected no proved actions" + ); + } + + #[test] + fn should_fetch_and_prove_action_infos_with_start_action_id() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity_1 = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + let identity_1_id = identity_1.id(); + + let identity_2 = Identity::random_identity(3, Some(506), platform_version) + .expect("expected a platform identity"); + let identity_2_id = identity_2.id(); + + let identity_3 = Identity::random_identity(3, Some(9), platform_version) + .expect("expected a platform identity"); + + let identity_3_id = identity_3.id(); + + // Create a data contract with multiple tokens + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: BTreeMap::from([ + ( + 0, + Group::V0(GroupV0 { + members: [(identity_1_id, 1), (identity_2_id, 1)].into(), + required_power: 2, + }), + ), + ( + 1, + Group::V0(GroupV0 { + members: [(identity_1_id, 2), (identity_2_id, 1), (identity_3_id, 1)] + .into(), + required_power: 2, + }), + ), + ]), + tokens: BTreeMap::from([ + ( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ), + ( + 1, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ), + ]), + }); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Contract and group details + let contract_id = contract.id(); + let group_contract_position = 0; + + // Create actions + let action_id_1 = Identifier::new([1; 32]); + let action_id_2 = Identifier::new([2; 32]); + let action_id_3 = Identifier::new([3; 32]); + let action_id_4 = Identifier::new([4; 32]); + + let action_1 = GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(TokenEvent::Mint(200, identity_1_id, None)), + }); + + let action_2 = GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(TokenEvent::Burn(50, None)), + }); + + let action_3 = GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(TokenEvent::Transfer( + identity_2_id, + None, + None, + None, + 150, + )), + }); + + let action_4 = GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(TokenEvent::Transfer( + identity_3_id, + None, + None, + None, + 150, + )), + }); + + // Add actions using `add_group_action` + drive + .add_group_action( + contract_id, + group_contract_position, + Some(action_1.clone()), + action_id_1, + identity_1_id, + 1, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add action 1"); + + drive + .add_group_action( + contract_id, + group_contract_position, + Some(action_2.clone()), + action_id_2, + identity_1_id, + 1, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add action 2"); + + drive + .add_group_action( + contract_id, + group_contract_position, + Some(action_3.clone()), + action_id_3, + identity_2_id, + 1, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add action 3"); + + drive + .add_group_action( + contract_id, + group_contract_position, + Some(action_4.clone()), + action_id_4, + identity_3_id, + 1, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add action 3"); + + // Fetch actions starting from action_id_2 + let fetched_actions = drive + .fetch_action_infos( + contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + Some((action_id_2, true)), + Some(2), + None, + platform_version, + ) + .expect("expected to fetch active actions"); + + assert_eq!( + fetched_actions, + BTreeMap::from([ + (action_id_2, action_2.clone()), + (action_id_3, action_3.clone()) + ]), + "unexpected fetched actions" + ); + + // Prove actions starting from action_id_2 + let proof = drive + .prove_action_infos_v0( + contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + Some((action_id_2, true)), + Some(2), + None, + platform_version, + ) + .expect("should not error when proving active actions"); + + // Verify proof + let proved_actions: BTreeMap = + Drive::verify_action_infos_in_contract( + proof.as_slice(), + contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + Some((action_id_2, true)), + Some(2), + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert proved actions match fetched actions + assert_eq!(proved_actions, fetched_actions, "unexpected proved actions"); + } +} diff --git a/packages/rs-drive/src/drive/group/prove/prove_action_signers/mod.rs b/packages/rs-drive/src/drive/group/prove/prove_action_signers/mod.rs new file mode 100644 index 0000000000..cd6ee8d520 --- /dev/null +++ b/packages/rs-drive/src/drive/group/prove/prove_action_signers/mod.rs @@ -0,0 +1,124 @@ +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use grovedb::TransactionArg; +use platform_version::version::PlatformVersion; + +mod v0; +impl Drive { + /// Generates a cryptographic proof of the signers for a specified action in a group within a contract. + /// + /// # Arguments + /// + /// * `contract_id` - The unique identifier of the contract containing the group. + /// * `group_contract_position` - The position of the group within the contract. + /// * `action_status` - The status of the action (e.g., active or closed). + /// * `action_id` - The unique identifier of the action for which to prove signers. + /// * `transaction` - The transaction context for this operation. + /// * `platform_version` - The platform version to use for determining method compatibility. + /// + /// # Returns + /// + /// Returns a `Result` containing: + /// * `Vec` - The serialized cryptographic proof of the signers. + /// * `Error` - An error if the operation fails or if the platform version is unsupported. + /// + /// # Errors + /// + /// Returns an `Error` if: + /// * The specified platform version is not supported. + /// * Internal database or transaction errors occur. + pub fn prove_action_signers( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + action_id: Identifier, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .group + .prove + .prove_action_signers + { + 0 => self.prove_action_signers_v0( + contract_id, + group_contract_position, + action_status, + action_id, + transaction, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_action_signers".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + /// Generates a cryptographic proof of the signers for a specified action in a group within a contract + /// and appends the required operations for this proof to the provided list of drive operations. + /// + /// # Arguments + /// + /// * `contract_id` - The unique identifier of the contract containing the group. + /// * `group_contract_position` - The position of the group within the contract. + /// * `action_status` - The status of the action (e.g., active or closed). + /// * `action_id` - The unique identifier of the action for which to prove signers. + /// * `transaction` - The transaction context for this operation. + /// * `drive_operations` - A mutable reference to a list of low-level drive operations to which this operation will be appended. + /// * `platform_version` - The platform version to use for determining method compatibility. + /// + /// # Returns + /// + /// Returns a `Result` containing: + /// * `Vec` - The serialized cryptographic proof of the signers. + /// * `Error` - An error if the operation fails or if the platform version is unsupported. + /// + /// # Errors + /// + /// Returns an `Error` if: + /// * The specified platform version is not supported. + /// * Internal database or transaction errors occur. + pub(crate) fn prove_action_signers_operations( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + action_id: Identifier, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + match platform_version + .drive + .methods + .group + .prove + .prove_action_signers + { + 0 => self.prove_action_signers_operations_v0( + contract_id, + group_contract_position, + action_status, + action_id, + transaction, + drive_operations, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "prove_action_signers_operations".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/prove/prove_action_signers/v0/mod.rs b/packages/rs-drive/src/drive/group/prove/prove_action_signers/v0/mod.rs new file mode 100644 index 0000000000..509b374931 --- /dev/null +++ b/packages/rs-drive/src/drive/group/prove/prove_action_signers/v0/mod.rs @@ -0,0 +1,479 @@ +use crate::drive::Drive; +use crate::error::Error; +use crate::fees::op::LowLevelDriveOperation; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use dpp::version::PlatformVersion; +use grovedb::TransactionArg; + +impl Drive { + pub(super) fn prove_action_signers_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + action_id: Identifier, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result, Error> { + self.prove_action_signers_operations_v0( + contract_id, + group_contract_position, + action_status, + action_id, + transaction, + &mut vec![], + platform_version, + ) + } + + pub(super) fn prove_action_signers_operations_v0( + &self, + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + action_id: Identifier, + transaction: TransactionArg, + drive_operations: &mut Vec, + platform_version: &PlatformVersion, + ) -> Result, Error> { + let path_query = Drive::group_action_signers_query( + contract_id.to_buffer(), + group_contract_position, + action_status, + action_id.to_buffer(), + ); + self.grove_get_proved_path_query( + &path_query, + transaction, + drive_operations, + &platform_version.drive, + ) + } +} +#[cfg(test)] +mod tests { + use super::*; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::block::block_info::BlockInfo; + use dpp::data_contract::accessors::v0::DataContractV0Getters; + use dpp::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; + use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; + use dpp::data_contract::config::v0::DataContractConfigV0; + use dpp::data_contract::config::DataContractConfig; + use dpp::data_contract::group::v0::GroupV0; + use dpp::data_contract::group::{Group, GroupMemberPower}; + use dpp::data_contract::v1::DataContractV1; + use dpp::data_contract::DataContract; + use dpp::group::action_event::GroupActionEvent; + use dpp::group::group_action::v0::GroupActionV0; + use dpp::group::group_action::GroupAction; + use dpp::identifier::Identifier; + use dpp::identity::accessors::IdentityGettersV0; + use dpp::identity::Identity; + use dpp::tokens::token_event::TokenEvent; + use dpp::version::PlatformVersion; + use std::collections::BTreeMap; + + #[test] + fn should_prove_action_signers_with_multiple_actions() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity_1 = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_1_id = identity_1.id(); + + let identity_2 = Identity::random_identity(3, Some(506), platform_version) + .expect("expected a platform identity"); + + let identity_2_id = identity_2.id(); + + let identity_3 = Identity::random_identity(3, Some(9), platform_version) + .expect("expected a platform identity"); + + let identity_3_id = identity_3.id(); + + // Create a data contract with multiple tokens + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: BTreeMap::from([ + ( + 0, + Group::V0(GroupV0 { + members: [(identity_1_id, 1), (identity_2_id, 1)].into(), + required_power: 2, + }), + ), + ( + 1, + Group::V0(GroupV0 { + members: [(identity_1_id, 2), (identity_2_id, 1), (identity_3_id, 1)] + .into(), + required_power: 2, + }), + ), + ]), + tokens: BTreeMap::from([ + ( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ), + ( + 1, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ), + ]), + }); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Contract and group details + let contract_id = contract.id(); + let group_contract_position = 0; + + // Create actions + let action_id_1 = Identifier::random(); + let action_id_2 = Identifier::random(); + + let action_1 = GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(TokenEvent::Mint(100, identity_1_id, None)), + }); + + let action_2 = GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(TokenEvent::Burn(50, None)), + }); + + // Add actions using `add_group_action` + drive + .add_group_action( + contract_id, + group_contract_position, + Some(action_1.clone()), + action_id_1, + identity_1_id, + 1, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add action 1"); + + drive + .add_group_action( + contract_id, + group_contract_position, + Some(action_1.clone()), + action_id_1, + identity_2_id, + 1, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add action 1"); + + drive + .add_group_action( + contract_id, + group_contract_position, + Some(action_2.clone()), + action_id_2, + identity_2_id, + 1, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add action 2"); + + // Fetch actions directly + let fetched_actions = drive + .fetch_action_signers( + contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + action_id_1, + None, + platform_version, + ) + .expect("expected to fetch active actions"); + + assert_eq!( + fetched_actions, + BTreeMap::from([(identity_1_id, 1), (identity_2_id, 1)]), + "unexpected fetched powers" + ); + + // Prove actions + let proof = drive + .prove_action_signers_v0( + contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + action_id_1, + None, + platform_version, + ) + .expect("should not error when proving active actions"); + + // Verify proof + let proved_actions: BTreeMap = Drive::verify_action_signers( + proof.as_slice(), + contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + action_id_1, + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert proved actions match fetched actions + assert_eq!(proved_actions, fetched_actions, "unexpected proved actions"); + } + + #[test] + fn should_prove_no_action_signers_for_non_existent_action() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity_1 = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_1_id = identity_1.id(); + + let identity_2 = Identity::random_identity(3, Some(506), platform_version) + .expect("expected a platform identity"); + + let identity_2_id = identity_2.id(); + + // Create a data contract with groups + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: BTreeMap::from([( + 0, + Group::V0(GroupV0 { + members: [(identity_1_id, 1), (identity_2_id, 1)].into(), + required_power: 2, + }), + )]), + tokens: BTreeMap::new(), + }); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Contract and group details + let contract_id = contract.id(); + let group_contract_position = 0; + let non_existent_action_id = Identifier::random(); + + // Prove action signers for a non-existent action + let proof = drive + .prove_action_signers_v0( + contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + non_existent_action_id, + None, + platform_version, + ) + .expect("should not error when proving action signers for non-existent action"); + + // Verify proof + let proved_signers: BTreeMap = Drive::verify_action_signers( + proof.as_slice(), + contract_id, + group_contract_position, + GroupActionStatus::ActionActive, + non_existent_action_id, + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert no signers exist + assert!(proved_signers.is_empty(), "expected no signers"); + } + + #[test] + fn should_prove_action_signers_for_closed_action_if_still_active() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity_1 = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_1_id = identity_1.id(); + + let identity_2 = Identity::random_identity(3, Some(506), platform_version) + .expect("expected a platform identity"); + + let identity_2_id = identity_2.id(); + + // Create a data contract with groups + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: BTreeMap::from([( + 0, + Group::V0(GroupV0 { + members: [(identity_1_id, 1), (identity_2_id, 1)].into(), + required_power: 2, + }), + )]), + tokens: BTreeMap::new(), + }); + + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Contract and group details + let contract_id = contract.id(); + let group_contract_position = 0; + + // Create a closed action + let action_id = Identifier::random(); + let action = GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(TokenEvent::Burn(50, None)), + }); + + drive + .add_group_action( + contract_id, + group_contract_position, + Some(action.clone()), + action_id, + identity_2_id, + 1, + &BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to add action"); + + // Fetch closed action signers + let fetched_signers = drive + .fetch_action_signers( + contract_id, + group_contract_position, + GroupActionStatus::ActionClosed, + action_id, + None, + platform_version, + ) + .expect("expected to fetch closed action signers"); + + assert_eq!( + fetched_signers, + BTreeMap::new(), + "unexpected fetched powers" + ); + + // Prove closed action signers + let proof = drive + .prove_action_signers_v0( + contract_id, + group_contract_position, + GroupActionStatus::ActionClosed, + action_id, + None, + platform_version, + ) + .expect("should not error when proving closed action signers"); + + // Verify proof + let proved_signers: BTreeMap = Drive::verify_action_signers( + proof.as_slice(), + contract_id, + group_contract_position, + GroupActionStatus::ActionClosed, + action_id, + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert proved signers match fetched signers + assert_eq!(proved_signers, fetched_signers, "unexpected proved signers"); + } +} diff --git a/packages/rs-drive/src/drive/group/prove/prove_group_info/mod.rs b/packages/rs-drive/src/drive/group/prove/prove_group_info/mod.rs index 5fd307c25e..a985301f6d 100644 --- a/packages/rs-drive/src/drive/group/prove/prove_group_info/mod.rs +++ b/packages/rs-drive/src/drive/group/prove/prove_group_info/mod.rs @@ -2,13 +2,10 @@ use crate::drive::Drive; use crate::error::drive::DriveError; use crate::error::Error; use crate::fees::op::LowLevelDriveOperation; -use dpp::data_contract::group::Group; use dpp::data_contract::GroupContractPosition; use dpp::identifier::Identifier; -use grovedb::batch::KeyInfoPath; -use grovedb::{EstimatedLayerInformation, TransactionArg}; +use grovedb::TransactionArg; use platform_version::version::PlatformVersion; -use std::collections::HashMap; mod v0; diff --git a/packages/rs-drive/src/drive/group/prove/prove_group_info/v0/mod.rs b/packages/rs-drive/src/drive/group/prove/prove_group_info/v0/mod.rs index 0dd20e36e0..189cc63a2a 100644 --- a/packages/rs-drive/src/drive/group/prove/prove_group_info/v0/mod.rs +++ b/packages/rs-drive/src/drive/group/prove/prove_group_info/v0/mod.rs @@ -43,3 +43,157 @@ impl Drive { ) } } + +#[cfg(test)] +mod tests { + use super::*; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::block::block_info::BlockInfo; + use dpp::data_contract::accessors::v0::DataContractV0Getters; + use dpp::data_contract::config::v0::DataContractConfigV0; + use dpp::data_contract::config::DataContractConfig; + use dpp::data_contract::group::v0::GroupV0; + use dpp::data_contract::group::Group; + use dpp::data_contract::v1::DataContractV1; + use dpp::identity::accessors::IdentityGettersV0; + use dpp::identity::Identity; + use dpp::prelude::DataContract; + use dpp::version::PlatformVersion; + use std::collections::BTreeMap; + + #[test] + fn should_prove_group_info_for_existing_group() { + let drive = setup_drive_with_initial_state_structure(None); + let platform_version = PlatformVersion::latest(); + + // Create identities for group members + let identity_1 = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + let identity_2 = Identity::random_identity(3, Some(506), platform_version) + .expect("expected a platform identity"); + + let identity_1_id = identity_1.id(); + let identity_2_id = identity_2.id(); + + // Create a data contract with a single group + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: BTreeMap::from([( + 0, + Group::V0(GroupV0 { + members: [(identity_1_id, 1), (identity_2_id, 2)].into(), + required_power: 3, + }), + )]), + tokens: Default::default(), + }); + + let contract_id = contract.id(); + + // Insert the contract into Drive + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Prove group info for group at position 0 + let proof = drive + .prove_group_info_v0(contract_id, 0, None, platform_version) + .expect("should not error when proving group info"); + + // Verify the proof + let (root_hash, group) = + Drive::verify_group_info(proof.as_slice(), contract_id, 0, false, platform_version) + .expect("expected proof verification to succeed"); + + // Assert root hash is valid + assert!(!root_hash.is_empty(), "root hash should not be empty"); + + // Assert group matches the expected value + assert_eq!( + group, + Some(Group::V0(GroupV0 { + members: [(identity_1_id, 1), (identity_2_id, 2)].into(), + required_power: 3, + })), + "unexpected group info" + ); + } + + #[test] + fn should_prove_no_group_info_for_non_existent_group() { + let drive = setup_drive_with_initial_state_structure(None); + let platform_version = PlatformVersion::latest(); + + // Create a data contract without groups + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: Default::default(), + tokens: Default::default(), + }); + + let contract_id = contract.id(); + + // Insert the contract into Drive + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Prove group info for a non-existent group at position 0 + let proof = drive + .prove_group_info_v0(contract_id, 0, None, platform_version) + .expect("should not error when proving group info for a non-existent group"); + + // Verify the proof + let (root_hash, group) = + Drive::verify_group_info(proof.as_slice(), contract_id, 0, false, platform_version) + .expect("expected proof verification to succeed"); + + // Assert root hash is valid + assert!(!root_hash.is_empty(), "root hash should not be empty"); + + // Assert group is None + assert!(group.is_none(), "expected no group info, but got some"); + } +} diff --git a/packages/rs-drive/src/drive/group/prove/prove_group_infos/mod.rs b/packages/rs-drive/src/drive/group/prove/prove_group_infos/mod.rs index 27b153c2b1..3b882557de 100644 --- a/packages/rs-drive/src/drive/group/prove/prove_group_infos/mod.rs +++ b/packages/rs-drive/src/drive/group/prove/prove_group_infos/mod.rs @@ -2,13 +2,11 @@ use crate::drive::Drive; use crate::error::drive::DriveError; use crate::error::Error; use crate::fees::op::LowLevelDriveOperation; -use dpp::data_contract::group::Group; use dpp::data_contract::GroupContractPosition; use dpp::identifier::Identifier; use dpp::prelude::StartAtIncluded; use grovedb::TransactionArg; use platform_version::version::PlatformVersion; -use std::collections::BTreeMap; mod v0; impl Drive { diff --git a/packages/rs-drive/src/drive/group/prove/prove_group_infos/v0/mod.rs b/packages/rs-drive/src/drive/group/prove/prove_group_infos/v0/mod.rs index d1260102bd..cf65df5400 100644 --- a/packages/rs-drive/src/drive/group/prove/prove_group_infos/v0/mod.rs +++ b/packages/rs-drive/src/drive/group/prove/prove_group_infos/v0/mod.rs @@ -48,3 +48,320 @@ impl Drive { ) } } + +#[cfg(test)] +mod tests { + use super::*; + use crate::util::test_helpers::setup::setup_drive_with_initial_state_structure; + use dpp::block::block_info::BlockInfo; + use dpp::data_contract::accessors::v0::DataContractV0Getters; + use dpp::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; + use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; + use dpp::data_contract::config::v0::DataContractConfigV0; + use dpp::data_contract::config::DataContractConfig; + use dpp::data_contract::group::v0::GroupV0; + use dpp::data_contract::group::Group; + use dpp::data_contract::v1::DataContractV1; + use dpp::data_contract::GroupContractPosition; + use dpp::identity::accessors::IdentityGettersV0; + use dpp::identity::Identity; + use dpp::prelude::DataContract; + use dpp::version::PlatformVersion; + use std::collections::BTreeMap; + + #[test] + fn should_prove_group_infos_with_multiple_groups() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity_1 = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_1_id = identity_1.id(); + + let identity_2 = Identity::random_identity(3, Some(506), platform_version) + .expect("expected a platform identity"); + + let identity_2_id = identity_2.id(); + + let identity_3 = Identity::random_identity(3, Some(9), platform_version) + .expect("expected a platform identity"); + + let identity_3_id = identity_3.id(); + + // Create a data contract with groups + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: BTreeMap::from([ + ( + 0, + Group::V0(GroupV0 { + members: [(identity_1_id, 1), (identity_2_id, 1)].into(), + required_power: 2, + }), + ), + ( + 1, + Group::V0(GroupV0 { + members: [(identity_1_id, 2), (identity_2_id, 1), (identity_3_id, 1)] + .into(), + required_power: 2, + }), + ), + ]), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + + let contract_id = contract.id(); + + // Insert contract into Drive + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Prove group infos + let proof = drive + .prove_group_infos_v0( + contract_id, + None, // No start position + Some(10), // Limit + None, + platform_version, + ) + .expect("should not error when proving group infos"); + + println!("{}", hex::encode(&proof)); + + // Verify proof + let proved_group_infos: BTreeMap = + Drive::verify_group_infos_in_contract( + proof.as_slice(), + contract_id, + None, + Some(10), + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert group infos match expected values + assert_eq!( + proved_group_infos, + BTreeMap::from([ + ( + 0, + Group::V0(GroupV0 { + members: [(identity_1_id, 1), (identity_2_id, 1)].into(), + required_power: 2, + }), + ), + ( + 1, + Group::V0(GroupV0 { + members: [(identity_1_id, 2), (identity_2_id, 1), (identity_3_id, 1)] + .into(), + required_power: 2, + }), + ), + ]), + "unexpected group infos" + ); + } + + #[test] + fn should_prove_group_infos_with_start_position_and_limit() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let identity_1 = Identity::random_identity(3, Some(14), platform_version) + .expect("expected a platform identity"); + + let identity_1_id = identity_1.id(); + + let identity_2 = Identity::random_identity(3, Some(506), platform_version) + .expect("expected a platform identity"); + + let identity_2_id = identity_2.id(); + + let identity_3 = Identity::random_identity(3, Some(9), platform_version) + .expect("expected a platform identity"); + + let identity_3_id = identity_3.id(); + + // Create a data contract with groups + let contract = DataContract::V1(DataContractV1 { + id: Default::default(), + version: 0, + owner_id: Default::default(), + document_types: Default::default(), + metadata: None, + config: DataContractConfig::V0(DataContractConfigV0 { + can_be_deleted: false, + readonly: false, + keeps_history: false, + documents_keep_history_contract_default: false, + documents_mutable_contract_default: false, + documents_can_be_deleted_contract_default: false, + requires_identity_encryption_bounded_key: None, + requires_identity_decryption_bounded_key: None, + }), + schema_defs: None, + groups: BTreeMap::from([ + ( + 0, + Group::V0(GroupV0 { + members: [(identity_1_id, 1), (identity_2_id, 1)].into(), + required_power: 2, + }), + ), + ( + 1, + Group::V0(GroupV0 { + members: [(identity_1_id, 2), (identity_2_id, 1), (identity_3_id, 1)] + .into(), + required_power: 2, + }), + ), + ( + 2, + Group::V0(GroupV0 { + members: [(identity_2_id, 1), (identity_3_id, 2)].into(), + required_power: 3, + }), + ), + ( + 3, + Group::V0(GroupV0 { + members: [(identity_1_id, 1), (identity_3_id, 1)].into(), + required_power: 2, + }), + ), + ]), + tokens: BTreeMap::from([( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + )]), + }); + + let contract_id = contract.id(); + + // Insert contract into Drive + drive + .insert_contract( + &contract, + BlockInfo::default(), + true, + None, + platform_version, + ) + .expect("expected to insert contract"); + + // Prove group infos starting from position 1 with a limit of 2 + let proof = drive + .prove_group_infos_v0( + contract_id, + Some((1, true)), + Some(2), + None, + platform_version, + ) + .expect("should not error when proving group infos"); + + // Verify proof + let proved_group_infos: BTreeMap = + Drive::verify_group_infos_in_contract( + proof.as_slice(), + contract_id, + Some((1, true)), + Some(2), + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert group infos match expected values + assert_eq!( + proved_group_infos, + BTreeMap::from([ + ( + 1, + Group::V0(GroupV0 { + members: [(identity_1_id, 2), (identity_2_id, 1), (identity_3_id, 1)] + .into(), + required_power: 2, + }) + ), + ( + 2, + Group::V0(GroupV0 { + members: [(identity_2_id, 1), (identity_3_id, 2)].into(), + required_power: 3, + }), + ), + ]), + "unexpected group infos" + ); + } + + #[test] + fn should_prove_no_group_infos_for_empty_contract() { + let drive = setup_drive_with_initial_state_structure(None); + + let platform_version = PlatformVersion::latest(); + + let contract_id = Identifier::random(); + + // Prove group infos for an empty contract + let proof = drive + .prove_group_infos_v0(contract_id, None, Some(10), None, platform_version) + .expect("should not error when proving group infos for an empty contract"); + + // Verify proof + let proved_group_infos: BTreeMap = + Drive::verify_group_infos_in_contract( + proof.as_slice(), + contract_id, + None, + Some(10), + false, + platform_version, + ) + .expect("expected proof verification to succeed") + .1; + + // Assert no group infos exist for the empty contract + assert!( + proved_group_infos.is_empty(), + "expected no group infos, but got: {:?}", + proved_group_infos + ); + } +} diff --git a/packages/rs-drive/src/drive/tokens/balance/queries.rs b/packages/rs-drive/src/drive/tokens/balance/queries.rs index a02a3216db..1804724e2a 100644 --- a/packages/rs-drive/src/drive/tokens/balance/queries.rs +++ b/packages/rs-drive/src/drive/tokens/balance/queries.rs @@ -1,7 +1,5 @@ use crate::drive::balances::total_tokens_root_supply_path_vec; -use crate::drive::tokens::paths::{ - token_balances_path_vec, token_balances_root_path_vec, tokens_root_path_vec, TOKEN_BALANCES_KEY, -}; +use crate::drive::tokens::paths::{token_balances_path_vec, token_balances_root_path_vec}; use crate::drive::Drive; use crate::error::Error; use crate::query::{Query, QueryItem}; diff --git a/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/mod.rs b/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/mod.rs index 60b85c9dbb..8472cfb8aa 100644 --- a/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/mod.rs +++ b/packages/rs-drive/src/drive/tokens/calculate_total_tokens_balance/mod.rs @@ -4,7 +4,6 @@ use crate::drive::Drive; use crate::error::drive::DriveError; use crate::error::Error; use dpp::balances::total_tokens_balance::TotalTokensBalance; -use dpp::version::drive_versions::DriveVersion; use grovedb::TransactionArg; use platform_version::version::PlatformVersion; diff --git a/packages/rs-drive/src/drive/tokens/info/queries.rs b/packages/rs-drive/src/drive/tokens/info/queries.rs index c4e80a5af1..8f5a444380 100644 --- a/packages/rs-drive/src/drive/tokens/info/queries.rs +++ b/packages/rs-drive/src/drive/tokens/info/queries.rs @@ -1,6 +1,5 @@ use crate::drive::tokens::paths::{ - token_identity_infos_path_vec, token_identity_infos_root_path_vec, - token_statuses_root_path_vec, tokens_root_path_vec, TOKEN_STATUS_INFO_KEY, + token_identity_infos_path_vec, token_identity_infos_root_path_vec, token_statuses_root_path_vec, }; use crate::drive::Drive; use crate::query::{Query, QueryItem}; diff --git a/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/mod.rs b/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/mod.rs index 26f2ad535f..bf442bd2a8 100644 --- a/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/mod.rs +++ b/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/mod.rs @@ -3,12 +3,8 @@ mod v0; use crate::drive::Drive; use crate::error::drive::DriveError; use crate::error::Error; -use crate::fees::op::LowLevelDriveOperation; -use dpp::balances::credits::TokenAmount; use dpp::version::PlatformVersion; -use grovedb::batch::KeyInfoPath; -use grovedb::{EstimatedLayerInformation, TransactionArg}; -use std::collections::HashMap; +use grovedb::TransactionArg; impl Drive { /// Proves token's total supply and aggregated identity balances diff --git a/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/v0/mod.rs b/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/v0/mod.rs index 7dde90d7ef..64ee4a9dd3 100644 --- a/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/v0/mod.rs +++ b/packages/rs-drive/src/drive/tokens/system/prove_token_total_supply_and_aggregated_identity_balances/v0/mod.rs @@ -197,7 +197,9 @@ mod tests { groups: Default::default(), tokens: BTreeMap::from([( 0, - TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + TokenConfiguration::V0( + TokenConfigurationV0::default_most_restrictive().with_base_supply(0), + ), )]), }); diff --git a/packages/rs-drive/src/verify/group/mod.rs b/packages/rs-drive/src/verify/group/mod.rs new file mode 100644 index 0000000000..d77cec3ea0 --- /dev/null +++ b/packages/rs-drive/src/verify/group/mod.rs @@ -0,0 +1,4 @@ +mod verify_action_signers; +mod verify_active_action_infos; +mod verify_group_info; +mod verify_group_infos_in_contract; diff --git a/packages/rs-drive/src/verify/group/verify_action_signers/mod.rs b/packages/rs-drive/src/verify/group/verify_action_signers/mod.rs new file mode 100644 index 0000000000..e708038af4 --- /dev/null +++ b/packages/rs-drive/src/verify/group/verify_action_signers/mod.rs @@ -0,0 +1,78 @@ +mod v0; + +use crate::drive::Drive; +use dpp::data_contract::group::GroupMemberPower; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; + +use crate::error::drive::DriveError; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the proof of action signer information within a contract. + /// + /// This method validates and extracts action signer information stored in a contract based on the provided proof. + /// It uses the proof to confirm the integrity and authenticity of the action signer data. The method supports + /// different versions for backward compatibility and forwards the verification logic to the appropriate versioned implementation. + /// + /// # Type Parameters + /// - `T`: The output container type that implements `FromIterator`. This is used to collect the verified action signer information + /// as pairs of [`Identifier`] and [`GroupMemberPower`]. + /// + /// # Arguments + /// - `proof`: A byte slice containing the cryptographic proof for the active_action information. + /// - `contract_id`: The identifier of the contract whose active_action information is being verified. + /// - `start_active_action_contract_position`: An optional starting position for the active_action query, combined with a [`StartAtIncluded`] flag + /// to indicate whether the start position is inclusive. + /// - `limit`: An optional limit on the number of active_actions to verify. + /// - `verify_subset_of_proof`: A boolean flag indicating whether to verify only a subset of the proof (useful for optimizations). + /// - `platform_version`: A reference to the platform version, used to determine the appropriate versioned implementation. + /// + /// # Returns + /// - `Ok((RootHash, T))`: On success, returns a tuple containing: + /// - `RootHash`: The root hash of the Merkle tree, confirming the proof's validity. + /// - `T`: A collection of verified active_action information as pairs of [`GroupContractPosition`] and [`Group`]. + /// + /// # Errors + /// - [`Error::Proof`]: If the proof is invalid, corrupted, or contains unexpected data structures. + /// - [`Error::Drive(DriveError::UnknownVersionMismatch)`]: If the method is called with an unsupported platform version. + /// - Any other errors propagated from the versioned implementation. + pub fn verify_action_signers>( + proof: &[u8], + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + action_id: Identifier, + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + match platform_version + .drive + .methods + .verify + .group + .verify_action_signers + { + 0 => Self::verify_action_signers_v0( + proof, + contract_id, + group_contract_position, + action_status, + action_id, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_action_signers".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/group/verify_action_signers/v0/mod.rs b/packages/rs-drive/src/verify/group/verify_action_signers/v0/mod.rs new file mode 100644 index 0000000000..2cffb68635 --- /dev/null +++ b/packages/rs-drive/src/verify/group/verify_action_signers/v0/mod.rs @@ -0,0 +1,72 @@ +use crate::drive::Drive; +use grovedb::Element::SumItem; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::data_contract::group::GroupMemberPower; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_action_signers_v0>( + proof: &[u8], + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + action_id: Identifier, + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + let path_query = Drive::group_action_signers_query( + contract_id.to_buffer(), + group_contract_position, + action_status, + action_id.to_buffer(), + ); + + let (root_hash, proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query(proof, &path_query, &platform_version.drive.grove_version)? + } else { + GroveDb::verify_query(proof, &path_query, &platform_version.drive.grove_version)? + }; + let values = proved_key_values + .into_iter() + .filter_map(|(_, key, element)| { + let id: Identifier = match key.try_into() { + Ok(id) => id, + Err(_) => { + return Some(Err(Error::Proof(ProofError::IncorrectProof( + "identifier was not 32 bytes long".to_string(), + )))) + } + }; + match element { + Some(SumItem(value, ..)) => { + let signing_power: GroupMemberPower = match value.try_into() { + Ok(signing_power) => signing_power, + Err(_) => { + return Some(Err(Error::Proof(ProofError::IncorrectProof( + "signed power should be encodable on a u32 integer".to_string(), + )))) + } + }; + + Some(Ok((id, signing_power))) + } + None => None, + _ => Some(Err(Error::Proof(ProofError::IncorrectProof( + "element should be a sum item representing member signed power".to_string(), + )) + .into())), + } + }) + .collect::>()?; + Ok((root_hash, values)) + } +} diff --git a/packages/rs-drive/src/verify/group/verify_active_action_infos/mod.rs b/packages/rs-drive/src/verify/group/verify_active_action_infos/mod.rs new file mode 100644 index 0000000000..d0d81ecd69 --- /dev/null +++ b/packages/rs-drive/src/verify/group/verify_active_action_infos/mod.rs @@ -0,0 +1,81 @@ +mod v0; + +use crate::drive::Drive; +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action::GroupAction; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use dpp::prelude::StartAtIncluded; + +use crate::error::drive::DriveError; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the proof of action information within a contract. + /// + /// This method validates and extracts action information stored in a contract based on the provided proof. + /// It uses the proof to confirm the integrity and authenticity of the action data. The method supports + /// different versions for backward compatibility and forwards the verification logic to the appropriate versioned implementation. + /// + /// # Type Parameters + /// - `T`: The output container type that implements `FromIterator`. This is used to collect the verified action information + /// as pairs of [`Identifier`] and [`GroupAction`]. + /// + /// # Arguments + /// - `proof`: A byte slice containing the cryptographic proof for the active_action information. + /// - `contract_id`: The identifier of the contract whose active_action information is being verified. + /// - `start_active_action_contract_position`: An optional starting position for the active_action query, combined with a [`StartAtIncluded`] flag + /// to indicate whether the start position is inclusive. + /// - `limit`: An optional limit on the number of active_actions to verify. + /// - `verify_subset_of_proof`: A boolean flag indicating whether to verify only a subset of the proof (useful for optimizations). + /// - `platform_version`: A reference to the platform version, used to determine the appropriate versioned implementation. + /// + /// # Returns + /// - `Ok((RootHash, T))`: On success, returns a tuple containing: + /// - `RootHash`: The root hash of the Merkle tree, confirming the proof's validity. + /// - `T`: A collection of verified active_action information as pairs of [`GroupContractPosition`] and [`Group`]. + /// + /// # Errors + /// - [`Error::Proof`]: If the proof is invalid, corrupted, or contains unexpected data structures. + /// - [`Error::Drive(DriveError::UnknownVersionMismatch)`]: If the method is called with an unsupported platform version. + /// - Any other errors propagated from the versioned implementation. + pub fn verify_action_infos_in_contract>( + proof: &[u8], + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + start_action_id: Option<(Identifier, StartAtIncluded)>, + limit: Option, + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + match platform_version + .drive + .methods + .verify + .group + .verify_action_infos + { + 0 => Self::verify_action_infos_in_contract_v0( + proof, + contract_id, + group_contract_position, + action_status, + start_action_id, + limit, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_action_infos_in_contract".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/group/verify_active_action_infos/v0/mod.rs b/packages/rs-drive/src/verify/group/verify_active_action_infos/v0/mod.rs new file mode 100644 index 0000000000..972ddc1082 --- /dev/null +++ b/packages/rs-drive/src/verify/group/verify_active_action_infos/v0/mod.rs @@ -0,0 +1,74 @@ +use crate::drive::Drive; +use grovedb::Element::Item; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::data_contract::GroupContractPosition; +use dpp::group::group_action::GroupAction; +use dpp::group::group_action_status::GroupActionStatus; +use dpp::identifier::Identifier; +use dpp::prelude::StartAtIncluded; +use dpp::serialization::PlatformDeserializable; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_action_infos_in_contract_v0>( + proof: &[u8], + contract_id: Identifier, + group_contract_position: GroupContractPosition, + action_status: GroupActionStatus, + start_action_id: Option<(Identifier, StartAtIncluded)>, + limit: Option, + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + let path_query = Drive::group_action_infos_query( + contract_id.to_buffer(), + group_contract_position, + action_status, + start_action_id.map(|(s, i)| (s.to_buffer(), i)), + limit, + ); + + let (root_hash, proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query(proof, &path_query, &platform_version.drive.grove_version)? + } else { + GroveDb::verify_query(proof, &path_query, &platform_version.drive.grove_version)? + }; + let values = proved_key_values + .into_iter() + .filter_map(|(path, _, element)| { + let Some(last_path_component) = path.last() else { + return Some(Err(Error::Proof(ProofError::IncorrectProof( + "last path component is empty".to_string(), + )))); + }; + let action_id = match Identifier::from_bytes(last_path_component) { + Ok(action_id) => action_id, + Err(e) => return Some(Err(e.into())), + }; + + match element { + Some(Item(value, ..)) => { + let active_action = match GroupAction::deserialize_from_bytes(&value) { + Ok(active_action) => active_action, + + Err(e) => return Some(Err(e.into())), + }; + Some(Ok((action_id, active_action))) + } + None => None, + Some(element) => Some(Err(Error::Proof(ProofError::IncorrectProof(format!( + "group action should be in an item, however a {} was returned", + element.type_str() + ))))), + } + }) + .collect::>()?; + Ok((root_hash, values)) + } +} diff --git a/packages/rs-drive/src/verify/group/verify_group_info/mod.rs b/packages/rs-drive/src/verify/group/verify_group_info/mod.rs new file mode 100644 index 0000000000..ded3f812fe --- /dev/null +++ b/packages/rs-drive/src/verify/group/verify_group_info/mod.rs @@ -0,0 +1,69 @@ +mod v0; + +use crate::drive::Drive; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; + +use crate::error::drive::DriveError; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the proof of a single group's information within a contract. + /// + /// This method validates and extracts a specific group's information stored in a contract based on the provided proof. + /// It ensures the integrity and authenticity of the data associated with the specified group position in the contract. + /// The method supports multiple versions for backward compatibility and forwards the verification logic + /// to the appropriate versioned implementation. + /// + /// # Arguments + /// - `proof`: A byte slice containing the cryptographic proof for the group information. + /// - `contract_id`: The identifier of the contract containing the group information. + /// - `group_contract_position`: The position of the group within the contract to verify. + /// - `verify_subset_of_proof`: A boolean flag indicating whether to verify only a subset of the proof (useful for optimizations). + /// - `platform_version`: A reference to the platform version, used to determine the appropriate versioned implementation. + /// + /// # Returns + /// - `Ok((RootHash, Option))`: On success, returns a tuple containing: + /// - `RootHash`: The root hash of the Merkle tree, confirming the proof's validity. + /// - `Option`: The verified group information if it exists, or `None` if the group is absent. + /// - `Err(Error)`: If verification fails, returns an [`Error`] indicating the cause of failure. + /// + /// # Errors + /// - [`Error::Proof`]: If the proof is invalid, corrupted, or contains unexpected data structures. + /// - [`Error::Drive(DriveError::UnknownVersionMismatch)`]: If the method is called with an unsupported platform version. + /// - [`Error::GroveDB`]: If the data deserialization or conversion fails during proof verification. + pub fn verify_group_info( + proof: &[u8], + contract_id: Identifier, + group_contract_position: GroupContractPosition, + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, Option), Error> { + match platform_version + .drive + .methods + .verify + .group + .verify_group_info + { + 0 => Self::verify_group_info_v0( + proof, + contract_id, + group_contract_position, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_group_info".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/group/verify_group_info/v0/mod.rs b/packages/rs-drive/src/verify/group/verify_group_info/v0/mod.rs new file mode 100644 index 0000000000..0b2ae2397c --- /dev/null +++ b/packages/rs-drive/src/verify/group/verify_group_info/v0/mod.rs @@ -0,0 +1,57 @@ +use crate::drive::Drive; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use dpp::serialization::PlatformDeserializable; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_group_info_v0( + proof: &[u8], + contract_id: Identifier, + group_contract_position: GroupContractPosition, + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, Option), Error> { + let path_query = Self::group_info_for_contract_id_and_group_contract_position_query( + contract_id.to_buffer(), + group_contract_position, + ); + let (root_hash, mut proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + } else { + GroveDb::verify_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + }; + + if proved_key_values.len() != 1 { + return Err(Error::Proof(ProofError::CorruptedProof( + "we should always get back one element".to_string(), + ))); + } + + let element = proved_key_values.remove(0).2; + + let group = element + .map(|element| element.into_item_bytes().map_err(Error::GroveDB)) + .transpose()? + .map(|bytes| Group::deserialize_from_bytes(&bytes)) + .transpose()?; + + Ok((root_hash, group)) + } +} diff --git a/packages/rs-drive/src/verify/group/verify_group_infos_in_contract/mod.rs b/packages/rs-drive/src/verify/group/verify_group_infos_in_contract/mod.rs new file mode 100644 index 0000000000..0d20771bc6 --- /dev/null +++ b/packages/rs-drive/src/verify/group/verify_group_infos_in_contract/mod.rs @@ -0,0 +1,77 @@ +mod v0; + +use crate::drive::Drive; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use dpp::prelude::StartAtIncluded; + +use crate::error::drive::DriveError; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the proof of group information within a contract. + /// + /// This method validates and extracts group information stored in a contract based on the provided proof. + /// It uses the proof to confirm the integrity and authenticity of the group data. The method supports + /// different versions for backward compatibility and forwards the verification logic to the appropriate versioned implementation. + /// + /// # Type Parameters + /// - `T`: The output container type that implements `FromIterator`. This is used to collect the verified group information + /// as pairs of [`GroupContractPosition`] and [`Group`]. + /// + /// # Arguments + /// - `proof`: A byte slice containing the cryptographic proof for the group information. + /// - `contract_id`: The identifier of the contract whose group information is being verified. + /// - `start_group_contract_position`: An optional starting position for the group query, combined with a [`StartAtIncluded`] flag + /// to indicate whether the start position is inclusive. + /// - `limit`: An optional limit on the number of groups to verify. + /// - `verify_subset_of_proof`: A boolean flag indicating whether to verify only a subset of the proof (useful for optimizations). + /// - `platform_version`: A reference to the platform version, used to determine the appropriate versioned implementation. + /// + /// # Returns + /// - `Ok((RootHash, T))`: On success, returns a tuple containing: + /// - `RootHash`: The root hash of the Merkle tree, confirming the proof's validity. + /// - `T`: A collection of verified group information as pairs of [`GroupContractPosition`] and [`Group`]. + /// - `Err(Error)`: If verification fails, returns an [`Error`] indicating the cause of failure. + /// + /// # Errors + /// - [`Error::Proof`]: If the proof is invalid, corrupted, or contains unexpected data structures. + /// - [`Error::Drive(DriveError::UnknownVersionMismatch)`]: If the method is called with an unsupported platform version. + /// - Any other errors propagated from the versioned implementation. + pub fn verify_group_infos_in_contract>( + proof: &[u8], + contract_id: Identifier, + start_group_contract_position: Option<(GroupContractPosition, StartAtIncluded)>, + limit: Option, + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + match platform_version + .drive + .methods + .verify + .group + .verify_group_infos_in_contract + { + 0 => Self::verify_group_infos_in_contract_v0( + proof, + contract_id, + start_group_contract_position, + limit, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_group_infos_in_contract".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/group/verify_group_infos_in_contract/v0/mod.rs b/packages/rs-drive/src/verify/group/verify_group_infos_in_contract/v0/mod.rs new file mode 100644 index 0000000000..e594605f95 --- /dev/null +++ b/packages/rs-drive/src/verify/group/verify_group_infos_in_contract/v0/mod.rs @@ -0,0 +1,79 @@ +use crate::drive::Drive; +use grovedb::Element::Item; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use dpp::prelude::StartAtIncluded; +use dpp::serialization::PlatformDeserializable; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_group_infos_in_contract_v0< + T: FromIterator<(GroupContractPosition, Group)>, + >( + proof: &[u8], + contract_id: Identifier, + start_group_contract_position: Option<(GroupContractPosition, StartAtIncluded)>, + limit: Option, + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, T), Error> { + let path_query = Self::group_infos_for_contract_id_query( + contract_id.to_buffer(), + start_group_contract_position, + limit, + ); + let (root_hash, proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query(proof, &path_query, &platform_version.drive.grove_version)? + } else { + GroveDb::verify_query(proof, &path_query, &platform_version.drive.grove_version)? + }; + let values = proved_key_values + .into_iter() + .filter_map(|(path, _, element)| { + let key_bytes = match path.last() { + Some(contract_position_bytes) => contract_position_bytes, + None => { + return Some(Err(Error::Proof(ProofError::CorruptedProof( + "path can't be empty in proof".to_string(), + )))) + } + }; + let key_bytes: [u8; 2] = match key_bytes.clone().try_into().map_err(|_| { + Error::Proof(ProofError::IncorrectValueSize( + "group contract position incorrect size", + )) + }) { + Ok(bytes) => bytes, + + Err(e) => return Some(Err(e)), + }; + let group_contract_position: GroupContractPosition = + GroupContractPosition::from_be_bytes(key_bytes); + match element { + Some(Item(value, ..)) => { + let group = match Group::deserialize_from_bytes(&value) { + Ok(group) => group, + + Err(e) => return Some(Err(e.into())), + }; + Some(Ok((group_contract_position, group))) + } + None => None, + Some(element) => Some(Err(Error::Proof(ProofError::IncorrectProof(format!( + "group should be in an item, however a {} was returned", + element.type_str() + ))))), + } + }) + .collect::>()?; + Ok((root_hash, values)) + } +} diff --git a/packages/rs-drive/src/verify/mod.rs b/packages/rs-drive/src/verify/mod.rs index 18474b4bbb..98d19c7bb0 100644 --- a/packages/rs-drive/src/verify/mod.rs +++ b/packages/rs-drive/src/verify/mod.rs @@ -10,9 +10,13 @@ pub mod single_document; /// System components (Epoch info etc...) verification methods on proofs pub mod system; +/// Group proof verification module +pub mod group; /// Verifies that a state transition contents exist in the proof pub mod state_transition; -mod tokens; +/// Token proof verification module +pub mod tokens; +/// Voting proof verification module pub mod voting; /// Represents the root hash of the grovedb tree diff --git a/packages/rs-drive/src/verify/tokens/verify_token_statuses/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_statuses/mod.rs index 7b7e9b8287..8cb213ff90 100644 --- a/packages/rs-drive/src/verify/tokens/verify_token_statuses/mod.rs +++ b/packages/rs-drive/src/verify/tokens/verify_token_statuses/mod.rs @@ -2,7 +2,6 @@ mod v0; use crate::drive::Drive; use crate::error::drive::DriveError; -use dpp::tokens::info::IdentityTokenInfo; use dpp::tokens::status::TokenStatus; use crate::error::Error; diff --git a/packages/rs-drive/src/verify/tokens/verify_token_total_supply_and_aggregated_identity_balance/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_total_supply_and_aggregated_identity_balance/mod.rs index 1c2b950104..4515948dfd 100644 --- a/packages/rs-drive/src/verify/tokens/verify_token_total_supply_and_aggregated_identity_balance/mod.rs +++ b/packages/rs-drive/src/verify/tokens/verify_token_total_supply_and_aggregated_identity_balance/mod.rs @@ -2,14 +2,9 @@ mod v0; use crate::drive::Drive; use crate::error::drive::DriveError; -use dpp::balances::credits::TokenAmount; -use dpp::balances::total_single_token_balance::TotalSingleTokenBalance; -use dpp::balances::total_tokens_balance::TotalTokensBalance; - use crate::error::Error; - use crate::verify::RootHash; - +use dpp::balances::total_single_token_balance::TotalSingleTokenBalance; use dpp::version::PlatformVersion; impl Drive { diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs index bb2e8559b7..aea9f87133 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/mod.rs @@ -37,6 +37,8 @@ pub struct DriveAbciQueryTokenVersions { pub struct DriveAbciQueryGroupVersions { pub group_info: FeatureVersionBounds, pub group_infos: FeatureVersionBounds, + pub group_actions: FeatureVersionBounds, + pub group_action_signers: FeatureVersionBounds, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs index 2db3bde39c..ff92cdfcc6 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_query_versions/v1.rs @@ -209,5 +209,15 @@ pub const DRIVE_ABCI_QUERY_VERSIONS_V1: DriveAbciQueryVersions = DriveAbciQueryV max_version: 0, default_current_version: 0, }, + group_actions: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + group_action_signers: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, }, }; diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/mod.rs index 20ebc59466..5d4e390d7e 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/mod.rs @@ -13,17 +13,21 @@ pub struct DriveGroupMethodVersions { #[derive(Clone, Debug, Default)] pub struct DriveGroupFetchMethodVersions { pub fetch_action_id_signers_power: FeatureVersion, - pub fetch_action_id_info: FeatureVersion, + pub fetch_active_action_info: FeatureVersion, pub fetch_action_id_info_keep_serialized: FeatureVersion, pub fetch_action_id_has_signer: FeatureVersion, pub fetch_group_info: FeatureVersion, pub fetch_group_infos: FeatureVersion, + pub fetch_action_infos: FeatureVersion, + pub fetch_action_signers: FeatureVersion, } #[derive(Clone, Debug, Default)] pub struct DriveGroupProveMethodVersions { pub prove_group_info: FeatureVersion, pub prove_group_infos: FeatureVersion, + pub prove_action_infos: FeatureVersion, + pub prove_action_signers: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/v1.rs index 365678957b..259a9029f6 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/v1.rs @@ -6,15 +6,19 @@ use crate::version::drive_versions::drive_group_method_versions::{ pub const DRIVE_GROUP_METHOD_VERSIONS_V1: DriveGroupMethodVersions = DriveGroupMethodVersions { fetch: DriveGroupFetchMethodVersions { fetch_action_id_signers_power: 0, - fetch_action_id_info: 0, + fetch_active_action_info: 0, fetch_action_id_info_keep_serialized: 0, fetch_action_id_has_signer: 0, fetch_group_info: 0, fetch_group_infos: 0, + fetch_action_infos: 0, + fetch_action_signers: 0, }, prove: DriveGroupProveMethodVersions { prove_group_info: 0, prove_group_infos: 0, + prove_action_infos: 0, + prove_action_signers: 0, }, insert: DriveGroupInsertMethodVersions { add_new_groups: 0, diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs index 5b2309458d..e7b9919c93 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs @@ -7,6 +7,7 @@ pub struct DriveVerifyMethodVersions { pub contract: DriveVerifyContractMethodVersions, pub document: DriveVerifyDocumentMethodVersions, pub identity: DriveVerifyIdentityMethodVersions, + pub group: DriveVerifyGroupMethodVersions, pub token: DriveVerifyTokenMethodVersions, pub single_document: DriveVerifySingleDocumentMethodVersions, pub system: DriveVerifySystemMethodVersions, @@ -43,6 +44,13 @@ pub struct DriveVerifyIdentityMethodVersions { pub verify_identity_revision_for_identity_id: FeatureVersion, } +#[derive(Clone, Debug, Default)] +pub struct DriveVerifyGroupMethodVersions { + pub verify_group_info: FeatureVersion, + pub verify_group_infos_in_contract: FeatureVersion, + pub verify_action_infos: FeatureVersion, +} + #[derive(Clone, Debug, Default)] pub struct DriveVerifyTokenMethodVersions { pub verify_token_balances_for_identity_ids: FeatureVersion, diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs index 0daa0cdd0b..4872470b08 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs @@ -1,6 +1,6 @@ use crate::version::drive_versions::drive_verify_method_versions::{ DriveVerifyContractMethodVersions, DriveVerifyDocumentMethodVersions, - DriveVerifyIdentityMethodVersions, DriveVerifyMethodVersions, + DriveVerifyGroupMethodVersions, DriveVerifyIdentityMethodVersions, DriveVerifyMethodVersions, DriveVerifySingleDocumentMethodVersions, DriveVerifyStateTransitionMethodVersions, DriveVerifySystemMethodVersions, DriveVerifyTokenMethodVersions, DriveVerifyVoteMethodVersions, }; @@ -29,6 +29,11 @@ pub const DRIVE_VERIFY_METHOD_VERSIONS_V1: DriveVerifyMethodVersions = DriveVeri verify_identities_contract_keys: 0, verify_identity_revision_for_identity_id: 0, }, + group: DriveVerifyGroupMethodVersions { + verify_group_info: 0, + verify_group_infos_in_contract: 0, + verify_action_infos: 0, + }, token: DriveVerifyTokenMethodVersions { verify_token_balances_for_identity_ids: 0, verify_token_balances_for_identity_id: 0, diff --git a/packages/rs-platform-version/src/version/mocks/v2_test.rs b/packages/rs-platform-version/src/version/mocks/v2_test.rs index 9dc5f2d253..9a4de6099f 100644 --- a/packages/rs-platform-version/src/version/mocks/v2_test.rs +++ b/packages/rs-platform-version/src/version/mocks/v2_test.rs @@ -347,6 +347,16 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { max_version: 0, default_current_version: 0, }, + group_actions: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, + group_action_signers: FeatureVersionBounds { + min_version: 0, + max_version: 0, + default_current_version: 0, + }, }, }, }, From d9647cc33213f119c10609c77e264c3e1c5a7bba Mon Sep 17 00:00:00 2001 From: QuantumExplorer Date: Tue, 21 Jan 2025 10:28:58 +0700 Subject: [PATCH 4/6] feat: get proofs for tokens (#2433) --- .../protos/platform/v0/platform.proto | 17 ++ .../src/state_transition/proof_result.rs | 9 + .../token_mint_transition/v0/v0_methods.rs | 25 ++ .../token_mint_transition/v0_methods.rs | 11 + .../v0/v0_methods.rs | 31 +++ .../token_transfer_transition/v0_methods.rs | 20 ++ .../batched_transition/token_transition.rs | 147 +++++++++++ .../rs-dpp/src/tokens/emergency_action.rs | 3 + packages/rs-dpp/src/tokens/errors.rs | 2 + packages/rs-dpp/src/tokens/token_event.rs | 2 +- .../rs-drive-abci/src/query/proofs/v0/mod.rs | 94 +++++++ .../tests/strategy_tests/token_tests.rs | 5 +- .../verify_state_transitions.rs | 3 + .../fetch/fetch_action_signers/v0/mod.rs | 2 +- .../rs-drive/src/drive/tokens/info/queries.rs | 18 +- .../rs-drive/src/drive/tokens/status/mod.rs | 1 + .../src/drive/tokens/status/queries.rs | 33 +++ .../mod.rs | 17 ++ .../v0/mod.rs | 50 ++++ .../identity_token_balance_drive_query.rs | 23 ++ .../query/identity_token_info_drive_query.rs | 23 ++ packages/rs-drive/src/query/mod.rs | 17 +- .../src/query/token_status_drive_query.rs | 18 ++ .../v0/mod.rs | 237 +++++++++++++++++- packages/rs-drive/src/verify/tokens/mod.rs | 3 + .../mod.rs | 75 ++++++ .../v0/mod.rs | 51 ++++ .../verify_token_info_for_identity_id/mod.rs | 73 ++++++ .../v0/mod.rs | 55 ++++ .../verify/tokens/verify_token_status/mod.rs | 68 +++++ .../tokens/verify_token_status/v0/mod.rs | 54 ++++ .../drive_verify_method_versions/mod.rs | 4 + .../drive_verify_method_versions/v1.rs | 4 + .../v1/token-history-contract-documents.json | 6 +- 34 files changed, 1161 insertions(+), 40 deletions(-) create mode 100644 packages/rs-drive/src/drive/tokens/status/queries.rs create mode 100644 packages/rs-drive/src/query/identity_token_balance_drive_query.rs create mode 100644 packages/rs-drive/src/query/identity_token_info_drive_query.rs create mode 100644 packages/rs-drive/src/query/token_status_drive_query.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_balance_for_identity_id/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_balance_for_identity_id/v0/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_info_for_identity_id/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_info_for_identity_id/v0/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_status/mod.rs create mode 100644 packages/rs-drive/src/verify/tokens/verify_token_status/v0/mod.rs diff --git a/packages/dapi-grpc/protos/platform/v0/platform.proto b/packages/dapi-grpc/protos/platform/v0/platform.proto index 5a0d8842a6..44d27fc8be 100644 --- a/packages/dapi-grpc/protos/platform/v0/platform.proto +++ b/packages/dapi-grpc/protos/platform/v0/platform.proto @@ -446,10 +446,27 @@ message GetProofsRequest { oneof request_type { ContestedResourceVoteStatusRequest contested_resource_vote_status_request = 1; } } + message IdentityTokenBalanceRequest { + bytes token_id = 1; + bytes identity_id = 2; + } + + message IdentityTokenInfoRequest { + bytes token_id = 1; + bytes identity_id = 2; + } + + message TokenStatusRequest { + bytes token_id = 1; + } + repeated IdentityRequest identities = 1; // List of identity requests repeated ContractRequest contracts = 2; // List of contract requests repeated DocumentRequest documents = 3; // List of document requests repeated VoteStatusRequest votes = 4; + repeated IdentityTokenBalanceRequest identity_token_balances = 5; + repeated IdentityTokenInfoRequest identity_token_infos = 6; + repeated TokenStatusRequest token_statuses = 7; } oneof version { GetProofsRequestV0 v0 = 1; } diff --git a/packages/rs-dpp/src/state_transition/proof_result.rs b/packages/rs-dpp/src/state_transition/proof_result.rs index 012326ac30..b20938b49d 100644 --- a/packages/rs-dpp/src/state_transition/proof_result.rs +++ b/packages/rs-dpp/src/state_transition/proof_result.rs @@ -1,6 +1,9 @@ +use crate::balances::credits::TokenAmount; use crate::data_contract::DataContract; use crate::document::Document; use crate::identity::{Identity, PartialIdentity}; +use crate::tokens::info::IdentityTokenInfo; +use crate::tokens::status::TokenStatus; use crate::voting::votes::Vote; use platform_value::Identifier; use std::collections::BTreeMap; @@ -9,8 +12,14 @@ use std::collections::BTreeMap; pub enum StateTransitionProofResult { VerifiedDataContract(DataContract), VerifiedIdentity(Identity), + VerifiedTokenBalanceAbsence(Identifier), + VerifiedTokenBalance(Identifier, TokenAmount), + VerifiedTokenIdentityInfo(Identifier, IdentityTokenInfo), + VerifiedTokenStatus(TokenStatus), + VerifiedTokenIdentitiesBalances(BTreeMap), VerifiedPartialIdentity(PartialIdentity), VerifiedBalanceTransfer(PartialIdentity, PartialIdentity), //from/to VerifiedDocuments(BTreeMap>), + VerifiedTokenActionWithDocument(Document), VerifiedMasternodeVote(Vote), } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0/v0_methods.rs index 9bb315fd6e..1973836f53 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0/v0_methods.rs @@ -1,10 +1,14 @@ use platform_value::Identifier; +use crate::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::ProtocolError; use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; use crate::state_transition::batch_transition::token_mint_transition::TokenMintTransitionV0; use crate::state_transition::batch_transition::TokenMintTransition; +use crate::tokens::errors::TokenError; impl TokenBaseTransitionAccessors for TokenMintTransitionV0 { fn base(&self) -> &TokenBaseTransition { @@ -38,6 +42,10 @@ pub trait TokenMintTransitionV0Methods: /// Returns the `issued_to_identity_id` field of the `TokenMintTransitionV0`. fn issued_to_identity_id(&self) -> Option; + fn recipient_id( + &self, + token_configuration: &TokenConfiguration, + ) -> Result; /// Sets the value of the `issued_to_identity_id` field in the `TokenMintTransitionV0`. fn set_issued_to_identity_id(&mut self, issued_to_identity_id: Option); @@ -67,6 +75,23 @@ impl TokenMintTransitionV0Methods for TokenMintTransitionV0 { fn issued_to_identity_id(&self) -> Option { self.issued_to_identity_id } + + fn recipient_id( + &self, + token_configuration: &TokenConfiguration, + ) -> Result { + match self.issued_to_identity_id() { + None => { + token_configuration + .new_tokens_destination_identity() + .ok_or(ProtocolError::Token( + TokenError::TokenNoMintingRecipient.into(), + )) + } + Some(recipient) => Ok(recipient), + } + } + fn set_issued_to_identity_id(&mut self, issued_to_identity_id: Option) { self.issued_to_identity_id = issued_to_identity_id; } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0_methods.rs index 245242e452..b956f1f71c 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_mint_transition/v0_methods.rs @@ -1,6 +1,8 @@ use platform_value::Identifier; use crate::balances::credits::TokenAmount; +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; use crate::prelude::IdentityNonce; +use crate::ProtocolError; use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; @@ -65,6 +67,15 @@ impl TokenMintTransitionV0Methods for TokenMintTransition { } } + fn recipient_id( + &self, + token_configuration: &TokenConfiguration, + ) -> Result { + match self { + TokenMintTransition::V0(v0) => v0.recipient_id(token_configuration), + } + } + fn set_issued_to_identity_id(&mut self, issued_to_identity_id: Option) { match self { TokenMintTransition::V0(v0) => v0.set_issued_to_identity_id(issued_to_identity_id), diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/v0_methods.rs index ec31b70b1c..ce0c6d2723 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0/v0_methods.rs @@ -95,6 +95,19 @@ pub trait TokenTransferTransitionV0Methods: TokenBaseTransitionAccessors { Vec, )>, ); + + /// Returns all notes (public, shared, and private) as cloned values in a tuple. + fn notes( + &self, + ) -> ( + Option, + Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ); } impl TokenTransferTransitionV0Methods for TokenTransferTransitionV0 { @@ -192,4 +205,22 @@ impl TokenTransferTransitionV0Methods for TokenTransferTransitionV0 { self.private_encrypted_note, ) } + + fn notes( + &self, + ) -> ( + Option, + Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ) { + ( + self.public_note.clone(), + self.shared_encrypted_note.clone(), + self.private_encrypted_note.clone(), + ) + } } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0_methods.rs index 414e53f5d4..12da036c9f 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transfer_transition/v0_methods.rs @@ -153,4 +153,24 @@ impl TokenTransferTransitionV0Methods for TokenTransferTransition { ), } } + + fn notes( + &self, + ) -> ( + Option, + Option<(SenderKeyIndex, RecipientKeyIndex, Vec)>, + Option<( + RootEncryptionKeyIndex, + DerivationEncryptionKeyIndex, + Vec, + )>, + ) { + match self { + TokenTransferTransition::V0(v0) => ( + v0.public_note.clone(), + v0.shared_encrypted_note.clone(), + v0.private_encrypted_note.clone(), + ), + } + } } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs index 0ca461a184..91371bde32 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs @@ -3,7 +3,17 @@ use derive_more::{Display, From}; use serde::{Deserialize, Serialize}; use platform_value::Identifier; use bincode::{Encode, Decode}; +use data_contracts::SystemDataContract; +use crate::balances::credits::TokenAmount; +use crate::block::block_info::BlockInfo; +use crate::data_contract::accessors::v0::DataContractV0Getters; +use crate::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::DataContract; +use crate::data_contract::document_type::DocumentTypeRef; +use crate::document::Document; use crate::prelude::IdentityNonce; +use crate::ProtocolError; use crate::state_transition::batch_transition::{DocumentCreateTransition, DocumentDeleteTransition, DocumentReplaceTransition, TokenBurnTransition, TokenDestroyFrozenFundsTransition, TokenEmergencyActionTransition, TokenFreezeTransition, TokenMintTransition, TokenTransferTransition}; use crate::state_transition::batch_transition::batched_transition::{DocumentPurchaseTransition, DocumentTransferTransition}; use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; @@ -12,6 +22,14 @@ use crate::state_transition::batch_transition::resolvers::v0::BatchTransitionRes use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use crate::state_transition::batch_transition::token_burn_transition::v0::v0_methods::TokenBurnTransitionV0Methods; +use crate::state_transition::batch_transition::token_destroy_frozen_funds_transition::v0::v0_methods::TokenDestroyFrozenFundsTransitionV0Methods; +use crate::state_transition::batch_transition::token_emergency_action_transition::v0::v0_methods::TokenEmergencyActionTransitionV0Methods; +use crate::state_transition::batch_transition::token_freeze_transition::v0::v0_methods::TokenFreezeTransitionV0Methods; +use crate::state_transition::batch_transition::token_mint_transition::v0::v0_methods::TokenMintTransitionV0Methods; +use crate::state_transition::batch_transition::token_transfer_transition::v0::v0_methods::TokenTransferTransitionV0Methods; +use crate::state_transition::batch_transition::token_unfreeze_transition::v0::v0_methods::TokenUnfreezeTransitionV0Methods; +use crate::tokens::token_event::TokenEvent; #[derive(Debug, Clone, Encode, Decode, From, PartialEq, Display)] #[cfg_attr( @@ -141,6 +159,33 @@ pub trait TokenTransitionV0Methods { fn calculate_action_id(&self, owner_id: Identifier) -> Option; fn can_calculate_action_id(&self) -> bool; + /// Historical document type name for the token history contract + fn historical_document_type_name(&self) -> &str; + /// Historical document type for the token history contract + fn historical_document_type<'a>( + &self, + token_history_contract: &'a DataContract, + ) -> Result, ProtocolError>; + /// Historical document id + fn historical_document_id( + &self, + owner_id: Identifier, + owner_nonce: IdentityNonce, + ) -> Identifier; + fn associated_token_event( + &self, + token_configuration: &TokenConfiguration, + ) -> Result; + /// Historical document id + fn build_historical_document( + &self, + token_historical_contract: &DataContract, + token_id: Identifier, + owner_id: Identifier, + owner_nonce: IdentityNonce, + block_info: &BlockInfo, + token_configuration: &TokenConfiguration, + ) -> Result; } impl TokenTransitionV0Methods for TokenTransition { @@ -215,4 +260,106 @@ impl TokenTransitionV0Methods for TokenTransition { fn set_identity_contract_nonce(&mut self, nonce: IdentityNonce) { self.base_mut().set_identity_contract_nonce(nonce); } + + /// Historical document type name for the token history contract + fn historical_document_type_name(&self) -> &str { + match self { + TokenTransition::Burn(_) => "burn", + TokenTransition::Mint(_) => "mint", + TokenTransition::Transfer(_) => "transfer", + TokenTransition::Freeze(_) => "freeze", + TokenTransition::Unfreeze(_) => "unfreeze", + TokenTransition::EmergencyAction(_) => "emergencyAction", + TokenTransition::DestroyFrozenFunds(_) => "destroyFrozenFunds", + } + } + + /// Historical document type for the token history contract + fn historical_document_type<'a>( + &self, + token_history_contract: &'a DataContract, + ) -> Result, ProtocolError> { + Ok(token_history_contract.document_type_for_name(self.historical_document_type_name())?) + } + + /// Historical document id + fn historical_document_id( + &self, + owner_id: Identifier, + owner_nonce: IdentityNonce, + ) -> Identifier { + let name = self.historical_document_type_name(); + Document::generate_document_id_v0( + &SystemDataContract::TokenHistory.id(), + &owner_id, + name, + owner_nonce.to_be_bytes().as_slice(), + ) + } + + /// Historical document id + fn build_historical_document( + &self, + token_historical_contract: &DataContract, + token_id: Identifier, + owner_id: Identifier, + owner_nonce: IdentityNonce, + block_info: &BlockInfo, + token_configuration: &TokenConfiguration, + ) -> Result { + self.associated_token_event(token_configuration)? + .build_historical_document_owned( + token_historical_contract, + token_id, + owner_id, + owner_nonce, + block_info, + ) + } + + fn associated_token_event( + &self, + token_configuration: &TokenConfiguration, + ) -> Result { + Ok(match self { + TokenTransition::Burn(burn) => { + TokenEvent::Burn(burn.burn_amount(), burn.public_note().cloned()) + } + TokenTransition::Mint(mint) => { + let recipient = match mint.issued_to_identity_id() { + None => token_configuration.new_tokens_destination_identity().ok_or(ProtocolError::NotSupported("either the mint destination must be set or the contract must have a destination set for new tokens".to_string()))?, + Some(recipient) => recipient, + }; + TokenEvent::Mint(mint.amount(), recipient, mint.public_note().cloned()) + } + TokenTransition::Transfer(transfer) => { + let (public_note, shared_encrypted_note, private_encrypted_note) = transfer.notes(); + TokenEvent::Transfer( + transfer.recipient_id(), + public_note, + shared_encrypted_note, + private_encrypted_note, + transfer.amount(), + ) + } + TokenTransition::Freeze(freeze) => { + TokenEvent::Freeze(freeze.frozen_identity_id(), freeze.public_note().cloned()) + } + TokenTransition::Unfreeze(unfreeze) => TokenEvent::Unfreeze( + unfreeze.frozen_identity_id(), + unfreeze.public_note().cloned(), + ), + TokenTransition::EmergencyAction(emergency_action) => TokenEvent::EmergencyAction( + emergency_action.emergency_action(), + emergency_action.public_note().cloned(), + ), + TokenTransition::DestroyFrozenFunds(destroy) => { + TokenEvent::DestroyFrozenFunds( + destroy.frozen_identity_id(), + TokenAmount::MAX, // we do not know how much will be destroyed + destroy.public_note().cloned(), + ) + } + }) + } } diff --git a/packages/rs-dpp/src/tokens/emergency_action.rs b/packages/rs-dpp/src/tokens/emergency_action.rs index 7e18e6f426..8bac9c8ea6 100644 --- a/packages/rs-dpp/src/tokens/emergency_action.rs +++ b/packages/rs-dpp/src/tokens/emergency_action.rs @@ -18,6 +18,9 @@ pub enum TokenEmergencyAction { } impl TokenEmergencyAction { + pub fn paused(&self) -> bool { + matches!(self, TokenEmergencyAction::Pause) + } pub fn resulting_status( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-dpp/src/tokens/errors.rs b/packages/rs-dpp/src/tokens/errors.rs index c23e619410..536534ddde 100644 --- a/packages/rs-dpp/src/tokens/errors.rs +++ b/packages/rs-dpp/src/tokens/errors.rs @@ -6,4 +6,6 @@ pub enum TokenError { TokenNotFoundAtPositionError, #[error("The contract version does not allow tokens")] TokenNotFoundOnContractVersion, + #[error("There is no minting recipient set")] + TokenNoMintingRecipient, } diff --git a/packages/rs-dpp/src/tokens/token_event.rs b/packages/rs-dpp/src/tokens/token_event.rs index df805788b1..c0313efaee 100644 --- a/packages/rs-dpp/src/tokens/token_event.rs +++ b/packages/rs-dpp/src/tokens/token_event.rs @@ -164,7 +164,7 @@ impl TokenEvent { let mut properties = BTreeMap::from([ ("tokenId".to_string(), token_id.into()), ("frozenIdentityId".to_string(), frozen_identity_id.into()), - ("amount".to_string(), amount.into()), + ("destroyedAmount".to_string(), amount.into()), ]); if let Some(note) = public_note { properties.insert("note".to_string(), note.into()); 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 7db4d01227..bdd3705500 100644 --- a/packages/rs-drive-abci/src/query/proofs/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/proofs/v0/mod.rs @@ -4,6 +4,9 @@ use crate::platform_types::platform::Platform; use crate::platform_types::platform_state::PlatformState; use crate::query::QueryValidationResult; use dapi_grpc::platform::v0::get_proofs_request::get_proofs_request_v0::vote_status_request::RequestType; +use dapi_grpc::platform::v0::get_proofs_request::get_proofs_request_v0::{ + IdentityTokenBalanceRequest, IdentityTokenInfoRequest, TokenStatusRequest, +}; use dapi_grpc::platform::v0::get_proofs_request::GetProofsRequestV0; use dapi_grpc::platform::v0::get_proofs_response::{get_proofs_response_v0, GetProofsResponseV0}; use dpp::check_validation_result_with_data; @@ -13,6 +16,9 @@ use dpp::validation::ValidationResult; use dpp::version::PlatformVersion; use dpp::voting::vote_polls::contested_document_resource_vote_poll::ContestedDocumentResourceVotePoll; use drive::drive::identity::{IdentityDriveQuery, IdentityProveRequestType}; +use drive::query::identity_token_balance_drive_query::IdentityTokenBalanceDriveQuery; +use drive::query::identity_token_info_drive_query::IdentityTokenInfoDriveQuery; +use drive::query::token_status_drive_query::TokenStatusDriveQuery; use drive::query::{IdentityBasedVoteDriveQuery, SingleDocumentDriveQuery}; impl Platform { @@ -23,6 +29,9 @@ impl Platform { contracts, documents, votes, + identity_token_balances, + identity_token_infos, + token_statuses, }: GetProofsRequestV0, platform_state: &PlatformState, platform_version: &PlatformVersion, @@ -145,11 +154,72 @@ impl Platform { }) .collect::, QueryError>>()); + let token_balance_queries = check_validation_result_with_data!(identity_token_balances + .into_iter() + .map(|identity_token_balance_request| { + let IdentityTokenBalanceRequest { + token_id, + identity_id, + } = identity_token_balance_request; + Ok(IdentityTokenBalanceDriveQuery { + identity_id: Identifier::try_from(identity_id).map_err(|_| { + QueryError::InvalidArgument( + "identity_id must be a valid identifier (32 bytes long)".to_string(), + ) + })?, + token_id: Identifier::try_from(token_id).map_err(|_| { + QueryError::InvalidArgument( + "token_id must be a valid identifier (32 bytes long)".to_string(), + ) + })?, + }) + }) + .collect::, QueryError>>()); + + let token_info_queries = check_validation_result_with_data!(identity_token_infos + .into_iter() + .map(|identity_token_info_request| { + let IdentityTokenInfoRequest { + token_id, + identity_id, + } = identity_token_info_request; + Ok(IdentityTokenInfoDriveQuery { + identity_id: Identifier::try_from(identity_id).map_err(|_| { + QueryError::InvalidArgument( + "identity_id must be a valid identifier (32 bytes long)".to_string(), + ) + })?, + token_id: Identifier::try_from(token_id).map_err(|_| { + QueryError::InvalidArgument( + "token_id must be a valid identifier (32 bytes long)".to_string(), + ) + })?, + }) + }) + .collect::, QueryError>>()); + + let token_status_queries = check_validation_result_with_data!(token_statuses + .into_iter() + .map(|token_status_request| { + let TokenStatusRequest { token_id } = token_status_request; + Ok(TokenStatusDriveQuery { + token_id: Identifier::try_from(token_id).map_err(|_| { + QueryError::InvalidArgument( + "token_id must be a valid identifier (32 bytes long)".to_string(), + ) + })?, + }) + }) + .collect::, QueryError>>()); + let proof = self.drive.prove_multiple_state_transition_results( &identity_requests, &contract_ids, &document_queries, &vote_queries, + &token_balance_queries, + &token_info_queries, + &token_status_queries, None, platform_version, )?; @@ -190,6 +260,9 @@ mod tests { contracts: vec![], documents: vec![], votes: vec![], + identity_token_balances: vec![], + identity_token_infos: vec![], + token_statuses: vec![], }; let result = platform @@ -213,6 +286,9 @@ mod tests { contracts: vec![], documents: vec![], votes: vec![], + identity_token_balances: vec![], + identity_token_infos: vec![], + token_statuses: vec![], }; let result = platform @@ -239,6 +315,9 @@ mod tests { }], documents: vec![], votes: vec![], + identity_token_balances: vec![], + identity_token_infos: vec![], + token_statuses: vec![], }; let result = platform @@ -263,6 +342,9 @@ mod tests { document_contested_status: 0, }], votes: vec![], + identity_token_balances: vec![], + identity_token_infos: vec![], + token_statuses: vec![], }; let result = platform @@ -287,6 +369,9 @@ mod tests { document_contested_status: 0, }], votes: vec![], + identity_token_balances: vec![], + identity_token_infos: vec![], + token_statuses: vec![], }; let result = platform @@ -311,6 +396,9 @@ mod tests { document_contested_status: 0, }], votes: vec![], + identity_token_balances: vec![], + identity_token_infos: vec![], + token_statuses: vec![], }; let validation_result = platform @@ -363,6 +451,9 @@ mod tests { }, )), }], + identity_token_balances: vec![], + identity_token_infos: vec![], + token_statuses: vec![], }; let validation_result = platform @@ -395,6 +486,9 @@ mod tests { document_contested_status: 0, }], votes: vec![], + identity_token_balances: vec![], + identity_token_infos: vec![], + token_statuses: vec![], }; let validation_result = platform diff --git a/packages/rs-drive-abci/tests/strategy_tests/token_tests.rs b/packages/rs-drive-abci/tests/strategy_tests/token_tests.rs index 484e517ece..af9dddbee2 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/token_tests.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/token_tests.rs @@ -12,7 +12,6 @@ mod tests { use dpp::state_transition::StateTransition; use dpp::tests::json_document::json_document_to_created_contract; use dpp::tokens::token_event::TokenEvent; - use drive::query::PathQuery; use drive_abci::config::{ ChainLockConfig, ExecutionConfig, InstantLockConfig, PlatformConfig, PlatformTestConfig, ValidatorSetConfig, @@ -68,7 +67,7 @@ mod tests { .collect(); let contract = created_contract.data_contract_mut(); - let mut token_configuration = contract + let token_configuration = contract .token_configuration_mut(0) .expect("expected to get token configuration"); token_configuration.set_minting_allow_choosing_destination(true); @@ -216,7 +215,7 @@ mod tests { .collect(); let contract = created_contract.data_contract_mut(); - let mut token_configuration = contract + let token_configuration = contract .token_configuration_mut(0) .expect("expected to get token configuration"); token_configuration.set_minting_allow_choosing_destination(true); diff --git a/packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs b/packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs index 64701edcfa..4cd29a9d94 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs @@ -113,6 +113,9 @@ pub(crate) fn verify_state_transitions_were_or_were_not_executed( contracts: vec![], documents: vec![], votes: vec![], + identity_token_balances: vec![], + identity_token_infos: vec![], + token_statuses: vec![], }; if let Some(action) = action { diff --git a/packages/rs-drive/src/drive/group/fetch/fetch_action_signers/v0/mod.rs b/packages/rs-drive/src/drive/group/fetch/fetch_action_signers/v0/mod.rs index c0a64a9b63..864a6fff3e 100644 --- a/packages/rs-drive/src/drive/group/fetch/fetch_action_signers/v0/mod.rs +++ b/packages/rs-drive/src/drive/group/fetch/fetch_action_signers/v0/mod.rs @@ -63,7 +63,7 @@ impl Drive { .map(|(key, element)| match element { SumItem(value, ..) => Ok(( key.try_into()?, - value.try_into().map_err(|e| { + value.try_into().map_err(|_| { Error::Drive(DriveError::CorruptedDriveState( "signed power should be encodable on a u32 integer".to_string(), )) diff --git a/packages/rs-drive/src/drive/tokens/info/queries.rs b/packages/rs-drive/src/drive/tokens/info/queries.rs index 8f5a444380..e4e6e5c09d 100644 --- a/packages/rs-drive/src/drive/tokens/info/queries.rs +++ b/packages/rs-drive/src/drive/tokens/info/queries.rs @@ -1,5 +1,5 @@ use crate::drive::tokens::paths::{ - token_identity_infos_path_vec, token_identity_infos_root_path_vec, token_statuses_root_path_vec, + token_identity_infos_path_vec, token_identity_infos_root_path_vec, }; use crate::drive::Drive; use crate::query::{Query, QueryItem}; @@ -55,22 +55,6 @@ impl Drive { ) } - /// The query getting a token statuses - pub fn token_statuses_query(token_ids: &[[u8; 32]]) -> PathQuery { - let tokens_root = token_statuses_root_path_vec(); - - let mut query = Query::new(); - - for token_id in token_ids { - query.insert_key(token_id.to_vec()); - } - - PathQuery::new( - tokens_root, - SizedQuery::new(query, Some(token_ids.len() as u16), None), - ) - } - /// The query getting token infos for identities in a range pub fn token_infos_for_range_query( token_id: [u8; 32], diff --git a/packages/rs-drive/src/drive/tokens/status/mod.rs b/packages/rs-drive/src/drive/tokens/status/mod.rs index 57d88f594e..4824bb8f87 100644 --- a/packages/rs-drive/src/drive/tokens/status/mod.rs +++ b/packages/rs-drive/src/drive/tokens/status/mod.rs @@ -5,3 +5,4 @@ mod fetch_token_statuses; mod fetch_token_status; #[cfg(feature = "server")] mod prove_token_statuses; +mod queries; diff --git a/packages/rs-drive/src/drive/tokens/status/queries.rs b/packages/rs-drive/src/drive/tokens/status/queries.rs new file mode 100644 index 0000000000..f15f67db30 --- /dev/null +++ b/packages/rs-drive/src/drive/tokens/status/queries.rs @@ -0,0 +1,33 @@ +use crate::drive::tokens::paths::token_statuses_root_path_vec; +use crate::drive::Drive; +use crate::query::Query; +use grovedb::{PathQuery, SizedQuery}; + +impl Drive { + /// The query getting a token statuses + pub fn token_statuses_query(token_ids: &[[u8; 32]]) -> PathQuery { + let tokens_root = token_statuses_root_path_vec(); + + let mut query = Query::new(); + + for token_id in token_ids { + query.insert_key(token_id.to_vec()); + } + + PathQuery::new( + tokens_root, + SizedQuery::new(query, Some(token_ids.len() as u16), None), + ) + } + + /// The query getting a token statuses + pub fn token_status_query(token_id: [u8; 32]) -> PathQuery { + let tokens_root = token_statuses_root_path_vec(); + + let mut query = Query::new(); + + query.insert_key(token_id.to_vec()); + + PathQuery::new(tokens_root, SizedQuery::new(query, Some(1), None)) + } +} diff --git a/packages/rs-drive/src/prove/prove_multiple_state_transition_results/mod.rs b/packages/rs-drive/src/prove/prove_multiple_state_transition_results/mod.rs index 309cecc47e..646894b25c 100644 --- a/packages/rs-drive/src/prove/prove_multiple_state_transition_results/mod.rs +++ b/packages/rs-drive/src/prove/prove_multiple_state_transition_results/mod.rs @@ -4,6 +4,9 @@ use crate::error::drive::DriveError; use crate::error::Error; use crate::query::{IdentityBasedVoteDriveQuery, SingleDocumentDriveQuery}; +use crate::query::identity_token_balance_drive_query::IdentityTokenBalanceDriveQuery; +use crate::query::identity_token_info_drive_query::IdentityTokenInfoDriveQuery; +use crate::query::token_status_drive_query::TokenStatusDriveQuery; use dpp::version::PlatformVersion; use grovedb::TransactionArg; @@ -21,6 +24,14 @@ impl Drive { /// if the contract is historical. /// - `document_queries`: A list of [SingleDocumentDriveQuery]. These specify the documents /// to be proven. + /// - `vote_queries`: A list of [IdentityBasedVoteDriveQuery]. These would be to figure out the + /// result of votes based on identities making them. + /// - `token_balance_queries`: A slice of [IdentityTokenBalanceDriveQuery] objects specifying + /// token balance queries for identities. + /// - `token_info_queries`: A slice of [IdentityTokenInfoDriveQuery] objects specifying + /// token information queries for identities. + /// - `token_status_queries`: A slice of [TokenStatusDriveQuery] objects specifying token + /// status queries. /// - `transaction`: An optional grovedb transaction /// - `drive_version`: A reference to the [DriveVersion] object that specifies the version of /// the function to call. @@ -34,6 +45,9 @@ impl Drive { contract_ids: &[([u8; 32], Option)], //bool represents if it is historical document_queries: &[SingleDocumentDriveQuery], vote_queries: &[IdentityBasedVoteDriveQuery], + token_balance_queries: &[IdentityTokenBalanceDriveQuery], + token_info_queries: &[IdentityTokenInfoDriveQuery], + token_status_queries: &[TokenStatusDriveQuery], transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result, Error> { @@ -48,6 +62,9 @@ impl Drive { contract_ids, document_queries, vote_queries, + token_balance_queries, + token_info_queries, + token_status_queries, transaction, platform_version, ), diff --git a/packages/rs-drive/src/prove/prove_multiple_state_transition_results/v0/mod.rs b/packages/rs-drive/src/prove/prove_multiple_state_transition_results/v0/mod.rs index a348c2d140..4c0c8058b1 100644 --- a/packages/rs-drive/src/prove/prove_multiple_state_transition_results/v0/mod.rs +++ b/packages/rs-drive/src/prove/prove_multiple_state_transition_results/v0/mod.rs @@ -3,6 +3,9 @@ use crate::drive::Drive; use crate::error::Error; use crate::query::{IdentityBasedVoteDriveQuery, SingleDocumentDriveQuery}; +use crate::query::identity_token_balance_drive_query::IdentityTokenBalanceDriveQuery; +use crate::query::identity_token_info_drive_query::IdentityTokenInfoDriveQuery; +use crate::query::token_status_drive_query::TokenStatusDriveQuery; use dpp::version::PlatformVersion; use grovedb::{PathQuery, TransactionArg}; use itertools::{Either, Itertools}; @@ -18,6 +21,12 @@ impl Drive { /// to be proven. /// - `vote_queries`: A list of [IdentityBasedVoteDriveQuery]. These would be to figure out the /// result of votes based on identities making them. + /// - `token_balance_queries`: A slice of [IdentityTokenBalanceDriveQuery] objects specifying + /// token balance queries for identities. + /// - `token_info_queries`: A slice of [IdentityTokenInfoDriveQuery] objects specifying + /// token information queries for identities. + /// - `token_status_queries`: A slice of [TokenStatusDriveQuery] objects specifying token + /// status queries. /// - `transaction`: An optional grovedb transaction /// - `platform_version`: A reference to the [PlatformVersion] object that specifies the version of /// the function to call. @@ -32,6 +41,9 @@ impl Drive { contract_ids: &[([u8; 32], Option)], //bool is history document_queries: &[SingleDocumentDriveQuery], vote_queries: &[IdentityBasedVoteDriveQuery], + token_balance_queries: &[IdentityTokenBalanceDriveQuery], + token_info_queries: &[IdentityTokenInfoDriveQuery], + token_status_queries: &[TokenStatusDriveQuery], transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result, Error> { @@ -108,6 +120,44 @@ impl Drive { })); } + if !token_balance_queries.is_empty() { + path_queries.extend( + token_balance_queries + .iter() + .filter_map(|token_balance_query| { + // The path query construction can only fail if the serialization fails. + // Because the serialization will pretty much never fail, we can do this. + let mut path_query = token_balance_query.construct_path_query(); + path_query.query.limit = None; + Some(path_query) + }), + ); + } + + if !token_info_queries.is_empty() { + path_queries.extend(token_info_queries.iter().filter_map(|token_info_query| { + // The path query construction can only fail if the serialization fails. + // Because the serialization will pretty much never fail, we can do this. + let mut path_query = token_info_query.construct_path_query(); + path_query.query.limit = None; + Some(path_query) + })); + } + + if !token_status_queries.is_empty() { + path_queries.extend( + token_status_queries + .iter() + .filter_map(|token_status_query| { + // The path query construction can only fail if the serialization fails. + // Because the serialization will pretty much never fail, we can do this. + let mut path_query = token_status_query.construct_path_query(); + path_query.query.limit = None; + Some(path_query) + }), + ); + } + let path_query = PathQuery::merge( path_queries.iter().collect(), &platform_version.drive.grove_version, diff --git a/packages/rs-drive/src/query/identity_token_balance_drive_query.rs b/packages/rs-drive/src/query/identity_token_balance_drive_query.rs new file mode 100644 index 0000000000..568fb176cf --- /dev/null +++ b/packages/rs-drive/src/query/identity_token_balance_drive_query.rs @@ -0,0 +1,23 @@ +use crate::drive::Drive; +use bincode::{Decode, Encode}; +use dpp::identifier::Identifier; +use grovedb::PathQuery; + +/// Identity token balance drive query struct +#[derive(Debug, PartialEq, Clone, Encode, Decode)] +pub struct IdentityTokenBalanceDriveQuery { + /// The identity who we are querying for + pub identity_id: Identifier, + /// the token id + pub token_id: Identifier, +} + +impl IdentityTokenBalanceDriveQuery { + /// Operations to construct a path query. + pub fn construct_path_query(&self) -> PathQuery { + Drive::token_balance_for_identity_id_query( + self.token_id.to_buffer(), + self.identity_id.to_buffer(), + ) + } +} diff --git a/packages/rs-drive/src/query/identity_token_info_drive_query.rs b/packages/rs-drive/src/query/identity_token_info_drive_query.rs new file mode 100644 index 0000000000..1cb78c7731 --- /dev/null +++ b/packages/rs-drive/src/query/identity_token_info_drive_query.rs @@ -0,0 +1,23 @@ +use crate::drive::Drive; +use bincode::{Decode, Encode}; +use dpp::identifier::Identifier; +use grovedb::PathQuery; + +/// Identity token info drive query struct +#[derive(Debug, PartialEq, Clone, Encode, Decode)] +pub struct IdentityTokenInfoDriveQuery { + /// The identity who we are querying for + pub identity_id: Identifier, + /// The token id + pub token_id: Identifier, +} + +impl IdentityTokenInfoDriveQuery { + /// Operations to construct a path query. + pub fn construct_path_query(&self) -> PathQuery { + Drive::token_info_for_identity_id_query( + self.token_id.to_buffer(), + self.identity_id.to_buffer(), + ) + } +} diff --git a/packages/rs-drive/src/query/mod.rs b/packages/rs-drive/src/query/mod.rs index 5cdc6dcca6..7c959cbd53 100644 --- a/packages/rs-drive/src/query/mod.rs +++ b/packages/rs-drive/src/query/mod.rs @@ -130,17 +130,28 @@ pub fn contract_lookup_fn_for_contract<'a>( Box::new(func) } -#[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"))] +pub mod contested_resource_votes_given_by_identity_query; /// A query to get contested documents before they have been awarded +#[cfg(any(feature = "server", feature = "verify"))] pub mod drive_contested_document_query; -#[cfg(any(feature = "server", feature = "verify"))] /// A query to get the block counts of proposers in an epoch +#[cfg(any(feature = "server", feature = "verify"))] pub mod proposer_block_count_query; +/// A query to get the identity's token balance +#[cfg(any(feature = "server", feature = "verify"))] +pub mod identity_token_balance_drive_query; +/// A query to get the identity's token info +#[cfg(any(feature = "server", feature = "verify"))] +pub mod identity_token_info_drive_query; + +/// A query to get the token's status +#[cfg(any(feature = "server", feature = "verify"))] +pub mod token_status_drive_query; + #[cfg(any(feature = "server", feature = "verify"))] /// Represents a starting point for a query based on a specific document. /// diff --git a/packages/rs-drive/src/query/token_status_drive_query.rs b/packages/rs-drive/src/query/token_status_drive_query.rs new file mode 100644 index 0000000000..d4712b3545 --- /dev/null +++ b/packages/rs-drive/src/query/token_status_drive_query.rs @@ -0,0 +1,18 @@ +use crate::drive::Drive; +use bincode::{Decode, Encode}; +use dpp::identifier::Identifier; +use grovedb::PathQuery; + +/// Token status drive query struct +#[derive(Debug, PartialEq, Clone, Encode, Decode)] +pub struct TokenStatusDriveQuery { + /// the token id + pub token_id: Identifier, +} + +impl TokenStatusDriveQuery { + /// Operations to construct a path query. + pub fn construct_path_query(&self) -> PathQuery { + Drive::token_status_query(self.token_id.to_buffer()) + } +} 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 8225f4f666..640961d656 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 @@ -1,6 +1,9 @@ use std::collections::BTreeMap; +use dpp::balances::credits::TokenAmount; use dpp::block::block_info::BlockInfo; use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::data_contract::serialized_version::DataContractInSerializationFormat; use dpp::document::{Document, DocumentV0Getters}; @@ -9,6 +12,7 @@ use dpp::document::property_names::PRICE; use dpp::fee::Credits; use dpp::identity::PartialIdentity; use dpp::platform_value::btreemap_extensions::BTreeValueMapHelper; +use dpp::prelude::Identifier; use dpp::state_transition::data_contract_create_transition::accessors::DataContractCreateTransitionAccessorsV0; use dpp::state_transition::data_contract_update_transition::accessors::DataContractUpdateTransitionAccessorsV0; use dpp::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; @@ -27,9 +31,20 @@ use dpp::state_transition::batch_transition::document_replace_transition::Docume use dpp::state_transition::batch_transition::batched_transition::document_transfer_transition::v0::v0_methods::DocumentTransferTransitionV0Methods; use dpp::state_transition::batch_transition::batched_transition::document_transition::{DocumentTransition, DocumentTransitionV0Methods}; use dpp::state_transition::batch_transition::batched_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods; +use dpp::state_transition::batch_transition::batched_transition::token_transition::{TokenTransition, TokenTransitionV0Methods}; +use dpp::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use dpp::state_transition::batch_transition::token_destroy_frozen_funds_transition::v0::v0_methods::TokenDestroyFrozenFundsTransitionV0Methods; +use dpp::state_transition::batch_transition::token_emergency_action_transition::v0::v0_methods::TokenEmergencyActionTransitionV0Methods; +use dpp::state_transition::batch_transition::token_freeze_transition::v0::v0_methods::TokenFreezeTransitionV0Methods; +use dpp::state_transition::batch_transition::token_mint_transition::v0::v0_methods::TokenMintTransitionV0Methods; +use dpp::state_transition::batch_transition::token_transfer_transition::v0::v0_methods::TokenTransferTransitionV0Methods; +use dpp::state_transition::batch_transition::token_unfreeze_transition::v0::v0_methods::TokenUnfreezeTransitionV0Methods; use dpp::state_transition::masternode_vote_transition::accessors::MasternodeVoteTransitionAccessorsV0; use dpp::state_transition::proof_result::StateTransitionProofResult; -use dpp::state_transition::proof_result::StateTransitionProofResult::{VerifiedBalanceTransfer, VerifiedDataContract, VerifiedDocuments, VerifiedIdentity, VerifiedMasternodeVote, VerifiedPartialIdentity}; +use dpp::state_transition::proof_result::StateTransitionProofResult::{VerifiedBalanceTransfer, VerifiedDataContract, VerifiedDocuments, VerifiedIdentity, VerifiedMasternodeVote, VerifiedPartialIdentity, VerifiedTokenActionWithDocument, VerifiedTokenBalance, VerifiedTokenBalanceAbsence, VerifiedTokenIdentitiesBalances, VerifiedTokenIdentityInfo, VerifiedTokenStatus}; +use dpp::system_data_contracts::SystemDataContract; +use dpp::tokens::info::v0::IdentityTokenInfoV0Accessors; +use dpp::tokens::status::v0::TokenStatusV0Accessors; use dpp::voting::vote_polls::VotePoll; use dpp::voting::votes::resource_vote::accessors::v0::ResourceVoteGettersV0; use dpp::voting::votes::Vote; @@ -278,17 +293,215 @@ impl Drive { } } BatchedTransitionRef::Token(token_transition) => { - todo!() - //todo - // we need to check if the contract has history - // if it has history we verify the proof of the history - // known_contracts_provider_fn - // let token_id = token_transition.token_id(); - // match token_transition { - // TokenTransition::Burn(_) => {} - // TokenTransition::Issuance(_) => {} - // TokenTransition::Transfer(_) => {} - // } + //todo group actions + let data_contract_id = token_transition.data_contract_id(); + let token_id = token_transition.token_id(); + + let contract = known_contracts_provider_fn(&data_contract_id)?.ok_or( + Error::Proof(ProofError::UnknownContract(format!( + "unknown contract with id {}", + data_contract_id + ))), + )?; + + let identity_contract_nonce = + token_transition.base().identity_contract_nonce(); + + let document_type_name = + token_transition.historical_document_type_name().to_string(); + let document_type = token_transition.historical_document_type(&contract)?; + + let token_config = contract.expected_token_configuration( + token_transition.base().token_contract_position(), + )?; + let keeps_historical_document = token_config.keeps_history(); + if keeps_historical_document { + let query = SingleDocumentDriveQuery { + contract_id: SystemDataContract::TokenHistory.id().to_buffer(), + document_type_name, + document_type_keeps_history: false, + document_id: token_transition + .historical_document_id(owner_id, identity_contract_nonce) + .to_buffer(), + block_time_ms: None, //None because we want latest + contested_status: + SingleDocumentDriveQueryContestedStatus::NotContested, + }; + + let expected_document = token_transition.build_historical_document( + &contract, + token_id, + owner_id, + identity_contract_nonce, + &BlockInfo::default(), + token_config, + )?; + let (root_hash, document) = query.verify_proof( + false, + proof, + document_type, + platform_version, + )?; + let document = document.ok_or(Error::Proof(ProofError::IncorrectProof(format!("proof did not contain document with id {} expected to exist because the token keeps historical documents", token_transition.historical_document_type_name()))))?; + if !document.is_equal_ignoring_time_based_fields( + &expected_document, + Some(vec!["destroyedAmount"]), + platform_version, + )? { + return Err(Error::Proof(ProofError::IncorrectProof(format!("proof of state transition execution did not show the correct historical document {}, {}", document, expected_document)))); + } + Ok((root_hash, VerifiedTokenActionWithDocument(document))) + } else { + match token_transition { + TokenTransition::Burn(_) => { + let (root_hash, Some(balance)) = + Drive::verify_token_balance_for_identity_id( + proof, + token_id.into_buffer(), + owner_id.into_buffer(), + false, + platform_version, + )? + else { + return Err(Error::Proof(ProofError::IncorrectProof( + format!("proof did not contain token balance for identity {} expected to exist because of state transition (token burn)", owner_id)))); + }; + Ok((root_hash, VerifiedTokenBalance(owner_id, balance))) + } + TokenTransition::Mint(token_mint_transition) => { + let recipient_id = + token_mint_transition.recipient_id(token_config)?; + let (root_hash, Some(balance)) = + Drive::verify_token_balance_for_identity_id( + proof, + token_id.into_buffer(), + recipient_id.into_buffer(), + false, + platform_version, + )? + else { + return Err(Error::Proof(ProofError::IncorrectProof( + format!("proof did not contain token balance for identity {} expected to exist because of state transition (token mint)", recipient_id)))); + }; + Ok((root_hash, VerifiedTokenBalance(recipient_id, balance))) + } + TokenTransition::Transfer(token_transfer_transition) => { + let recipient_id = token_transfer_transition.recipient_id(); + let identity_ids = + [owner_id.to_buffer(), recipient_id.to_buffer()]; + let (root_hash, balances): ( + RootHash, + BTreeMap>, + ) = Drive::verify_token_balances_for_identity_ids( + proof, + token_id.into_buffer(), + &identity_ids, + false, + platform_version, + )?; + + let balances = balances.into_iter().map(|(id, maybe_balance)| { + let balance = maybe_balance.ok_or(Error::Proof(ProofError::IncorrectProof( + format!("proof did not contain token balance for identity {} expected to exist because of state transition (token transfer)", id))))?; + Ok((id, balance)) + }).collect::>()?; + + Ok((root_hash, VerifiedTokenIdentitiesBalances(balances))) + } + TokenTransition::Freeze(token_freeze_transition) => { + let (root_hash, Some(identity_token_info)) = + Drive::verify_token_info_for_identity_id( + proof, + token_id.into_buffer(), + token_freeze_transition + .frozen_identity_id() + .into_buffer(), + false, + platform_version, + )? + else { + return Err(Error::Proof(ProofError::IncorrectProof( + format!("proof did not contain token info for identity {} expected to exist because of state transition (token freeze)", token_freeze_transition.frozen_identity_id())))); + }; + if !identity_token_info.frozen() { + return Err(Error::Proof(ProofError::IncorrectProof( + format!("proof contained token info saying this token was not frozen for identity {}", token_freeze_transition.frozen_identity_id())))); + } + Ok(( + root_hash, + VerifiedTokenIdentityInfo(owner_id, identity_token_info), + )) + } + TokenTransition::Unfreeze(token_unfreeze_transition) => { + let (root_hash, Some(identity_token_info)) = + Drive::verify_token_info_for_identity_id( + proof, + token_id.into_buffer(), + token_unfreeze_transition + .frozen_identity_id() + .into_buffer(), + false, + platform_version, + )? + else { + return Err(Error::Proof(ProofError::IncorrectProof( + format!("proof did not contain token info for identity {} expected to exist because of state transition (token freeze)", token_unfreeze_transition.frozen_identity_id())))); + }; + if identity_token_info.frozen() { + return Err(Error::Proof(ProofError::IncorrectProof( + format!("proof contained token info saying this token was frozen for identity {} when we just unfroze it", token_unfreeze_transition.frozen_identity_id())))); + } + Ok(( + root_hash, + VerifiedTokenIdentityInfo(owner_id, identity_token_info), + )) + } + TokenTransition::DestroyFrozenFunds( + destroy_frozen_funds_transition, + ) => { + let (root_hash, None) = + Drive::verify_token_balance_for_identity_id( + proof, + token_id.into_buffer(), + destroy_frozen_funds_transition + .frozen_identity_id() + .into_buffer(), + false, + platform_version, + )? + else { + return Err(Error::Proof(ProofError::IncorrectProof( + format!("proof contained token balance for identity {} expected to not exist because of state transition (token destroy frozen funds)", owner_id)))); + }; + Ok(( + root_hash, + VerifiedTokenBalanceAbsence( + destroy_frozen_funds_transition.frozen_identity_id(), + ), + )) + } + TokenTransition::EmergencyAction(emergency_action_transition) => { + let (root_hash, Some(token_status)) = + Drive::verify_token_status( + proof, + token_id.into_buffer(), + false, + platform_version, + )? + else { + return Err(Error::Proof(ProofError::IncorrectProof( + "proof did not contain token status expected to exist because of state transition (token emergency action)".to_string()))); + }; + if token_status.paused() + != emergency_action_transition.emergency_action().paused() + { + return Err(Error::Proof(ProofError::IncorrectProof( + format!("proof contained token status saying this token is {}paused, but we expected {}paused", if token_status.paused() {""} else {"not "}, if emergency_action_transition.emergency_action().paused() {""} else {"not "})))); + } + Ok((root_hash, VerifiedTokenStatus(token_status))) + } + } + } } } } diff --git a/packages/rs-drive/src/verify/tokens/mod.rs b/packages/rs-drive/src/verify/tokens/mod.rs index 91e8d10e09..2210311510 100644 --- a/packages/rs-drive/src/verify/tokens/mod.rs +++ b/packages/rs-drive/src/verify/tokens/mod.rs @@ -1,6 +1,9 @@ +mod verify_token_balance_for_identity_id; mod verify_token_balances_for_identity_id; mod verify_token_balances_for_identity_ids; +mod verify_token_info_for_identity_id; mod verify_token_infos_for_identity_id; mod verify_token_infos_for_identity_ids; +mod verify_token_status; mod verify_token_statuses; mod verify_token_total_supply_and_aggregated_identity_balance; diff --git a/packages/rs-drive/src/verify/tokens/verify_token_balance_for_identity_id/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_balance_for_identity_id/mod.rs new file mode 100644 index 0000000000..900dc9c637 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_balance_for_identity_id/mod.rs @@ -0,0 +1,75 @@ +mod v0; + +use crate::drive::Drive; +use dpp::balances::credits::TokenAmount; + +use crate::error::drive::DriveError; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the token balance of a specific identity using a cryptographic proof. + /// + /// This function validates the token balance associated with an identity by verifying + /// the provided cryptographic proof. It ensures the correctness of the balance stored + /// for the given identity and token combination. + /// + /// # Parameters + /// + /// - `proof`: A slice of bytes containing the cryptographic proof of the token balance. + /// - `token_id`: A 32-byte identifier representing the unique ID of the token to verify. + /// - `identity_id`: A 32-byte identifier representing the identity whose token balance + /// is to be verified. + /// - `verify_subset_of_proof`: A boolean indicating whether to verify only a subset of + /// the provided proof. + /// - `platform_version`: A reference to the [PlatformVersion] object specifying which + /// implementation version of the function to invoke. + /// + /// # Returns + /// + /// Returns a `Result` containing: + /// - `Ok((RootHash, Option))`: A tuple where: + /// - `RootHash`: The root hash of the data structure at the time the proof was generated. + /// - `Option`: The token balance if it exists, or `None` if the balance is absent. + /// - `Err(Error)`: An error if the verification fails due to an invalid proof, incorrect data, + /// or version mismatch. + /// + /// # Errors + /// + /// This function may return an `Error` in the following cases: + /// - The provided proof is invalid or corrupted. + /// - The token balance data is missing, inconsistent, or does not match the proof. + /// - The specified platform version does not match any known or supported implementations. + pub fn verify_token_balance_for_identity_id( + proof: &[u8], + token_id: [u8; 32], + identity_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, Option), Error> { + match platform_version + .drive + .methods + .verify + .token + .verify_token_balance_for_identity_id + { + 0 => Self::verify_token_balance_for_identity_id_v0( + proof, + token_id, + identity_id, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_token_balance_for_identity_id".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_balance_for_identity_id/v0/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_balance_for_identity_id/v0/mod.rs new file mode 100644 index 0000000000..e65abd89ed --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_balance_for_identity_id/v0/mod.rs @@ -0,0 +1,51 @@ +use crate::drive::Drive; +use grovedb::Element::SumItem; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::balances::credits::TokenAmount; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_token_balance_for_identity_id_v0( + proof: &[u8], + token_id: [u8; 32], + identity_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, Option), Error> { + let path_query = Self::token_balance_for_identity_id_query(token_id, identity_id); + let (root_hash, mut proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + } else { + GroveDb::verify_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + }; + if proved_key_values.len() == 1 { + let proved_key_value = proved_key_values.remove(0); + match proved_key_value.2 { + Some(SumItem(value, ..)) => Ok((root_hash, Some(value as TokenAmount))), + None => Ok((root_hash, None)), + _ => Err(Error::Proof(ProofError::IncorrectValueSize( + "proof did not point to a sum item", + ))), + } + } else { + Err(Error::Proof(ProofError::WrongElementCount { + expected: 1, + got: proved_key_values.len(), + })) + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_info_for_identity_id/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_info_for_identity_id/mod.rs new file mode 100644 index 0000000000..d61562f687 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_info_for_identity_id/mod.rs @@ -0,0 +1,73 @@ +mod v0; + +use crate::drive::Drive; +use dpp::tokens::info::IdentityTokenInfo; + +use crate::error::drive::DriveError; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the token information for a specific identity using a cryptographic proof. + /// + /// This function verifies the association between a token and an identity by processing the provided + /// cryptographic proof. It checks the existence and correctness of the token's information in the + /// context of the specified identity. + /// + /// # Parameters + /// + /// - `proof`: A slice of bytes containing the cryptographic proof of the token's information. + /// - `token_id`: A 32-byte identifier representing the unique ID of the token to verify. + /// - `identity_id`: A 32-byte identifier representing the identity associated with the token. + /// - `verify_subset_of_proof`: A boolean indicating whether to verify only a subset of the provided proof. + /// - `platform_version`: A reference to the [PlatformVersion] object specifying which implementation + /// version of the function to invoke. + /// + /// # Returns + /// + /// Returns a `Result` containing: + /// - `Ok((RootHash, Option))`: A tuple where: + /// - `RootHash`: The root hash of the data structure at the time the proof was generated. + /// - `Option`: The token information if it exists, or `None` if the token information + /// is absent. + /// - `Err(Error)`: An error if the verification fails due to an invalid proof, incorrect data, or version mismatch. + /// + /// # Errors + /// + /// This function may return an `Error` in the following cases: + /// - The provided proof is invalid or corrupted. + /// - The token's information is missing, inconsistent, or does not match the proof. + /// - The specified platform version does not match any known or supported implementations. + pub fn verify_token_info_for_identity_id( + proof: &[u8], + token_id: [u8; 32], + identity_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, Option), Error> { + match platform_version + .drive + .methods + .verify + .token + .verify_token_info_for_identity_id + { + 0 => Self::verify_token_info_for_identity_id_v0( + proof, + token_id, + identity_id, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_token_info_for_identity_id".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_info_for_identity_id/v0/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_info_for_identity_id/v0/mod.rs new file mode 100644 index 0000000000..0d90766948 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_info_for_identity_id/v0/mod.rs @@ -0,0 +1,55 @@ +use crate::drive::Drive; +use grovedb::Element::Item; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::serialization::PlatformDeserializable; +use dpp::tokens::info::IdentityTokenInfo; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_token_info_for_identity_id_v0( + proof: &[u8], + token_id: [u8; 32], + identity_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, Option), Error> { + let path_query = Self::token_info_for_identity_id_query(token_id, identity_id); + let (root_hash, mut proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + } else { + GroveDb::verify_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + }; + if proved_key_values.len() == 1 { + let proved_key_value = proved_key_values.remove(0); + match proved_key_value.2 { + Some(Item(value, ..)) => Ok(( + root_hash, + Some(IdentityTokenInfo::deserialize_from_bytes(&value)?), + )), + None => Ok((root_hash, None)), + _ => Err(Error::Proof(ProofError::IncorrectValueSize( + "proof did not point to an item", + ))), + } + } else { + Err(Error::Proof(ProofError::WrongElementCount { + expected: 1, + got: proved_key_values.len(), + })) + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_status/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_status/mod.rs new file mode 100644 index 0000000000..d88fdf14bd --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_status/mod.rs @@ -0,0 +1,68 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use dpp::tokens::status::TokenStatus; + +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::version::PlatformVersion; + +impl Drive { + /// Verifies the status of a token using a provided cryptographic proof. + /// + /// This function takes a cryptographic proof, a token ID, and other parameters to verify + /// the existence and status of a token in the data structure. It delegates the verification + /// process to the appropriate versioned implementation based on the platform version. + /// + /// # Parameters + /// + /// - `proof`: A slice of bytes representing the cryptographic proof of the token's status. + /// - `token_id`: A 32-byte identifier representing the unique ID of the token. + /// - `verify_subset_of_proof`: A boolean indicating whether to verify a subset of the provided proof. + /// - `platform_version`: A reference to the [PlatformVersion] object that specifies which version + /// of the function implementation to invoke. + /// + /// # Returns + /// + /// Returns a `Result` containing: + /// - `Ok((RootHash, Option))`: A tuple where: + /// - `RootHash`: The root hash of the data structure at the time the proof was created. + /// - `Option`: The status of the token if it exists, or `None` if the token does not exist. + /// - `Err(Error)`: An error if the verification fails due to an invalid proof, incorrect data, or version mismatch. + /// + /// # Errors + /// + /// This function can return an `Error` in the following cases: + /// - The proof is invalid or corrupted. + /// - The token's status data is missing or inconsistent. + /// - The platform version does not match any of the known implementations. + pub fn verify_token_status( + proof: &[u8], + token_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, Option), Error> { + match platform_version + .drive + .methods + .verify + .token + .verify_token_status + { + 0 => Self::verify_token_status_v0( + proof, + token_id, + verify_subset_of_proof, + platform_version, + ), + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "verify_token_status".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/verify/tokens/verify_token_status/v0/mod.rs b/packages/rs-drive/src/verify/tokens/verify_token_status/v0/mod.rs new file mode 100644 index 0000000000..0ed0bc36c9 --- /dev/null +++ b/packages/rs-drive/src/verify/tokens/verify_token_status/v0/mod.rs @@ -0,0 +1,54 @@ +use crate::drive::Drive; +use grovedb::Element::Item; + +use crate::error::proof::ProofError; +use crate::error::Error; + +use crate::verify::RootHash; + +use dpp::serialization::PlatformDeserializable; +use dpp::tokens::status::TokenStatus; +use grovedb::GroveDb; +use platform_version::version::PlatformVersion; + +impl Drive { + pub(super) fn verify_token_status_v0( + proof: &[u8], + token_id: [u8; 32], + verify_subset_of_proof: bool, + platform_version: &PlatformVersion, + ) -> Result<(RootHash, Option), Error> { + let path_query = Self::token_status_query(token_id); + let (root_hash, mut proved_key_values) = if verify_subset_of_proof { + GroveDb::verify_subset_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + } else { + GroveDb::verify_query_with_absence_proof( + proof, + &path_query, + &platform_version.drive.grove_version, + )? + }; + if proved_key_values.len() == 1 { + let proved_key_value = proved_key_values.remove(0); + match proved_key_value.2 { + Some(Item(value, ..)) => Ok(( + root_hash, + Some(TokenStatus::deserialize_from_bytes(&value)?), + )), + None => Ok((root_hash, None)), + _ => Err(Error::Proof(ProofError::IncorrectValueSize( + "proof did not point to an item", + ))), + } + } else { + Err(Error::Proof(ProofError::WrongElementCount { + expected: 1, + got: proved_key_values.len(), + })) + } + } +} diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs index e7b9919c93..d371eabce6 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/mod.rs @@ -49,6 +49,7 @@ pub struct DriveVerifyGroupMethodVersions { pub verify_group_info: FeatureVersion, pub verify_group_infos_in_contract: FeatureVersion, pub verify_action_infos: FeatureVersion, + pub verify_action_signers: FeatureVersion, } #[derive(Clone, Debug, Default)] @@ -59,6 +60,9 @@ pub struct DriveVerifyTokenMethodVersions { pub verify_token_infos_for_identity_id: FeatureVersion, pub verify_token_statuses: FeatureVersion, pub verify_token_total_supply_and_aggregated_identity_balance: FeatureVersion, + pub verify_token_balance_for_identity_id: FeatureVersion, + pub verify_token_info_for_identity_id: FeatureVersion, + pub verify_token_status: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs index 4872470b08..9df4fc8dfd 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_verify_method_versions/v1.rs @@ -33,6 +33,7 @@ pub const DRIVE_VERIFY_METHOD_VERSIONS_V1: DriveVerifyMethodVersions = DriveVeri verify_group_info: 0, verify_group_infos_in_contract: 0, verify_action_infos: 0, + verify_action_signers: 0, }, token: DriveVerifyTokenMethodVersions { verify_token_balances_for_identity_ids: 0, @@ -41,6 +42,9 @@ pub const DRIVE_VERIFY_METHOD_VERSIONS_V1: DriveVerifyMethodVersions = DriveVeri verify_token_infos_for_identity_id: 0, verify_token_statuses: 0, verify_token_total_supply_and_aggregated_identity_balance: 0, + verify_token_balance_for_identity_id: 0, + verify_token_info_for_identity_id: 0, + verify_token_status: 0, }, single_document: DriveVerifySingleDocumentMethodVersions { verify_proof: 0, diff --git a/packages/token-history-contract/schema/v1/token-history-contract-documents.json b/packages/token-history-contract/schema/v1/token-history-contract-documents.json index 0946d7a29e..e6d96fd8f7 100644 --- a/packages/token-history-contract/schema/v1/token-history-contract-documents.json +++ b/packages/token-history-contract/schema/v1/token-history-contract-documents.json @@ -460,7 +460,7 @@ "tokenId": "asc" }, { - "amount": "asc" + "destroyedAmount": "asc" } ] }, @@ -498,7 +498,7 @@ "position": 1, "contentMediaType": "application/x.dash.dpp.identifier" }, - "amount": { + "destroyedAmount": { "type": "integer", "minimum": 0, "description": "The amount that was frost burned", @@ -508,7 +508,7 @@ "required": [ "tokenId", "frozenIdentityId", - "amount", + "destroyedAmount", "$createdAt", "$createdAtBlockHeight" ], From c9ab154319484f65f5e313215e91eeaf066de69c Mon Sep 17 00:00:00 2001 From: QuantumExplorer Date: Wed, 22 Jan 2025 15:50:25 +0700 Subject: [PATCH 5/6] feat(platform)!: improved token validation and token config update transition (#2435) --- Cargo.lock | 18 +- .../protos/platform/v0/platform.proto | 7 + .../src/data_contract/associated_token/mod.rs | 2 + .../token_configuration/accessors/mod.rs | 32 +- .../token_configuration/accessors/v0/mod.rs | 17 +- .../apply_token_configuration_item/mod.rs | 18 + .../apply_token_configuration_item/v0/mod.rs | 116 ++ .../mod.rs | 25 + .../v0/mod.rs | 112 ++ .../can_apply_token_configuration_item/mod.rs | 38 + .../v0/mod.rs | 253 ++++ .../token_configuration/methods/mod.rs | 4 + .../mod.rs | 50 + .../v0/mod.rs | 42 + .../mod.rs | 6 +- .../v0/mod.rs | 71 +- .../token_configuration/v0/accessors.rs | 59 +- .../token_configuration/v0/mod.rs | 100 +- .../token_configuration_convention/mod.rs | 25 + .../token_configuration_convention/v0/mod.rs | 56 + .../token_configuration_item.rs | 203 +++ .../authorized_action_takers.rs | 56 +- .../data_contract/change_control_rules/mod.rs | 78 +- .../change_control_rules/v0/mod.rs | 119 +- .../src/data_contract/group/methods/mod.rs | 1 + .../src/data_contract/group/methods/v0/mod.rs | 10 + .../rs-dpp/src/data_contract/group/mod.rs | 16 + .../rs-dpp/src/data_contract/group/v0/mod.rs | 87 ++ .../rs-dpp/src/data_contract/methods/mod.rs | 2 + .../methods/validate_groups/mod.rs | 58 + .../methods/validate_groups/v0/mod.rs | 39 + .../methods/validate_update/v0/mod.rs | 82 ++ .../src/errors/consensus/basic/basic_error.rs | 28 +- .../group_exceeds_max_members_error.rs | 31 + .../group_member_has_power_of_zero_error.rs | 32 + ...group_member_has_power_over_limit_error.rs | 57 + ...ower_has_less_than_required_power_error.rs | 49 + .../group_position_does_not_exist_error.rs | 46 + ...ower_has_less_than_required_power_error.rs | 40 + .../consensus/basic/data_contract/mod.rs | 12 + packages/rs-dpp/src/errors/consensus/codes.rs | 25 +- ...ontract_update_action_not_allowed_error.rs | 45 + .../consensus/state/data_contract/mod.rs | 1 + .../src/errors/consensus/state/state_error.rs | 4 + packages/rs-dpp/src/group/action_taker.rs | 13 + packages/rs-dpp/src/group/mod.rs | 1 + packages/rs-dpp/src/lib.rs | 1 - .../rs-dpp/src/multi_identity_events/mod.rs | 7 - packages/rs-dpp/src/state_transition/mod.rs | 114 +- .../batched_transition/mod.rs | 1 + .../token_config_update_transition/mod.rs | 25 + .../token_config_update_transition/v0/mod.rs | 27 + .../v0/v0_methods.rs | 87 ++ .../v0_methods.rs | 72 + .../batched_transition/token_transition.rs | 27 +- .../token_transition_action_type.rs | 3 + .../document/batch_transition/methods/mod.rs | 1 + .../batch_transition/methods/v1/mod.rs | 11 + .../document/batch_transition/mod.rs | 1 + .../batch_transition/v1/v0_methods.rs | 5 +- .../validate_basic_structure/v0/mod.rs | 1 + packages/rs-dpp/src/tokens/token_event.rs | 25 + .../document_create_transition_action/mod.rs | 6 +- .../state_v0/mod.rs | 2 +- .../state_v1/mod.rs | 2 +- .../structure_v0/mod.rs | 2 +- .../document_delete_transition_action/mod.rs | 4 +- .../state_v0/mod.rs | 2 +- .../structure_v0/mod.rs | 2 +- .../mod.rs | 4 +- .../state_v0/mod.rs | 2 +- .../structure_v0/mod.rs | 2 +- .../document_replace_transition_action/mod.rs | 4 +- .../state_v0/mod.rs | 2 +- .../structure_v0/mod.rs | 2 +- .../mod.rs | 4 +- .../state_v0/mod.rs | 2 +- .../structure_v0/mod.rs | 2 +- .../mod.rs | 4 +- .../state_v0/mod.rs | 2 +- .../structure_v0/mod.rs | 2 +- .../batch/action_validation/document/mod.rs | 6 + .../batch/action_validation/mod.rs | 16 +- .../batch/action_validation/token/mod.rs | 9 + .../token/token_base_transition_action/mod.rs | 138 ++ .../state_v0/mod.rs | 130 +- .../structure_v0/mod.rs | 2 +- .../token_burn_transition_action/mod.rs | 4 +- .../state_v0/mod.rs | 37 +- .../structure_v0/mod.rs | 4 +- .../mod.rs | 18 +- .../state_v0/mod.rs | 81 ++ .../structure_v0/mod.rs | 25 + .../mod.rs | 4 +- .../state_v0/mod.rs | 36 +- .../structure_v0/mod.rs | 4 +- .../mod.rs | 4 +- .../state_v0/mod.rs | 36 +- .../structure_v0/mod.rs | 4 +- .../token_freeze_transition_action/mod.rs | 4 +- .../state_v0/mod.rs | 36 +- .../structure_v0/mod.rs | 4 +- .../token_mint_transition_action/mod.rs | 4 +- .../state_v0/mod.rs | 102 ++ .../structure_v0/mod.rs | 4 +- .../token_transfer_transition_action/mod.rs | 4 +- .../state_v0/mod.rs | 4 +- .../structure_v0/mod.rs | 4 +- .../token_unfreeze_transition_action/mod.rs | 4 +- .../state_v0/mod.rs | 36 +- .../structure_v0/mod.rs | 4 +- .../state_v0/mod.rs | 67 - .../batch/advanced_structure/v0/mod.rs | 41 +- .../state_transitions/batch/mod.rs | 106 +- .../state_transitions/batch/state/v0/mod.rs | 37 +- .../batch/transformer/v0/mod.rs | 11 + .../advanced_structure/v0/mod.rs | 39 +- .../data_contract_create/mod.rs | 1173 ++++++++++++++++- .../data_contract_update/mod.rs | 636 +++++++++ .../group_queries/group_actions/v0/mod.rs | 19 +- .../verify_state_transitions.rs | 1 + .../contract/basic-token/basic-token.json | 1 + packages/rs-drive/Cargo.toml | 12 +- .../get_fetch/fetch_contract/v0/mod.rs | 12 +- .../estimated_costs/for_add_groups/mod.rs | 74 ++ .../estimated_costs/for_add_groups/v0/mod.rs | 88 ++ .../src/drive/group/estimated_costs/mod.rs | 1 + .../group/insert/add_new_groups/v0/mod.rs | 9 + .../v0/mod.rs | 1 + .../batch/token/mod.rs | 1 + .../token/token_config_update_transition.rs | 118 ++ .../batch/token/token_transition.rs | 7 + .../batch/token/token_unfreeze_transition.rs | 2 +- .../token_transition/mod.rs | 11 + .../mod.rs | 66 + .../transformer.rs | 117 ++ .../v0/mod.rs | 104 ++ .../v0/transformer.rs | 233 ++++ .../token_transition_action_type.rs | 1 + .../src/util/batch/drive_op_batch/token.rs | 4 - .../v0/mod.rs | 36 + packages/rs-platform-version/Cargo.toml | 2 +- .../dpp_versions/dpp_contract_versions/mod.rs | 1 + .../dpp_versions/dpp_contract_versions/v1.rs | 1 + .../dpp_versions/dpp_contract_versions/v2.rs | 1 + .../dpp_validation_versions/mod.rs | 1 + .../dpp_validation_versions/v1.rs | 1 + .../dpp_validation_versions/v2.rs | 1 + .../drive_abci_validation_versions/mod.rs | 4 + .../drive_abci_validation_versions/v1.rs | 4 + .../drive_abci_validation_versions/v2.rs | 4 + .../drive_abci_validation_versions/v3.rs | 4 + .../drive_abci_validation_versions/v4.rs | 4 + .../drive_abci_validation_versions/v5.rs | 4 + .../drive_group_method_versions/mod.rs | 1 + .../drive_group_method_versions/v1.rs | 1 + .../mod.rs | 1 + .../v1.rs | 1 + .../src/version/mocks/v2_test.rs | 1 + .../src/version/system_limits/mod.rs | 1 + .../src/version/system_limits/v1.rs | 1 + .../v1/token-history-contract-documents.json | 71 + .../src/errors/consensus/consensus_error.rs | 28 +- 163 files changed, 5857 insertions(+), 723 deletions(-) create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/apply_token_configuration_item/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/apply_token_configuration_item/v0/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/authorized_action_takers_for_configuration_item/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/authorized_action_takers_for_configuration_item/v0/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/can_apply_token_configuration_item/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/can_apply_token_configuration_item/v0/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_groups_exist/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_groups_exist/v0/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration_convention/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration_convention/v0/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/associated_token/token_configuration_item.rs create mode 100644 packages/rs-dpp/src/data_contract/group/methods/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/group/methods/v0/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/methods/validate_groups/mod.rs create mode 100644 packages/rs-dpp/src/data_contract/methods/validate_groups/v0/mod.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/data_contract/group_exceeds_max_members_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/data_contract/group_member_has_power_of_zero_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/data_contract/group_member_has_power_over_limit_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/data_contract/group_non_unilateral_member_power_has_less_than_required_power_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/data_contract/group_position_does_not_exist_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/basic/data_contract/group_total_power_has_less_than_required_power_error.rs create mode 100644 packages/rs-dpp/src/errors/consensus/state/data_contract/data_contract_update_action_not_allowed_error.rs create mode 100644 packages/rs-dpp/src/group/action_taker.rs delete mode 100644 packages/rs-dpp/src/multi_identity_events/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0/mod.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0/v0_methods.rs create mode 100644 packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0_methods.rs rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_create_transition_action/mod.rs (91%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_create_transition_action/state_v0/mod.rs (98%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_create_transition_action/state_v1/mod.rs (98%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_create_transition_action/structure_v0/mod.rs (97%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_delete_transition_action/mod.rs (92%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_delete_transition_action/state_v0/mod.rs (96%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_delete_transition_action/structure_v0/mod.rs (92%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_purchase_transition_action/mod.rs (92%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_purchase_transition_action/state_v0/mod.rs (94%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_purchase_transition_action/structure_v0/mod.rs (94%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_replace_transition_action/mod.rs (92%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_replace_transition_action/state_v0/mod.rs (94%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_replace_transition_action/structure_v0/mod.rs (93%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_transfer_transition_action/mod.rs (92%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_transfer_transition_action/state_v0/mod.rs (94%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_transfer_transition_action/structure_v0/mod.rs (93%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_update_price_transition_action/mod.rs (92%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_update_price_transition_action/state_v0/mod.rs (94%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => document}/document_update_price_transition_action/structure_v0/mod.rs (93%) create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_base_transition_action/mod.rs rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{token_mint_transition_action => token/token_base_transition_action}/state_v0/mod.rs (61%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_base_transition_action/structure_v0/mod.rs (93%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_burn_transition_action/mod.rs (93%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_burn_transition_action/state_v0/mod.rs (79%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_burn_transition_action/structure_v0/mod.rs (80%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{token_base_transition_action => token/token_config_update_transition_action}/mod.rs (76%) create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/state_v0/mod.rs create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/structure_v0/mod.rs rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_destroy_frozen_funds_transition_action/mod.rs (92%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_destroy_frozen_funds_transition_action/state_v0/mod.rs (79%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_destroy_frozen_funds_transition_action/structure_v0/mod.rs (80%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_emergency_action_transition_action/mod.rs (92%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_emergency_action_transition_action/state_v0/mod.rs (72%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_emergency_action_transition_action/structure_v0/mod.rs (80%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_freeze_transition_action/mod.rs (93%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_freeze_transition_action/state_v0/mod.rs (72%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_freeze_transition_action/structure_v0/mod.rs (80%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_mint_transition_action/mod.rs (93%) create mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/state_v0/mod.rs rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_mint_transition_action/structure_v0/mod.rs (80%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_transfer_transition_action/mod.rs (93%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_transfer_transition_action/state_v0/mod.rs (94%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_transfer_transition_action/structure_v0/mod.rs (83%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_unfreeze_transition_action/mod.rs (93%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_unfreeze_transition_action/state_v0/mod.rs (79%) rename packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/{ => token}/token_unfreeze_transition_action/structure_v0/mod.rs (80%) delete mode 100644 packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/state_v0/mod.rs create mode 100644 packages/rs-drive/src/drive/group/estimated_costs/for_add_groups/mod.rs create mode 100644 packages/rs-drive/src/drive/group/estimated_costs/for_add_groups/v0/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_config_update_transition.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/transformer.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/v0/mod.rs create mode 100644 packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/v0/transformer.rs diff --git a/Cargo.lock b/Cargo.lock index 5964aaa3fb..f55e79caa6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2099,7 +2099,7 @@ dependencies = [ [[package]] name = "grovedb" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" +source = "git+https://github.com/dashpay/grovedb?rev=44c2244bbccd3e6e684729e8cf620644f7ebbf70#44c2244bbccd3e6e684729e8cf620644f7ebbf70" dependencies = [ "axum", "bincode", @@ -2130,7 +2130,7 @@ dependencies = [ [[package]] name = "grovedb-costs" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" +source = "git+https://github.com/dashpay/grovedb?rev=44c2244bbccd3e6e684729e8cf620644f7ebbf70#44c2244bbccd3e6e684729e8cf620644f7ebbf70" dependencies = [ "integer-encoding", "intmap", @@ -2140,7 +2140,7 @@ dependencies = [ [[package]] name = "grovedb-epoch-based-storage-flags" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" +source = "git+https://github.com/dashpay/grovedb?rev=44c2244bbccd3e6e684729e8cf620644f7ebbf70#44c2244bbccd3e6e684729e8cf620644f7ebbf70" dependencies = [ "grovedb-costs", "hex", @@ -2152,7 +2152,7 @@ dependencies = [ [[package]] name = "grovedb-merk" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" +source = "git+https://github.com/dashpay/grovedb?rev=44c2244bbccd3e6e684729e8cf620644f7ebbf70#44c2244bbccd3e6e684729e8cf620644f7ebbf70" dependencies = [ "bincode", "blake3", @@ -2175,7 +2175,7 @@ dependencies = [ [[package]] name = "grovedb-path" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" +source = "git+https://github.com/dashpay/grovedb?rev=44c2244bbccd3e6e684729e8cf620644f7ebbf70#44c2244bbccd3e6e684729e8cf620644f7ebbf70" dependencies = [ "hex", ] @@ -2183,7 +2183,7 @@ dependencies = [ [[package]] name = "grovedb-storage" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" +source = "git+https://github.com/dashpay/grovedb?rev=44c2244bbccd3e6e684729e8cf620644f7ebbf70#44c2244bbccd3e6e684729e8cf620644f7ebbf70" dependencies = [ "blake3", "grovedb-costs", @@ -2202,7 +2202,7 @@ dependencies = [ [[package]] name = "grovedb-version" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" +source = "git+https://github.com/dashpay/grovedb?rev=44c2244bbccd3e6e684729e8cf620644f7ebbf70#44c2244bbccd3e6e684729e8cf620644f7ebbf70" dependencies = [ "thiserror 2.0.11", "versioned-feature-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2211,7 +2211,7 @@ dependencies = [ [[package]] name = "grovedb-visualize" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" +source = "git+https://github.com/dashpay/grovedb?rev=44c2244bbccd3e6e684729e8cf620644f7ebbf70#44c2244bbccd3e6e684729e8cf620644f7ebbf70" dependencies = [ "hex", "itertools 0.14.0", @@ -2220,7 +2220,7 @@ dependencies = [ [[package]] name = "grovedbg-types" version = "3.0.0" -source = "git+https://github.com/dashpay/grovedb?rev=e3ac3f7883bb0f2e25936153f76d447b42ebc9c0#e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" +source = "git+https://github.com/dashpay/grovedb?rev=44c2244bbccd3e6e684729e8cf620644f7ebbf70#44c2244bbccd3e6e684729e8cf620644f7ebbf70" dependencies = [ "serde", "serde_with 3.9.0", diff --git a/packages/dapi-grpc/protos/platform/v0/platform.proto b/packages/dapi-grpc/protos/platform/v0/platform.proto index 44d27fc8be..a071a3174b 100644 --- a/packages/dapi-grpc/protos/platform/v0/platform.proto +++ b/packages/dapi-grpc/protos/platform/v0/platform.proto @@ -1622,6 +1622,12 @@ message GetGroupActionsResponse { optional string public_note = 2; // Public note } + // Token config update event + message TokenConfigUpdateEvent { + bytes token_config_update_item = 1; // Token config update item + optional string public_note = 2; // Public note + } + // Event associated with this action message GroupActionEvent { oneof event_type { @@ -1661,6 +1667,7 @@ message GetGroupActionsResponse { DestroyFrozenFundsEvent destroy_frozen_funds = 5; // Destroy frozen funds TransferEvent transfer = 6; // Transfer event details EmergencyActionEvent emergency_action = 7; // Emergency action details + TokenConfigUpdateEvent token_config_update = 8; // Token configuration update details } } diff --git a/packages/rs-dpp/src/data_contract/associated_token/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/mod.rs index ad9156e391..d7558c24b1 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/mod.rs @@ -1 +1,3 @@ pub mod token_configuration; +pub mod token_configuration_convention; +pub mod token_configuration_item; diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/mod.rs index 46c82e7995..31e816a0b1 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/mod.rs @@ -1,33 +1,41 @@ pub mod v0; +use crate::balances::credits::TokenAmount; use crate::data_contract::associated_token::token_configuration::accessors::v0::{ TokenConfigurationV0Getters, TokenConfigurationV0Setters, }; -use crate::data_contract::associated_token::token_configuration::v0::TokenConfigurationConventionV0; use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::associated_token::token_configuration_convention::TokenConfigurationConvention; use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; use crate::data_contract::change_control_rules::ChangeControlRules; use crate::data_contract::GroupContractPosition; use platform_value::Identifier; +use std::collections::BTreeSet; /// Implementing TokenConfigurationV0Getters for TokenConfiguration impl TokenConfigurationV0Getters for TokenConfiguration { /// Returns a reference to the conventions. - fn conventions(&self) -> &TokenConfigurationConventionV0 { + fn conventions(&self) -> &TokenConfigurationConvention { match self { TokenConfiguration::V0(v0) => v0.conventions(), } } /// Returns a mutable reference to the conventions. - fn conventions_mut(&mut self) -> &mut TokenConfigurationConventionV0 { + fn conventions_mut(&mut self) -> &mut TokenConfigurationConvention { match self { TokenConfiguration::V0(v0) => v0.conventions_mut(), } } + fn conventions_change_rules(&self) -> &ChangeControlRules { + match self { + TokenConfiguration::V0(v0) => v0.conventions_change_rules(), + } + } + /// Returns the base supply. - fn base_supply(&self) -> u64 { + fn base_supply(&self) -> TokenAmount { match self { TokenConfiguration::V0(v0) => v0.base_supply(), } @@ -141,17 +149,31 @@ impl TokenConfigurationV0Getters for TokenConfiguration { TokenConfiguration::V0(v0) => v0.main_control_group_can_be_modified(), } } + + /// Returns all group positions used in the token configuration + fn all_used_group_positions(&self) -> BTreeSet { + match self { + TokenConfiguration::V0(v0) => v0.all_used_group_positions(), + } + } } /// Implementing TokenConfigurationV0Setters for TokenConfiguration impl TokenConfigurationV0Setters for TokenConfiguration { /// Sets the conventions. - fn set_conventions(&mut self, conventions: TokenConfigurationConventionV0) { + fn set_conventions(&mut self, conventions: TokenConfigurationConvention) { match self { TokenConfiguration::V0(v0) => v0.set_conventions(conventions), } } + /// Sets the conventions change rules. + fn set_conventions_change_rules(&mut self, rules: ChangeControlRules) { + match self { + TokenConfiguration::V0(v0) => v0.set_conventions_change_rules(rules), + } + } + /// Sets the base supply. fn set_base_supply(&mut self, base_supply: u64) { match self { diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/v0/mod.rs index cc1de8cb81..b1b4143059 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/accessors/v0/mod.rs @@ -1,17 +1,20 @@ use crate::balances::credits::TokenAmount; -use crate::data_contract::associated_token::token_configuration::v0::TokenConfigurationConventionV0; +use crate::data_contract::associated_token::token_configuration_convention::TokenConfigurationConvention; use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; use crate::data_contract::change_control_rules::ChangeControlRules; use crate::data_contract::GroupContractPosition; use platform_value::Identifier; +use std::collections::BTreeSet; /// Accessor trait for getters of `TokenConfigurationV0` pub trait TokenConfigurationV0Getters { /// Returns a reference to the conventions. - fn conventions(&self) -> &TokenConfigurationConventionV0; + fn conventions(&self) -> &TokenConfigurationConvention; /// Returns a mutable reference to the conventions. - fn conventions_mut(&mut self) -> &mut TokenConfigurationConventionV0; + fn conventions_mut(&mut self) -> &mut TokenConfigurationConvention; + /// Returns the new tokens destination identity rules. + fn conventions_change_rules(&self) -> &ChangeControlRules; /// Returns the base supply. fn base_supply(&self) -> TokenAmount; @@ -56,12 +59,18 @@ pub trait TokenConfigurationV0Getters { /// Returns the main control group can be modified. fn main_control_group_can_be_modified(&self) -> &AuthorizedActionTakers; + + /// Returns all group positions used in the token configuration + fn all_used_group_positions(&self) -> BTreeSet; } /// Accessor trait for setters of `TokenConfigurationV0` pub trait TokenConfigurationV0Setters { /// Sets the conventions. - fn set_conventions(&mut self, conventions: TokenConfigurationConventionV0); + fn set_conventions(&mut self, conventions: TokenConfigurationConvention); + + /// Sets the conventions change rules. + fn set_conventions_change_rules(&mut self, rules: ChangeControlRules); /// Sets the base supply. fn set_base_supply(&mut self, base_supply: TokenAmount); diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/apply_token_configuration_item/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/apply_token_configuration_item/mod.rs new file mode 100644 index 0000000000..9468c91ca7 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/apply_token_configuration_item/mod.rs @@ -0,0 +1,18 @@ +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::associated_token::token_configuration_item::TokenConfigurationChangeItem; + +mod v0; + +impl TokenConfiguration { + /// Applies a `TokenConfigurationChangeItem` to this token configuration. + /// + /// # Parameters + /// - `change_item`: The change item to be applied. + /// + /// This method modifies the current `TokenConfigurationV0` instance in place. + pub fn apply_token_configuration_item(&mut self, change_item: TokenConfigurationChangeItem) { + match self { + TokenConfiguration::V0(v0) => v0.apply_token_configuration_item(change_item), + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/apply_token_configuration_item/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/apply_token_configuration_item/v0/mod.rs new file mode 100644 index 0000000000..706faf5f48 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/apply_token_configuration_item/v0/mod.rs @@ -0,0 +1,116 @@ +use crate::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; +use crate::data_contract::associated_token::token_configuration_item::TokenConfigurationChangeItem; +impl TokenConfigurationV0 { + /// Applies a `TokenConfigurationChangeItem` to this token configuration. + /// + /// # Parameters + /// - `change_item`: The change item to be applied. + /// + /// This method modifies the current `TokenConfigurationV0` instance in place. + pub fn apply_token_configuration_item(&mut self, change_item: TokenConfigurationChangeItem) { + match change_item { + TokenConfigurationChangeItem::TokenConfigurationNoChange => { + // No changes are made + } + TokenConfigurationChangeItem::Conventions(conventions) => { + self.conventions = conventions; + } + TokenConfigurationChangeItem::ConventionsControlGroup(control_group) => { + self.conventions_change_rules + .set_authorized_to_make_change_action_takers(control_group); + } + TokenConfigurationChangeItem::ConventionsAdminGroup(admin_group) => { + self.conventions_change_rules + .set_admin_action_takers(admin_group); + } + TokenConfigurationChangeItem::MaxSupply(max_supply) => { + self.max_supply = max_supply; + } + TokenConfigurationChangeItem::MaxSupplyControlGroup(control_group) => { + self.max_supply_change_rules + .set_authorized_to_make_change_action_takers(control_group); + } + TokenConfigurationChangeItem::MaxSupplyAdminGroup(admin_group) => { + self.max_supply_change_rules + .set_admin_action_takers(admin_group); + } + TokenConfigurationChangeItem::NewTokensDestinationIdentity(identity) => { + self.new_tokens_destination_identity = identity; + } + TokenConfigurationChangeItem::NewTokensDestinationIdentityControlGroup( + control_group, + ) => { + self.new_tokens_destination_identity_rules + .set_authorized_to_make_change_action_takers(control_group); + } + TokenConfigurationChangeItem::NewTokensDestinationIdentityAdminGroup(admin_group) => { + self.new_tokens_destination_identity_rules + .set_admin_action_takers(admin_group); + } + TokenConfigurationChangeItem::MintingAllowChoosingDestination(allow) => { + self.minting_allow_choosing_destination = allow; + } + TokenConfigurationChangeItem::MintingAllowChoosingDestinationControlGroup( + control_group, + ) => { + self.minting_allow_choosing_destination_rules + .set_authorized_to_make_change_action_takers(control_group); + } + TokenConfigurationChangeItem::MintingAllowChoosingDestinationAdminGroup( + admin_group, + ) => { + self.minting_allow_choosing_destination_rules + .set_admin_action_takers(admin_group); + } + TokenConfigurationChangeItem::ManualMinting(control_group) => { + self.manual_minting_rules + .set_authorized_to_make_change_action_takers(control_group); + } + TokenConfigurationChangeItem::ManualMintingAdminGroup(admin_group) => { + self.manual_minting_rules + .set_admin_action_takers(admin_group); + } + TokenConfigurationChangeItem::ManualBurning(control_group) => { + self.manual_burning_rules + .set_authorized_to_make_change_action_takers(control_group); + } + TokenConfigurationChangeItem::ManualBurningAdminGroup(admin_group) => { + self.manual_burning_rules + .set_admin_action_takers(admin_group); + } + TokenConfigurationChangeItem::Freeze(control_group) => { + self.freeze_rules + .set_authorized_to_make_change_action_takers(control_group); + } + TokenConfigurationChangeItem::FreezeAdminGroup(admin_group) => { + self.freeze_rules.set_admin_action_takers(admin_group); + } + TokenConfigurationChangeItem::Unfreeze(control_group) => { + self.unfreeze_rules + .set_authorized_to_make_change_action_takers(control_group); + } + TokenConfigurationChangeItem::UnfreezeAdminGroup(admin_group) => { + self.unfreeze_rules.set_admin_action_takers(admin_group); + } + TokenConfigurationChangeItem::DestroyFrozenFunds(control_group) => { + self.destroy_frozen_funds_rules + .set_authorized_to_make_change_action_takers(control_group); + } + TokenConfigurationChangeItem::DestroyFrozenFundsAdminGroup(admin_group) => { + self.destroy_frozen_funds_rules + .set_admin_action_takers(admin_group); + } + TokenConfigurationChangeItem::EmergencyAction(control_group) => { + self.emergency_action_rules + .set_authorized_to_make_change_action_takers(control_group); + } + TokenConfigurationChangeItem::EmergencyActionAdminGroup(admin_group) => { + self.emergency_action_rules + .set_admin_action_takers(admin_group); + } + TokenConfigurationChangeItem::MainControlGroup(main_group) => { + self.main_control_group = main_group; + } + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/authorized_action_takers_for_configuration_item/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/authorized_action_takers_for_configuration_item/mod.rs new file mode 100644 index 0000000000..3a52cff129 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/authorized_action_takers_for_configuration_item/mod.rs @@ -0,0 +1,25 @@ +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::associated_token::token_configuration_item::TokenConfigurationChangeItem; +use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; + +mod v0; + +impl TokenConfiguration { + /// Returns the authorized action takers for a specific `TokenConfigurationChangeItem`. + /// + /// # Parameters + /// - `change_item`: The change item for which to retrieve the authorized action takers. + /// + /// # Returns + /// - `AuthorizedActionTakers`: The authorized action takers for the given change item. + pub fn authorized_action_takers_for_configuration_item( + &self, + change_item: &TokenConfigurationChangeItem, + ) -> AuthorizedActionTakers { + match self { + TokenConfiguration::V0(v0) => { + v0.authorized_action_takers_for_configuration_item(change_item) + } + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/authorized_action_takers_for_configuration_item/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/authorized_action_takers_for_configuration_item/v0/mod.rs new file mode 100644 index 0000000000..bf8d070994 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/authorized_action_takers_for_configuration_item/v0/mod.rs @@ -0,0 +1,112 @@ +use crate::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; +use crate::data_contract::associated_token::token_configuration_item::TokenConfigurationChangeItem; +use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; +impl TokenConfigurationV0 { + /// Returns the authorized action takers for a specific `TokenConfigurationChangeItem`. + /// + /// # Parameters + /// - `change_item`: The change item for which to retrieve the authorized action takers. + /// + /// # Returns + /// - `AuthorizedActionTakers`: The authorized action takers for the given change item. + pub fn authorized_action_takers_for_configuration_item( + &self, + change_item: &TokenConfigurationChangeItem, + ) -> AuthorizedActionTakers { + match change_item { + TokenConfigurationChangeItem::TokenConfigurationNoChange => { + AuthorizedActionTakers::NoOne + } + TokenConfigurationChangeItem::Conventions(_) => self + .conventions_change_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::ConventionsControlGroup(_) => self + .conventions_change_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::ConventionsAdminGroup(_) => { + self.conventions_change_rules.admin_action_takers().clone() + } + TokenConfigurationChangeItem::MaxSupply(_) => self + .max_supply_change_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::MaxSupplyControlGroup(_) => self + .max_supply_change_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::MaxSupplyAdminGroup(_) => { + self.max_supply_change_rules.admin_action_takers().clone() + } + TokenConfigurationChangeItem::NewTokensDestinationIdentity(_) => self + .new_tokens_destination_identity_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::NewTokensDestinationIdentityControlGroup(_) => self + .new_tokens_destination_identity_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::NewTokensDestinationIdentityAdminGroup(_) => self + .new_tokens_destination_identity_rules + .admin_action_takers() + .clone(), + TokenConfigurationChangeItem::MintingAllowChoosingDestination(_) => self + .minting_allow_choosing_destination_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::MintingAllowChoosingDestinationControlGroup(_) => self + .minting_allow_choosing_destination_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::MintingAllowChoosingDestinationAdminGroup(_) => self + .minting_allow_choosing_destination_rules + .admin_action_takers() + .clone(), + TokenConfigurationChangeItem::ManualMinting(_) => self + .manual_minting_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::ManualMintingAdminGroup(_) => { + self.manual_minting_rules.admin_action_takers().clone() + } + TokenConfigurationChangeItem::ManualBurning(_) => self + .manual_burning_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::ManualBurningAdminGroup(_) => { + self.manual_burning_rules.admin_action_takers().clone() + } + TokenConfigurationChangeItem::Freeze(_) => self + .freeze_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::FreezeAdminGroup(_) => { + self.freeze_rules.admin_action_takers().clone() + } + TokenConfigurationChangeItem::Unfreeze(_) => self + .unfreeze_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::UnfreezeAdminGroup(_) => { + self.unfreeze_rules.admin_action_takers().clone() + } + TokenConfigurationChangeItem::DestroyFrozenFunds(_) => self + .destroy_frozen_funds_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::DestroyFrozenFundsAdminGroup(_) => self + .destroy_frozen_funds_rules + .admin_action_takers() + .clone(), + TokenConfigurationChangeItem::EmergencyAction(_) => self + .emergency_action_rules + .authorized_to_make_change_action_takers() + .clone(), + TokenConfigurationChangeItem::EmergencyActionAdminGroup(_) => { + self.emergency_action_rules.admin_action_takers().clone() + } + TokenConfigurationChangeItem::MainControlGroup(_) => AuthorizedActionTakers::NoOne, + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/can_apply_token_configuration_item/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/can_apply_token_configuration_item/mod.rs new file mode 100644 index 0000000000..8aa4d41a4b --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/can_apply_token_configuration_item/mod.rs @@ -0,0 +1,38 @@ +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::associated_token::token_configuration_item::TokenConfigurationChangeItem; +use crate::data_contract::group::Group; +use crate::data_contract::GroupContractPosition; +use crate::group::action_taker::{ActionGoal, ActionTaker}; +use platform_value::Identifier; +use std::collections::BTreeMap; + +mod v0; + +impl TokenConfiguration { + /// Applies a `TokenConfigurationChangeItem` to this token configuration. + /// + /// # Parameters + /// - `change_item`: The change item to be applied. + /// + /// This method modifies the current `TokenConfigurationV0` instance in place. + pub fn can_apply_token_configuration_item( + &self, + change_item: &TokenConfigurationChangeItem, + contract_owner_id: &Identifier, + main_group: Option, + groups: &BTreeMap, + action_taker: &ActionTaker, + goal: ActionGoal, + ) -> bool { + match self { + TokenConfiguration::V0(v0) => v0.can_apply_token_configuration_item( + change_item, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/can_apply_token_configuration_item/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/can_apply_token_configuration_item/v0/mod.rs new file mode 100644 index 0000000000..158143efa0 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/can_apply_token_configuration_item/v0/mod.rs @@ -0,0 +1,253 @@ +use crate::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; +use crate::data_contract::associated_token::token_configuration_item::TokenConfigurationChangeItem; +use crate::data_contract::group::Group; +use crate::data_contract::GroupContractPosition; +use crate::group::action_taker::{ActionGoal, ActionTaker}; +use platform_value::Identifier; +use std::collections::BTreeMap; +impl TokenConfigurationV0 { + /// Determines whether a `TokenConfigurationChangeItem` can be applied to this token configuration. + /// + /// # Parameters + /// - `change_item`: The change item to evaluate. + /// - `contract_owner_id`: The ID of the contract owner. + /// - `main_group`: The main control group position, if any. + /// - `groups`: A map of group positions to their respective `Group` instances. + /// - `action_taker`: The entity attempting the action. + /// - `goal`: The goal of the action being attempted. + /// + /// Returns `true` if the change item can be applied, `false` otherwise. + pub fn can_apply_token_configuration_item( + &self, + change_item: &TokenConfigurationChangeItem, + contract_owner_id: &Identifier, + main_group: Option, + groups: &BTreeMap, + action_taker: &ActionTaker, + goal: ActionGoal, + ) -> bool { + match change_item { + TokenConfigurationChangeItem::TokenConfigurationNoChange => false, + TokenConfigurationChangeItem::Conventions(_) => self + .conventions_change_rules + .can_make_change(contract_owner_id, main_group, groups, action_taker, goal), + TokenConfigurationChangeItem::ConventionsControlGroup(control_group) => self + .conventions_change_rules + .can_change_authorized_action_takers( + control_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + TokenConfigurationChangeItem::ConventionsAdminGroup(admin_group) => self + .conventions_change_rules + .can_change_admin_action_takers( + admin_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + TokenConfigurationChangeItem::MaxSupply(_) => self + .max_supply_change_rules + .can_make_change(contract_owner_id, main_group, groups, action_taker, goal), + TokenConfigurationChangeItem::MaxSupplyControlGroup(control_group) => self + .max_supply_change_rules + .can_change_authorized_action_takers( + control_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + TokenConfigurationChangeItem::MaxSupplyAdminGroup(admin_group) => { + self.max_supply_change_rules.can_change_admin_action_takers( + admin_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ) + } + TokenConfigurationChangeItem::NewTokensDestinationIdentity(_) => self + .new_tokens_destination_identity_rules + .can_make_change(contract_owner_id, main_group, groups, action_taker, goal), + TokenConfigurationChangeItem::NewTokensDestinationIdentityControlGroup( + control_group, + ) => self + .new_tokens_destination_identity_rules + .can_change_authorized_action_takers( + control_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + TokenConfigurationChangeItem::NewTokensDestinationIdentityAdminGroup(admin_group) => { + self.new_tokens_destination_identity_rules + .can_change_admin_action_takers( + admin_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ) + } + TokenConfigurationChangeItem::MintingAllowChoosingDestination(_) => self + .minting_allow_choosing_destination_rules + .can_make_change(contract_owner_id, main_group, groups, action_taker, goal), + TokenConfigurationChangeItem::MintingAllowChoosingDestinationControlGroup( + control_group, + ) => self + .minting_allow_choosing_destination_rules + .can_change_authorized_action_takers( + control_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + TokenConfigurationChangeItem::MintingAllowChoosingDestinationAdminGroup( + admin_group, + ) => self + .minting_allow_choosing_destination_rules + .can_change_admin_action_takers( + admin_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + TokenConfigurationChangeItem::ManualMinting(control_group) => self + .manual_minting_rules + .can_change_authorized_action_takers( + control_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + TokenConfigurationChangeItem::ManualMintingAdminGroup(admin_group) => { + self.manual_minting_rules.can_change_admin_action_takers( + admin_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ) + } + TokenConfigurationChangeItem::ManualBurning(control_group) => self + .manual_burning_rules + .can_change_authorized_action_takers( + control_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + TokenConfigurationChangeItem::ManualBurningAdminGroup(admin_group) => { + self.manual_burning_rules.can_change_admin_action_takers( + admin_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ) + } + TokenConfigurationChangeItem::Freeze(control_group) => { + self.freeze_rules.can_change_authorized_action_takers( + control_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ) + } + TokenConfigurationChangeItem::FreezeAdminGroup(admin_group) => { + self.freeze_rules.can_change_admin_action_takers( + admin_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ) + } + TokenConfigurationChangeItem::Unfreeze(control_group) => { + self.unfreeze_rules.can_change_authorized_action_takers( + control_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ) + } + TokenConfigurationChangeItem::UnfreezeAdminGroup(admin_group) => { + self.unfreeze_rules.can_change_admin_action_takers( + admin_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ) + } + TokenConfigurationChangeItem::DestroyFrozenFunds(control_group) => self + .destroy_frozen_funds_rules + .can_change_authorized_action_takers( + control_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + TokenConfigurationChangeItem::DestroyFrozenFundsAdminGroup(admin_group) => self + .destroy_frozen_funds_rules + .can_change_admin_action_takers( + admin_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + TokenConfigurationChangeItem::EmergencyAction(control_group) => self + .emergency_action_rules + .can_change_authorized_action_takers( + control_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + TokenConfigurationChangeItem::EmergencyActionAdminGroup(admin_group) => { + self.emergency_action_rules.can_change_admin_action_takers( + admin_group, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ) + } + TokenConfigurationChangeItem::MainControlGroup(_) => false, // Main control group cannot be updated directly + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/mod.rs index 5e5a7181a5..85a371e739 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/mod.rs @@ -1 +1,5 @@ +mod apply_token_configuration_item; +mod authorized_action_takers_for_configuration_item; +mod can_apply_token_configuration_item; +mod validate_token_configuration_groups_exist; mod validate_token_configuration_update; diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_groups_exist/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_groups_exist/mod.rs new file mode 100644 index 0000000000..d4d5d285fe --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_groups_exist/mod.rs @@ -0,0 +1,50 @@ +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::group::Group; +use crate::data_contract::GroupContractPosition; +use crate::validation::SimpleConsensusValidationResult; +use crate::ProtocolError; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +mod v0; + +impl TokenConfiguration { + /// Validates that all group positions referenced in the token configuration exist in the provided groups map. + /// + /// # Parameters + /// - `groups`: A reference to a `BTreeMap` containing group positions as keys and their associated `Group` objects as values. + /// These represent the groups defined in the data contract. + /// - `platform_version`: A reference to the `PlatformVersion` object specifying the version of the function to call. + /// + /// # Returns + /// - `Ok(SimpleConsensusValidationResult)`: If the validation is successful, returns a result containing a validation result object, + /// which will be empty if no errors are found. + /// - `Err(ProtocolError)`: If an unknown or unsupported platform version is specified, an error indicating a version mismatch is returned. + /// + /// # Errors + /// - If a group position referenced in the token configuration does not exist in the provided `groups` map, the method will invoke the + /// version-specific validation logic, which will include any corresponding validation errors. + /// + /// # Versioning + /// - This function dispatches to version-specific validation logic based on the `platform_version`. + /// - Currently supports `validate_token_config_groups_exist_v0` for version `0`. + pub fn validate_token_config_groups_exist( + &self, + groups: &BTreeMap, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .dpp + .validation + .data_contract + .validate_token_config_groups_exist + { + 0 => Ok(self.validate_token_config_groups_exist_v0(groups)), + version => Err(ProtocolError::UnknownVersionMismatch { + method: "validate_token_config_groups_exist".to_string(), + known_versions: vec![0], + received: version, + }), + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_groups_exist/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_groups_exist/v0/mod.rs new file mode 100644 index 0000000000..e49571e07e --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_groups_exist/v0/mod.rs @@ -0,0 +1,42 @@ +use crate::consensus::basic::data_contract::GroupPositionDoesNotExistError; +use crate::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use crate::data_contract::associated_token::token_configuration::TokenConfiguration; +use crate::data_contract::group::Group; +use crate::data_contract::GroupContractPosition; +use crate::validation::SimpleConsensusValidationResult; +use std::collections::BTreeMap; + +impl TokenConfiguration { + #[inline(always)] + pub(super) fn validate_token_config_groups_exist_v0( + &self, + groups: &BTreeMap, + ) -> SimpleConsensusValidationResult { + // Initialize validation result + let validation_result = SimpleConsensusValidationResult::new(); + + // Collect all group positions used in the token configuration + let group_positions = self.all_used_group_positions(); + + // Check that all referenced group positions exist in the provided groups map + for group_position in group_positions { + if !groups.contains_key(&group_position) { + return SimpleConsensusValidationResult::new_with_error( + GroupPositionDoesNotExistError::new(group_position).into(), + ); + } + } + + // If a main group is defined in the token configuration, verify its existence + if let Some(main_group_position) = self.main_control_group() { + if !groups.contains_key(&main_group_position) { + return SimpleConsensusValidationResult::new_with_error( + GroupPositionDoesNotExistError::new(main_group_position).into(), + ); + } + } + + // If we reach here with no errors, return an empty result + validation_result + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/mod.rs index 9dda53c984..a0a12019fb 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/mod.rs @@ -1,7 +1,7 @@ use crate::data_contract::associated_token::token_configuration::TokenConfiguration; use crate::data_contract::group::Group; use crate::data_contract::GroupContractPosition; -use crate::multi_identity_events::ActionTaker; +use crate::group::action_taker::{ActionGoal, ActionTaker}; use crate::validation::SimpleConsensusValidationResult; use crate::ProtocolError; use platform_value::Identifier; @@ -15,9 +15,9 @@ impl TokenConfiguration { &self, new_config: &TokenConfiguration, contract_owner_id: &Identifier, - main_group: Option<&Group>, groups: &BTreeMap, action_taker: &ActionTaker, + goal: ActionGoal, platform_version: &PlatformVersion, ) -> Result { match platform_version @@ -29,9 +29,9 @@ impl TokenConfiguration { 0 => Ok(self.validate_token_config_update_v0( new_config, contract_owner_id, - main_group, groups, action_taker, + goal, )), version => Err(ProtocolError::UnknownVersionMismatch { method: "validate_token_config_update".to_string(), diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs index a11f775a57..9789261865 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/methods/validate_token_configuration_update/v0/mod.rs @@ -1,8 +1,9 @@ use crate::consensus::basic::data_contract::DataContractTokenConfigurationUpdateError; +use crate::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; use crate::data_contract::associated_token::token_configuration::TokenConfiguration; use crate::data_contract::group::Group; use crate::data_contract::GroupContractPosition; -use crate::multi_identity_events::ActionTaker; +use crate::group::action_taker::{ActionGoal, ActionTaker}; use crate::validation::SimpleConsensusValidationResult; use platform_value::Identifier; use std::collections::BTreeMap; @@ -13,24 +14,35 @@ impl TokenConfiguration { &self, new_config: &TokenConfiguration, contract_owner_id: &Identifier, - main_group: Option<&Group>, groups: &BTreeMap, action_taker: &ActionTaker, + goal: ActionGoal, ) -> SimpleConsensusValidationResult { let old = self.as_cow_v0(); let new = new_config.as_cow_v0(); // Check immutable fields: conventions - if old.conventions != new.conventions { - return SimpleConsensusValidationResult::new_with_error( - DataContractTokenConfigurationUpdateError::new( - "update".to_string(), - "conventions".to_string(), - self.clone(), - new_config.clone(), - ) - .into(), - ); + if old.conventions != new.conventions + || old.conventions_change_rules != new.conventions_change_rules + { + if !old.conventions_change_rules.can_change_to( + &new.conventions_change_rules, + contract_owner_id, + self.main_control_group(), + groups, + action_taker, + goal, + ) { + return SimpleConsensusValidationResult::new_with_error( + DataContractTokenConfigurationUpdateError::new( + "update".to_string(), + "conventions or conventionsRules".to_string(), + self.clone(), + new_config.clone(), + ) + .into(), + ); + } } // Check immutable fields: base_supply @@ -53,9 +65,10 @@ impl TokenConfiguration { if !old.max_supply_change_rules.can_change_to( &new.max_supply_change_rules, contract_owner_id, - main_group, + self.main_control_group(), groups, action_taker, + goal, ) { return SimpleConsensusValidationResult::new_with_error( DataContractTokenConfigurationUpdateError::new( @@ -77,9 +90,10 @@ impl TokenConfiguration { if !old.new_tokens_destination_identity_rules.can_change_to( &new.new_tokens_destination_identity_rules, contract_owner_id, - main_group, + self.main_control_group(), groups, action_taker, + goal, ) { return SimpleConsensusValidationResult::new_with_error( DataContractTokenConfigurationUpdateError::new( @@ -102,9 +116,10 @@ impl TokenConfiguration { if !old.minting_allow_choosing_destination_rules.can_change_to( &new.minting_allow_choosing_destination_rules, contract_owner_id, - main_group, + self.main_control_group(), groups, action_taker, + goal, ) { return SimpleConsensusValidationResult::new_with_error( DataContractTokenConfigurationUpdateError::new( @@ -124,9 +139,10 @@ impl TokenConfiguration { if !old.manual_minting_rules.can_change_to( &new.manual_minting_rules, contract_owner_id, - main_group, + self.main_control_group(), groups, action_taker, + goal, ) { return SimpleConsensusValidationResult::new_with_error( DataContractTokenConfigurationUpdateError::new( @@ -145,9 +161,10 @@ impl TokenConfiguration { if !old.manual_burning_rules.can_change_to( &new.manual_burning_rules, contract_owner_id, - main_group, + self.main_control_group(), groups, action_taker, + goal, ) { return SimpleConsensusValidationResult::new_with_error( DataContractTokenConfigurationUpdateError::new( @@ -166,9 +183,10 @@ impl TokenConfiguration { if !old.freeze_rules.can_change_to( &new.freeze_rules, contract_owner_id, - main_group, + self.main_control_group(), groups, action_taker, + goal, ) { return SimpleConsensusValidationResult::new_with_error( DataContractTokenConfigurationUpdateError::new( @@ -187,9 +205,10 @@ impl TokenConfiguration { if !old.unfreeze_rules.can_change_to( &new.unfreeze_rules, contract_owner_id, - main_group, + self.main_control_group(), groups, action_taker, + goal, ) { return SimpleConsensusValidationResult::new_with_error( DataContractTokenConfigurationUpdateError::new( @@ -208,9 +227,10 @@ impl TokenConfiguration { if !old.destroy_frozen_funds_rules.can_change_to( &new.destroy_frozen_funds_rules, contract_owner_id, - main_group, + self.main_control_group(), groups, action_taker, + goal, ) { return SimpleConsensusValidationResult::new_with_error( DataContractTokenConfigurationUpdateError::new( @@ -229,9 +249,10 @@ impl TokenConfiguration { if !old.emergency_action_rules.can_change_to( &new.emergency_action_rules, contract_owner_id, - main_group, + self.main_control_group(), groups, action_taker, + goal, ) { return SimpleConsensusValidationResult::new_with_error( DataContractTokenConfigurationUpdateError::new( @@ -249,7 +270,13 @@ impl TokenConfiguration { if old.main_control_group != new.main_control_group { if !old .main_control_group_can_be_modified - .allowed_for_action_taker(contract_owner_id, main_group, groups, action_taker) + .allowed_for_action_taker( + contract_owner_id, + self.main_control_group(), + groups, + action_taker, + goal, + ) { return SimpleConsensusValidationResult::new_with_error( DataContractTokenConfigurationUpdateError::new( diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/accessors.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/accessors.rs index 60312bd445..3d4642ab8d 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/accessors.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/accessors.rs @@ -3,25 +3,31 @@ use crate::data_contract::associated_token::token_configuration::accessors::v0:: TokenConfigurationV0Getters, TokenConfigurationV0Setters, }; use crate::data_contract::associated_token::token_configuration::v0::{ - TokenConfigurationConventionV0, TokenConfigurationV0, + TokenConfigurationConvention, TokenConfigurationV0, }; use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; use crate::data_contract::change_control_rules::ChangeControlRules; use crate::data_contract::GroupContractPosition; use platform_value::Identifier; +use std::collections::BTreeSet; /// Implementing `TokenConfigurationV0Getters` for `TokenConfigurationV0` impl TokenConfigurationV0Getters for TokenConfigurationV0 { /// Returns a reference to the conventions. - fn conventions(&self) -> &TokenConfigurationConventionV0 { + fn conventions(&self) -> &TokenConfigurationConvention { &self.conventions } /// Returns a mutable reference to the conventions. - fn conventions_mut(&mut self) -> &mut TokenConfigurationConventionV0 { + fn conventions_mut(&mut self) -> &mut TokenConfigurationConvention { &mut self.conventions } + /// Returns the conventions change rules. + fn conventions_change_rules(&self) -> &ChangeControlRules { + &self.conventions_change_rules + } + /// Returns the base supply. fn base_supply(&self) -> TokenAmount { self.base_supply @@ -106,15 +112,60 @@ impl TokenConfigurationV0Getters for TokenConfigurationV0 { fn main_control_group_can_be_modified(&self) -> &AuthorizedActionTakers { &self.main_control_group_can_be_modified } + + /// Returns all group positions used in the token configuration + fn all_used_group_positions(&self) -> BTreeSet { + let mut group_positions = BTreeSet::new(); + + // Add the main control group if it exists + if let Some(main_group_position) = self.main_control_group { + group_positions.insert(main_group_position); + } + + // Helper function to extract group positions from `AuthorizedActionTakers` + let mut add_from_authorized_action_takers = |authorized_takers: &AuthorizedActionTakers| { + if let AuthorizedActionTakers::Group(group_position) = authorized_takers { + group_positions.insert(*group_position); + } + }; + + // Add positions from change control rules + let mut add_from_change_control_rules = |rules: &ChangeControlRules| { + add_from_authorized_action_takers(rules.authorized_to_make_change_action_takers()); + add_from_authorized_action_takers(rules.admin_action_takers()); + }; + + // Apply the helper to all fields containing `ChangeControlRules` + add_from_change_control_rules(&self.max_supply_change_rules); + add_from_change_control_rules(&self.conventions_change_rules); + add_from_change_control_rules(&self.new_tokens_destination_identity_rules); + add_from_change_control_rules(&self.minting_allow_choosing_destination_rules); + add_from_change_control_rules(&self.manual_minting_rules); + add_from_change_control_rules(&self.manual_burning_rules); + add_from_change_control_rules(&self.freeze_rules); + add_from_change_control_rules(&self.unfreeze_rules); + add_from_change_control_rules(&self.destroy_frozen_funds_rules); + add_from_change_control_rules(&self.emergency_action_rules); + + // Add positions from the `main_control_group_can_be_modified` field + add_from_authorized_action_takers(&self.main_control_group_can_be_modified); + + group_positions + } } /// Implementing `TokenConfigurationV0Setters` for `TokenConfigurationV0` impl TokenConfigurationV0Setters for TokenConfigurationV0 { /// Sets the conventions. - fn set_conventions(&mut self, conventions: TokenConfigurationConventionV0) { + fn set_conventions(&mut self, conventions: TokenConfigurationConvention) { self.conventions = conventions; } + /// Sets the new conventions change rules. + fn set_conventions_change_rules(&mut self, rules: ChangeControlRules) { + self.conventions_change_rules = rules; + } + /// Sets the base supply. fn set_base_supply(&mut self, base_supply: TokenAmount) { self.base_supply = base_supply; diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs index a192c4ab43..6f6bcd9556 100644 --- a/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration/v0/mod.rs @@ -1,6 +1,8 @@ mod accessors; use crate::balances::credits::TokenAmount; +use crate::data_contract::associated_token::token_configuration_convention::v0::TokenConfigurationConventionV0; +use crate::data_contract::associated_token::token_configuration_convention::TokenConfigurationConvention; use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; use crate::data_contract::change_control_rules::v0::ChangeControlRulesV0; use crate::data_contract::change_control_rules::ChangeControlRules; @@ -8,35 +10,15 @@ use crate::data_contract::GroupContractPosition; use bincode::{Decode, Encode}; use platform_value::Identifier; use serde::{Deserialize, Serialize}; -use std::collections::BTreeMap; use std::fmt; -#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq)] -#[serde(rename_all = "camelCase")] -pub struct TokenConfigurationLocalizationsV0 { - pub should_capitalize: bool, - pub singular_form: String, - pub plural_form: String, -} - -#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq, Default)] -#[serde(rename_all = "camelCase")] -pub struct TokenConfigurationConventionV0 { - #[serde(default)] - pub localizations: BTreeMap, - #[serde(default = "default_decimals")] - pub decimals: u16, -} - -// Default function for `decimals` -fn default_decimals() -> u16 { - 8 // Default value for decimals -} - #[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct TokenConfigurationV0 { - pub conventions: TokenConfigurationConventionV0, + pub conventions: TokenConfigurationConvention, + /// Who can change the conventions + #[serde(default = "default_change_control_rules")] + pub conventions_change_rules: ChangeControlRules, /// The supply at the creation of the token pub base_supply: TokenAmount, /// The maximum supply the token can ever have @@ -96,18 +78,20 @@ fn default_starts_as_paused() -> bool { fn default_change_control_rules() -> ChangeControlRules { ChangeControlRules::V0(ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::NoOne, - authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }) } fn default_contract_owner_change_control_rules() -> ChangeControlRules { ChangeControlRules::V0(ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::ContractOwner, - authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }) } @@ -115,8 +99,9 @@ impl fmt::Display for TokenConfigurationV0 { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( f, - "TokenConfigurationV0 {{\n conventions: {:?},\n base_supply: {},\n max_supply: {:?},\n keeps_history: {},\n start_as_paused: {},\n max_supply_change_rules: {:?},\n new_tokens_destination_identity: {:?},\n new_tokens_destination_identity_rules: {:?},\n minting_allow_choosing_destination: {},\n minting_allow_choosing_destination_rules: {:?},\n manual_minting_rules: {:?},\n manual_burning_rules: {:?},\n freeze_rules: {:?},\n unfreeze_rules: {:?},\n destroy_frozen_funds_rules: {:?},\n emergency_action_rules: {:?},\n main_control_group: {:?},\n main_control_group_can_be_modified: {:?}\n}}", + "TokenConfigurationV0 {{\n conventions: {:?},\n conventions_change_rules: {:?},\n base_supply: {},\n max_supply: {:?},\n keeps_history: {},\n start_as_paused: {},\n max_supply_change_rules: {:?},\n new_tokens_destination_identity: {:?},\n new_tokens_destination_identity_rules: {:?},\n minting_allow_choosing_destination: {},\n minting_allow_choosing_destination_rules: {:?},\n manual_minting_rules: {:?},\n manual_burning_rules: {:?},\n freeze_rules: {:?},\n unfreeze_rules: {:?},\n destroy_frozen_funds_rules: {:?},\n emergency_action_rules: {:?},\n main_control_group: {:?},\n main_control_group_can_be_modified: {:?}\n}}", self.conventions, + self.conventions_change_rules, self.base_supply, self.max_supply, self.keeps_history, @@ -141,77 +126,94 @@ impl fmt::Display for TokenConfigurationV0 { impl TokenConfigurationV0 { pub fn default_most_restrictive() -> Self { Self { - conventions: TokenConfigurationConventionV0 { + conventions: TokenConfigurationConvention::V0(TokenConfigurationConventionV0 { localizations: Default::default(), decimals: 8, - }, + }), + conventions_change_rules: ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + } + .into(), base_supply: 100000, max_supply: None, keeps_history: true, start_as_paused: false, max_supply_change_rules: ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::NoOne, - authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, } .into(), new_tokens_destination_identity: None, new_tokens_destination_identity_rules: ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::NoOne, - authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, } .into(), minting_allow_choosing_destination: true, minting_allow_choosing_destination_rules: ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::NoOne, - authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, } .into(), manual_minting_rules: ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::NoOne, - authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, } .into(), manual_burning_rules: ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::NoOne, - authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, } .into(), freeze_rules: ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::NoOne, - authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, } .into(), unfreeze_rules: ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::NoOne, - authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, } .into(), destroy_frozen_funds_rules: ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::NoOne, - authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, } .into(), emergency_action_rules: ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::NoOne, - authorized_to_change_authorized_action_takers: AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, } .into(), main_control_group: None, diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration_convention/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration_convention/mod.rs new file mode 100644 index 0000000000..76a4ed1370 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration_convention/mod.rs @@ -0,0 +1,25 @@ +use crate::data_contract::associated_token::token_configuration_convention::v0::TokenConfigurationConventionV0; +use bincode::{Decode, Encode}; +use derive_more::From; +use serde::{Deserialize, Serialize}; + +pub mod v0; + +#[derive(Serialize, Deserialize, Encode, Decode, Debug, Clone, PartialEq, Eq, PartialOrd, From)] +#[serde(tag = "$format_version")] +pub enum TokenConfigurationConvention { + #[serde(rename = "0")] + V0(TokenConfigurationConventionV0), +} + +use std::fmt; + +impl fmt::Display for TokenConfigurationConvention { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + TokenConfigurationConvention::V0(v0) => { + write!(f, "{}", v0) //just pass through + } + } + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration_convention/v0/mod.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration_convention/v0/mod.rs new file mode 100644 index 0000000000..6ea538cc6e --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration_convention/v0/mod.rs @@ -0,0 +1,56 @@ +use bincode::Encode; +use platform_serialization::de::Decode; +use serde::{Deserialize, Serialize}; +use std::collections::BTreeMap; +use std::fmt; + +#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq, PartialOrd)] +#[serde(rename_all = "camelCase")] +pub struct TokenConfigurationLocalizationsV0 { + pub should_capitalize: bool, + pub singular_form: String, + pub plural_form: String, +} + +impl fmt::Display for TokenConfigurationLocalizationsV0 { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!( + f, + "Capitalized: {}, Singular: '{}', Plural: '{}'", + self.should_capitalize, self.singular_form, self.plural_form + ) + } +} + +#[derive( + Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq, PartialOrd, Default, +)] +#[serde(rename_all = "camelCase")] +pub struct TokenConfigurationConventionV0 { + #[serde(default)] + pub localizations: BTreeMap, + #[serde(default = "default_decimals")] + pub decimals: u16, +} + +// Default function for `decimals` +fn default_decimals() -> u16 { + 8 // Default value for decimals +} + +impl fmt::Display for TokenConfigurationConventionV0 { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let localizations: Vec = self + .localizations + .iter() + .map(|(key, value)| format!("{}: {}", key, value)) + .collect(); + + write!( + f, + "Decimals: {}, Localizations: [{}]", + self.decimals, + localizations.join(", ") + ) + } +} diff --git a/packages/rs-dpp/src/data_contract/associated_token/token_configuration_item.rs b/packages/rs-dpp/src/data_contract/associated_token/token_configuration_item.rs new file mode 100644 index 0000000000..12c32c83be --- /dev/null +++ b/packages/rs-dpp/src/data_contract/associated_token/token_configuration_item.rs @@ -0,0 +1,203 @@ +use crate::balances::credits::TokenAmount; +use crate::data_contract::associated_token::token_configuration_convention::TokenConfigurationConvention; +use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; +use crate::data_contract::GroupContractPosition; +use crate::ProtocolError; +use bincode::Encode; +use platform_serialization::de::Decode; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use platform_value::Identifier; +use serde::{Deserialize, Serialize}; +use std::fmt; + +#[derive( + Debug, + Clone, + Default, + PartialOrd, + Encode, + Decode, + PlatformSerialize, + PlatformDeserialize, + PartialEq, + Eq, +)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(rename_all = "camelCase") +)] +pub enum TokenConfigurationChangeItem { + #[default] + TokenConfigurationNoChange, + Conventions(TokenConfigurationConvention), + ConventionsControlGroup(AuthorizedActionTakers), + ConventionsAdminGroup(AuthorizedActionTakers), + MaxSupply(Option), + MaxSupplyControlGroup(AuthorizedActionTakers), + MaxSupplyAdminGroup(AuthorizedActionTakers), + NewTokensDestinationIdentity(Option), + NewTokensDestinationIdentityControlGroup(AuthorizedActionTakers), + NewTokensDestinationIdentityAdminGroup(AuthorizedActionTakers), + MintingAllowChoosingDestination(bool), + MintingAllowChoosingDestinationControlGroup(AuthorizedActionTakers), + MintingAllowChoosingDestinationAdminGroup(AuthorizedActionTakers), + ManualMinting(AuthorizedActionTakers), + ManualMintingAdminGroup(AuthorizedActionTakers), + ManualBurning(AuthorizedActionTakers), + ManualBurningAdminGroup(AuthorizedActionTakers), + Freeze(AuthorizedActionTakers), + FreezeAdminGroup(AuthorizedActionTakers), + Unfreeze(AuthorizedActionTakers), + UnfreezeAdminGroup(AuthorizedActionTakers), + DestroyFrozenFunds(AuthorizedActionTakers), + DestroyFrozenFundsAdminGroup(AuthorizedActionTakers), + EmergencyAction(AuthorizedActionTakers), + EmergencyActionAdminGroup(AuthorizedActionTakers), + MainControlGroup(Option), +} + +impl TokenConfigurationChangeItem { + pub fn u8_item_index(&self) -> u8 { + match self { + TokenConfigurationChangeItem::TokenConfigurationNoChange => 0, + TokenConfigurationChangeItem::Conventions(_) => 1, + TokenConfigurationChangeItem::ConventionsControlGroup(_) => 2, + TokenConfigurationChangeItem::ConventionsAdminGroup(_) => 3, + TokenConfigurationChangeItem::MaxSupply(_) => 4, + TokenConfigurationChangeItem::MaxSupplyControlGroup(_) => 5, + TokenConfigurationChangeItem::MaxSupplyAdminGroup(_) => 6, + TokenConfigurationChangeItem::NewTokensDestinationIdentity(_) => 7, + TokenConfigurationChangeItem::NewTokensDestinationIdentityControlGroup(_) => 8, + TokenConfigurationChangeItem::NewTokensDestinationIdentityAdminGroup(_) => 9, + TokenConfigurationChangeItem::MintingAllowChoosingDestination(_) => 10, + TokenConfigurationChangeItem::MintingAllowChoosingDestinationControlGroup(_) => 11, + TokenConfigurationChangeItem::MintingAllowChoosingDestinationAdminGroup(_) => 12, + TokenConfigurationChangeItem::ManualMinting(_) => 13, + TokenConfigurationChangeItem::ManualMintingAdminGroup(_) => 14, + TokenConfigurationChangeItem::ManualBurning(_) => 15, + TokenConfigurationChangeItem::ManualBurningAdminGroup(_) => 16, + TokenConfigurationChangeItem::Freeze(_) => 17, + TokenConfigurationChangeItem::FreezeAdminGroup(_) => 18, + TokenConfigurationChangeItem::Unfreeze(_) => 19, + TokenConfigurationChangeItem::UnfreezeAdminGroup(_) => 20, + TokenConfigurationChangeItem::DestroyFrozenFunds(_) => 21, + TokenConfigurationChangeItem::DestroyFrozenFundsAdminGroup(_) => 22, + TokenConfigurationChangeItem::EmergencyAction(_) => 23, + TokenConfigurationChangeItem::EmergencyActionAdminGroup(_) => 24, + TokenConfigurationChangeItem::MainControlGroup(_) => 25, + } + } +} + +impl fmt::Display for TokenConfigurationChangeItem { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + TokenConfigurationChangeItem::TokenConfigurationNoChange => { + write!(f, "No Change in Token Configuration") + } + TokenConfigurationChangeItem::Conventions(convention) => { + write!(f, "Conventions: {}", convention) + } + TokenConfigurationChangeItem::ConventionsControlGroup(control_group) => { + write!(f, "Conventions Control Group: {}", control_group) + } + TokenConfigurationChangeItem::ConventionsAdminGroup(admin_group) => { + write!(f, "Conventions Admin Group: {}", admin_group) + } + TokenConfigurationChangeItem::MaxSupply(max_supply) => match max_supply { + Some(amount) => write!(f, "Max Supply: {}", amount), + None => write!(f, "Max Supply: No Limit"), + }, + TokenConfigurationChangeItem::MaxSupplyControlGroup(control_group) => { + write!(f, "Max Supply Control Group: {}", control_group) + } + TokenConfigurationChangeItem::MaxSupplyAdminGroup(admin_group) => { + write!(f, "Max Supply Admin Group: {}", admin_group) + } + TokenConfigurationChangeItem::NewTokensDestinationIdentity(identity) => { + match identity { + Some(id) => write!(f, "New Tokens Destination Identity: {}", id), + None => write!(f, "New Tokens Destination Identity: None"), + } + } + TokenConfigurationChangeItem::NewTokensDestinationIdentityControlGroup( + control_group, + ) => { + write!( + f, + "New Tokens Destination Identity Control Group: {}", + control_group + ) + } + TokenConfigurationChangeItem::NewTokensDestinationIdentityAdminGroup(admin_group) => { + write!( + f, + "New Tokens Destination Identity Admin Group: {}", + admin_group + ) + } + TokenConfigurationChangeItem::MintingAllowChoosingDestination(allow) => { + write!(f, "Minting Allow Choosing Destination: {}", allow) + } + TokenConfigurationChangeItem::MintingAllowChoosingDestinationControlGroup( + control_group, + ) => { + write!( + f, + "Minting Allow Choosing Destination Control Group: {}", + control_group + ) + } + TokenConfigurationChangeItem::MintingAllowChoosingDestinationAdminGroup( + admin_group, + ) => { + write!( + f, + "Minting Allow Choosing Destination Admin Group: {}", + admin_group + ) + } + TokenConfigurationChangeItem::ManualMinting(control_group) => { + write!(f, "Manual Minting: {}", control_group) + } + TokenConfigurationChangeItem::ManualMintingAdminGroup(admin_group) => { + write!(f, "Manual Minting Admin Group: {}", admin_group) + } + TokenConfigurationChangeItem::ManualBurning(control_group) => { + write!(f, "Manual Burning: {}", control_group) + } + TokenConfigurationChangeItem::ManualBurningAdminGroup(admin_group) => { + write!(f, "Manual Burning Admin Group: {}", admin_group) + } + TokenConfigurationChangeItem::Freeze(control_group) => { + write!(f, "Freeze: {}", control_group) + } + TokenConfigurationChangeItem::FreezeAdminGroup(admin_group) => { + write!(f, "Freeze Admin Group: {}", admin_group) + } + TokenConfigurationChangeItem::Unfreeze(control_group) => { + write!(f, "Unfreeze: {}", control_group) + } + TokenConfigurationChangeItem::UnfreezeAdminGroup(admin_group) => { + write!(f, "Unfreeze Admin Group: {}", admin_group) + } + TokenConfigurationChangeItem::DestroyFrozenFunds(control_group) => { + write!(f, "Destroy Frozen Funds: {}", control_group) + } + TokenConfigurationChangeItem::DestroyFrozenFundsAdminGroup(admin_group) => { + write!(f, "Destroy Frozen Funds Admin Group: {}", admin_group) + } + TokenConfigurationChangeItem::EmergencyAction(control_group) => { + write!(f, "Emergency Action: {}", control_group) + } + TokenConfigurationChangeItem::EmergencyActionAdminGroup(admin_group) => { + write!(f, "Emergency Action Admin Group: {}", admin_group) + } + TokenConfigurationChangeItem::MainControlGroup(position) => match position { + Some(pos) => write!(f, "Main Control Group: {}", pos), + None => write!(f, "Main Control Group: None"), + }, + } + } +} diff --git a/packages/rs-dpp/src/data_contract/change_control_rules/authorized_action_takers.rs b/packages/rs-dpp/src/data_contract/change_control_rules/authorized_action_takers.rs index 7a23c4259d..97e83ac6eb 100644 --- a/packages/rs-dpp/src/data_contract/change_control_rules/authorized_action_takers.rs +++ b/packages/rs-dpp/src/data_contract/change_control_rules/authorized_action_takers.rs @@ -1,13 +1,16 @@ use crate::data_contract::group::accessors::v0::GroupV0Getters; use crate::data_contract::group::{Group, GroupMemberPower}; use crate::data_contract::GroupContractPosition; -use crate::multi_identity_events::ActionTaker; +use crate::group::action_taker::{ActionGoal, ActionTaker}; use bincode::{Decode, Encode}; use platform_value::Identifier; use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; +use std::fmt; -#[derive(Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq, Default)] +#[derive( + Serialize, Deserialize, Decode, Encode, Debug, Clone, PartialEq, Eq, PartialOrd, Default, +)] pub enum AuthorizedActionTakers { #[default] NoOne, @@ -16,13 +19,25 @@ pub enum AuthorizedActionTakers { Group(GroupContractPosition), } +impl fmt::Display for AuthorizedActionTakers { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + AuthorizedActionTakers::NoOne => write!(f, "NoOne"), + AuthorizedActionTakers::ContractOwner => write!(f, "ContractOwner"), + AuthorizedActionTakers::MainGroup => write!(f, "MainGroup"), + AuthorizedActionTakers::Group(position) => write!(f, "Group(Position: {})", position), + } + } +} + impl AuthorizedActionTakers { pub fn allowed_for_action_taker( &self, contract_owner_id: &Identifier, - main_group: Option<&Group>, + main_group: Option, groups: &BTreeMap, action_taker: &ActionTaker, + goal: ActionGoal, ) -> bool { match self { // No one is allowed @@ -38,8 +53,19 @@ impl AuthorizedActionTakers { // MainGroup allows multiparty actions with specific power requirements AuthorizedActionTakers::MainGroup => { - if let Some(main_group) = main_group { - Self::is_action_taker_authorized(main_group, action_taker) + if let Some(main_group_contract_position) = &main_group { + if let Some(group) = groups.get(main_group_contract_position) { + match goal { + ActionGoal::ActionCompletion => { + Self::is_action_taker_authorized(group, action_taker) + } + ActionGoal::ActionParticipation => { + Self::is_action_taker_participant(group, action_taker) + } + } + } else { + false + } } else { false } @@ -48,7 +74,14 @@ impl AuthorizedActionTakers { // Group-specific permissions with power aggregation logic AuthorizedActionTakers::Group(group_contract_position) => { if let Some(group) = groups.get(group_contract_position) { - Self::is_action_taker_authorized(group, action_taker) + match goal { + ActionGoal::ActionCompletion => { + Self::is_action_taker_authorized(group, action_taker) + } + ActionGoal::ActionParticipation => { + Self::is_action_taker_participant(group, action_taker) + } + } } else { false } @@ -77,4 +110,15 @@ impl AuthorizedActionTakers { } } } + + /// Helper method to check if action takers are participants. + fn is_action_taker_participant(group: &Group, action_taker: &ActionTaker) -> bool { + match action_taker { + ActionTaker::SingleIdentity(member_id) => group.members().get(member_id).is_some(), + ActionTaker::SpecifiedIdentities(_) => { + // this is made only for single identities + false + } + } + } } diff --git a/packages/rs-dpp/src/data_contract/change_control_rules/mod.rs b/packages/rs-dpp/src/data_contract/change_control_rules/mod.rs index 2385e11435..105580133b 100644 --- a/packages/rs-dpp/src/data_contract/change_control_rules/mod.rs +++ b/packages/rs-dpp/src/data_contract/change_control_rules/mod.rs @@ -5,7 +5,7 @@ use crate::data_contract::change_control_rules::authorized_action_takers::Author use crate::data_contract::change_control_rules::v0::ChangeControlRulesV0; use crate::data_contract::group::Group; use crate::data_contract::GroupContractPosition; -use crate::multi_identity_events::ActionTaker; +use crate::group::action_taker::{ActionGoal, ActionTaker}; use bincode::{Decode, Encode}; use derive_more::From; use platform_value::Identifier; @@ -18,31 +18,100 @@ pub enum ChangeControlRules { } impl ChangeControlRules { + pub fn admin_action_takers(&self) -> &AuthorizedActionTakers { + match self { + ChangeControlRules::V0(v0) => &v0.admin_action_takers, + } + } pub fn authorized_to_make_change_action_takers(&self) -> &AuthorizedActionTakers { match self { ChangeControlRules::V0(v0) => &v0.authorized_to_make_change, } } + + pub fn set_admin_action_takers(&mut self, admin_action_takers: AuthorizedActionTakers) { + match self { + ChangeControlRules::V0(v0) => { + v0.admin_action_takers = admin_action_takers; + } + } + } + + pub fn set_authorized_to_make_change_action_takers( + &mut self, + authorized_to_make_change: AuthorizedActionTakers, + ) { + match self { + ChangeControlRules::V0(v0) => { + v0.authorized_to_make_change = authorized_to_make_change; + } + } + } + pub fn can_make_change( &self, contract_owner_id: &Identifier, - main_group: Option<&Group>, + main_group: Option, groups: &BTreeMap, action_taker: &ActionTaker, + goal: ActionGoal, ) -> bool { match self { ChangeControlRules::V0(v0) => { - v0.can_make_change(contract_owner_id, main_group, groups, action_taker) + v0.can_make_change(contract_owner_id, main_group, groups, action_taker, goal) } } } + + pub fn can_change_authorized_action_takers( + &self, + controlling_action_takers: &AuthorizedActionTakers, + contract_owner_id: &Identifier, + main_group: Option, + groups: &BTreeMap, + action_taker: &ActionTaker, + goal: ActionGoal, + ) -> bool { + match self { + ChangeControlRules::V0(v0) => v0.can_change_authorized_action_takers( + controlling_action_takers, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + } + } + + pub fn can_change_admin_action_takers( + &self, + admin_action_takers: &AuthorizedActionTakers, + contract_owner_id: &Identifier, + main_group: Option, + groups: &BTreeMap, + action_taker: &ActionTaker, + goal: ActionGoal, + ) -> bool { + match self { + ChangeControlRules::V0(v0) => v0.can_change_admin_action_takers( + admin_action_takers, + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ), + } + } pub fn can_change_to( &self, other: &ChangeControlRules, contract_owner_id: &Identifier, - main_group: Option<&Group>, + main_group: Option, groups: &BTreeMap, action_taker: &ActionTaker, + goal: ActionGoal, ) -> bool { match (self, other) { (ChangeControlRules::V0(v0), ChangeControlRules::V0(v0_other)) => v0.can_change_to( @@ -51,6 +120,7 @@ impl ChangeControlRules { main_group, groups, action_taker, + goal, ), } } diff --git a/packages/rs-dpp/src/data_contract/change_control_rules/v0/mod.rs b/packages/rs-dpp/src/data_contract/change_control_rules/v0/mod.rs index 41261680ce..f5f4254a2a 100644 --- a/packages/rs-dpp/src/data_contract/change_control_rules/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/change_control_rules/v0/mod.rs @@ -1,7 +1,7 @@ use crate::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; use crate::data_contract::group::Group; use crate::data_contract::GroupContractPosition; -use crate::multi_identity_events::ActionTaker; +use crate::group::action_taker::{ActionGoal, ActionTaker}; use bincode::{Decode, Encode}; use platform_value::Identifier; use serde::{Deserialize, Serialize}; @@ -12,35 +12,89 @@ pub struct ChangeControlRulesV0 { /// This is who is authorized to make such a change pub authorized_to_make_change: AuthorizedActionTakers, /// This is who is authorized to make such a change to the people authorized to make a change - pub authorized_to_change_authorized_action_takers: AuthorizedActionTakers, + pub admin_action_takers: AuthorizedActionTakers, /// Are we allowed to change to None in the future pub changing_authorized_action_takers_to_no_one_allowed: bool, - /// Are we allowed to change to None in the future - pub changing_authorized_action_takers_to_contract_owner_allowed: bool, + /// Are we allowed to change the admin action takers to no one in the future + pub changing_admin_action_takers_to_no_one_allowed: bool, + /// Can the admin action takers change themselves + pub self_changing_admin_action_takers_allowed: bool, } impl ChangeControlRulesV0 { pub fn can_make_change( &self, contract_owner_id: &Identifier, - main_group: Option<&Group>, + main_group: Option, groups: &BTreeMap, action_taker: &ActionTaker, + goal: ActionGoal, ) -> bool { self.authorized_to_make_change.allowed_for_action_taker( contract_owner_id, main_group, groups, action_taker, + goal, + ) + } + pub fn can_change_authorized_action_takers( + &self, + controlling_action_takers: &AuthorizedActionTakers, + contract_owner_id: &Identifier, + main_group: Option, + groups: &BTreeMap, + action_taker: &ActionTaker, + goal: ActionGoal, + ) -> bool { + if !self.changing_authorized_action_takers_to_no_one_allowed + && controlling_action_takers == &AuthorizedActionTakers::NoOne + { + return false; + } + self.admin_action_takers.allowed_for_action_taker( + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ) + } + + pub fn can_change_admin_action_takers( + &self, + admin_action_takers: &AuthorizedActionTakers, + contract_owner_id: &Identifier, + main_group: Option, + groups: &BTreeMap, + action_taker: &ActionTaker, + goal: ActionGoal, + ) -> bool { + if !self.self_changing_admin_action_takers_allowed { + return false; + } + if !self.changing_admin_action_takers_to_no_one_allowed + && admin_action_takers == &AuthorizedActionTakers::NoOne + { + return false; + } + self.admin_action_takers.allowed_for_action_taker( + contract_owner_id, + main_group, + groups, + action_taker, + goal, ) } + pub fn can_change_to( &self, other: &ChangeControlRulesV0, contract_owner_id: &Identifier, - main_group: Option<&Group>, + main_group: Option, groups: &BTreeMap, action_taker: &ActionTaker, + goal: ActionGoal, ) -> bool { // First, check if the action taker is allowed to make any changes at all if !self.authorized_to_make_change.allowed_for_action_taker( @@ -48,6 +102,7 @@ impl ChangeControlRulesV0 { main_group, groups, action_taker, + goal, ) { return false; } @@ -56,10 +111,13 @@ impl ChangeControlRulesV0 { if self.authorized_to_make_change != other.authorized_to_make_change { // Changing the authorized action takers requires the action_taker to be allowed by // authorized_to_change_authorized_action_takers in the current rules - if !self - .authorized_to_change_authorized_action_takers - .allowed_for_action_taker(contract_owner_id, main_group, groups, action_taker) - { + if !self.admin_action_takers.allowed_for_action_taker( + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ) { return false; } @@ -69,41 +127,28 @@ impl ChangeControlRulesV0 { return false; } } - - // If we are changing to ContractOwner, ensure it's allowed - if let AuthorizedActionTakers::ContractOwner = other.authorized_to_make_change { - if !self.changing_authorized_action_takers_to_contract_owner_allowed { - return false; - } - } } // Check if authorized_to_change_authorized_action_takers is being modified - if self.authorized_to_change_authorized_action_takers - != other.authorized_to_change_authorized_action_takers - { - // Must be allowed by the current authorized_to_change_authorized_action_takers - if !self - .authorized_to_change_authorized_action_takers - .allowed_for_action_taker(contract_owner_id, main_group, groups, action_taker) - { + if self.admin_action_takers != other.admin_action_takers { + if !self.self_changing_admin_action_takers_allowed { return false; } - // If we are changing to NoOne, ensure it's allowed - if let AuthorizedActionTakers::NoOne = - other.authorized_to_change_authorized_action_takers - { - if !self.changing_authorized_action_takers_to_no_one_allowed { - return false; - } + // Must be allowed by the current authorized_to_change_authorized_action_takers + if !self.admin_action_takers.allowed_for_action_taker( + contract_owner_id, + main_group, + groups, + action_taker, + goal, + ) { + return false; } - // If we are changing to ContractOwner, ensure it's allowed - if let AuthorizedActionTakers::ContractOwner = - other.authorized_to_change_authorized_action_takers - { - if !self.changing_authorized_action_takers_to_contract_owner_allowed { + // If we are changing to NoOne, ensure it's allowed + if let AuthorizedActionTakers::NoOne = other.admin_action_takers { + if !self.changing_admin_action_takers_to_no_one_allowed { return false; } } diff --git a/packages/rs-dpp/src/data_contract/group/methods/mod.rs b/packages/rs-dpp/src/data_contract/group/methods/mod.rs new file mode 100644 index 0000000000..2d24cd45f5 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/group/methods/mod.rs @@ -0,0 +1 @@ +pub mod v0; diff --git a/packages/rs-dpp/src/data_contract/group/methods/v0/mod.rs b/packages/rs-dpp/src/data_contract/group/methods/v0/mod.rs new file mode 100644 index 0000000000..c57a7ad227 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/group/methods/v0/mod.rs @@ -0,0 +1,10 @@ +use crate::validation::SimpleConsensusValidationResult; +use crate::ProtocolError; +use platform_version::version::PlatformVersion; + +pub trait GroupMethodsV0 { + fn validate( + &self, + platform_version: &PlatformVersion, + ) -> Result; +} diff --git a/packages/rs-dpp/src/data_contract/group/mod.rs b/packages/rs-dpp/src/data_contract/group/mod.rs index 26e3c03629..9f8f4cc97b 100644 --- a/packages/rs-dpp/src/data_contract/group/mod.rs +++ b/packages/rs-dpp/src/data_contract/group/mod.rs @@ -1,14 +1,19 @@ use crate::data_contract::group::accessors::v0::{GroupV0Getters, GroupV0Setters}; +use crate::data_contract::group::methods::v0::GroupMethodsV0; use crate::data_contract::group::v0::GroupV0; use crate::errors::ProtocolError; +use crate::validation::SimpleConsensusValidationResult; use bincode::{Decode, Encode}; use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; use platform_value::Identifier; +use platform_version::version::PlatformVersion; use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; pub mod accessors; +pub(crate) mod methods; pub mod v0; + pub type RequiredSigners = u8; pub type GroupMemberPower = u32; @@ -81,3 +86,14 @@ impl GroupV0Setters for Group { } } } + +impl GroupMethodsV0 for Group { + fn validate( + &self, + platform_version: &PlatformVersion, + ) -> Result { + match self { + Group::V0(group_v0) => group_v0.validate(platform_version), + } + } +} diff --git a/packages/rs-dpp/src/data_contract/group/v0/mod.rs b/packages/rs-dpp/src/data_contract/group/v0/mod.rs index c53696e9b2..c4b04befcc 100644 --- a/packages/rs-dpp/src/data_contract/group/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/group/v0/mod.rs @@ -1,9 +1,17 @@ +use crate::consensus::basic::data_contract::{ + GroupExceedsMaxMembersError, GroupMemberHasPowerOfZeroError, GroupMemberHasPowerOverLimitError, + GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError, + GroupTotalPowerLessThanRequiredError, +}; use crate::data_contract::group::accessors::v0::{GroupV0Getters, GroupV0Setters}; +use crate::data_contract::group::methods::v0::GroupMethodsV0; use crate::data_contract::group::{GroupMemberPower, GroupRequiredPower}; +use crate::validation::SimpleConsensusValidationResult; use crate::ProtocolError; use bincode::{Decode, Encode}; use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; use platform_value::Identifier; +use platform_version::version::PlatformVersion; use serde::{Deserialize, Serialize}; use std::collections::BTreeMap; @@ -66,3 +74,82 @@ impl GroupV0Setters for GroupV0 { self.required_power = required_power; } } + +impl GroupMethodsV0 for GroupV0 { + /// Validates the group to ensure: + /// - The sum of all group member powers is equal to or greater than the required power. + /// - No group member has a power of 0. + /// - The group does not exceed the maximum allowed members (256). + /// + /// # Returns + /// - `Ok(SimpleConsensusValidationResult)` if the group is valid. + /// - `Err(ProtocolError)` if validation fails due to an invalid group configuration. + fn validate( + &self, + platform_version: &PlatformVersion, + ) -> Result { + let max_group_members = platform_version.system_limits.max_contract_group_size; + const GROUP_POWER_LIMIT: GroupMemberPower = u16::MAX as GroupMemberPower; + + // Check the number of members does not exceed the maximum allowed + if self.members.len() as u32 > max_group_members { + return Ok(SimpleConsensusValidationResult::new_with_error( + GroupExceedsMaxMembersError::new(max_group_members).into(), + )); + } + + let mut total_power: GroupMemberPower = 0; + + let mut total_power_without_unilateral_members: GroupMemberPower = 0; + + // Iterate over members to validate their power and calculate the total power + for (&member, &power) in &self.members { + if power == 0 { + return Ok(SimpleConsensusValidationResult::new_with_error( + GroupMemberHasPowerOfZeroError::new(member).into(), + )); + } + if power > GROUP_POWER_LIMIT { + return Ok(SimpleConsensusValidationResult::new_with_error( + GroupMemberHasPowerOverLimitError::new(member, power, GROUP_POWER_LIMIT).into(), + )); + } + if power > self.required_power { + return Ok(SimpleConsensusValidationResult::new_with_error( + GroupMemberHasPowerOverLimitError::new(member, power, self.required_power) + .into(), + )); + } + total_power = total_power + .checked_add(power) + .ok_or_else(|| ProtocolError::Overflow("Total power overflowed"))?; + + if power < self.required_power { + total_power_without_unilateral_members = total_power_without_unilateral_members + .checked_add(power) + .ok_or_else(|| ProtocolError::Overflow("Total power overflowed"))?; + } + } + + // Check if the total power meets the required power + if total_power < self.required_power { + return Ok(SimpleConsensusValidationResult::new_with_error( + GroupTotalPowerLessThanRequiredError::new(total_power, self.required_power).into(), + )); + } + + // Check if the total power without unilateral members meets the required power + if total_power_without_unilateral_members < self.required_power { + return Ok(SimpleConsensusValidationResult::new_with_error( + GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError::new( + total_power_without_unilateral_members, + self.required_power, + ) + .into(), + )); + } + + // If all validations pass, return an empty validation result + Ok(SimpleConsensusValidationResult::new()) + } +} diff --git a/packages/rs-dpp/src/data_contract/methods/mod.rs b/packages/rs-dpp/src/data_contract/methods/mod.rs index d9bde273a7..20b64863c0 100644 --- a/packages/rs-dpp/src/data_contract/methods/mod.rs +++ b/packages/rs-dpp/src/data_contract/methods/mod.rs @@ -2,4 +2,6 @@ pub mod schema; #[cfg(feature = "validation")] pub mod validate_document; #[cfg(feature = "validation")] +pub mod validate_groups; +#[cfg(feature = "validation")] pub mod validate_update; diff --git a/packages/rs-dpp/src/data_contract/methods/validate_groups/mod.rs b/packages/rs-dpp/src/data_contract/methods/validate_groups/mod.rs new file mode 100644 index 0000000000..d6a6bef8a8 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/methods/validate_groups/mod.rs @@ -0,0 +1,58 @@ +use crate::data_contract::group::Group; +use crate::data_contract::GroupContractPosition; +use crate::prelude::DataContract; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +mod v0; +use crate::validation::SimpleConsensusValidationResult; +use crate::ProtocolError; + +impl DataContract { + /// Validates the provided groups to ensure they meet the requirements for data contracts. + /// + /// # Parameters + /// - `groups`: A reference to a `BTreeMap` of group contract positions (`GroupContractPosition`) + /// mapped to their corresponding `Group` objects. These represent the groups associated with + /// the data contract. + /// - `platform_version`: A reference to the [`PlatformVersion`](crate::version::PlatformVersion) + /// object specifying the version of the platform and determining which validation method to use. + /// + /// # Returns + /// - `Ok(SimpleConsensusValidationResult)` if all the groups pass validation: + /// - Group contract positions must be contiguous, i.e., no gaps between positions. + /// - Each group must meet its individual validation criteria. + /// - `Err(ProtocolError)` if: + /// - An unknown or unsupported platform version is provided. + /// - Validation of any group fails. + /// + /// # Behavior + /// - Delegates the actual validation logic to the appropriate versioned implementation + /// (`validate_groups_v0`) based on the provided platform version. + /// - If an unknown platform version is encountered, a `ProtocolError::UnknownVersionMismatch` + /// is returned. + /// + /// # Errors + /// - Returns a `ProtocolError::UnknownVersionMismatch` if the platform version is not recognized. + /// - Returns validation errors for: + /// - Non-contiguous group contract positions (`NonContiguousContractGroupPositionsError`). + /// - Invalid individual group configurations (e.g., power-related errors or exceeding member limits). + pub fn validate_groups( + groups: &BTreeMap, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .dpp + .contract_versions + .methods + .validate_groups + { + 0 => Self::validate_groups_v0(groups, platform_version), + version => Err(ProtocolError::UnknownVersionMismatch { + method: "DataContract::validate_groups".to_string(), + known_versions: vec![0], + received: version, + }), + } + } +} diff --git a/packages/rs-dpp/src/data_contract/methods/validate_groups/v0/mod.rs b/packages/rs-dpp/src/data_contract/methods/validate_groups/v0/mod.rs new file mode 100644 index 0000000000..b6f4fc2753 --- /dev/null +++ b/packages/rs-dpp/src/data_contract/methods/validate_groups/v0/mod.rs @@ -0,0 +1,39 @@ +use crate::consensus::basic::data_contract::NonContiguousContractGroupPositionsError; +use crate::data_contract::group::methods::v0::GroupMethodsV0; +use crate::data_contract::group::Group; +use crate::data_contract::{DataContract, GroupContractPosition}; +use crate::validation::SimpleConsensusValidationResult; +use crate::ProtocolError; +use platform_version::version::PlatformVersion; +use std::collections::BTreeMap; + +impl DataContract { + #[inline(always)] + pub(super) fn validate_groups_v0( + groups: &BTreeMap, + platform_version: &PlatformVersion, + ) -> Result { + // Check for gaps in the group contract positions + let mut expected_position = 0; + for &position in groups.keys() { + if position != expected_position { + return Ok(SimpleConsensusValidationResult::new_with_error( + NonContiguousContractGroupPositionsError::new(expected_position, position) + .into(), + )); + } + expected_position += 1; + } + + // Validate each group individually + for group in groups.values() { + let validation_result = group.validate(platform_version)?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + } + + // If we reach here, everything is valid + Ok(SimpleConsensusValidationResult::new()) + } +} diff --git a/packages/rs-dpp/src/data_contract/methods/validate_update/v0/mod.rs b/packages/rs-dpp/src/data_contract/methods/validate_update/v0/mod.rs index fed077b712..21b9fc6183 100644 --- a/packages/rs-dpp/src/data_contract/methods/validate_update/v0/mod.rs +++ b/packages/rs-dpp/src/data_contract/methods/validate_update/v0/mod.rs @@ -3,8 +3,10 @@ use crate::data_contract::accessors::v0::DataContractV0Getters; use crate::consensus::basic::data_contract::{ IncompatibleDataContractSchemaError, InvalidDataContractVersionError, }; +use crate::consensus::state::data_contract::data_contract_update_action_not_allowed_error::DataContractUpdateActionNotAllowedError; 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::data_contract::accessors::v1::DataContractV1Getters; use crate::data_contract::document_type::schema::validate_schema_compatibility; use crate::data_contract::schema::DataContractSchemaMethodsV0; use crate::data_contract::DataContract; @@ -164,6 +166,86 @@ impl DataContract { return Ok(SimpleConsensusValidationResult::new_with_errors(errors)); } } + + if self.groups() != new_data_contract.groups() { + // No groups can have been removed + for old_group_position in self.groups().keys() { + if !new_data_contract.groups().contains_key(old_group_position) { + return Ok(SimpleConsensusValidationResult::new_with_error( + DataContractUpdateActionNotAllowedError::new( + self.id(), + "remove group".to_string(), + ) + .into(), + )); + } + } + + // Ensure no group has been changed + for (old_group_position, old_group) in self.groups() { + if let Some(new_group) = new_data_contract.groups().get(old_group_position) { + if old_group != new_group { + return Ok(SimpleConsensusValidationResult::new_with_error( + DataContractUpdateActionNotAllowedError::new( + self.id(), + format!( + "change group at position {} is not allowed", + old_group_position + ), + ) + .into(), + )); + } + } + } + + let valid = + DataContract::validate_groups(new_data_contract.groups(), platform_version)?; + if !valid.is_valid() { + return Ok(valid); + } + } + + if self.tokens() != new_data_contract.tokens() { + for (token_position, old_token_config) in self.tokens() { + // Check if a token has been removed + if !new_data_contract.tokens().contains_key(token_position) { + return Ok(SimpleConsensusValidationResult::new_with_error( + DataContractUpdateActionNotAllowedError::new( + self.id(), + format!("remove token at position {}", token_position), + ) + .into(), + )); + } + + // Check if a token configuration has been changed + if let Some(new_token_config) = new_data_contract.tokens().get(token_position) { + if old_token_config != new_token_config { + return Ok(SimpleConsensusValidationResult::new_with_error( + DataContractUpdateActionNotAllowedError::new( + self.id(), + format!("update token at position {}", token_position), + ) + .into(), + )); + } + } + } + + // Check if a token has been added + for token_position in new_data_contract.tokens().keys() { + if !self.tokens().contains_key(token_position) { + return Ok(SimpleConsensusValidationResult::new_with_error( + DataContractUpdateActionNotAllowedError::new( + self.id(), + format!("add token at position {}", token_position), + ) + .into(), + )); + } + } + } } Ok(SimpleConsensusValidationResult::new()) diff --git a/packages/rs-dpp/src/errors/consensus/basic/basic_error.rs b/packages/rs-dpp/src/errors/consensus/basic/basic_error.rs index e99398b757..e89758dde7 100644 --- a/packages/rs-dpp/src/errors/consensus/basic/basic_error.rs +++ b/packages/rs-dpp/src/errors/consensus/basic/basic_error.rs @@ -11,9 +11,11 @@ use crate::consensus::basic::data_contract::{ DataContractHaveNewUniqueIndexError, DataContractImmutablePropertiesUpdateError, DataContractInvalidIndexDefinitionUpdateError, DataContractTokenConfigurationUpdateError, DataContractUniqueIndicesChangedError, DuplicateIndexError, DuplicateIndexNameError, - IncompatibleDataContractSchemaError, IncompatibleDocumentTypeSchemaError, - IncompatibleRe2PatternError, InvalidCompoundIndexError, InvalidDataContractIdError, - InvalidDataContractVersionError, InvalidDocumentTypeNameError, + GroupExceedsMaxMembersError, GroupMemberHasPowerOfZeroError, GroupMemberHasPowerOverLimitError, + GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError, GroupPositionDoesNotExistError, + GroupTotalPowerLessThanRequiredError, IncompatibleDataContractSchemaError, + IncompatibleDocumentTypeSchemaError, IncompatibleRe2PatternError, InvalidCompoundIndexError, + InvalidDataContractIdError, InvalidDataContractVersionError, InvalidDocumentTypeNameError, InvalidDocumentTypeRequiredSecurityLevelError, InvalidIndexPropertyTypeError, InvalidIndexedPropertyConstraintError, InvalidTokenBaseSupplyError, NonContiguousContractGroupPositionsError, NonContiguousContractTokenPositionsError, @@ -439,6 +441,9 @@ pub enum BasicError { #[error(transparent)] InvalidGroupPositionError(InvalidGroupPositionError), + #[error(transparent)] + GroupPositionDoesNotExistError(GroupPositionDoesNotExistError), + #[error(transparent)] InvalidActionIdError(InvalidActionIdError), @@ -450,6 +455,23 @@ pub enum BasicError { #[error(transparent)] GroupActionNotAllowedOnTransitionError(GroupActionNotAllowedOnTransitionError), + + #[error(transparent)] + GroupExceedsMaxMembersError(GroupExceedsMaxMembersError), + + #[error(transparent)] + GroupMemberHasPowerOfZeroError(GroupMemberHasPowerOfZeroError), + + #[error(transparent)] + GroupMemberHasPowerOverLimitError(GroupMemberHasPowerOverLimitError), + + #[error(transparent)] + GroupTotalPowerLessThanRequiredError(GroupTotalPowerLessThanRequiredError), + + #[error(transparent)] + GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError( + GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError, + ), } impl From for ConsensusError { diff --git a/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_exceeds_max_members_error.rs b/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_exceeds_max_members_error.rs new file mode 100644 index 0000000000..adc124655a --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_exceeds_max_members_error.rs @@ -0,0 +1,31 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::errors::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error("Group exceeds the maximum allowed number of members: {max_members}")] +#[platform_serialize(unversioned)] +pub struct GroupExceedsMaxMembersError { + max_members: u32, +} + +impl GroupExceedsMaxMembersError { + pub fn new(max_members: u32) -> Self { + Self { max_members } + } + + pub fn max_members(&self) -> u32 { + self.max_members + } +} + +impl From for ConsensusError { + fn from(err: GroupExceedsMaxMembersError) -> Self { + Self::BasicError(BasicError::GroupExceedsMaxMembersError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_member_has_power_of_zero_error.rs b/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_member_has_power_of_zero_error.rs new file mode 100644 index 0000000000..4d3b9c37d8 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_member_has_power_of_zero_error.rs @@ -0,0 +1,32 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::errors::ProtocolError; +use crate::identifier::Identifier; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error("Member {member_id} has a power of 0, which is not allowed")] +#[platform_serialize(unversioned)] +pub struct GroupMemberHasPowerOfZeroError { + member_id: Identifier, +} + +impl GroupMemberHasPowerOfZeroError { + pub fn new(member_id: Identifier) -> Self { + Self { member_id } + } + + pub fn member_id(&self) -> Identifier { + self.member_id + } +} + +impl From for ConsensusError { + fn from(err: GroupMemberHasPowerOfZeroError) -> Self { + Self::BasicError(BasicError::GroupMemberHasPowerOfZeroError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_member_has_power_over_limit_error.rs b/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_member_has_power_over_limit_error.rs new file mode 100644 index 0000000000..40bbd70a60 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_member_has_power_over_limit_error.rs @@ -0,0 +1,57 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::data_contract::group::GroupMemberPower; +use crate::errors::ProtocolError; +use crate::identifier::Identifier; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error( + "Member {member_id} has a power of {power}, which exceeds the allowed limit of {max_power}" +)] +#[platform_serialize(unversioned)] +pub struct GroupMemberHasPowerOverLimitError { + member_id: Identifier, + power: GroupMemberPower, + max_power: GroupMemberPower, +} + +impl GroupMemberHasPowerOverLimitError { + /// Creates a new `GroupMemberHasPowerOverLimitError`. + pub fn new( + member_id: Identifier, + power: GroupMemberPower, + max_power: GroupMemberPower, + ) -> Self { + Self { + member_id, + power, + max_power, + } + } + + /// Returns the identifier of the member. + pub fn member_id(&self) -> Identifier { + self.member_id + } + + /// Returns the power of the member. + pub fn power(&self) -> GroupMemberPower { + self.power + } + + /// Returns the maximum allowed power. + pub fn max_power(&self) -> GroupMemberPower { + self.max_power + } +} + +impl From for ConsensusError { + fn from(err: GroupMemberHasPowerOverLimitError) -> Self { + Self::BasicError(BasicError::GroupMemberHasPowerOverLimitError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_non_unilateral_member_power_has_less_than_required_power_error.rs b/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_non_unilateral_member_power_has_less_than_required_power_error.rs new file mode 100644 index 0000000000..7d8632fc53 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_non_unilateral_member_power_has_less_than_required_power_error.rs @@ -0,0 +1,49 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::data_contract::group::GroupMemberPower; +use crate::errors::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error("The collective power of non-unilateral members {total_power} is less than the required power {required_power}")] +#[platform_serialize(unversioned)] +pub struct GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError { + total_power: GroupMemberPower, + required_power: GroupMemberPower, +} + +impl GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError { + /// Creates a new `GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError`. + /// + /// # Parameters + /// - `total_power`: The total power of non-unilateral members. + /// - `required_power`: The required power to meet the threshold. + pub fn new(total_power: GroupMemberPower, required_power: GroupMemberPower) -> Self { + Self { + total_power, + required_power, + } + } + + /// Returns the total power of non-unilateral members. + pub fn total_power(&self) -> GroupMemberPower { + self.total_power + } + + /// Returns the required power to meet the threshold. + pub fn required_power(&self) -> GroupMemberPower { + self.required_power + } +} + +impl From for ConsensusError { + fn from(err: GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError) -> Self { + Self::BasicError( + BasicError::GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError(err), + ) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_position_does_not_exist_error.rs b/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_position_does_not_exist_error.rs new file mode 100644 index 0000000000..7f52548936 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_position_does_not_exist_error.rs @@ -0,0 +1,46 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::data_contract::GroupContractPosition; +use crate::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +/// Error raised when a group position does not exist in the data contract. +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error("Group position {} does not exist", missing_group_position)] +#[platform_serialize(unversioned)] +pub struct GroupPositionDoesNotExistError { + missing_group_position: GroupContractPosition, +} + +impl GroupPositionDoesNotExistError { + /// Creates a new instance of `GroupPositionDoesNotExistError`. + /// + /// # Parameters + /// - `missing_group_position`: The group position that does not exist. + /// + /// # Returns + /// A new `GroupPositionDoesNotExistError` instance. + pub fn new(missing_group_position: GroupContractPosition) -> Self { + Self { + missing_group_position, + } + } + + /// Gets the missing group position that caused this error. + /// + /// # Returns + /// The missing group position. + pub fn missing_group_position(&self) -> GroupContractPosition { + self.missing_group_position + } +} + +impl From for ConsensusError { + fn from(err: GroupPositionDoesNotExistError) -> Self { + Self::BasicError(BasicError::GroupPositionDoesNotExistError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_total_power_has_less_than_required_power_error.rs b/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_total_power_has_less_than_required_power_error.rs new file mode 100644 index 0000000000..6559f20e5c --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/basic/data_contract/group_total_power_has_less_than_required_power_error.rs @@ -0,0 +1,40 @@ +use crate::consensus::basic::BasicError; +use crate::consensus::ConsensusError; +use crate::data_contract::group::GroupMemberPower; +use crate::errors::ProtocolError; +use bincode::{Decode, Encode}; +use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; +use thiserror::Error; + +#[derive( + Error, Debug, Clone, PartialEq, Eq, Encode, Decode, PlatformSerialize, PlatformDeserialize, +)] +#[error("Group total power {total_power} is less than the required power {required_power}")] +#[platform_serialize(unversioned)] +pub struct GroupTotalPowerLessThanRequiredError { + total_power: GroupMemberPower, + required_power: GroupMemberPower, +} + +impl GroupTotalPowerLessThanRequiredError { + pub fn new(total_power: GroupMemberPower, required_power: GroupMemberPower) -> Self { + Self { + total_power, + required_power, + } + } + + pub fn total_power(&self) -> GroupMemberPower { + self.total_power + } + + pub fn required_power(&self) -> GroupMemberPower { + self.required_power + } +} + +impl From for ConsensusError { + fn from(err: GroupTotalPowerLessThanRequiredError) -> Self { + Self::BasicError(BasicError::GroupTotalPowerLessThanRequiredError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/basic/data_contract/mod.rs b/packages/rs-dpp/src/errors/consensus/basic/data_contract/mod.rs index 2fc29ce57f..529edda651 100644 --- a/packages/rs-dpp/src/errors/consensus/basic/data_contract/mod.rs +++ b/packages/rs-dpp/src/errors/consensus/basic/data_contract/mod.rs @@ -9,6 +9,12 @@ mod data_contract_unique_indices_changed_error; mod document_types_are_missing_error; mod duplicate_index_error; mod duplicate_index_name_error; +mod group_exceeds_max_members_error; +mod group_member_has_power_of_zero_error; +mod group_member_has_power_over_limit_error; +mod group_non_unilateral_member_power_has_less_than_required_power_error; +mod group_position_does_not_exist_error; +mod group_total_power_has_less_than_required_power_error; mod incompatible_data_contract_schema_error; mod incompatible_document_type_schema_error; mod incompatible_re2_pattern_error; @@ -58,6 +64,12 @@ pub use unique_indices_limit_reached_error::*; pub use contested_unique_index_on_mutable_document_type_error::*; pub use contested_unique_index_with_unique_index_error::*; +pub use group_exceeds_max_members_error::*; +pub use group_member_has_power_of_zero_error::*; +pub use group_member_has_power_over_limit_error::*; +pub use group_non_unilateral_member_power_has_less_than_required_power_error::*; +pub use group_position_does_not_exist_error::*; +pub use group_total_power_has_less_than_required_power_error::*; pub use incompatible_document_type_schema_error::*; pub use invalid_document_type_name_error::*; pub use invalid_token_base_supply_error::*; diff --git a/packages/rs-dpp/src/errors/consensus/codes.rs b/packages/rs-dpp/src/errors/consensus/codes.rs index 56f38cfaa2..00ee6d4da5 100644 --- a/packages/rs-dpp/src/errors/consensus/codes.rs +++ b/packages/rs-dpp/src/errors/consensus/codes.rs @@ -103,6 +103,16 @@ impl ErrorWithCode for BasicError { Self::NonContiguousContractGroupPositionsError(_) => 10252, Self::NonContiguousContractTokenPositionsError(_) => 10253, + // Group Errors: 10350-10399 + Self::InvalidGroupPositionError(_) => 10350, + Self::GroupPositionDoesNotExistError(_) => 10351, + Self::GroupActionNotAllowedOnTransitionError(_) => 10352, + Self::GroupTotalPowerLessThanRequiredError(_) => 10353, + Self::GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError(_) => 10354, + Self::GroupExceedsMaxMembersError(_) => 10355, + Self::GroupMemberHasPowerOfZeroError(_) => 10356, + Self::GroupMemberHasPowerOverLimitError(_) => 10357, + // Document Errors: 10400-10449 Self::DataContractNotPresentError { .. } => 10400, Self::DuplicateDocumentTransitionsWithIdsError { .. } => 10401, @@ -127,12 +137,11 @@ impl ErrorWithCode for BasicError { // Token Errors: 10450-10499 Self::InvalidTokenIdError(_) => 10450, Self::InvalidTokenPositionError(_) => 10451, - Self::InvalidGroupPositionError(_) => 10452, - Self::InvalidActionIdError(_) => 10453, - Self::ContractHasNoTokensError(_) => 10454, - Self::DestinationIdentityForTokenMintingNotSetError(_) => 10455, - Self::ChoosingTokenMintRecipientNotAllowedError(_) => 10456, - Self::TokenTransferToOurselfError(_) => 10457, + Self::InvalidActionIdError(_) => 10452, + Self::ContractHasNoTokensError(_) => 10453, + Self::DestinationIdentityForTokenMintingNotSetError(_) => 10454, + Self::ChoosingTokenMintRecipientNotAllowedError(_) => 10455, + Self::TokenTransferToOurselfError(_) => 10456, // Identity Errors: 10500-10599 Self::DuplicatedIdentityPublicKeyBasicError(_) => 10500, @@ -176,7 +185,6 @@ impl ErrorWithCode for BasicError { // General Errors 10700-10799 Self::OverflowError(_) => 10700, - Self::GroupActionNotAllowedOnTransitionError(_) => 10701, } } } @@ -215,6 +223,8 @@ impl ErrorWithCode for StateError { Self::DataContractAlreadyPresentError { .. } => 40000, Self::DataContractIsReadonlyError { .. } => 40001, Self::DataContractConfigUpdateError { .. } => 40002, + Self::DataContractUpdatePermissionError(_) => 40003, + Self::DataContractUpdateActionNotAllowedError(_) => 40004, // Document Errors: 40100-40149 Self::DocumentAlreadyPresentError { .. } => 40100, @@ -253,7 +263,6 @@ impl ErrorWithCode for StateError { Self::IdentityInsufficientBalanceError(_) => 40210, Self::IdentityPublicKeyAlreadyExistsForUniqueContractBoundsError(_) => 40211, Self::DocumentTypeUpdateError(_) => 40212, - Self::DataContractUpdatePermissionError(_) => 40213, Self::MissingTransferKeyError(_) => 40214, Self::NoTransferKeyForCoreWithdrawalAvailableError(_) => 40215, Self::RecipientIdentityDoesNotExistError(_) => 40216, diff --git a/packages/rs-dpp/src/errors/consensus/state/data_contract/data_contract_update_action_not_allowed_error.rs b/packages/rs-dpp/src/errors/consensus/state/data_contract/data_contract_update_action_not_allowed_error.rs new file mode 100644 index 0000000000..0064bc5923 --- /dev/null +++ b/packages/rs-dpp/src/errors/consensus/state/data_contract/data_contract_update_action_not_allowed_error.rs @@ -0,0 +1,45 @@ +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("Action '{action}' is not allowed on Data Contract {data_contract_id}")] +#[platform_serialize(unversioned)] +pub struct DataContractUpdateActionNotAllowedError { + /* + + DO NOT CHANGE ORDER OF FIELDS WITHOUT INTRODUCING OF NEW VERSION + + */ + data_contract_id: Identifier, + action: String, +} + +impl DataContractUpdateActionNotAllowedError { + pub fn new(data_contract_id: Identifier, action: impl Into) -> Self { + Self { + data_contract_id, + action: action.into(), + } + } + + pub fn data_contract_id(&self) -> Identifier { + self.data_contract_id + } + + pub fn action(&self) -> &str { + &self.action + } +} + +impl From for ConsensusError { + fn from(err: DataContractUpdateActionNotAllowedError) -> Self { + Self::StateError(StateError::DataContractUpdateActionNotAllowedError(err)) + } +} diff --git a/packages/rs-dpp/src/errors/consensus/state/data_contract/mod.rs b/packages/rs-dpp/src/errors/consensus/state/data_contract/mod.rs index 563596603d..c06986bb44 100644 --- a/packages/rs-dpp/src/errors/consensus/state/data_contract/mod.rs +++ b/packages/rs-dpp/src/errors/consensus/state/data_contract/mod.rs @@ -1,5 +1,6 @@ pub mod data_contract_already_present_error; pub mod data_contract_config_update_error; pub mod data_contract_is_readonly_error; +pub mod data_contract_update_action_not_allowed_error; pub mod data_contract_update_permission_error; pub mod document_type_update_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 9dc0a2938b..91eaf396cc 100644 --- a/packages/rs-dpp/src/errors/consensus/state/state_error.rs +++ b/packages/rs-dpp/src/errors/consensus/state/state_error.rs @@ -25,6 +25,7 @@ use crate::consensus::state::identity::max_identity_public_key_limit_reached_err use crate::consensus::state::identity::missing_identity_public_key_ids_error::MissingIdentityPublicKeyIdsError; use crate::consensus::state::identity::{IdentityAlreadyExistsError, IdentityInsufficientBalanceError, RecipientIdentityDoesNotExistError}; use crate::consensus::ConsensusError; +use crate::consensus::state::data_contract::data_contract_update_action_not_allowed_error::DataContractUpdateActionNotAllowedError; 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; @@ -226,6 +227,9 @@ pub enum StateError { #[error(transparent)] GroupActionAlreadySignedByIdentityError(GroupActionAlreadySignedByIdentityError), + + #[error(transparent)] + DataContractUpdateActionNotAllowedError(DataContractUpdateActionNotAllowedError), } impl From for ConsensusError { diff --git a/packages/rs-dpp/src/group/action_taker.rs b/packages/rs-dpp/src/group/action_taker.rs new file mode 100644 index 0000000000..61e5d10c1b --- /dev/null +++ b/packages/rs-dpp/src/group/action_taker.rs @@ -0,0 +1,13 @@ +use platform_value::Identifier; +use std::collections::BTreeSet; +#[derive(Debug, PartialEq, PartialOrd, Clone, Copy, Eq)] +pub enum ActionGoal { + ActionCompletion, + ActionParticipation, +} + +#[derive(Debug, PartialEq, PartialOrd, Clone, Eq)] +pub enum ActionTaker { + SingleIdentity(Identifier), + SpecifiedIdentities(BTreeSet), +} diff --git a/packages/rs-dpp/src/group/mod.rs b/packages/rs-dpp/src/group/mod.rs index aba7606668..427b62c775 100644 --- a/packages/rs-dpp/src/group/mod.rs +++ b/packages/rs-dpp/src/group/mod.rs @@ -7,6 +7,7 @@ use platform_value::Identifier; use serde::{Deserialize, Serialize}; pub mod action_event; +pub mod action_taker; pub mod group_action; pub mod group_action_status; diff --git a/packages/rs-dpp/src/lib.rs b/packages/rs-dpp/src/lib.rs index af7195d65c..4225704da9 100644 --- a/packages/rs-dpp/src/lib.rs +++ b/packages/rs-dpp/src/lib.rs @@ -41,7 +41,6 @@ pub mod block; /// Core subsidy pub mod core_subsidy; pub mod fee; -pub mod multi_identity_events; pub mod nft; pub mod prefunded_specialized_balance; pub mod serialization; diff --git a/packages/rs-dpp/src/multi_identity_events/mod.rs b/packages/rs-dpp/src/multi_identity_events/mod.rs deleted file mode 100644 index 6c6558cf9f..0000000000 --- a/packages/rs-dpp/src/multi_identity_events/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use platform_value::Identifier; -use std::collections::BTreeSet; - -pub enum ActionTaker { - SingleIdentity(Identifier), - SpecifiedIdentities(BTreeSet), -} diff --git a/packages/rs-dpp/src/state_transition/mod.rs b/packages/rs-dpp/src/state_transition/mod.rs index da4c004287..88a3eddcfe 100644 --- a/packages/rs-dpp/src/state_transition/mod.rs +++ b/packages/rs-dpp/src/state_transition/mod.rs @@ -241,27 +241,6 @@ macro_rules! call_errorable_method_identity_signed { }; } -// TODO unused macros below -// macro_rules! call_static_method { -// ($state_transition:expr, $method:ident ) => { -// match $state_transition { -// StateTransition::DataContractCreate(_) => DataContractCreateTransition::$method(), -// StateTransition::DataContractUpdate(_) => DataContractUpdateTransition::$method(), -// StateTransition::DocumentsBatch(_) => DocumentsBatchTransition::$method(), -// StateTransition::IdentityCreate(_) => IdentityCreateTransition::$method(), -// StateTransition::IdentityTopUp(_) => IdentityTopUpTransition::$method(), -// StateTransition::IdentityCreditWithdrawal(_) => { -// IdentityCreditWithdrawalTransition::$method() -// } -// StateTransition::IdentityUpdate(_) => IdentityUpdateTransition::$method(), -// StateTransition::IdentityCreditTransfer(_) => { -// IdentityCreditTransferTransition::$method() -// } -// StateTransition::MasternodeVote(_) => MasternodeVote::$method(), -// } -// }; -// } - #[derive( Debug, Clone, @@ -379,6 +358,9 @@ impl StateTransition { BatchedTransitionRef::Token(TokenTransition::EmergencyAction(_)) => { "TokenEmergencyAction" } + BatchedTransitionRef::Token(TokenTransition::ConfigUpdate(_)) => { + "TokenConfigUpdate" + } }; document_transition_types.push(document_transition_name); } @@ -761,93 +743,3 @@ impl StateTransition { }) } } -// -// impl StateTransition { -// fn signature_property_paths(&self) -> Vec<&'static str> { -// call_static_method!(self, signature_property_paths) -// } -// -// fn identifiers_property_paths(&self) -> Vec<&'static str> { -// call_static_method!(self, identifiers_property_paths) -// } -// -// fn binary_property_paths(&self) -> Vec<&'static str> { -// call_static_method!(self, binary_property_paths) -// } -// -// pub fn get_owner_id(&self) -> &Identifier { -// call_method!(self, get_owner_id) -// } -// } -// -// impl StateTransitionFieldTypes for StateTransition { -// fn hash(&self, skip_signature: bool) -> Result, ProtocolError> { -// if skip_signature { -// Ok(hash::hash_to_vec(self.signable_bytes()?)) -// } else { -// Ok(hash::hash_to_vec(PlatformSerializable::serialize_to_bytes(self)?)) -// } -// } -// -// #[cfg(feature = "state-transition-cbor-conversion")] -// fn to_cbor_buffer(&self, _skip_signature: bool) -> Result, crate::ProtocolError> { -// call_method!(self, to_cbor_buffer, true) -// } -// -// #[cfg(feature = "state-transition-json-conversion")] -// fn to_json(&self, skip_signature: bool) -> Result { -// call_method!(self, to_json, skip_signature) -// } -// -// #[cfg(feature = "state-transition-value-conversion")] -// fn to_object( -// &self, -// skip_signature: bool, -// ) -> Result { -// call_method!(self, to_object, skip_signature) -// } -// -// fn signature_property_paths() -> Vec<&'static str> { -// panic!("Static call is not supported") -// } -// -// fn identifiers_property_paths() -> Vec<&'static str> { -// panic!("Static call is not supported") -// } -// -// fn binary_property_paths() -> Vec<&'static str> { -// panic!("Static call is not supported") -// } -// -// #[cfg(feature = "state-transition-value-conversion")] -// fn to_cleaned_object(&self, skip_signature: bool) -> Result { -// call_method!(self, to_cleaned_object, skip_signature) -// } -// } -// -// impl StateTransitionLike for StateTransition { -// fn state_transition_protocol_version(&self) -> FeatureVersion { -// call_method!(self, state_transition_protocol_version) -// } -// /// returns the type of State Transition -// fn state_transition_type(&self) -> StateTransitionType { -// call_method!(self, state_transition_type) -// } -// /// returns the signature as a byte-array -// fn signature(&self) -> &BinaryData { -// call_method!(self, signature) -// } -// -// /// set a new signature -// fn set_signature(&mut self, signature: BinaryData) { -// call_method!(self, set_signature, signature) -// } -// -// fn set_signature_bytes(&mut self, signature: Vec) { -// call_method!(self, set_signature_bytes, signature) -// } -// -// fn modified_data_ids(&self) -> Vec { -// call_method!(self, modified_data_ids) -// } -// } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/mod.rs index cbd28a7d90..39d0c5e2ff 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/mod.rs @@ -16,6 +16,7 @@ pub mod multi_party_action; mod resolvers; pub mod token_base_transition; pub mod token_burn_transition; +pub mod token_config_update_transition; pub mod token_destroy_frozen_funds_transition; pub mod token_emergency_action_transition; pub mod token_freeze_transition; diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/mod.rs new file mode 100644 index 0000000000..f9e937cb3d --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/mod.rs @@ -0,0 +1,25 @@ +pub mod v0; +mod v0_methods; + +use bincode::{Decode, Encode}; +use derive_more::{Display, From}; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; +pub use v0::TokenConfigUpdateTransitionV0; + +#[derive(Debug, Clone, Encode, Decode, PartialEq, Display, From)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize) +)] +pub enum TokenConfigUpdateTransition { + #[display("V0({})", "_0")] + V0(TokenConfigUpdateTransitionV0), +} + +impl Default for TokenConfigUpdateTransition { + fn default() -> Self { + TokenConfigUpdateTransition::V0(TokenConfigUpdateTransitionV0::default()) + // since only v0 + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0/mod.rs new file mode 100644 index 0000000000..e49ba00050 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0/mod.rs @@ -0,0 +1,27 @@ +pub mod v0_methods; + +/// The Identifier fields in [`TokenConfigUpdateTransition`] +pub use super::super::document_base_transition::IDENTIFIER_FIELDS; +use crate::data_contract::associated_token::token_configuration_item::TokenConfigurationChangeItem; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use bincode::{Decode, Encode}; +use derive_more::Display; +#[cfg(feature = "state-transition-serde-conversion")] +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Default, Encode, Decode, PartialEq, Display)] +#[cfg_attr( + feature = "state-transition-serde-conversion", + derive(Serialize, Deserialize), + serde(rename_all = "camelCase") +)] +#[display("Base: {base}, change: {update_token_configuration_item}")] +pub struct TokenConfigUpdateTransitionV0 { + /// Document Base Transition + #[cfg_attr(feature = "state-transition-serde-conversion", serde(flatten))] + pub base: TokenBaseTransition, + /// Updated token configuration item + pub update_token_configuration_item: TokenConfigurationChangeItem, + /// The public note + pub public_note: Option, +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0/v0_methods.rs new file mode 100644 index 0000000000..49ba01f625 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0/v0_methods.rs @@ -0,0 +1,87 @@ +use platform_value::Identifier; +use crate::data_contract::associated_token::token_configuration_item::TokenConfigurationChangeItem; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use crate::state_transition::batch_transition::token_config_update_transition::TokenConfigUpdateTransitionV0; +use crate::util::hash::hash_double; + +impl TokenBaseTransitionAccessors for TokenConfigUpdateTransitionV0 { + fn base(&self) -> &TokenBaseTransition { + &self.base + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + &mut self.base + } + + fn set_base(&mut self, base: TokenBaseTransition) { + self.base = base; + } +} + +pub trait TokenConfigUpdateTransitionV0Methods: + TokenBaseTransitionAccessors + AllowedAsMultiPartyAction +{ + /// Returns the `update_token_configuration_item` + fn update_token_configuration_item(&self) -> &TokenConfigurationChangeItem; + + /// Sets the `update_token_configuration_item` + fn set_update_token_configuration_item( + &mut self, + update_token_configuration_item: TokenConfigurationChangeItem, + ); + + /// Returns the `public_note` field of the `TokenConfigUpdateTransitionV0`. + fn public_note(&self) -> Option<&String>; + + /// Returns the owned `public_note` field of the `TokenConfigUpdateTransitionV0`. + fn public_note_owned(self) -> Option; + + /// Sets the `public_note` field in the `TokenConfigUpdateTransitionV0`. + fn set_public_note(&mut self, public_note: Option); +} + +impl TokenConfigUpdateTransitionV0Methods for TokenConfigUpdateTransitionV0 { + fn update_token_configuration_item(&self) -> &TokenConfigurationChangeItem { + &self.update_token_configuration_item + } + + fn set_update_token_configuration_item( + &mut self, + update_token_configuration_item: TokenConfigurationChangeItem, + ) { + self.update_token_configuration_item = update_token_configuration_item; + } + + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } +} + +impl AllowedAsMultiPartyAction for TokenConfigUpdateTransitionV0 { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + let TokenConfigUpdateTransitionV0 { + base, + update_token_configuration_item, + .. + } = self; + + let mut bytes = b"action_token_config_update".to_vec(); + bytes.extend_from_slice(base.token_id().as_bytes()); + bytes.extend_from_slice(owner_id.as_bytes()); + bytes.extend_from_slice(&base.identity_contract_nonce().to_be_bytes()); + bytes.extend_from_slice(&[update_token_configuration_item.u8_item_index()]); + + hash_double(bytes).into() + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0_methods.rs new file mode 100644 index 0000000000..b996f9a0b5 --- /dev/null +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_config_update_transition/v0_methods.rs @@ -0,0 +1,72 @@ +use platform_value::Identifier; +use crate::data_contract::associated_token::token_configuration_item::TokenConfigurationChangeItem; +use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; +use crate::state_transition::batch_transition::token_base_transition::token_base_transition_accessors::TokenBaseTransitionAccessors; +use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; +use crate::state_transition::batch_transition::token_config_update_transition::TokenConfigUpdateTransition; +use crate::state_transition::batch_transition::token_config_update_transition::v0::v0_methods::TokenConfigUpdateTransitionV0Methods; + +impl TokenBaseTransitionAccessors for TokenConfigUpdateTransition { + fn base(&self) -> &TokenBaseTransition { + match self { + TokenConfigUpdateTransition::V0(v0) => &v0.base, + } + } + + fn base_mut(&mut self) -> &mut TokenBaseTransition { + match self { + TokenConfigUpdateTransition::V0(v0) => &mut v0.base, + } + } + + fn set_base(&mut self, base: TokenBaseTransition) { + match self { + TokenConfigUpdateTransition::V0(v0) => v0.base = base, + } + } +} + +impl TokenConfigUpdateTransitionV0Methods for TokenConfigUpdateTransition { + fn update_token_configuration_item(&self) -> &TokenConfigurationChangeItem { + match self { + TokenConfigUpdateTransition::V0(v0) => v0.update_token_configuration_item(), + } + } + + fn set_update_token_configuration_item( + &mut self, + update_token_configuration_item: TokenConfigurationChangeItem, + ) { + match self { + TokenConfigUpdateTransition::V0(v0) => { + v0.set_update_token_configuration_item(update_token_configuration_item) + } + } + } + + fn public_note(&self) -> Option<&String> { + match self { + TokenConfigUpdateTransition::V0(v0) => v0.public_note(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenConfigUpdateTransition::V0(v0) => v0.public_note_owned(), + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenConfigUpdateTransition::V0(v0) => v0.set_public_note(public_note), + } + } +} + +impl AllowedAsMultiPartyAction for TokenConfigUpdateTransition { + fn calculate_action_id(&self, owner_id: Identifier) -> Identifier { + match self { + TokenConfigUpdateTransition::V0(v0) => v0.calculate_action_id(owner_id), + } + } +} diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs index 91371bde32..5bf04af790 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs @@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize}; use platform_value::Identifier; use bincode::{Encode, Decode}; use data_contracts::SystemDataContract; +use platform_version::version::PlatformVersion; use crate::balances::credits::TokenAmount; use crate::block::block_info::BlockInfo; use crate::data_contract::accessors::v0::DataContractV0Getters; @@ -14,7 +15,7 @@ use crate::data_contract::document_type::DocumentTypeRef; use crate::document::Document; use crate::prelude::IdentityNonce; use crate::ProtocolError; -use crate::state_transition::batch_transition::{DocumentCreateTransition, DocumentDeleteTransition, DocumentReplaceTransition, TokenBurnTransition, TokenDestroyFrozenFundsTransition, TokenEmergencyActionTransition, TokenFreezeTransition, TokenMintTransition, TokenTransferTransition}; +use crate::state_transition::batch_transition::{DocumentCreateTransition, DocumentDeleteTransition, DocumentReplaceTransition, TokenBurnTransition, TokenConfigUpdateTransition, TokenDestroyFrozenFundsTransition, TokenEmergencyActionTransition, TokenFreezeTransition, TokenMintTransition, TokenTransferTransition}; use crate::state_transition::batch_transition::batched_transition::{DocumentPurchaseTransition, DocumentTransferTransition}; use crate::state_transition::batch_transition::batched_transition::multi_party_action::AllowedAsMultiPartyAction; use crate::state_transition::batch_transition::batched_transition::token_unfreeze_transition::TokenUnfreezeTransition; @@ -23,6 +24,7 @@ use crate::state_transition::batch_transition::token_base_transition::token_base use crate::state_transition::batch_transition::token_base_transition::TokenBaseTransition; use crate::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; use crate::state_transition::batch_transition::token_burn_transition::v0::v0_methods::TokenBurnTransitionV0Methods; +use crate::state_transition::batch_transition::token_config_update_transition::v0::v0_methods::TokenConfigUpdateTransitionV0Methods; use crate::state_transition::batch_transition::token_destroy_frozen_funds_transition::v0::v0_methods::TokenDestroyFrozenFundsTransitionV0Methods; use crate::state_transition::batch_transition::token_emergency_action_transition::v0::v0_methods::TokenEmergencyActionTransitionV0Methods; use crate::state_transition::batch_transition::token_freeze_transition::v0::v0_methods::TokenFreezeTransitionV0Methods; @@ -57,6 +59,9 @@ pub enum TokenTransition { #[display("TokenEmergencyActionTransition({})", "_0")] EmergencyAction(TokenEmergencyActionTransition), + + #[display("TokenConfigUpdateTransition({})", "_0")] + ConfigUpdate(TokenConfigUpdateTransition), } impl BatchTransitionResolversV0 for TokenTransition { @@ -185,6 +190,7 @@ pub trait TokenTransitionV0Methods { owner_nonce: IdentityNonce, block_info: &BlockInfo, token_configuration: &TokenConfiguration, + platform_version: &PlatformVersion, ) -> Result; } @@ -198,6 +204,7 @@ impl TokenTransitionV0Methods for TokenTransition { TokenTransition::Unfreeze(t) => t.base(), TokenTransition::DestroyFrozenFunds(t) => t.base(), TokenTransition::EmergencyAction(t) => t.base(), + TokenTransition::ConfigUpdate(t) => t.base(), } } @@ -210,6 +217,7 @@ impl TokenTransitionV0Methods for TokenTransition { TokenTransition::Unfreeze(t) => t.base_mut(), TokenTransition::DestroyFrozenFunds(t) => t.base_mut(), TokenTransition::EmergencyAction(t) => t.base_mut(), + TokenTransition::ConfigUpdate(t) => t.base_mut(), } } @@ -226,6 +234,7 @@ impl TokenTransitionV0Methods for TokenTransition { TokenTransition::Transfer(_) => None, TokenTransition::DestroyFrozenFunds(t) => Some(t.calculate_action_id(owner_id)), TokenTransition::EmergencyAction(t) => Some(t.calculate_action_id(owner_id)), + TokenTransition::ConfigUpdate(t) => Some(t.calculate_action_id(owner_id)), } } @@ -236,7 +245,8 @@ impl TokenTransitionV0Methods for TokenTransition { | TokenTransition::Freeze(_) | TokenTransition::Unfreeze(_) | TokenTransition::DestroyFrozenFunds(_) - | TokenTransition::EmergencyAction(_) => true, + | TokenTransition::EmergencyAction(_) + | TokenTransition::ConfigUpdate(_) => true, TokenTransition::Transfer(_) => false, } } @@ -271,6 +281,7 @@ impl TokenTransitionV0Methods for TokenTransition { TokenTransition::Unfreeze(_) => "unfreeze", TokenTransition::EmergencyAction(_) => "emergencyAction", TokenTransition::DestroyFrozenFunds(_) => "destroyFrozenFunds", + TokenTransition::ConfigUpdate(_) => "configUpdate", } } @@ -306,6 +317,7 @@ impl TokenTransitionV0Methods for TokenTransition { owner_nonce: IdentityNonce, block_info: &BlockInfo, token_configuration: &TokenConfiguration, + platform_version: &PlatformVersion, ) -> Result { self.associated_token_event(token_configuration)? .build_historical_document_owned( @@ -314,6 +326,7 @@ impl TokenTransitionV0Methods for TokenTransition { owner_id, owner_nonce, block_info, + platform_version, ) } @@ -353,13 +366,17 @@ impl TokenTransitionV0Methods for TokenTransition { emergency_action.emergency_action(), emergency_action.public_note().cloned(), ), - TokenTransition::DestroyFrozenFunds(destroy) => { + TokenTransition::DestroyFrozenFunds(destroy_frozen_funds) => { TokenEvent::DestroyFrozenFunds( - destroy.frozen_identity_id(), + destroy_frozen_funds.frozen_identity_id(), TokenAmount::MAX, // we do not know how much will be destroyed - destroy.public_note().cloned(), + destroy_frozen_funds.public_note().cloned(), ) } + TokenTransition::ConfigUpdate(config_update) => TokenEvent::ConfigUpdate( + config_update.update_token_configuration_item().clone(), + config_update.public_note().cloned(), + ), }) } } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition_action_type.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition_action_type.rs index d196637391..818c492021 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition_action_type.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition_action_type.rs @@ -12,6 +12,7 @@ pub enum TokenTransitionActionType { Unfreeze, DestroyFrozenFunds, EmergencyAction, + ConfigUpdate, } impl fmt::Display for TokenTransitionActionType { @@ -24,6 +25,7 @@ impl fmt::Display for TokenTransitionActionType { TokenTransitionActionType::Unfreeze => "Unfreeze", TokenTransitionActionType::DestroyFrozenFunds => "DestroyFrozenFunds", TokenTransitionActionType::EmergencyAction => "EmergencyAction", + TokenTransitionActionType::ConfigUpdate => "ConfigUpdate", }; write!(f, "{}", action_str) } @@ -43,6 +45,7 @@ impl TokenTransitionActionTypeGetter for TokenTransition { TokenTransition::Unfreeze(_) => TokenTransitionActionType::Unfreeze, TokenTransition::DestroyFrozenFunds(_) => TokenTransitionActionType::DestroyFrozenFunds, TokenTransition::EmergencyAction(_) => TokenTransitionActionType::EmergencyAction, + TokenTransition::ConfigUpdate(_) => TokenTransitionActionType::ConfigUpdate, } } } diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs index f690b7edc2..a92bc453fb 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/mod.rs @@ -28,6 +28,7 @@ use crate::state_transition::batch_transition::BatchTransition; use crate::state_transition::batch_transition::{BatchTransitionV0, BatchTransitionV1}; #[cfg(feature = "state-transition-signing")] use crate::state_transition::StateTransition; +#[cfg(feature = "state-transition-signing")] use crate::tokens::emergency_action::TokenEmergencyAction; use crate::ProtocolError; #[cfg(feature = "state-transition-signing")] diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs index db4e2efab7..ea9c43e7d4 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/methods/v1/mod.rs @@ -1,17 +1,28 @@ +#[cfg(feature = "state-transition-signing")] use crate::balances::credits::TokenAmount; +#[cfg(feature = "state-transition-signing")] use crate::group::GroupStateTransitionInfoStatus; +#[cfg(feature = "state-transition-signing")] use crate::identity::signer::Signer; +#[cfg(feature = "state-transition-signing")] use crate::identity::IdentityPublicKey; +#[cfg(feature = "state-transition-signing")] use crate::prelude::{ DerivationEncryptionKeyIndex, IdentityNonce, RecipientKeyIndex, RootEncryptionKeyIndex, SenderKeyIndex, UserFeeIncrease, }; use crate::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; +#[cfg(feature = "state-transition-signing")] use crate::state_transition::StateTransition; +#[cfg(feature = "state-transition-signing")] use crate::tokens::emergency_action::TokenEmergencyAction; +#[cfg(feature = "state-transition-signing")] use crate::version::FeatureVersion; +#[cfg(feature = "state-transition-signing")] use crate::ProtocolError; +#[cfg(feature = "state-transition-signing")] use platform_value::Identifier; +#[cfg(feature = "state-transition-signing")] use platform_version::version::PlatformVersion; pub trait DocumentsBatchTransitionMethodsV1: DocumentsBatchTransitionAccessorsV0 { diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/mod.rs index a3600a133c..4b33e2e79e 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/mod.rs @@ -17,6 +17,7 @@ pub use self::batched_transition::{ document_delete_transition::DocumentDeleteTransition, document_replace_transition, document_replace_transition::DocumentReplaceTransition, token_base_transition, token_burn_transition, token_burn_transition::TokenBurnTransition, + token_config_update_transition, token_config_update_transition::TokenConfigUpdateTransition, token_destroy_frozen_funds_transition, token_destroy_frozen_funds_transition::TokenDestroyFrozenFundsTransition, token_emergency_action_transition, diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs index 91d9120c44..0ae1f0abcc 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/v1/v0_methods.rs @@ -7,13 +7,14 @@ use crate::fee::Credits; use crate::identity::signer::Signer; #[cfg(feature = "state-transition-signing")] use crate::identity::SecurityLevel; +use crate::prelude::IdentityNonce; #[cfg(feature = "state-transition-signing")] use crate::prelude::IdentityPublicKey; #[cfg(feature = "state-transition-signing")] use crate::prelude::UserFeeIncrease; +#[cfg(feature = "state-transition-signing")] use crate::prelude::{ - DerivationEncryptionKeyIndex, IdentityNonce, RecipientKeyIndex, RootEncryptionKeyIndex, - SenderKeyIndex, + DerivationEncryptionKeyIndex, RecipientKeyIndex, RootEncryptionKeyIndex, SenderKeyIndex, }; use crate::state_transition::batch_transition::accessors::DocumentsBatchTransitionAccessorsV0; use crate::state_transition::batch_transition::batched_transition::{ diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/validate_basic_structure/v0/mod.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/validate_basic_structure/v0/mod.rs index c90794beb7..fa69e5a93f 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/validate_basic_structure/v0/mod.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/validation/validate_basic_structure/v0/mod.rs @@ -152,6 +152,7 @@ impl BatchTransition { TokenTransition::Unfreeze(_) => {} TokenTransition::DestroyFrozenFunds(_) => {} TokenTransition::EmergencyAction(_) => {} + TokenTransition::ConfigUpdate(_) => {} } // We need to verify that the action id given matches the expected action id diff --git a/packages/rs-dpp/src/tokens/token_event.rs b/packages/rs-dpp/src/tokens/token_event.rs index c0313efaee..dd13b2fe9e 100644 --- a/packages/rs-dpp/src/tokens/token_event.rs +++ b/packages/rs-dpp/src/tokens/token_event.rs @@ -1,6 +1,7 @@ use crate::balances::credits::TokenAmount; use crate::block::block_info::BlockInfo; use crate::data_contract::accessors::v0::DataContractV0Getters; +use crate::data_contract::associated_token::token_configuration_item::TokenConfigurationChangeItem; use crate::data_contract::document_type::DocumentTypeRef; use crate::document::{Document, DocumentV0}; use crate::prelude::{ @@ -10,6 +11,7 @@ use crate::prelude::{ use bincode::{Decode, Encode}; use platform_serialization_derive::{PlatformDeserialize, PlatformSerialize}; use platform_value::Identifier; +use platform_version::version::PlatformVersion; use std::collections::BTreeMap; pub type TokenEventPublicNote = Option; @@ -19,6 +21,7 @@ pub type TokenEventPersonalEncryptedNote = Option<( DerivationEncryptionKeyIndex, Vec, )>; +use crate::serialization::PlatformSerializableWithPlatformVersion; use crate::tokens::emergency_action::TokenEmergencyAction; use crate::ProtocolError; @@ -43,6 +46,7 @@ pub enum TokenEvent { TokenAmount, ), EmergencyAction(TokenEmergencyAction, TokenEventPublicNote), + ConfigUpdate(TokenConfigurationChangeItem, TokenEventPublicNote), } impl TokenEvent { @@ -55,6 +59,7 @@ impl TokenEvent { TokenEvent::DestroyFrozenFunds(_, _, _) => "destroyFrozenFunds", TokenEvent::Transfer(_, _, _, _, _) => "transfer", TokenEvent::EmergencyAction(_, _) => "emergencyAction", + TokenEvent::ConfigUpdate(_, _) => "configUpdate", } } @@ -72,6 +77,7 @@ impl TokenEvent { owner_id: Identifier, owner_nonce: IdentityNonce, block_info: &BlockInfo, + platform_version: &PlatformVersion, ) -> Result { let document_id = Document::generate_document_id_v0( &token_history_contract.id(), @@ -181,6 +187,25 @@ impl TokenEvent { } properties } + TokenEvent::ConfigUpdate(configuration_change_item, public_note) => { + let mut properties = BTreeMap::from([ + ("tokenId".to_string(), token_id.into()), + ( + "changeItemType".to_string(), + configuration_change_item.u8_item_index().into(), + ), + ( + "changeItem".to_string(), + configuration_change_item + .serialize_consume_to_bytes_with_platform_version(platform_version)? + .into(), + ), + ]); + if let Some(note) = public_note { + properties.insert("note".to_string(), note.into()); + } + properties + } }; let document: Document = DocumentV0 { diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/mod.rs similarity index 91% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/mod.rs index 56c8458ced..f238dd8633 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/mod.rs @@ -8,9 +8,9 @@ use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::document_create_transition_action::state_v0::DocumentCreateTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::document_create_transition_action::state_v1::DocumentCreateTransitionActionStateValidationV1; -use crate::execution::validation::state_transition::batch::action_validation::document_create_transition_action::structure_v0::DocumentCreateTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document::document_create_transition_action::state_v0::DocumentCreateTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document::document_create_transition_action::state_v1::DocumentCreateTransitionActionStateValidationV1; +use crate::execution::validation::state_transition::batch::action_validation::document::document_create_transition_action::structure_v0::DocumentCreateTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/state_v0/mod.rs similarity index 98% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/state_v0/mod.rs index aa752dc2fd..5b016084d4 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/state_v0/mod.rs @@ -23,7 +23,7 @@ use crate::execution::validation::state_transition::batch::state::v0::fetch_cont use crate::execution::validation::state_transition::batch::state::v0::fetch_documents::fetch_document_with_id; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait DocumentCreateTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentCreateTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/state_v1/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/state_v1/mod.rs similarity index 98% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/state_v1/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/state_v1/mod.rs index 14cb413f30..6bde962b05 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/state_v1/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/state_v1/mod.rs @@ -25,7 +25,7 @@ use crate::execution::validation::state_transition::batch::state::v0::fetch_cont use crate::execution::validation::state_transition::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 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentCreateTransitionActionStateValidationV1 { fn validate_state_v1( &self, platform: &PlatformStateRef, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/structure_v0/mod.rs similarity index 97% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/structure_v0/mod.rs index 49b71dc021..d3c0d57b7d 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_create_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_create_transition_action/structure_v0/mod.rs @@ -14,7 +14,7 @@ use drive::state_transition_action::batch::batched_transition::document_transiti use dpp::version::PlatformVersion; use crate::error::Error; -pub(super) trait DocumentCreateTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentCreateTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, owner_id: Identifier, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_delete_transition_action/mod.rs similarity index 92% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_delete_transition_action/mod.rs index a3b7196204..4bc007486b 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_delete_transition_action/mod.rs @@ -7,8 +7,8 @@ use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::document_delete_transition_action::state_v0::DocumentDeleteTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::document_delete_transition_action::structure_v0::DocumentDeleteTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document::document_delete_transition_action::state_v0::DocumentDeleteTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document::document_delete_transition_action::structure_v0::DocumentDeleteTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_delete_transition_action/state_v0/mod.rs similarity index 96% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_delete_transition_action/state_v0/mod.rs index 6ccb56aa5b..bd96ae4727 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_delete_transition_action/state_v0/mod.rs @@ -20,7 +20,7 @@ use crate::execution::types::state_transition_execution_context::{StateTransitio use crate::execution::validation::state_transition::batch::state::v0::fetch_documents::fetch_document_with_id; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait DocumentDeleteTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentDeleteTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_delete_transition_action/structure_v0/mod.rs similarity index 92% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_delete_transition_action/structure_v0/mod.rs index 347e495894..0a9cbfe892 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_delete_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_delete_transition_action/structure_v0/mod.rs @@ -8,7 +8,7 @@ use drive::state_transition_action::batch::batched_transition::document_transiti use crate::error::Error; -pub(super) trait DocumentDeleteTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentDeleteTransitionActionStructureValidationV0 { fn validate_structure_v0(&self) -> Result; } impl DocumentDeleteTransitionActionStructureValidationV0 for DocumentDeleteTransitionAction { diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_purchase_transition_action/mod.rs similarity index 92% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_purchase_transition_action/mod.rs index 8396ba0577..8b37d7ed40 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_purchase_transition_action/mod.rs @@ -8,8 +8,8 @@ use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::document_purchase_transition_action::state_v0::DocumentPurchaseTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::document_purchase_transition_action::structure_v0::DocumentPurchaseTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document::document_purchase_transition_action::state_v0::DocumentPurchaseTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document::document_purchase_transition_action::structure_v0::DocumentPurchaseTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_purchase_transition_action/state_v0/mod.rs similarity index 94% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_purchase_transition_action/state_v0/mod.rs index c5060437b7..9d7b5d884f 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_purchase_transition_action/state_v0/mod.rs @@ -12,7 +12,7 @@ use crate::error::Error; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait DocumentPurchaseTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentPurchaseTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_purchase_transition_action/structure_v0/mod.rs similarity index 94% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_purchase_transition_action/structure_v0/mod.rs index 5a77bd645b..7c65043d3e 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_purchase_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_purchase_transition_action/structure_v0/mod.rs @@ -9,7 +9,7 @@ use drive::state_transition_action::batch::batched_transition::document_transiti use dpp::version::PlatformVersion; use crate::error::Error; -pub(super) trait DocumentPurchaseTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentPurchaseTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_replace_transition_action/mod.rs similarity index 92% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_replace_transition_action/mod.rs index 6392eb6870..6419ff5811 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_replace_transition_action/mod.rs @@ -8,8 +8,8 @@ use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::document_replace_transition_action::state_v0::DocumentReplaceTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::document_replace_transition_action::structure_v0::DocumentReplaceTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document::document_replace_transition_action::state_v0::DocumentReplaceTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document::document_replace_transition_action::structure_v0::DocumentReplaceTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_replace_transition_action/state_v0/mod.rs similarity index 94% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_replace_transition_action/state_v0/mod.rs index 01359fb61e..ef3e33ad72 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_replace_transition_action/state_v0/mod.rs @@ -12,7 +12,7 @@ use crate::error::Error; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait DocumentReplaceTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentReplaceTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_replace_transition_action/structure_v0/mod.rs similarity index 93% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_replace_transition_action/structure_v0/mod.rs index acb8488346..582db214f0 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_replace_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_replace_transition_action/structure_v0/mod.rs @@ -8,7 +8,7 @@ use drive::state_transition_action::batch::batched_transition::document_transiti use dpp::version::PlatformVersion; use crate::error::Error; -pub(super) trait DocumentReplaceTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentReplaceTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_transfer_transition_action/mod.rs similarity index 92% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_transfer_transition_action/mod.rs index 6a517d7140..d5df2e9b98 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_transfer_transition_action/mod.rs @@ -8,8 +8,8 @@ use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::document_transfer_transition_action::state_v0::DocumentTransferTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::document_transfer_transition_action::structure_v0::DocumentTransferTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document::document_transfer_transition_action::state_v0::DocumentTransferTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document::document_transfer_transition_action::structure_v0::DocumentTransferTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_transfer_transition_action/state_v0/mod.rs similarity index 94% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_transfer_transition_action/state_v0/mod.rs index 3a779e1302..51b68d3d3c 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_transfer_transition_action/state_v0/mod.rs @@ -12,7 +12,7 @@ use crate::error::Error; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait DocumentTransferTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentTransferTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_transfer_transition_action/structure_v0/mod.rs similarity index 93% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_transfer_transition_action/structure_v0/mod.rs index a8beba7bae..c8c27c4630 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_transfer_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_transfer_transition_action/structure_v0/mod.rs @@ -7,7 +7,7 @@ use drive::state_transition_action::batch::batched_transition::document_transiti use dpp::version::PlatformVersion; use crate::error::Error; -pub(super) trait DocumentTransferTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentTransferTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_update_price_transition_action/mod.rs similarity index 92% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_update_price_transition_action/mod.rs index b541eb15e1..6b9dcdcfe7 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_update_price_transition_action/mod.rs @@ -8,8 +8,8 @@ use drive::state_transition_action::batch::batched_transition::document_transiti use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::document_update_price_transition_action::state_v0::DocumentUpdatePriceTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::document_update_price_transition_action::structure_v0::DocumentUpdatePriceTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document::document_update_price_transition_action::state_v0::DocumentUpdatePriceTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::document::document_update_price_transition_action::structure_v0::DocumentUpdatePriceTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_update_price_transition_action/state_v0/mod.rs similarity index 94% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_update_price_transition_action/state_v0/mod.rs index 9dc2abd730..62e1ff3cbb 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_update_price_transition_action/state_v0/mod.rs @@ -12,7 +12,7 @@ use crate::error::Error; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait DocumentUpdatePriceTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentUpdatePriceTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_update_price_transition_action/structure_v0/mod.rs similarity index 93% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_update_price_transition_action/structure_v0/mod.rs index 8635df40dd..c595dba491 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document_update_price_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/document_update_price_transition_action/structure_v0/mod.rs @@ -7,7 +7,7 @@ use drive::state_transition_action::batch::batched_transition::document_transiti use dpp::version::PlatformVersion; use crate::error::Error; -pub(super) trait DocumentUpdatePriceTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait DocumentUpdatePriceTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/mod.rs new file mode 100644 index 0000000000..32c28c43fa --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/document/mod.rs @@ -0,0 +1,6 @@ +pub(crate) mod document_create_transition_action; +pub(crate) mod document_delete_transition_action; +pub(crate) mod document_purchase_transition_action; +pub(crate) mod document_replace_transition_action; +pub(crate) mod document_transfer_transition_action; +pub(crate) mod document_update_price_transition_action; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/mod.rs index f9872eec43..7a2f9c5eb0 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/mod.rs @@ -1,14 +1,2 @@ -pub(crate) mod document_create_transition_action; -pub(crate) mod document_delete_transition_action; -pub(crate) mod document_purchase_transition_action; -pub(crate) mod document_replace_transition_action; -pub(crate) mod document_transfer_transition_action; -pub(crate) mod document_update_price_transition_action; -pub(crate) mod token_base_transition_action; -pub(crate) mod token_burn_transition_action; -pub(crate) mod token_destroy_frozen_funds_transition_action; -pub(crate) mod token_emergency_action_transition_action; -pub(crate) mod token_freeze_transition_action; -pub(crate) mod token_mint_transition_action; -pub(crate) mod token_transfer_transition_action; -pub(crate) mod token_unfreeze_transition_action; +pub(crate) mod document; +pub(crate) mod token; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/mod.rs new file mode 100644 index 0000000000..7060861681 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/mod.rs @@ -0,0 +1,9 @@ +pub(crate) mod token_base_transition_action; +pub(crate) mod token_burn_transition_action; +pub(crate) mod token_config_update_transition_action; +pub(crate) mod token_destroy_frozen_funds_transition_action; +pub(crate) mod token_emergency_action_transition_action; +pub(crate) mod token_freeze_transition_action; +pub(crate) mod token_mint_transition_action; +pub(crate) mod token_transfer_transition_action; +pub(crate) mod token_unfreeze_transition_action; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_base_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_base_transition_action/mod.rs new file mode 100644 index 0000000000..3ee470eb30 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_base_transition_action/mod.rs @@ -0,0 +1,138 @@ +use std::collections::BTreeMap; +use dpp::block::block_info::BlockInfo; +use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; +use dpp::data_contract::change_control_rules::ChangeControlRules; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::identifier::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; +use dpp::version::PlatformVersion; +use drive::grovedb::TransactionArg; +use crate::error::Error; +use crate::error::execution::ExecutionError; +use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::state_v0::TokenBaseTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::structure_v0::TokenBaseTransitionActionStructureValidationV0; +use crate::platform_types::platform::PlatformStateRef; + +mod state_v0; +mod structure_v0; + +pub trait TokenBaseTransitionActionValidation { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result; + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; + + fn validate_group_action( + &self, + rules: &ChangeControlRules, + owner_id: Identifier, + contract_owner_id: Identifier, + main_control_group: Option, + groups: &BTreeMap, + action_type_string: String, + token_configuration: &TokenConfiguration, + platform_version: &PlatformVersion, + ) -> Result; +} + +impl TokenBaseTransitionActionValidation for TokenBaseTransitionAction { + fn validate_structure( + &self, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_base_transition_structure_validation + { + 0 => self.validate_structure_v0(platform_version), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenBaseTransitionAction::validate_structure".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + fn validate_state( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_base_transition_state_validation + { + 0 => self.validate_state_v0( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + ), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenBaseTransitionAction::validate_state".to_string(), + known_versions: vec![0], + received: version, + })), + } + } + + fn validate_group_action( + &self, + rules: &ChangeControlRules, + owner_id: Identifier, + contract_owner_id: Identifier, + main_control_group: Option, + groups: &BTreeMap, + action_type_string: String, + token_configuration: &TokenConfiguration, + platform_version: &PlatformVersion, + ) -> Result { + match platform_version + .drive_abci + .validation_and_processing + .state_transitions + .batch_state_transition + .token_base_transition_group_action_validation + { + 0 => self.validate_group_action_v0( + rules, + owner_id, + contract_owner_id, + main_control_group, + groups, + action_type_string, + token_configuration, + ), + version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { + method: "TokenBaseTransitionAction::validate_group_action".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_base_transition_action/state_v0/mod.rs similarity index 61% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_base_transition_action/state_v0/mod.rs index 7653477deb..ae145aeefd 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_base_transition_action/state_v0/mod.rs @@ -1,26 +1,27 @@ +use std::collections::BTreeMap; use dpp::block::block_info::BlockInfo; use dpp::consensus::ConsensusError; -use dpp::consensus::state::identity::RecipientIdentityDoesNotExistError; +use dpp::consensus::state::group::GroupActionAlreadySignedByIdentityError; use dpp::consensus::state::state_error::StateError; use dpp::consensus::state::token::UnauthorizedTokenActionError; -use dpp::data_contract::accessors::v0::DataContractV0Getters; -use dpp::data_contract::accessors::v1::DataContractV1Getters; use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; use dpp::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; -use dpp::multi_identity_events::ActionTaker; +use dpp::data_contract::change_control_rules::ChangeControlRules; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::group::action_taker::{ActionGoal, ActionTaker}; use dpp::prelude::Identifier; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::{TokenMintTransitionAction, TokenMintTransitionActionAccessorsV0}; +use drive::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use drive::query::TransactionArg; -use drive::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; use crate::error::Error; -use crate::execution::types::execution_operation::{RetrieveIdentityInfo, ValidationOperation}; +use crate::execution::types::execution_operation::ValidationOperation; use crate::execution::types::state_transition_execution_context::{StateTransitionExecutionContext, StateTransitionExecutionContextMethodsV0}; -use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait TokenMintTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenBaseTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, @@ -30,8 +31,19 @@ pub(super) trait TokenMintTransitionActionStateValidationV0 { transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result; + + fn validate_group_action_v0( + &self, + rules: &ChangeControlRules, + owner_id: Identifier, + contract_owner_id: Identifier, + main_control_group: Option, + groups: &BTreeMap, + action_type_string: String, + token_configuration: &TokenConfiguration, + ) -> Result; } -impl TokenMintTransitionActionStateValidationV0 for TokenMintTransitionAction { +impl TokenBaseTransitionActionStateValidationV0 for TokenBaseTransitionAction { fn validate_state_v0( &self, platform: &PlatformStateRef, @@ -41,28 +53,50 @@ impl TokenMintTransitionActionStateValidationV0 for TokenMintTransitionAction { transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result { - let validation_result = self.base().validate_state( - platform, - owner_id, - block_info, - execution_context, - transaction, - platform_version, - )?; - if !validation_result.is_valid() { - return Ok(validation_result); + // We should start by validating that if we did not yet sign + if let Some(group_state_transition_resolved_info) = self.store_in_group() { + let (already_signed, cost) = platform.drive.fetch_action_id_has_signer_with_costs( + self.data_contract_id(), + group_state_transition_resolved_info.group_contract_position, + group_state_transition_resolved_info.action_id, + owner_id, + block_info, + transaction, + platform_version, + )?; + execution_context.add_operation(ValidationOperation::PrecalculatedOperation(cost)); + if already_signed { + // We already have signed this state transition group action + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError( + StateError::GroupActionAlreadySignedByIdentityError( + GroupActionAlreadySignedByIdentityError::new( + owner_id, + self.data_contract_id(), + group_state_transition_resolved_info.group_contract_position, + group_state_transition_resolved_info.action_id, + ), + ), + ), + )); + } } - // Let's first check to see if we are authorized to perform this action - let contract = &self.data_contract_fetch_info_ref().contract; - let token_configuration = contract.expected_token_configuration(self.token_position())?; - let rules = token_configuration.manual_minting_rules(); - let main_control_group = token_configuration - .main_control_group() - .map(|position| contract.expected_group(position)) - .transpose()?; + Ok(SimpleConsensusValidationResult::new()) + } - if let Some(resolved_group_info) = self.base().store_in_group() { + fn validate_group_action_v0( + &self, + rules: &ChangeControlRules, + owner_id: Identifier, + contract_owner_id: Identifier, + main_control_group: Option, + groups: &BTreeMap, + action_type_string: String, + token_configuration: &TokenConfiguration, + ) -> Result { + // We should start by validating that if we did not yet sign + if let Some(resolved_group_info) = self.store_in_group() { // We are trying to do a group action // We have already checked when converting into an action that we are a member of the Group // Now we need to just check that the group is the actual group set by the contract @@ -73,7 +107,7 @@ impl TokenMintTransitionActionStateValidationV0 for TokenMintTransitionAction { UnauthorizedTokenActionError::new( self.token_id(), owner_id, - "mint".to_string(), + action_type_string, rules.authorized_to_make_change_action_takers().clone(), ), )), @@ -92,7 +126,7 @@ impl TokenMintTransitionActionStateValidationV0 for TokenMintTransitionAction { UnauthorizedTokenActionError::new( self.token_id(), owner_id, - "mint".to_string(), + action_type_string, rules.authorized_to_make_change_action_takers().clone(), ), ), @@ -108,7 +142,7 @@ impl TokenMintTransitionActionStateValidationV0 for TokenMintTransitionAction { UnauthorizedTokenActionError::new( self.token_id(), owner_id, - "mint".to_string(), + action_type_string, rules.authorized_to_make_change_action_takers().clone(), ), )), @@ -118,17 +152,18 @@ impl TokenMintTransitionActionStateValidationV0 for TokenMintTransitionAction { } } else { if !rules.can_make_change( - &contract.owner_id(), + &contract_owner_id, main_control_group, - contract.groups(), + groups, &ActionTaker::SingleIdentity(owner_id), + ActionGoal::ActionCompletion, ) { return Ok(SimpleConsensusValidationResult::new_with_error( ConsensusError::StateError(StateError::UnauthorizedTokenActionError( UnauthorizedTokenActionError::new( self.token_id(), owner_id, - "mint".to_string(), + action_type_string, rules.authorized_to_make_change_action_takers().clone(), ), )), @@ -136,31 +171,6 @@ impl TokenMintTransitionActionStateValidationV0 for TokenMintTransitionAction { } } - // todo verify that minting would not break max supply - - // We need to verify that the receiver is a valid identity - - let recipient = self.identity_balance_holder_id(); - if recipient != owner_id { - // We have already checked that this user exists if the recipient is the owner id - let balance = platform.drive.fetch_identity_balance( - recipient.to_buffer(), - transaction, - platform_version, - )?; - execution_context.add_operation(ValidationOperation::RetrieveIdentity( - RetrieveIdentityInfo::only_balance(), - )); - if balance.is_none() { - // The identity does not exist - return Ok(SimpleConsensusValidationResult::new_with_error( - ConsensusError::StateError(StateError::RecipientIdentityDoesNotExistError( - RecipientIdentityDoesNotExistError::new(recipient), - )), - )); - } - } - Ok(SimpleConsensusValidationResult::new()) } } diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_base_transition_action/structure_v0/mod.rs similarity index 93% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_base_transition_action/structure_v0/mod.rs index 034d208c51..3fb19707d4 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_base_transition_action/structure_v0/mod.rs @@ -8,7 +8,7 @@ use drive::state_transition_action::batch::batched_transition::token_transition: use dpp::version::PlatformVersion; use crate::error::Error; -pub(super) trait TokenBaseTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenBaseTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_burn_transition_action/mod.rs similarity index 93% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_burn_transition_action/mod.rs index 0ed8bdfb4d..e92feab605 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_burn_transition_action/mod.rs @@ -7,8 +7,8 @@ use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::token_burn_transition_action::state_v0::TokenBurnTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::token_burn_transition_action::structure_v0::TokenBurnTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_burn_transition_action::state_v0::TokenBurnTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_burn_transition_action::structure_v0::TokenBurnTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_burn_transition_action/state_v0/mod.rs similarity index 79% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_burn_transition_action/state_v0/mod.rs index 85ad0983ef..ae67c64bdf 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_burn_transition_action/state_v0/mod.rs @@ -5,19 +5,21 @@ use dpp::consensus::state::token::{IdentityDoesNotHaveEnoughTokenBalanceError, U use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::accessors::v1::DataContractV1Getters; use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; -use dpp::multi_identity_events::ActionTaker; +use dpp::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; +use dpp::group::action_taker::{ActionGoal, ActionTaker}; use dpp::prelude::Identifier; use dpp::validation::SimpleConsensusValidationResult; use drive::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::{TokenBurnTransitionAction, TokenBurnTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use drive::query::TransactionArg; +use drive::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; 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::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait TokenBurnTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenBurnTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, @@ -54,27 +56,20 @@ impl TokenBurnTransitionActionStateValidationV0 for TokenBurnTransitionAction { let contract = &self.data_contract_fetch_info_ref().contract; let token_configuration = contract.expected_token_configuration(self.token_position())?; let rules = token_configuration.manual_burning_rules(); - let main_control_group = token_configuration - .main_control_group() - .map(|position| contract.expected_group(position)) - .transpose()?; - if !rules.can_make_change( - &contract.owner_id(), + let main_control_group = token_configuration.main_control_group(); + let validation_result = self.base().validate_group_action( + rules, + owner_id, + contract.owner_id(), main_control_group, contract.groups(), - &ActionTaker::SingleIdentity(owner_id), - ) { - return Ok(SimpleConsensusValidationResult::new_with_error( - ConsensusError::StateError(StateError::UnauthorizedTokenActionError( - UnauthorizedTokenActionError::new( - self.token_id(), - owner_id, - "burn".to_string(), - rules.authorized_to_make_change_action_takers().clone(), - ), - )), - )); + "burn".to_string(), + token_configuration, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); } // We need to verify that we have enough of the token diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_burn_transition_action/structure_v0/mod.rs similarity index 80% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_burn_transition_action/structure_v0/mod.rs index 3529a60558..440d14ec86 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_burn_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_burn_transition_action/structure_v0/mod.rs @@ -2,9 +2,9 @@ use dpp::validation::{SimpleConsensusValidationResult}; use drive::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::{TokenBurnTransitionAction, TokenBurnTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::Error; -use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; -pub(super) trait TokenBurnTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenBurnTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/mod.rs similarity index 76% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/mod.rs index ed77bb370d..8dc9777366 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/mod.rs @@ -1,20 +1,20 @@ use dpp::block::block_info::BlockInfo; use dpp::identifier::Identifier; use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::token_config_update_transition_action::TokenConfigUpdateTransitionAction; use dpp::version::PlatformVersion; use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::state_v0::TokenBaseTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::structure_v0::TokenBaseTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_config_update_transition_action::state_v0::TokenConfigUpdateTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_config_update_transition_action::structure_v0::TokenConfigUpdateTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; mod structure_v0; -pub trait TokenBaseTransitionActionValidation { +pub trait TokenConfigUpdateTransitionActionValidation { fn validate_structure( &self, platform_version: &PlatformVersion, @@ -31,7 +31,7 @@ pub trait TokenBaseTransitionActionValidation { ) -> Result; } -impl TokenBaseTransitionActionValidation for TokenBaseTransitionAction { +impl TokenConfigUpdateTransitionActionValidation for TokenConfigUpdateTransitionAction { fn validate_structure( &self, platform_version: &PlatformVersion, @@ -41,11 +41,11 @@ impl TokenBaseTransitionActionValidation for TokenBaseTransitionAction { .validation_and_processing .state_transitions .batch_state_transition - .token_base_transition_structure_validation + .token_config_update_transition_structure_validation { 0 => self.validate_structure_v0(platform_version), version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { - method: "TokenBaseTransitionAction::validate_structure".to_string(), + method: "TokenConfigUpdateTransitionAction::validate_structure".to_string(), known_versions: vec![0], received: version, })), @@ -66,7 +66,7 @@ impl TokenBaseTransitionActionValidation for TokenBaseTransitionAction { .validation_and_processing .state_transitions .batch_state_transition - .token_base_transition_structure_validation + .token_config_update_transition_state_validation { 0 => self.validate_state_v0( platform, @@ -77,7 +77,7 @@ impl TokenBaseTransitionActionValidation for TokenBaseTransitionAction { platform_version, ), version => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { - method: "TokenBaseTransitionAction::validate_state".to_string(), + method: "TokenConfigUpdateTransitionAction::validate_state".to_string(), known_versions: vec![0], received: version, })), diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/state_v0/mod.rs new file mode 100644 index 0000000000..c4aec5e98f --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/state_v0/mod.rs @@ -0,0 +1,81 @@ +use dpp::block::block_info::BlockInfo; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::state_error::StateError; +use dpp::consensus::state::token::UnauthorizedTokenActionError; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::group::action_taker::{ActionGoal, ActionTaker}; +use dpp::prelude::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_config_update_transition_action::{TokenConfigUpdateTransitionAction, TokenConfigUpdateTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use drive::query::TransactionArg; +use crate::error::Error; +use crate::execution::types::state_transition_execution_context::{StateTransitionExecutionContext}; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::platform_types::platform::PlatformStateRef; + +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenConfigUpdateTransitionActionStateValidationV0 { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenConfigUpdateTransitionActionStateValidationV0 for TokenConfigUpdateTransitionAction { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + // Let's first check to see if we are authorized to perform this action + let contract = &self.data_contract_fetch_info_ref().contract; + let token_configuration = contract.expected_token_configuration(self.token_position())?; + let main_control_group = token_configuration.main_control_group(); + + if !token_configuration.can_apply_token_configuration_item( + self.update_token_configuration_item(), + &contract.owner_id(), + main_control_group, + contract.groups(), + &ActionTaker::SingleIdentity(owner_id), + ActionGoal::ActionParticipation, + ) { + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::UnauthorizedTokenActionError( + UnauthorizedTokenActionError::new( + self.token_id(), + owner_id, + "config_update".to_string(), + token_configuration.authorized_action_takers_for_configuration_item( + self.update_token_configuration_item(), + ), + ), + )), + )); + } + + Ok(SimpleConsensusValidationResult::new()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/structure_v0/mod.rs new file mode 100644 index 0000000000..604c50480b --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_config_update_transition_action/structure_v0/mod.rs @@ -0,0 +1,25 @@ +use dpp::validation::{SimpleConsensusValidationResult}; +use drive::state_transition_action::batch::batched_transition::token_transition::token_config_update_transition_action::{TokenConfigUpdateTransitionAction, TokenConfigUpdateTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use crate::error::Error; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; + +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenConfigUpdateTransitionActionStructureValidationV0 { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenConfigUpdateTransitionActionStructureValidationV0 for TokenConfigUpdateTransitionAction { + fn validate_structure_v0( + &self, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_structure(platform_version)?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + Ok(SimpleConsensusValidationResult::default()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_destroy_frozen_funds_transition_action/mod.rs similarity index 92% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_destroy_frozen_funds_transition_action/mod.rs index 9b8428f51d..513913539b 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_destroy_frozen_funds_transition_action/mod.rs @@ -7,8 +7,8 @@ use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::token_destroy_frozen_funds_transition_action::state_v0::TokenDestroyFrozenFundsTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::token_destroy_frozen_funds_transition_action::structure_v0::TokenDestroyFrozenFundsTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_destroy_frozen_funds_transition_action::state_v0::TokenDestroyFrozenFundsTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_destroy_frozen_funds_transition_action::structure_v0::TokenDestroyFrozenFundsTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_destroy_frozen_funds_transition_action/state_v0/mod.rs similarity index 79% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_destroy_frozen_funds_transition_action/state_v0/mod.rs index 99bf2b350c..b37bfab734 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_destroy_frozen_funds_transition_action/state_v0/mod.rs @@ -5,7 +5,7 @@ use dpp::consensus::state::token::{IdentityTokenAccountNotFrozenError, Unauthori use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::accessors::v1::DataContractV1Getters; use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; -use dpp::multi_identity_events::ActionTaker; +use dpp::group::action_taker::{ActionGoal, ActionTaker}; use dpp::prelude::Identifier; use dpp::tokens::info::v0::IdentityTokenInfoV0Accessors; use dpp::validation::SimpleConsensusValidationResult; @@ -15,10 +15,10 @@ 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::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait TokenDestroyFrozenFundsTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenDestroyFrozenFundsTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, @@ -81,27 +81,19 @@ impl TokenDestroyFrozenFundsTransitionActionStateValidationV0 let contract = &self.data_contract_fetch_info_ref().contract; let token_configuration = contract.expected_token_configuration(self.token_position())?; let rules = token_configuration.destroy_frozen_funds_rules(); - let main_control_group = token_configuration - .main_control_group() - .map(|position| contract.expected_group(position)) - .transpose()?; - - if !rules.can_make_change( - &contract.owner_id(), + let main_control_group = token_configuration.main_control_group(); + let validation_result = self.base().validate_group_action( + rules, + owner_id, + contract.owner_id(), main_control_group, contract.groups(), - &ActionTaker::SingleIdentity(owner_id), - ) { - return Ok(SimpleConsensusValidationResult::new_with_error( - ConsensusError::StateError(StateError::UnauthorizedTokenActionError( - UnauthorizedTokenActionError::new( - self.token_id(), - owner_id, - "destroy_frozen_funds".to_string(), - rules.authorized_to_make_change_action_takers().clone(), - ), - )), - )); + "destroy frozen funds".to_string(), + token_configuration, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); } Ok(SimpleConsensusValidationResult::new()) diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_destroy_frozen_funds_transition_action/structure_v0/mod.rs similarity index 80% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_destroy_frozen_funds_transition_action/structure_v0/mod.rs index 2f0c22d417..3553718572 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_destroy_frozen_funds_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_destroy_frozen_funds_transition_action/structure_v0/mod.rs @@ -2,9 +2,9 @@ use dpp::validation::{SimpleConsensusValidationResult}; use drive::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::{TokenDestroyFrozenFundsTransitionAction, TokenDestroyFrozenFundsTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::Error; -use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; -pub(super) trait TokenDestroyFrozenFundsTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenDestroyFrozenFundsTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_emergency_action_transition_action/mod.rs similarity index 92% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_emergency_action_transition_action/mod.rs index a78f9e9537..074b2f59f1 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_emergency_action_transition_action/mod.rs @@ -7,8 +7,8 @@ use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::token_emergency_action_transition_action::state_v0::TokenEmergencyActionTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::token_emergency_action_transition_action::structure_v0::TokenEmergencyActionTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_emergency_action_transition_action::state_v0::TokenEmergencyActionTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_emergency_action_transition_action::structure_v0::TokenEmergencyActionTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_emergency_action_transition_action/state_v0/mod.rs similarity index 72% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_emergency_action_transition_action/state_v0/mod.rs index c5ea53f9b0..928e9f092b 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_emergency_action_transition_action/state_v0/mod.rs @@ -5,7 +5,7 @@ use dpp::consensus::state::token::UnauthorizedTokenActionError; use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::accessors::v1::DataContractV1Getters; use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; -use dpp::multi_identity_events::ActionTaker; +use dpp::group::action_taker::{ActionGoal, ActionTaker}; use dpp::prelude::Identifier; use dpp::validation::SimpleConsensusValidationResult; use drive::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::{TokenEmergencyActionTransitionAction, TokenEmergencyActionTransitionActionAccessorsV0}; @@ -13,10 +13,10 @@ use dpp::version::PlatformVersion; use drive::query::TransactionArg; use crate::error::Error; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait TokenEmergencyActionTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenEmergencyActionTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, @@ -55,27 +55,19 @@ impl TokenEmergencyActionTransitionActionStateValidationV0 let contract = &self.data_contract_fetch_info_ref().contract; let token_configuration = contract.expected_token_configuration(self.token_position())?; let rules = token_configuration.emergency_action_rules(); - let main_control_group = token_configuration - .main_control_group() - .map(|position| contract.expected_group(position)) - .transpose()?; - - if !rules.can_make_change( - &contract.owner_id(), + let main_control_group = token_configuration.main_control_group(); + let validation_result = self.base().validate_group_action( + rules, + owner_id, + contract.owner_id(), main_control_group, contract.groups(), - &ActionTaker::SingleIdentity(owner_id), - ) { - return Ok(SimpleConsensusValidationResult::new_with_error( - ConsensusError::StateError(StateError::UnauthorizedTokenActionError( - UnauthorizedTokenActionError::new( - self.token_id(), - owner_id, - "emergency_action".to_string(), - rules.authorized_to_make_change_action_takers().clone(), - ), - )), - )); + "emergency action".to_string(), + token_configuration, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); } Ok(SimpleConsensusValidationResult::new()) diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_emergency_action_transition_action/structure_v0/mod.rs similarity index 80% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_emergency_action_transition_action/structure_v0/mod.rs index cc4f6b8d25..e89432925e 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_emergency_action_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_emergency_action_transition_action/structure_v0/mod.rs @@ -2,9 +2,9 @@ use dpp::validation::{SimpleConsensusValidationResult}; use drive::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::{TokenEmergencyActionTransitionAction, TokenEmergencyActionTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::Error; -use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; -pub(super) trait TokenEmergencyActionTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenEmergencyActionTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_freeze_transition_action/mod.rs similarity index 93% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_freeze_transition_action/mod.rs index 47777b8d73..a832de4810 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_freeze_transition_action/mod.rs @@ -7,8 +7,8 @@ use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::token_freeze_transition_action::state_v0::TokenFreezeTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::token_freeze_transition_action::structure_v0::TokenFreezeTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_freeze_transition_action::state_v0::TokenFreezeTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_freeze_transition_action::structure_v0::TokenFreezeTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_freeze_transition_action/state_v0/mod.rs similarity index 72% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_freeze_transition_action/state_v0/mod.rs index 507f02c281..69333fa12d 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_freeze_transition_action/state_v0/mod.rs @@ -5,7 +5,7 @@ use dpp::consensus::state::token::UnauthorizedTokenActionError; use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::accessors::v1::DataContractV1Getters; use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; -use dpp::multi_identity_events::ActionTaker; +use dpp::group::action_taker::{ActionGoal, ActionTaker}; use dpp::prelude::Identifier; use dpp::validation::SimpleConsensusValidationResult; use drive::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::{TokenFreezeTransitionAction, TokenFreezeTransitionActionAccessorsV0}; @@ -13,10 +13,10 @@ use dpp::version::PlatformVersion; use drive::query::TransactionArg; use crate::error::Error; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait TokenFreezeTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenFreezeTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, @@ -53,27 +53,19 @@ impl TokenFreezeTransitionActionStateValidationV0 for TokenFreezeTransitionActio let contract = &self.data_contract_fetch_info_ref().contract; let token_configuration = contract.expected_token_configuration(self.token_position())?; let rules = token_configuration.freeze_rules(); - let main_control_group = token_configuration - .main_control_group() - .map(|position| contract.expected_group(position)) - .transpose()?; - - if !rules.can_make_change( - &contract.owner_id(), + let main_control_group = token_configuration.main_control_group(); + let validation_result = self.base().validate_group_action( + rules, + owner_id, + contract.owner_id(), main_control_group, contract.groups(), - &ActionTaker::SingleIdentity(owner_id), - ) { - return Ok(SimpleConsensusValidationResult::new_with_error( - ConsensusError::StateError(StateError::UnauthorizedTokenActionError( - UnauthorizedTokenActionError::new( - self.token_id(), - owner_id, - "freeze".to_string(), - rules.authorized_to_make_change_action_takers().clone(), - ), - )), - )); + "freeze".to_string(), + token_configuration, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); } Ok(SimpleConsensusValidationResult::new()) diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_freeze_transition_action/structure_v0/mod.rs similarity index 80% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_freeze_transition_action/structure_v0/mod.rs index 8b754e60e7..d2c641554c 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_freeze_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_freeze_transition_action/structure_v0/mod.rs @@ -2,9 +2,9 @@ use dpp::validation::{SimpleConsensusValidationResult}; use drive::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::{TokenFreezeTransitionAction, TokenFreezeTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::Error; -use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; -pub(super) trait TokenFreezeTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenFreezeTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/mod.rs similarity index 93% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/mod.rs index f8cd83b7a6..56c8d556a7 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/mod.rs @@ -7,8 +7,8 @@ use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::token_mint_transition_action::state_v0::TokenMintTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::token_mint_transition_action::structure_v0::TokenMintTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_mint_transition_action::state_v0::TokenMintTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_mint_transition_action::structure_v0::TokenMintTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/state_v0/mod.rs new file mode 100644 index 0000000000..eba4356e11 --- /dev/null +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/state_v0/mod.rs @@ -0,0 +1,102 @@ +use dpp::block::block_info::BlockInfo; +use dpp::consensus::ConsensusError; +use dpp::consensus::state::identity::RecipientIdentityDoesNotExistError; +use dpp::consensus::state::state_error::StateError; +use dpp::consensus::state::token::UnauthorizedTokenActionError; +use dpp::data_contract::accessors::v0::DataContractV0Getters; +use dpp::data_contract::accessors::v1::DataContractV1Getters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; +use dpp::group::action_taker::{ActionGoal, ActionTaker}; +use dpp::prelude::Identifier; +use dpp::validation::SimpleConsensusValidationResult; +use drive::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::{TokenMintTransitionAction, TokenMintTransitionActionAccessorsV0}; +use dpp::version::PlatformVersion; +use drive::query::TransactionArg; +use drive::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; +use crate::error::Error; +use crate::execution::types::execution_operation::{RetrieveIdentityInfo, ValidationOperation}; +use crate::execution::types::state_transition_execution_context::{StateTransitionExecutionContext, StateTransitionExecutionContextMethodsV0}; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::platform_types::platform::PlatformStateRef; + +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenMintTransitionActionStateValidationV0 { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result; +} +impl TokenMintTransitionActionStateValidationV0 for TokenMintTransitionAction { + fn validate_state_v0( + &self, + platform: &PlatformStateRef, + owner_id: Identifier, + block_info: &BlockInfo, + execution_context: &mut StateTransitionExecutionContext, + transaction: TransactionArg, + platform_version: &PlatformVersion, + ) -> Result { + let validation_result = self.base().validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + // Let's first check to see if we are authorized to perform this action + let contract = &self.data_contract_fetch_info_ref().contract; + let token_configuration = contract.expected_token_configuration(self.token_position())?; + let rules = token_configuration.manual_minting_rules(); + let main_control_group = token_configuration.main_control_group(); + let validation_result = self.base().validate_group_action( + rules, + owner_id, + contract.owner_id(), + main_control_group, + contract.groups(), + "mint".to_string(), + token_configuration, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); + } + + // todo verify that minting would not break max supply + + // We need to verify that the receiver is a valid identity + + let recipient = self.identity_balance_holder_id(); + if recipient != owner_id { + // We have already checked that this user exists if the recipient is the owner id + let balance = platform.drive.fetch_identity_balance( + recipient.to_buffer(), + transaction, + platform_version, + )?; + execution_context.add_operation(ValidationOperation::RetrieveIdentity( + RetrieveIdentityInfo::only_balance(), + )); + if balance.is_none() { + // The identity does not exist + return Ok(SimpleConsensusValidationResult::new_with_error( + ConsensusError::StateError(StateError::RecipientIdentityDoesNotExistError( + RecipientIdentityDoesNotExistError::new(recipient), + )), + )); + } + } + + Ok(SimpleConsensusValidationResult::new()) + } +} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/structure_v0/mod.rs similarity index 80% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/structure_v0/mod.rs index 33648a7e26..7eb4aab96d 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_mint_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_mint_transition_action/structure_v0/mod.rs @@ -2,9 +2,9 @@ use dpp::validation::{SimpleConsensusValidationResult}; use drive::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::{TokenMintTransitionAction, TokenMintTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::Error; -use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; -pub(super) trait TokenMintTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenMintTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/mod.rs similarity index 93% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/mod.rs index 2d9754412f..924b4b80a2 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/mod.rs @@ -7,8 +7,8 @@ use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::token_transfer_transition_action::state_v0::TokenTransferTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::token_transfer_transition_action::structure_v0::TokenTransferTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_transfer_transition_action::state_v0::TokenTransferTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_transfer_transition_action::structure_v0::TokenTransferTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/state_v0/mod.rs similarity index 94% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/state_v0/mod.rs index 04336501c9..a40b0f3040 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/state_v0/mod.rs @@ -12,10 +12,10 @@ use drive::state_transition_action::batch::batched_transition::token_transition: 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::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait TokenTransferTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenTransferTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/structure_v0/mod.rs similarity index 83% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/structure_v0/mod.rs index 92747e6d4f..2b0fc92e20 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_transfer_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_transfer_transition_action/structure_v0/mod.rs @@ -4,9 +4,9 @@ use drive::state_transition_action::batch::batched_transition::token_transition: use dpp::version::PlatformVersion; use drive::state_transition_action::batch::batched_transition::token_transition::token_transfer_transition_action::v0::TokenTransferTransitionActionAccessorsV0; use crate::error::Error; -use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; -pub(super) trait TokenTransferTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenTransferTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, owner_id: Identifier, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_unfreeze_transition_action/mod.rs similarity index 93% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_unfreeze_transition_action/mod.rs index 0cb5f563fc..293906e3f0 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_unfreeze_transition_action/mod.rs @@ -7,8 +7,8 @@ use drive::grovedb::TransactionArg; use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::token_unfreeze_transition_action::state_v0::TokenUnfreezeTransitionActionStateValidationV0; -use crate::execution::validation::state_transition::batch::action_validation::token_unfreeze_transition_action::structure_v0::TokenUnfreezeTransitionActionStructureValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_unfreeze_transition_action::state_v0::TokenUnfreezeTransitionActionStateValidationV0; +use crate::execution::validation::state_transition::batch::action_validation::token::token_unfreeze_transition_action::structure_v0::TokenUnfreezeTransitionActionStructureValidationV0; use crate::platform_types::platform::PlatformStateRef; mod state_v0; diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_unfreeze_transition_action/state_v0/mod.rs similarity index 79% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/state_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_unfreeze_transition_action/state_v0/mod.rs index e8ba23d7f4..d99fab0765 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/state_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_unfreeze_transition_action/state_v0/mod.rs @@ -5,7 +5,7 @@ use dpp::consensus::state::token::{IdentityTokenAccountNotFrozenError, Unauthori use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::accessors::v1::DataContractV1Getters; use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; -use dpp::multi_identity_events::ActionTaker; +use dpp::group::action_taker::{ActionGoal, ActionTaker}; use dpp::prelude::Identifier; use dpp::tokens::info::v0::IdentityTokenInfoV0Accessors; use dpp::validation::SimpleConsensusValidationResult; @@ -15,10 +15,10 @@ 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::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; use crate::platform_types::platform::PlatformStateRef; -pub(super) trait TokenUnfreezeTransitionActionStateValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenUnfreezeTransitionActionStateValidationV0 { fn validate_state_v0( &self, platform: &PlatformStateRef, @@ -79,27 +79,19 @@ impl TokenUnfreezeTransitionActionStateValidationV0 for TokenUnfreezeTransitionA let contract = &self.data_contract_fetch_info_ref().contract; let token_configuration = contract.expected_token_configuration(self.token_position())?; let rules = token_configuration.unfreeze_rules(); - let main_control_group = token_configuration - .main_control_group() - .map(|position| contract.expected_group(position)) - .transpose()?; - - if !rules.can_make_change( - &contract.owner_id(), + let main_control_group = token_configuration.main_control_group(); + let validation_result = self.base().validate_group_action( + rules, + owner_id, + contract.owner_id(), main_control_group, contract.groups(), - &ActionTaker::SingleIdentity(owner_id), - ) { - return Ok(SimpleConsensusValidationResult::new_with_error( - ConsensusError::StateError(StateError::UnauthorizedTokenActionError( - UnauthorizedTokenActionError::new( - self.token_id(), - owner_id, - "unfreeze".to_string(), - rules.authorized_to_make_change_action_takers().clone(), - ), - )), - )); + "unfreeze".to_string(), + token_configuration, + platform_version, + )?; + if !validation_result.is_valid() { + return Ok(validation_result); } Ok(SimpleConsensusValidationResult::new()) diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/structure_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_unfreeze_transition_action/structure_v0/mod.rs similarity index 80% rename from packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/structure_v0/mod.rs rename to packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_unfreeze_transition_action/structure_v0/mod.rs index ba729c1f5e..f3a0b24e33 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_unfreeze_transition_action/structure_v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token/token_unfreeze_transition_action/structure_v0/mod.rs @@ -2,9 +2,9 @@ use dpp::validation::{SimpleConsensusValidationResult}; use drive::state_transition_action::batch::batched_transition::token_transition::token_unfreeze_transition_action::{TokenUnfreezeTransitionAction, TokenUnfreezeTransitionActionAccessorsV0}; use dpp::version::PlatformVersion; use crate::error::Error; -use crate::execution::validation::state_transition::batch::action_validation::token_base_transition_action::TokenBaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_base_transition_action::TokenBaseTransitionActionValidation; -pub(super) trait TokenUnfreezeTransitionActionStructureValidationV0 { +pub(in crate::execution::validation::state_transition::state_transitions::batch::action_validation) trait TokenUnfreezeTransitionActionStructureValidationV0 { fn validate_structure_v0( &self, platform_version: &PlatformVersion, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/state_v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/state_v0/mod.rs deleted file mode 100644 index d072a906d3..0000000000 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/action_validation/token_base_transition_action/state_v0/mod.rs +++ /dev/null @@ -1,67 +0,0 @@ -use dpp::block::block_info::BlockInfo; -use dpp::consensus::ConsensusError; -use dpp::consensus::state::group::GroupActionAlreadySignedByIdentityError; -use dpp::consensus::state::state_error::StateError; -use dpp::prelude::Identifier; -use dpp::validation::SimpleConsensusValidationResult; -use drive::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0}; -use dpp::version::PlatformVersion; -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::platform_types::platform::PlatformStateRef; - -pub(super) trait TokenBaseTransitionActionStateValidationV0 { - fn validate_state_v0( - &self, - platform: &PlatformStateRef, - owner_id: Identifier, - block_info: &BlockInfo, - execution_context: &mut StateTransitionExecutionContext, - transaction: TransactionArg, - platform_version: &PlatformVersion, - ) -> Result; -} -impl TokenBaseTransitionActionStateValidationV0 for TokenBaseTransitionAction { - fn validate_state_v0( - &self, - platform: &PlatformStateRef, - owner_id: Identifier, - block_info: &BlockInfo, - execution_context: &mut StateTransitionExecutionContext, - transaction: TransactionArg, - platform_version: &PlatformVersion, - ) -> Result { - // We should start by validating that if we did not yet sign - if let Some(group_state_transition_resolved_info) = self.store_in_group() { - let (already_signed, cost) = platform.drive.fetch_action_id_has_signer_with_costs( - self.data_contract_id(), - group_state_transition_resolved_info.group_contract_position, - group_state_transition_resolved_info.action_id, - owner_id, - block_info, - transaction, - platform_version, - )?; - execution_context.add_operation(ValidationOperation::PrecalculatedOperation(cost)); - if already_signed { - // We already have signed this state transition group action - return Ok(SimpleConsensusValidationResult::new_with_error( - ConsensusError::StateError( - StateError::GroupActionAlreadySignedByIdentityError( - GroupActionAlreadySignedByIdentityError::new( - owner_id, - self.data_contract_id(), - group_state_transition_resolved_info.group_contract_position, - group_state_transition_resolved_info.action_id, - ), - ), - ), - )); - } - } - - Ok(SimpleConsensusValidationResult::new()) - } -} diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/advanced_structure/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/advanced_structure/v0/mod.rs index d4da544dc9..1147fa871c 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/advanced_structure/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/advanced_structure/v0/mod.rs @@ -18,9 +18,9 @@ use dpp::validation::ConsensusValidationResult; use dpp::version::PlatformVersion; use drive::state_transition_action::batch::BatchTransitionAction; -use crate::execution::validation::state_transition::state_transitions::batch::action_validation::document_replace_transition_action::DocumentReplaceTransitionActionValidation; -use crate::execution::validation::state_transition::state_transitions::batch::action_validation::document_delete_transition_action::DocumentDeleteTransitionActionValidation; -use crate::execution::validation::state_transition::state_transitions::batch::action_validation::document_create_transition_action::DocumentCreateTransitionActionValidation; +use crate::execution::validation::state_transition::state_transitions::batch::action_validation::document::document_replace_transition_action::DocumentReplaceTransitionActionValidation; +use crate::execution::validation::state_transition::state_transitions::batch::action_validation::document::document_delete_transition_action::DocumentDeleteTransitionActionValidation; +use crate::execution::validation::state_transition::state_transitions::batch::action_validation::document::document_create_transition_action::DocumentCreateTransitionActionValidation; use dpp::state_transition::batch_transition::document_create_transition::v0::v0_methods::DocumentCreateTransitionV0Methods; use drive::state_transition_action::batch::batched_transition::BatchedTransitionAction; use drive::state_transition_action::batch::batched_transition::document_transition::document_delete_transition_action::v0::DocumentDeleteTransitionActionAccessorsV0; @@ -29,6 +29,7 @@ use drive::state_transition_action::batch::batched_transition::document_transiti use drive::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::DocumentTransferTransitionActionAccessorsV0; use drive::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::DocumentUpdatePriceTransitionActionAccessorsV0; use drive::state_transition_action::batch::batched_transition::document_transition::DocumentTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::token_config_update_transition_action::TokenConfigUpdateTransitionActionAccessorsV0; use drive::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionActionAccessorsV0; use drive::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::TokenEmergencyActionTransitionActionAccessorsV0; use drive::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::TokenFreezeTransitionActionAccessorsV0; @@ -41,16 +42,17 @@ use drive::state_transition_action::system::bump_identity_data_contract_nonce_ac use crate::error::execution::ExecutionError; use crate::execution::types::execution_operation::ValidationOperation; use crate::execution::types::state_transition_execution_context::{StateTransitionExecutionContext, StateTransitionExecutionContextMethodsV0}; -use crate::execution::validation::state_transition::batch::action_validation::document_purchase_transition_action::DocumentPurchaseTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::document_transfer_transition_action::DocumentTransferTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::document_update_price_transition_action::DocumentUpdatePriceTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_burn_transition_action::TokenBurnTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_emergency_action_transition_action::TokenEmergencyActionTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_freeze_transition_action::TokenFreezeTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_mint_transition_action::TokenMintTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_transfer_transition_action::TokenTransferTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_unfreeze_transition_action::TokenUnfreezeTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document::document_purchase_transition_action::DocumentPurchaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document::document_transfer_transition_action::DocumentTransferTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document::document_update_price_transition_action::DocumentUpdatePriceTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_burn_transition_action::TokenBurnTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_config_update_transition_action::TokenConfigUpdateTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_emergency_action_transition_action::TokenEmergencyActionTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_freeze_transition_action::TokenFreezeTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_mint_transition_action::TokenMintTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_transfer_transition_action::TokenTransferTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_unfreeze_transition_action::TokenUnfreezeTransitionActionValidation; pub(in crate::execution::validation::state_transition::state_transitions::batch) trait DocumentsBatchStateTransitionStructureValidationV0 { @@ -320,6 +322,19 @@ impl DocumentsBatchStateTransitionStructureValidationV0 for BatchTransition { BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action(destroy_frozen_funds_action.base(), self.owner_id(), self.user_fee_increase()), ); + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + result.errors, + )); + } + } + TokenTransitionAction::ConfigUpdateAction(config_update_action) => { + let result = config_update_action.validate_structure(platform_version)?; + if !result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityDataContractNonceAction( + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition_action(config_update_action.base(), self.owner_id(), self.user_fee_increase()), + ); + return Ok(ConsensusValidationResult::new_with_data_and_errors( bump_action, result.errors, diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/mod.rs index 83ac4eb0f6..f20e61f03b 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/mod.rs @@ -11169,11 +11169,10 @@ mod tests { token_configuration.set_manual_minting_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::NoOne, - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: - false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -11274,11 +11273,10 @@ mod tests { token_configuration.set_manual_minting_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::Group(0), - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: - false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -11390,11 +11388,10 @@ mod tests { token_configuration.set_manual_minting_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::Group(0), - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: - false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -11502,11 +11499,10 @@ mod tests { token_configuration.set_manual_minting_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::Group(0), - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: - false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -11700,11 +11696,10 @@ mod tests { token_configuration.set_manual_minting_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::Group(0), - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: - false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -11908,11 +11903,10 @@ mod tests { token_configuration.set_manual_minting_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::Group(0), - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: - false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -12202,11 +12196,10 @@ mod tests { token_configuration.set_manual_minting_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::Group(0), - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: - false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -12495,11 +12488,10 @@ mod tests { token_configuration.set_manual_minting_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::Group(0), - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: - false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -12613,11 +12605,10 @@ mod tests { token_configuration.set_manual_minting_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::Group(0), - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: - false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -12816,11 +12807,10 @@ mod tests { token_configuration.set_manual_minting_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::Group(0), - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: - false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -13559,10 +13549,10 @@ mod tests { token_configuration.set_manual_minting_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::Group(0), - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -13773,10 +13763,10 @@ mod tests { token_configuration.set_freeze_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::ContractOwner, - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -13872,19 +13862,19 @@ mod tests { token_configuration.set_freeze_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::ContractOwner, - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); token_configuration.set_unfreeze_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::ContractOwner, - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), @@ -14042,19 +14032,19 @@ mod tests { token_configuration.set_freeze_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::ContractOwner, - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); token_configuration.set_unfreeze_rules(ChangeControlRules::V0( ChangeControlRulesV0 { authorized_to_make_change: AuthorizedActionTakers::ContractOwner, - authorized_to_change_authorized_action_takers: - AuthorizedActionTakers::NoOne, + admin_action_takers: AuthorizedActionTakers::NoOne, changing_authorized_action_takers_to_no_one_allowed: false, - changing_authorized_action_takers_to_contract_owner_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, }, )); }), diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/mod.rs index 5b225e70a7..6db47d9f74 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/state/v0/mod.rs @@ -15,19 +15,20 @@ use drive::state_transition_action::system::bump_identity_data_contract_nonce_ac use crate::error::Error; use crate::error::execution::ExecutionError; use crate::execution::types::state_transition_execution_context::StateTransitionExecutionContext; -use crate::execution::validation::state_transition::batch::action_validation::document_create_transition_action::DocumentCreateTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::document_delete_transition_action::DocumentDeleteTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::document_purchase_transition_action::DocumentPurchaseTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::document_replace_transition_action::DocumentReplaceTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::document_transfer_transition_action::DocumentTransferTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::document_update_price_transition_action::DocumentUpdatePriceTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_burn_transition_action::TokenBurnTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_emergency_action_transition_action::TokenEmergencyActionTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_freeze_transition_action::TokenFreezeTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_mint_transition_action::TokenMintTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_transfer_transition_action::TokenTransferTransitionActionValidation; -use crate::execution::validation::state_transition::batch::action_validation::token_unfreeze_transition_action::TokenUnfreezeTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document::document_create_transition_action::DocumentCreateTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document::document_delete_transition_action::DocumentDeleteTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document::document_purchase_transition_action::DocumentPurchaseTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document::document_replace_transition_action::DocumentReplaceTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document::document_transfer_transition_action::DocumentTransferTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::document::document_update_price_transition_action::DocumentUpdatePriceTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_burn_transition_action::TokenBurnTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_config_update_transition_action::TokenConfigUpdateTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_emergency_action_transition_action::TokenEmergencyActionTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_freeze_transition_action::TokenFreezeTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_mint_transition_action::TokenMintTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_transfer_transition_action::TokenTransferTransitionActionValidation; +use crate::execution::validation::state_transition::batch::action_validation::token::token_unfreeze_transition_action::TokenUnfreezeTransitionActionValidation; use crate::execution::validation::state_transition::batch::data_triggers::{data_trigger_bindings_list, DataTriggerExecutionContext, DataTriggerExecutor}; use crate::platform_types::platform::{PlatformStateRef}; use crate::execution::validation::state_transition::state_transitions::batch::transformer::v0::BatchTransitionTransformerV0; @@ -208,6 +209,16 @@ impl DocumentsBatchStateTransitionStateValidationV0 for BatchTransition { transaction, platform_version, )?, + TokenTransitionAction::ConfigUpdateAction(config_update_action) => { + config_update_action.validate_state( + platform, + owner_id, + block_info, + execution_context, + transaction, + platform_version, + )? + } }, BatchedTransitionAction::BumpIdentityDataContractNonce(_) => { return Err(Error::Execution(ExecutionError::CorruptedCodeExecution( diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/transformer/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/transformer/v0/mod.rs index f9ed1d6d66..4828d923f8 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/transformer/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/transformer/v0/mod.rs @@ -55,6 +55,7 @@ use drive::state_transition_action::batch::batched_transition::document_transiti use drive::state_transition_action::batch::batched_transition::document_transition::document_transfer_transition_action::DocumentTransferTransitionAction; use drive::state_transition_action::batch::batched_transition::document_transition::document_update_price_transition_action::DocumentUpdatePriceTransitionAction; use drive::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::TokenBurnTransitionAction; +use drive::state_transition_action::batch::batched_transition::token_transition::token_config_update_transition_action::TokenConfigUpdateTransitionAction; use drive::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionAction; use drive::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::TokenEmergencyActionTransitionAction; use drive::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::TokenFreezeTransitionAction; @@ -573,6 +574,16 @@ impl BatchTransitionInternalTransformerV0 for BatchTransition { Ok(data_contract_fetch_info.clone()) }, platform_version)?; + execution_context + .add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); + + Ok(batched_action) + } + TokenTransition::ConfigUpdate(token_config_update) => { + let (batched_action, fee_result) = TokenConfigUpdateTransitionAction::try_from_borrowed_token_config_update_transition_with_contract_lookup(drive, owner_id, token_config_update, approximate_for_costs, transaction, block_info, user_fee_increase, |_identifier| { + Ok(data_contract_fetch_info.clone()) + }, platform_version)?; + execution_context .add_operation(ValidationOperation::PrecalculatedOperation(fee_result)); diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/advanced_structure/v0/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/advanced_structure/v0/mod.rs index 6d81da251c..f4ca13d3a2 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/advanced_structure/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/advanced_structure/v0/mod.rs @@ -14,11 +14,12 @@ use dpp::prelude::DataContract; use dpp::state_transition::data_contract_create_transition::accessors::DataContractCreateTransitionAccessorsV0; use dpp::state_transition::data_contract_create_transition::DataContractCreateTransition; use dpp::validation::ConsensusValidationResult; +use dpp::version::PlatformVersion; use drive::state_transition_action::system::bump_identity_nonce_action::BumpIdentityNonceAction; use drive::state_transition_action::StateTransitionAction; pub(in crate::execution::validation::state_transition::state_transitions::data_contract_create) trait DataContractCreatedStateTransitionAdvancedStructureValidationV0 { - fn validate_advanced_structure_v0(&self, execution_context: &mut StateTransitionExecutionContext) -> Result, Error>; + fn validate_advanced_structure_v0(&self, execution_context: &mut StateTransitionExecutionContext, platform_version: &PlatformVersion) -> Result, Error>; } impl DataContractCreatedStateTransitionAdvancedStructureValidationV0 @@ -27,6 +28,7 @@ impl DataContractCreatedStateTransitionAdvancedStructureValidationV0 fn validate_advanced_structure_v0( &self, execution_context: &mut StateTransitionExecutionContext, + platform_version: &PlatformVersion, ) -> Result, Error> { if self.data_contract().version() != INITIAL_DATA_CONTRACT_VERSION { let bump_action = StateTransitionAction::BumpIdentityNonceAction( @@ -69,6 +71,22 @@ impl DataContractCreatedStateTransitionAdvancedStructureValidationV0 )); } + let groups = self.data_contract().groups(); + if !groups.is_empty() { + let validation_result = DataContract::validate_groups(groups, platform_version)?; + + if !validation_result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityNonceAction( + BumpIdentityNonceAction::from_borrowed_data_contract_create_transition(self), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + validation_result.errors, + )); + } + } + let expected_position = 0; for (token_contract_position, token_configuration) in self.data_contract().tokens() { @@ -99,6 +117,21 @@ impl DataContractCreatedStateTransitionAdvancedStructureValidationV0 ], )); } + + let validation_result = token_configuration.validate_token_config_groups_exist( + self.data_contract().groups(), + platform_version, + )?; + if !validation_result.is_valid() { + let bump_action = StateTransitionAction::BumpIdentityNonceAction( + BumpIdentityNonceAction::from_borrowed_data_contract_create_transition(self), + ); + + return Ok(ConsensusValidationResult::new_with_data_and_errors( + bump_action, + validation_result.errors, + )); + } } Ok(ConsensusValidationResult::default()) @@ -152,7 +185,7 @@ mod tests { .expect("failed to create execution context"); let result = transition - .validate_advanced_structure_v0(&mut execution_context) + .validate_advanced_structure_v0(&mut execution_context, platform_version) .expect("failed to validate advanced structure"); assert_matches!(execution_context.operations_slice(), []); @@ -202,7 +235,7 @@ mod tests { .expect("failed to create execution context"); let result = transition - .validate_advanced_structure_v0(&mut execution_context) + .validate_advanced_structure_v0(&mut execution_context, platform_version) .expect("failed to validate advanced structure"); assert_matches!( diff --git a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/mod.rs b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/mod.rs index a5a0983202..e2cef7ac75 100644 --- a/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/mod.rs +++ b/packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_create/mod.rs @@ -85,7 +85,7 @@ impl StateTransitionAdvancedStructureValidationV0 for DataContractCreateTransiti .contract_create_state_transition .basic_structure { - Some(0) => self.validate_advanced_structure_v0(execution_context), + Some(0) => self.validate_advanced_structure_v0(execution_context, platform_version), Some(version) => Err(Error::Execution(ExecutionError::UnknownVersionMismatch { method: "data contract create transition: validate_basic_structure".to_string(), known_versions: vec![0], @@ -151,6 +151,11 @@ mod tests { use dpp::dash_to_credits; use dpp::data_contract::accessors::v1::DataContractV1Getters; use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Setters; + use dpp::data_contract::change_control_rules::authorized_action_takers::AuthorizedActionTakers; + use dpp::data_contract::change_control_rules::v0::ChangeControlRulesV0; + use dpp::data_contract::change_control_rules::ChangeControlRules; + use dpp::data_contract::group::v0::GroupV0; + use dpp::data_contract::group::Group; use dpp::data_contract::DataContract; use dpp::identity::accessors::IdentityGettersV0; use dpp::identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0; @@ -440,7 +445,7 @@ mod tests { } #[test] - fn test_data_contract_creation_with_single_token_with_starting_balance() { + fn test_data_contract_creation_with_single_token_and_group() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() .build_with_mock_rpc() @@ -450,6 +455,10 @@ mod tests { let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + let (identity_2, _, _) = setup_identity(&mut platform, 234, dash_to_credits!(0.1)); + + let (identity_3, _, _) = setup_identity(&mut platform, 45, dash_to_credits!(0.1)); + let mut data_contract = json_document_to_contract_with_ids( "tests/supporting_files/contract/basic-token/basic-token.json", None, @@ -459,21 +468,52 @@ mod tests { ) .expect("expected to get json based contract"); - let base_supply_start_amount = 10000; + let identity_id = identity.id(); + + let base_supply_start_amount = 0; { + let groups = data_contract.groups_mut().expect("expected tokens"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + ); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [ + (identity.id(), 1), + (identity_3.id(), 1), + (identity_2.id(), 2), + ] + .into(), + required_power: 2, + }), + ); let token_config = data_contract .tokens_mut() .expect("expected tokens") .get_mut(&0) .expect("expected first token"); + token_config.set_main_control_group(Some(1)); token_config.set_base_supply(base_supply_start_amount); + token_config.set_manual_minting_rules(ChangeControlRules::V0(ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + // We have no group at position 1, we should get an error + admin_action_takers: AuthorizedActionTakers::MainGroup, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + })); } - let identity_id = identity.id(); - let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + let data_contract_create_transition = DataContractCreateTransition::new_from_data_contract( data_contract, 1, @@ -485,8 +525,6 @@ mod tests { ) .expect("expect to create documents batch transition"); - let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); - let data_contract_create_serialized_transition = data_contract_create_transition .serialize_to_bytes() .expect("expected documents batch serialized state transition"); @@ -522,12 +560,11 @@ mod tests { .drive .fetch_identity_token_balance(token_id, identity_id.to_buffer(), None, platform_version) .expect("expected to fetch token balance"); - assert_eq!(token_balance, Some(base_supply_start_amount)); + assert_eq!(token_balance, None); } #[test] - fn test_data_contract_creation_with_single_token_with_starting_balance_over_limit_should_cause_error( - ) { + fn test_data_contract_creation_with_single_token_with_starting_balance() { let platform_version = PlatformVersion::latest(); let mut platform = TestPlatformBuilder::new() .build_with_mock_rpc() @@ -546,7 +583,7 @@ mod tests { ) .expect("expected to get json based contract"); - let base_supply_start_amount = u64::MAX; + let base_supply_start_amount = 10000; { let token_config = data_contract @@ -592,12 +629,10 @@ mod tests { None, ) .expect("expected to process state transition"); + assert_matches!( processing_result.execution_results().as_slice(), - [StateTransitionExecutionResult::PaidConsensusError( - ConsensusError::BasicError(BasicError::InvalidTokenBaseSupplyError(_)), - _ - )] + [StateTransitionExecutionResult::SuccessfulExecution(_, _)] ); platform @@ -611,6 +646,1112 @@ mod tests { .drive .fetch_identity_token_balance(token_id, identity_id.to_buffer(), None, platform_version) .expect("expected to fetch token balance"); - assert_eq!(token_balance, None); + assert_eq!(token_balance, Some(base_supply_start_amount)); + } + + mod token_errors { + use super::*; + #[test] + fn test_data_contract_creation_with_single_token_with_starting_balance_over_limit_should_cause_error( + ) { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let base_supply_start_amount = u64::MAX; + + { + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_base_supply(base_supply_start_amount); + } + + let identity_id = identity.id(); + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_serialized_transition = data_contract_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![data_contract_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::BasicError(BasicError::InvalidTokenBaseSupplyError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_data_contract_creation_with_single_token_needing_group_that_does_not_exist() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let (identity_2, _, _) = setup_identity(&mut platform, 564, dash_to_credits!(0.1)); + + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + { + let groups = data_contract.groups_mut().expect("expected tokens"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + ); + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + // We have no group at position 1, we should get an error + admin_action_takers: AuthorizedActionTakers::Group(1), + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + }, + )); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_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![data_contract_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::BasicError(BasicError::GroupPositionDoesNotExistError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_data_contract_creation_with_single_token_setting_main_group_that_does_not_exist() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let (identity_2, _, _) = setup_identity(&mut platform, 564, dash_to_credits!(0.1)); + + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + { + let groups = data_contract.groups_mut().expect("expected tokens"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + ); + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_main_control_group(Some(1)); + token_config.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + // We have no group at position 1, we should get an error + admin_action_takers: AuthorizedActionTakers::MainGroup, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + }, + )); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_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![data_contract_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::BasicError(BasicError::GroupPositionDoesNotExistError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + } + + mod group_errors { + use super::*; + #[test] + fn test_data_contract_creation_with_non_contiguous_groups_should_error() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let (identity_2, _, _) = setup_identity(&mut platform, 234, dash_to_credits!(0.1)); + + let (identity_3, _, _) = setup_identity(&mut platform, 45, dash_to_credits!(0.1)); + + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + let base_supply_start_amount = 0; + + { + let groups = data_contract.groups_mut().expect("expected tokens"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + ); + groups.insert( + 2, + Group::V0(GroupV0 { + members: [ + (identity.id(), 1), + (identity_3.id(), 1), + (identity_2.id(), 2), + ] + .into(), + required_power: 2, + }), + ); + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_main_control_group(Some(2)); + token_config.set_base_supply(base_supply_start_amount); + token_config.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + // We have no group at position 1, we should get an error + admin_action_takers: AuthorizedActionTakers::MainGroup, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + }, + )); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_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![data_contract_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::BasicError( + BasicError::NonContiguousContractGroupPositionsError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_data_contract_creation_with_group_with_member_with_zero_power_should_error() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let (identity_2, _, _) = setup_identity(&mut platform, 234, dash_to_credits!(0.1)); + + let (identity_3, _, _) = setup_identity(&mut platform, 45, dash_to_credits!(0.1)); + + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + let base_supply_start_amount = 0; + + { + let groups = data_contract.groups_mut().expect("expected tokens"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + ); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [ + (identity.id(), 1), + (identity_3.id(), 0), //error + (identity_2.id(), 2), + ] + .into(), + required_power: 2, + }), + ); + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_main_control_group(Some(1)); + token_config.set_base_supply(base_supply_start_amount); + token_config.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + admin_action_takers: AuthorizedActionTakers::MainGroup, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + }, + )); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_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![data_contract_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::BasicError(BasicError::GroupMemberHasPowerOfZeroError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_data_contract_creation_with_group_with_member_with_too_big_power_should_error() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let (identity_2, _, _) = setup_identity(&mut platform, 234, dash_to_credits!(0.1)); + + let (identity_3, _, _) = setup_identity(&mut platform, 45, dash_to_credits!(0.1)); + + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + let base_supply_start_amount = 0; + + { + let groups = data_contract.groups_mut().expect("expected tokens"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + ); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [ + (identity.id(), 50000), + (identity_3.id(), 100000), //error + (identity_2.id(), 50000), + ] + .into(), + required_power: 100000, + }), + ); + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_main_control_group(Some(1)); + token_config.set_base_supply(base_supply_start_amount); + token_config.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + admin_action_takers: AuthorizedActionTakers::MainGroup, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + }, + )); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_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![data_contract_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::BasicError(BasicError::GroupMemberHasPowerOverLimitError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_data_contract_creation_with_group_with_member_with_power_over_required_should_error( + ) { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let (identity_2, _, _) = setup_identity(&mut platform, 234, dash_to_credits!(0.1)); + + let (identity_3, _, _) = setup_identity(&mut platform, 45, dash_to_credits!(0.1)); + + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + let base_supply_start_amount = 0; + + { + let groups = data_contract.groups_mut().expect("expected tokens"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + ); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [ + (identity.id(), 3), + (identity_3.id(), 6), //error + (identity_2.id(), 3), + ] + .into(), + required_power: 5, + }), + ); + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_main_control_group(Some(1)); + token_config.set_base_supply(base_supply_start_amount); + token_config.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + admin_action_takers: AuthorizedActionTakers::MainGroup, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + }, + )); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_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![data_contract_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::BasicError(BasicError::GroupMemberHasPowerOverLimitError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_dcc_group_with_member_power_not_reaching_threshold() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let (identity_2, _, _) = setup_identity(&mut platform, 234, dash_to_credits!(0.1)); + + let (identity_3, _, _) = setup_identity(&mut platform, 45, dash_to_credits!(0.1)); + + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + let base_supply_start_amount = 0; + + { + let groups = data_contract.groups_mut().expect("expected tokens"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + ); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [ + (identity.id(), 1), + (identity_3.id(), 1), + (identity_2.id(), 1), + ] + .into(), + required_power: 5, // 1 + 1 + 1 < 5 so we should error + }), + ); + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_main_control_group(Some(1)); + token_config.set_base_supply(base_supply_start_amount); + token_config.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + admin_action_takers: AuthorizedActionTakers::MainGroup, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + }, + )); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_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![data_contract_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::BasicError(BasicError::GroupTotalPowerLessThanRequiredError(_)), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } + + #[test] + fn test_dcc_group_with_non_unilateral_member_power_not_reaching_threshold() { + let platform_version = PlatformVersion::latest(); + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let platform_state = platform.state.load(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let (identity_2, _, _) = setup_identity(&mut platform, 234, dash_to_credits!(0.1)); + + let (identity_3, _, _) = setup_identity(&mut platform, 45, dash_to_credits!(0.1)); + + let mut data_contract = json_document_to_contract_with_ids( + "tests/supporting_files/contract/basic-token/basic-token.json", + None, + None, + false, //no need to validate the data contracts in tests for drive + platform_version, + ) + .expect("expected to get json based contract"); + + let identity_id = identity.id(); + + let base_supply_start_amount = 0; + + { + let groups = data_contract.groups_mut().expect("expected tokens"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1), (identity_2.id(), 1)].into(), + required_power: 2, + }), + ); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [ + (identity.id(), 1), + (identity_3.id(), 5), + (identity_2.id(), 1), + ] + .into(), + required_power: 5, // 1 + 1 < 5 so we should error + }), + ); + let token_config = data_contract + .tokens_mut() + .expect("expected tokens") + .get_mut(&0) + .expect("expected first token"); + token_config.set_main_control_group(Some(1)); + token_config.set_base_supply(base_supply_start_amount); + token_config.set_manual_minting_rules(ChangeControlRules::V0( + ChangeControlRulesV0 { + authorized_to_make_change: AuthorizedActionTakers::Group(0), + admin_action_takers: AuthorizedActionTakers::MainGroup, + changing_authorized_action_takers_to_no_one_allowed: false, + changing_admin_action_takers_to_no_one_allowed: false, + self_changing_admin_action_takers_allowed: false, + }, + )); + } + + let data_contract_id = DataContract::generate_data_contract_id_v0(identity_id, 1); + + let token_id = calculate_token_id(data_contract_id.as_bytes(), 0); + + let data_contract_create_transition = + DataContractCreateTransition::new_from_data_contract( + data_contract, + 1, + &identity.into_partial_identity_info(), + key.id(), + &signer, + platform_version, + None, + ) + .expect("expect to create documents batch transition"); + + let data_contract_create_serialized_transition = data_contract_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![data_contract_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::BasicError( + BasicError::GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + + let token_balance = platform + .drive + .fetch_identity_token_balance( + token_id, + identity_id.to_buffer(), + None, + platform_version, + ) + .expect("expected to fetch token balance"); + assert_eq!(token_balance, None); + } } } 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 9cd512b6da..d92aa92444 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 @@ -81,6 +81,11 @@ mod tests { use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::platform_types::state_transitions_processing_result::StateTransitionExecutionResult; + use assert_matches::assert_matches; + use dpp::consensus::basic::BasicError; + use dpp::data_contract::accessors::v1::DataContractV1Getters; + use dpp::data_contract::group::v0::GroupV0; + use dpp::data_contract::group::Group; use dpp::tests::fixtures::get_data_contract_fixture; use dpp::tests::json_document::json_document_to_contract; use dpp::version::PlatformVersion; @@ -665,4 +670,635 @@ mod tests { && error.additional_message() == "document type can not change creation restriction mode: changing from Owner Only to No Restrictions" )); } + + mod group_tests { + use super::*; + #[test] + fn test_data_contract_update_can_not_remove_groups() { + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_initial_state_structure(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let platform_state = platform.state.load(); + let platform_version = platform_state + .current_platform_version() + .expect("expected to get current platform version"); + + // Create an initial data contract with groups + let mut data_contract = + get_data_contract_fixture(None, 0, platform_version.protocol_version) + .data_contract_owned(); + + data_contract.set_owner_id(identity.id()); + + { + // Add groups to the contract + let groups = data_contract.groups_mut().expect("expected groups"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1)].into(), + required_power: 1, + }), + ); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [(identity.id(), 1)].into(), + required_power: 1, + }), + ); + } + + platform + .drive + .apply_contract( + &data_contract, + BlockInfo::default(), + true, + StorageFlags::optional_default_as_cow(), + None, + platform_version, + ) + .expect("expected to apply contract successfully"); + + // Create an updated contract with one group removed + let mut updated_data_contract = data_contract.clone(); + updated_data_contract.set_version(2); + + { + // Remove a group from the updated contract + let groups = updated_data_contract.groups_mut().expect("expected groups"); + groups.remove(&1).expect("expected to remove group"); + } + + let data_contract_update_transition = + DataContractUpdateTransition::new_from_data_contract( + updated_data_contract, + &identity.into_partial_identity_info(), + key.id(), + 2, + 0, + &signer, + platform_version, + None, + ) + .expect("expect to create data contract update transition"); + + let data_contract_update_serialized_transition = data_contract_update_transition + .serialize_to_bytes() + .expect("expected serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![data_contract_update_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + // Extract the error and check the message + if let [StateTransitionExecutionResult::PaidConsensusError( + ConsensusError::StateError(StateError::DataContractUpdateActionNotAllowedError( + error, + )), + _, + )] = processing_result.execution_results().as_slice() + { + assert_eq!( + error.action(), + "remove group", + "expected error message to match 'remove group'" + ); + assert_eq!( + error.data_contract_id(), + data_contract.id(), + "expected the error to reference the correct data contract ID" + ); + } else { + panic!("Expected a DataContractUpdateActionNotAllowedError"); + } + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + } + + #[test] + fn test_data_contract_update_can_not_alter_group() { + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_initial_state_structure(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let platform_state = platform.state.load(); + let platform_version = platform_state + .current_platform_version() + .expect("expected to get current platform version"); + + // Create an initial data contract with groups + let mut data_contract = + get_data_contract_fixture(None, 0, platform_version.protocol_version) + .data_contract_owned(); + + data_contract.set_owner_id(identity.id()); + + { + // Add groups to the contract + let groups = data_contract.groups_mut().expect("expected groups"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1)].into(), + required_power: 1, + }), + ); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [(identity.id(), 1)].into(), + required_power: 1, + }), + ); + } + + platform + .drive + .apply_contract( + &data_contract, + BlockInfo::default(), + true, + StorageFlags::optional_default_as_cow(), + None, + platform_version, + ) + .expect("expected to apply contract successfully"); + + // Create an updated contract with one group removed + let mut updated_data_contract = data_contract.clone(); + updated_data_contract.set_version(2); + + { + // Remove a group from the updated contract + let groups = updated_data_contract.groups_mut().expect("expected groups"); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [(identity.id(), 2)].into(), + required_power: 2, + }), + ); + } + + let data_contract_update_transition = + DataContractUpdateTransition::new_from_data_contract( + updated_data_contract, + &identity.into_partial_identity_info(), + key.id(), + 2, + 0, + &signer, + platform_version, + None, + ) + .expect("expect to create data contract update transition"); + + let data_contract_update_serialized_transition = data_contract_update_transition + .serialize_to_bytes() + .expect("expected serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![data_contract_update_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + // Extract the error and check the message + if let [StateTransitionExecutionResult::PaidConsensusError( + ConsensusError::StateError(StateError::DataContractUpdateActionNotAllowedError( + error, + )), + _, + )] = processing_result.execution_results().as_slice() + { + assert_eq!( + error.action(), + "change group at position 1 is not allowed", + "expected error message to match 'change group at position 1 is not allowed'" + ); + assert_eq!( + error.data_contract_id(), + data_contract.id(), + "expected the error to reference the correct data contract ID" + ); + } else { + panic!("Expected a DataContractUpdateActionNotAllowedError"); + } + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + } + + #[test] + fn test_data_contract_update_can_not_add_new_group_with_gap() { + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_initial_state_structure(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let platform_state = platform.state.load(); + let platform_version = platform_state + .current_platform_version() + .expect("expected to get current platform version"); + + // Create an initial data contract with groups + let mut data_contract = + get_data_contract_fixture(None, 0, platform_version.protocol_version) + .data_contract_owned(); + + data_contract.set_owner_id(identity.id()); + + { + // Add groups to the contract + let groups = data_contract.groups_mut().expect("expected groups"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1)].into(), + required_power: 1, + }), + ); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [(identity.id(), 1)].into(), + required_power: 1, + }), + ); + } + + platform + .drive + .apply_contract( + &data_contract, + BlockInfo::default(), + true, + StorageFlags::optional_default_as_cow(), + None, + platform_version, + ) + .expect("expected to apply contract successfully"); + + // Create an updated contract with one group removed + let mut updated_data_contract = data_contract.clone(); + updated_data_contract.set_version(2); + + { + // Remove a group from the updated contract + let groups = updated_data_contract.groups_mut().expect("expected groups"); + groups.insert( + 3, + Group::V0(GroupV0 { + members: [(identity.id(), 2)].into(), + required_power: 2, + }), + ); + } + + let data_contract_update_transition = + DataContractUpdateTransition::new_from_data_contract( + updated_data_contract, + &identity.into_partial_identity_info(), + key.id(), + 2, + 0, + &signer, + platform_version, + None, + ) + .expect("expect to create data contract update transition"); + + let data_contract_update_serialized_transition = data_contract_update_transition + .serialize_to_bytes() + .expect("expected serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![data_contract_update_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::BasicError( + BasicError::NonContiguousContractGroupPositionsError(_) + ), + _ + )] + ); + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + } + + #[test] + fn test_data_contract_update_can_add_new_group() { + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_initial_state_structure(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let (identity_2, _, _) = setup_identity(&mut platform, 928, dash_to_credits!(0.1)); + + let (identity_3, _, _) = setup_identity(&mut platform, 8, dash_to_credits!(0.1)); + + let platform_state = platform.state.load(); + let platform_version = platform_state + .current_platform_version() + .expect("expected to get current platform version"); + + // Create an initial data contract with groups + let mut data_contract = + get_data_contract_fixture(None, 0, platform_version.protocol_version) + .data_contract_owned(); + + data_contract.set_owner_id(identity.id()); + + { + // Add groups to the contract + let groups = data_contract.groups_mut().expect("expected groups"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [ + (identity.id(), 1), + (identity_2.id(), 1), + (identity_3.id(), 1), + ] + .into(), + required_power: 3, + }), + ); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [ + (identity.id(), 1), + (identity_2.id(), 2), + (identity_3.id(), 1), + ] + .into(), + required_power: 3, + }), + ); + } + + platform + .drive + .apply_contract( + &data_contract, + BlockInfo::default(), + true, + StorageFlags::optional_default_as_cow(), + None, + platform_version, + ) + .expect("expected to apply contract successfully"); + + // Create an updated contract with one group removed + let mut updated_data_contract = data_contract.clone(); + updated_data_contract.set_version(2); + + { + // Remove a group from the updated contract + let groups = updated_data_contract.groups_mut().expect("expected groups"); + groups.insert( + 2, + Group::V0(GroupV0 { + members: [ + (identity.id(), 1), + (identity_2.id(), 2), + (identity_3.id(), 2), + ] + .into(), + required_power: 3, + }), + ); + } + + let data_contract_update_transition = + DataContractUpdateTransition::new_from_data_contract( + updated_data_contract, + &identity.into_partial_identity_info(), + key.id(), + 2, + 0, + &signer, + platform_version, + None, + ) + .expect("expect to create data contract update transition"); + + let data_contract_update_serialized_transition = data_contract_update_transition + .serialize_to_bytes() + .expect("expected serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![data_contract_update_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"); + } + } + + mod token_tests { + use super::*; + use dpp::data_contract::accessors::v1::DataContractV1Setters; + use dpp::data_contract::associated_token::token_configuration::v0::TokenConfigurationV0; + use dpp::data_contract::associated_token::token_configuration::TokenConfiguration; + #[test] + fn test_data_contract_update_can_not_add_new_token() { + let mut platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_initial_state_structure(); + + let (identity, signer, key) = setup_identity(&mut platform, 958, dash_to_credits!(0.1)); + + let platform_state = platform.state.load(); + let platform_version = platform_state + .current_platform_version() + .expect("expected to get current platform version"); + + // Create an initial data contract with groups + let mut data_contract = + get_data_contract_fixture(None, 0, platform_version.protocol_version) + .data_contract_owned(); + + data_contract.set_owner_id(identity.id()); + + { + // Add groups to the contract + let groups = data_contract.groups_mut().expect("expected groups"); + groups.insert( + 0, + Group::V0(GroupV0 { + members: [(identity.id(), 1)].into(), + required_power: 1, + }), + ); + groups.insert( + 1, + Group::V0(GroupV0 { + members: [(identity.id(), 1)].into(), + required_power: 1, + }), + ); + } + + platform + .drive + .apply_contract( + &data_contract, + BlockInfo::default(), + true, + StorageFlags::optional_default_as_cow(), + None, + platform_version, + ) + .expect("expected to apply contract successfully"); + + // Create an updated contract with one group removed + let mut updated_data_contract = data_contract.clone(); + updated_data_contract.set_version(2); + + updated_data_contract.add_token( + 0, + TokenConfiguration::V0(TokenConfigurationV0::default_most_restrictive()), + ); + + let data_contract_update_transition = + DataContractUpdateTransition::new_from_data_contract( + updated_data_contract, + &identity.into_partial_identity_info(), + key.id(), + 2, + 0, + &signer, + platform_version, + None, + ) + .expect("expect to create data contract update transition"); + + let data_contract_update_serialized_transition = data_contract_update_transition + .serialize_to_bytes() + .expect("expected serialized state transition"); + + let transaction = platform.drive.grove.start_transaction(); + + let processing_result = platform + .platform + .process_raw_state_transitions( + &vec![data_contract_update_serialized_transition.clone()], + &platform_state, + &BlockInfo::default(), + &transaction, + platform_version, + false, + None, + ) + .expect("expected to process state transition"); + + // Extract the error and check the message + if let [StateTransitionExecutionResult::PaidConsensusError( + ConsensusError::StateError(StateError::DataContractUpdateActionNotAllowedError( + error, + )), + _, + )] = processing_result.execution_results().as_slice() + { + assert_eq!( + error.action(), + "add token at position 0", + "expected error message to match 'add token at position 0'" + ); + assert_eq!( + error.data_contract_id(), + data_contract.id(), + "expected the error to reference the correct data contract ID" + ); + } else { + panic!("Expected a DataContractUpdateActionNotAllowedError"); + } + + platform + .drive + .grove + .commit_transaction(transaction) + .unwrap() + .expect("expected to commit transaction"); + } + } } diff --git a/packages/rs-drive-abci/src/query/group_queries/group_actions/v0/mod.rs b/packages/rs-drive-abci/src/query/group_queries/group_actions/v0/mod.rs index ef664f87f6..d9d8aa09b3 100644 --- a/packages/rs-drive-abci/src/query/group_queries/group_actions/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/group_queries/group_actions/v0/mod.rs @@ -7,8 +7,8 @@ use dapi_grpc::platform::v0::get_group_actions_request::GetGroupActionsRequestV0 use dapi_grpc::platform::v0::get_group_actions_response::get_group_actions_response_v0::{ emergency_action_event, group_action_event, token_event, BurnEvent, DestroyFrozenFundsEvent, EmergencyActionEvent, FreezeEvent, GroupActionEntry, GroupActionEvent, GroupActions, MintEvent, - PersonalEncryptedNote, SharedEncryptedNote, TokenEvent as TokenEventResponse, TransferEvent, - UnfreezeEvent, + PersonalEncryptedNote, SharedEncryptedNote, TokenConfigUpdateEvent, + TokenEvent as TokenEventResponse, TransferEvent, UnfreezeEvent, }; use dapi_grpc::platform::v0::get_group_actions_response::{ get_group_actions_response_v0, GetGroupActionsResponseV0, @@ -19,6 +19,7 @@ use dpp::group::action_event; use dpp::group::group_action::GroupAction; use dpp::group::group_action_status::GroupActionStatus; use dpp::identifier::Identifier; +use dpp::serialization::PlatformSerializableWithPlatformVersion; use dpp::tokens::emergency_action::TokenEmergencyAction; use dpp::tokens::token_event::TokenEvent; use dpp::validation::ValidationResult; @@ -128,9 +129,9 @@ impl Platform { platform_version, )? .into_iter() - .map(|(action_id, group_action)| { + .filter_map(|(action_id, group_action)| { // Convert the fetched GroupAction into a GroupActionEntry - GroupActionEntry { + Some(GroupActionEntry { action_id: action_id.to_vec(), event: Some(GroupActionEvent { event_type: Some(match group_action { @@ -222,11 +223,19 @@ impl Platform { })), }) } + TokenEvent::ConfigUpdate(token_configuration_change_item, public_note) => { + group_action_event::EventType::TokenEvent(TokenEventResponse { + r#type: Some(token_event::Type::TokenConfigUpdate(TokenConfigUpdateEvent { + token_config_update_item: token_configuration_change_item.serialize_consume_to_bytes_with_platform_version(platform_version).ok()?, + public_note, + })), + }) + } }, }, }), }), - } + }) }) .collect(); GetGroupActionsResponseV0 { diff --git a/packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs b/packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs index 4cd29a9d94..a7f8b30c99 100644 --- a/packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs +++ b/packages/rs-drive-abci/tests/strategy_tests/verify_state_transitions.rs @@ -576,6 +576,7 @@ pub(crate) fn verify_state_transitions_were_or_were_not_executed( .as_ref() .expect("expected last commited block info") .basic_info(), + platform_version, ) .expect("expected to build historical document"); diff --git a/packages/rs-drive-abci/tests/supporting_files/contract/basic-token/basic-token.json b/packages/rs-drive-abci/tests/supporting_files/contract/basic-token/basic-token.json index 7f103653d8..ec2a3fd928 100644 --- a/packages/rs-drive-abci/tests/supporting_files/contract/basic-token/basic-token.json +++ b/packages/rs-drive-abci/tests/supporting_files/contract/basic-token/basic-token.json @@ -8,6 +8,7 @@ "0": { "$format_version": "0", "conventions": { + "$format_version": "0", "decimals": 8 }, "baseSupply": 100000, diff --git a/packages/rs-drive/Cargo.toml b/packages/rs-drive/Cargo.toml index be5ae7dedb..c54c7dbc02 100644 --- a/packages/rs-drive/Cargo.toml +++ b/packages/rs-drive/Cargo.toml @@ -52,12 +52,12 @@ enum-map = { version = "2.0.3", optional = true } intmap = { version = "3.0.1", features = ["serde"], optional = true } chrono = { version = "0.4.35", optional = true } itertools = { version = "0.13", optional = true } -grovedb = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0", optional = true, default-features = false } -grovedb-costs = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0", optional = true } -grovedb-path = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" } -grovedb-storage = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0", optional = true } -grovedb-version = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" } -grovedb-epoch-based-storage-flags = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" } +grovedb = { git = "https://github.com/dashpay/grovedb", rev= "44c2244bbccd3e6e684729e8cf620644f7ebbf70", optional = true, default-features = false } +grovedb-costs = { git = "https://github.com/dashpay/grovedb", rev= "44c2244bbccd3e6e684729e8cf620644f7ebbf70", optional = true } +grovedb-path = { git = "https://github.com/dashpay/grovedb", rev= "44c2244bbccd3e6e684729e8cf620644f7ebbf70" } +grovedb-storage = { git = "https://github.com/dashpay/grovedb", rev= "44c2244bbccd3e6e684729e8cf620644f7ebbf70", optional = true } +grovedb-version = { git = "https://github.com/dashpay/grovedb", rev= "44c2244bbccd3e6e684729e8cf620644f7ebbf70" } +grovedb-epoch-based-storage-flags = { git = "https://github.com/dashpay/grovedb", rev= "44c2244bbccd3e6e684729e8cf620644f7ebbf70" } [dev-dependencies] criterion = "0.5" diff --git a/packages/rs-drive/src/drive/contract/get_fetch/fetch_contract/v0/mod.rs b/packages/rs-drive/src/drive/contract/get_fetch/fetch_contract/v0/mod.rs index fa3a6fa1a8..0d40cd945e 100644 --- a/packages/rs-drive/src/drive/contract/get_fetch/fetch_contract/v0/mod.rs +++ b/packages/rs-drive/src/drive/contract/get_fetch/fetch_contract/v0/mod.rs @@ -77,7 +77,7 @@ impl Drive { match value { Ok(Element::Item(stored_contract_bytes, element_flag)) => { let contract = cost_return_on_error_no_add!( - &cost, + cost, DataContract::versioned_deserialize( &stored_contract_bytes, false, @@ -88,7 +88,7 @@ impl Drive { let drive_operation = CalculatedCostOperation(cost.clone()); let fee = if let Some(epoch) = epoch { Some(cost_return_on_error_no_add!( - &cost, + cost, Drive::calculate_fee( None, Some(vec![drive_operation]), @@ -103,7 +103,7 @@ impl Drive { }; let storage_flags = cost_return_on_error_no_add!( - &cost, + cost, StorageFlags::map_some_element_flags_ref(&element_flag) .map_err(Error::StorageFlags) ); @@ -134,7 +134,7 @@ impl Drive { match value { Ok(Element::Item(stored_contract_bytes, element_flag)) => { let contract = cost_return_on_error_no_add!( - &cost, + cost, DataContract::versioned_deserialize( &stored_contract_bytes, false, @@ -145,7 +145,7 @@ impl Drive { let drive_operation = CalculatedCostOperation(cost.clone()); let fee = if let Some(epoch) = epoch { Some(cost_return_on_error_no_add!( - &cost, + cost, Drive::calculate_fee( None, Some(vec![drive_operation]), @@ -160,7 +160,7 @@ impl Drive { }; let storage_flags = cost_return_on_error_no_add!( - &cost, + cost, StorageFlags::map_some_element_flags_ref(&element_flag) .map_err(Error::StorageFlags) ); diff --git a/packages/rs-drive/src/drive/group/estimated_costs/for_add_groups/mod.rs b/packages/rs-drive/src/drive/group/estimated_costs/for_add_groups/mod.rs new file mode 100644 index 0000000000..4c11fd514c --- /dev/null +++ b/packages/rs-drive/src/drive/group/estimated_costs/for_add_groups/mod.rs @@ -0,0 +1,74 @@ +mod v0; + +use crate::drive::Drive; +use crate::error::drive::DriveError; +use crate::error::Error; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use dpp::version::drive_versions::DriveVersion; +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerInformation; +use std::collections::{BTreeMap, HashMap}; + +impl Drive { + /// Adds estimated costs for the layer information of group updates in a contract. + /// + /// This function updates the `estimated_costs_only_with_layer_info` map with the layer information for + /// the trees involved in adding or updating a group action in the context of a contract. The trees are + /// organized hierarchically based on their role in the system, such as "Group Actions", "Withdrawal Transactions", + /// "Balances", and "Contract/Documents". This estimation is used to determine the computational costs associated + /// with updating these trees, considering whether they are sum trees or normal trees and their expected layer counts. + /// + /// The function breaks down the tree layers and their corresponding costs as follows: + /// 1. **Group Actions Tree**: A normal tree that holds information about group actions in the contract. + /// 2. **Withdrawal Transactions Tree**: A normal tree that holds withdrawal transaction data. + /// 3. **Balances Tree**: A sum tree that holds balance information, which is crucial for cost estimation. + /// 4. **Contract/Documents Tree**: A normal tree that holds contract and document-related data. + /// + /// Each tree's cost is estimated based on its depth and whether it's a sum tree or not. The function inserts the + /// estimated layer information for each relevant tree in the `estimated_costs_only_with_layer_info` map, where + /// the key represents the path to the specific tree and the value represents its estimated layer information. + /// + /// # Parameters + /// + /// - `contract_id`: The unique identifier of the contract being updated. Used to construct paths for the trees. + /// - `groups`: The groups that we will insert. + /// - `estimated_costs_only_with_layer_info`: A mutable reference to a `HashMap` where the estimated layer information + /// will be inserted. The keys represent paths to the trees, and the values represent their estimated layer information. + /// + /// # Logic Breakdown + /// + /// - **Top Layer (Contract/Documents)**: The contract and documents tree is at the top level, with a weight of 2. + /// - **Balance Tree (Sum Tree)**: The balance tree is a sum tree with a weight of 1. + /// - **Withdrawal Transactions**: This tree is a normal tree, and it is expected to have a weight of 2. + /// - **Group Action Tree**: The group action tree is also a normal tree, with an expected weight of 2. + /// - **Additional Layer Costs**: For specific paths related to actions, signers, etc., further estimations are added with + /// appropriate layer counts and subtree size estimations. + /// + /// The function constructs the paths based on the contract ID, group contract position, and action ID (if provided). + /// It then populates the `estimated_costs_only_with_layer_info` map with the estimated costs for each relevant tree + /// involved in the group action update. + + pub(crate) fn add_estimation_costs_for_add_groups( + contract_id: [u8; 32], + groups: &BTreeMap, + estimated_costs_only_with_layer_info: &mut HashMap, + drive_version: &DriveVersion, + ) -> Result<(), Error> { + match drive_version.methods.group.cost_estimation.for_add_group { + 0 => { + Self::add_estimation_costs_for_add_groups_v0( + contract_id, + groups, + estimated_costs_only_with_layer_info, + ); + Ok(()) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: "add_estimation_costs_for_add_group".to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/drive/group/estimated_costs/for_add_groups/v0/mod.rs b/packages/rs-drive/src/drive/group/estimated_costs/for_add_groups/v0/mod.rs new file mode 100644 index 0000000000..b87806d4ab --- /dev/null +++ b/packages/rs-drive/src/drive/group/estimated_costs/for_add_groups/v0/mod.rs @@ -0,0 +1,88 @@ +use crate::drive::Drive; + +use crate::drive::group::paths::{group_contract_path, group_path, group_root_path}; +use crate::util::type_constants::DEFAULT_HASH_SIZE_U8; +use dpp::data_contract::group::Group; +use dpp::data_contract::GroupContractPosition; +use grovedb::batch::KeyInfoPath; +use grovedb::EstimatedLayerCount::EstimatedLevel; +use grovedb::EstimatedLayerSizes::AllSubtrees; +use grovedb::EstimatedSumTrees::{NoSumTrees, SomeSumTrees}; +use grovedb::{EstimatedLayerInformation, TreeType}; +use std::collections::{BTreeMap, HashMap}; + +impl Drive { + pub(super) fn add_estimation_costs_for_add_groups_v0( + contract_id: [u8; 32], + groups: &BTreeMap, + estimated_costs_only_with_layer_info: &mut HashMap, + ) { + // 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 GroupActions 88 Misc 104 Versions 120 + + // we have constructed the top layer so contract/documents tree are at the top + // since balance will be on layer 3 (level 2 on left then left) + // updating will mean we will update: + // 1 normal tree (group actions) + // 1 normal tree (withdrawal transactions) + // 1 sum tree (balances) + // 1 normal tree (contract/documents) + // hence we should give an equal weight to both + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path([]), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(3, false), + estimated_layer_sizes: AllSubtrees( + 1, + SomeSumTrees { + sum_trees_weight: 1, + big_sum_trees_weight: 0, + count_trees_weight: 0, + count_sum_trees_weight: 0, + non_sum_trees_weight: 2, + }, + None, + ), + }, + ); + + // there is one tree for the root path + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(group_root_path()), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(10, false), // We estimate that on average we need to update 10 nodes + estimated_layer_sizes: AllSubtrees(DEFAULT_HASH_SIZE_U8, NoSumTrees, None), + }, + ); + + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(group_contract_path(contract_id.as_slice())), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(1, false), + estimated_layer_sizes: AllSubtrees(2, NoSumTrees, None), + }, + ); + + for group_contract_position in groups.keys() { + estimated_costs_only_with_layer_info.insert( + KeyInfoPath::from_known_path(group_path( + contract_id.as_slice(), + &group_contract_position.to_be_bytes(), + )), + EstimatedLayerInformation { + tree_type: TreeType::NormalTree, + estimated_layer_count: EstimatedLevel(1, false), + estimated_layer_sizes: AllSubtrees(1, NoSumTrees, None), + }, + ); + } + } +} diff --git a/packages/rs-drive/src/drive/group/estimated_costs/mod.rs b/packages/rs-drive/src/drive/group/estimated_costs/mod.rs index ef47daecce..9537013375 100644 --- a/packages/rs-drive/src/drive/group/estimated_costs/mod.rs +++ b/packages/rs-drive/src/drive/group/estimated_costs/mod.rs @@ -1 +1,2 @@ mod for_add_group_action; +mod for_add_groups; diff --git a/packages/rs-drive/src/drive/group/insert/add_new_groups/v0/mod.rs b/packages/rs-drive/src/drive/group/insert/add_new_groups/v0/mod.rs index 2535d64d7a..7838be39bd 100644 --- a/packages/rs-drive/src/drive/group/insert/add_new_groups/v0/mod.rs +++ b/packages/rs-drive/src/drive/group/insert/add_new_groups/v0/mod.rs @@ -94,6 +94,15 @@ impl Drive { transaction: TransactionArg, platform_version: &PlatformVersion, ) -> Result, Error> { + if let Some(estimated_costs_only_with_layer_info) = estimated_costs_only_with_layer_info { + Drive::add_estimation_costs_for_add_groups( + contract_id.to_buffer(), + groups, + estimated_costs_only_with_layer_info, + &platform_version.drive, + )?; + } + let mut batch_operations: Vec = vec![]; let group_tree_path = group_root_path(); diff --git a/packages/rs-drive/src/drive/tokens/add_transaction_history_operations/v0/mod.rs b/packages/rs-drive/src/drive/tokens/add_transaction_history_operations/v0/mod.rs index 4f7a8e24c6..24da7e1129 100644 --- a/packages/rs-drive/src/drive/tokens/add_transaction_history_operations/v0/mod.rs +++ b/packages/rs-drive/src/drive/tokens/add_transaction_history_operations/v0/mod.rs @@ -37,6 +37,7 @@ impl Drive { owner_id, owner_nonce, block_info, + platform_version, )?; let operations = self.add_document_for_contract_operations( diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/mod.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/mod.rs index f4f2e61aa8..ac5990efb1 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/mod.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/mod.rs @@ -1,4 +1,5 @@ mod token_burn_transition; +mod token_config_update_transition; mod token_destroy_frozen_funds_transition; mod token_emergency_action_transition; mod token_freeze_transition; diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_config_update_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_config_update_transition.rs new file mode 100644 index 0000000000..d1e20c0b7f --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_config_update_transition.rs @@ -0,0 +1,118 @@ +use std::borrow::Cow; +use dpp::block::epoch::Epoch; +use dpp::data_contract::accessors::v1::DataContractV1Setters; +use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::group::action_event::GroupActionEvent; +use dpp::group::group_action::GroupAction; +use dpp::group::group_action::v0::GroupActionV0; +use dpp::group::GroupStateTransitionResolvedInfo; +use dpp::identifier::Identifier; +use dpp::tokens::token_event::TokenEvent; +use platform_version::version::PlatformVersion; +use crate::error::drive::DriveError; +use crate::error::Error; +use crate::state_transition_action::action_convert_to_operations::batch::DriveHighLevelBatchOperationConverter; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_config_update_transition_action::{TokenConfigUpdateTransitionAction, TokenConfigUpdateTransitionActionAccessorsV0}; +use crate::util::batch::{DataContractOperationType, DriveOperation, IdentityOperationType}; +use crate::util::batch::drive_op_batch::{GroupOperationType, TokenOperationType}; +use crate::util::batch::DriveOperation::{DataContractOperation, GroupOperation, IdentityOperation, TokenOperation}; + +impl DriveHighLevelBatchOperationConverter for TokenConfigUpdateTransitionAction { + fn into_high_level_batch_drive_operations<'b>( + self, + _epoch: &Epoch, + owner_id: Identifier, + platform_version: &PlatformVersion, + ) -> Result>, Error> { + match platform_version + .drive + .methods + .state_transitions + .convert_to_high_level_operations + .token_config_update_transition + { + 0 => { + let data_contract_id = self.base().data_contract_id(); + + let identity_contract_nonce = self.base().identity_contract_nonce(); + + let mut ops = vec![IdentityOperation( + IdentityOperationType::UpdateIdentityContractNonce { + identity_id: owner_id.into_buffer(), + contract_id: data_contract_id.into_buffer(), + nonce: identity_contract_nonce, + }, + )]; + + if let Some(GroupStateTransitionResolvedInfo { + group_contract_position, + action_id, + action_is_proposer, + signer_power, + .. + }) = self.base().store_in_group() + { + let event = TokenEvent::ConfigUpdate( + self.update_token_configuration_item().clone(), + self.public_note().cloned(), + ); + + let initialize_with_insert_action_info = if *action_is_proposer { + Some(GroupAction::V0(GroupActionV0 { + event: GroupActionEvent::TokenEvent(event), + })) + } else { + None + }; + + ops.push(GroupOperation(GroupOperationType::AddGroupAction { + contract_id: data_contract_id, + group_contract_position: *group_contract_position, + initialize_with_insert_action_info, + action_id: *action_id, + signer_identity_id: owner_id, + signer_power: *signer_power, + })); + } + + if self.base().perform_action() { + let mut contract = self.data_contract_fetch_info().contract.clone(); + let mut token_configuration = self.base().token_configuration()?.clone(); + token_configuration.apply_token_configuration_item( + self.update_token_configuration_item().clone(), + ); + contract.add_token(self.token_position(), token_configuration); + ops.push(DataContractOperation( + DataContractOperationType::ApplyContract { + contract: Cow::Owned(contract), + storage_flags: None, + }, + )); + + let token_configuration = self.base().token_configuration()?; + if token_configuration.keeps_history() { + ops.push(TokenOperation(TokenOperationType::TokenHistory { + token_id: self.token_id(), + owner_id, + nonce: identity_contract_nonce, + event: TokenEvent::ConfigUpdate( + self.update_token_configuration_item().clone(), + self.public_note_owned(), + ), + })); + } + } + + Ok(ops) + } + version => Err(Error::Drive(DriveError::UnknownVersionMismatch { + method: + "TokenConfigUpdateTransitionAction::into_high_level_document_drive_operations" + .to_string(), + known_versions: vec![0], + received: version, + })), + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_transition.rs index adb128e016..26e9ca3788 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_transition.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_transition.rs @@ -7,6 +7,7 @@ use dpp::prelude::Identifier; use dpp::tokens::token_event::TokenEvent; use dpp::version::PlatformVersion; use crate::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::TokenBurnTransitionActionAccessorsV0; +use crate::state_transition_action::batch::batched_transition::token_transition::token_config_update_transition_action::TokenConfigUpdateTransitionActionAccessorsV0; use crate::state_transition_action::batch::batched_transition::token_transition::token_destroy_frozen_funds_transition_action::TokenDestroyFrozenFundsTransitionActionAccessorsV0; use crate::state_transition_action::batch::batched_transition::token_transition::token_emergency_action_transition_action::TokenEmergencyActionTransitionActionAccessorsV0; use crate::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::TokenFreezeTransitionActionAccessorsV0; @@ -51,6 +52,8 @@ impl DriveHighLevelBatchOperationConverter for TokenTransitionAction { platform_version, ) } + TokenTransitionAction::ConfigUpdateAction(token_config_update) => token_config_update + .into_high_level_batch_drive_operations(epoch, owner_id, platform_version), } } } @@ -100,6 +103,10 @@ impl TokenTransitionAction { destroy_action.public_note().cloned(), ) } + TokenTransitionAction::ConfigUpdateAction(config_update) => TokenEvent::ConfigUpdate( + config_update.update_token_configuration_item().clone(), + config_update.public_note().cloned(), + ), } } } diff --git a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_unfreeze_transition.rs b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_unfreeze_transition.rs index ca853cf564..d297c2cae1 100644 --- a/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_unfreeze_transition.rs +++ b/packages/rs-drive/src/state_transition_action/action_convert_to_operations/batch/token/token_unfreeze_transition.rs @@ -86,7 +86,7 @@ impl DriveHighLevelBatchOperationConverter for TokenUnfreezeTransitionAction { token_id: self.token_id(), owner_id, nonce: identity_contract_nonce, - event: TokenEvent::Freeze( + event: TokenEvent::Unfreeze( self.frozen_identity_id(), self.public_note_owned(), ), diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/mod.rs index af779c91c2..df9f43a199 100644 --- a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/mod.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/mod.rs @@ -13,6 +13,8 @@ pub mod token_transfer_transition_action; /// token_unfreeze_transition_action pub mod token_unfreeze_transition_action; +/// token_config_update_transition_action +pub mod token_config_update_transition_action; /// token_destroy_frozen_funds_transition_action pub mod token_destroy_frozen_funds_transition_action; /// token_emergency_action_transition_action @@ -27,9 +29,11 @@ use dpp::document::Document; use dpp::identifier::Identifier; use dpp::prelude::{DataContract, IdentityNonce}; use dpp::ProtocolError; +use platform_version::version::PlatformVersion; use crate::error::Error; use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; use crate::state_transition_action::batch::batched_transition::token_transition::token_burn_transition_action::{TokenBurnTransitionAction, TokenBurnTransitionActionAccessorsV0}; +use crate::state_transition_action::batch::batched_transition::token_transition::token_config_update_transition_action::{TokenConfigUpdateTransitionAction, TokenConfigUpdateTransitionActionAccessorsV0}; use crate::state_transition_action::batch::batched_transition::token_transition::token_freeze_transition_action::{TokenFreezeTransitionAction, TokenFreezeTransitionActionAccessorsV0}; use crate::state_transition_action::batch::batched_transition::token_transition::token_unfreeze_transition_action::{TokenUnfreezeTransitionAction, TokenUnfreezeTransitionActionAccessorsV0}; use crate::state_transition_action::batch::batched_transition::token_transition::token_mint_transition_action::{TokenMintTransitionAction, TokenMintTransitionActionAccessorsV0}; @@ -57,6 +61,8 @@ pub enum TokenTransitionAction { EmergencyActionAction(TokenEmergencyActionTransitionAction), /// destroy frozen funds action DestroyFrozenFundsAction(TokenDestroyFrozenFundsTransitionAction), + /// update the token configuration + ConfigUpdateAction(TokenConfigUpdateTransitionAction), } impl TokenTransitionAction { @@ -70,6 +76,7 @@ impl TokenTransitionAction { TokenTransitionAction::UnfreezeAction(action) => action.base(), TokenTransitionAction::EmergencyActionAction(action) => action.base(), TokenTransitionAction::DestroyFrozenFundsAction(action) => action.base(), + TokenTransitionAction::ConfigUpdateAction(action) => action.base(), } } @@ -83,6 +90,7 @@ impl TokenTransitionAction { TokenTransitionAction::UnfreezeAction(action) => action.base_owned(), TokenTransitionAction::EmergencyActionAction(action) => action.base_owned(), TokenTransitionAction::DestroyFrozenFundsAction(action) => action.base_owned(), + TokenTransitionAction::ConfigUpdateAction(action) => action.base_owned(), } } @@ -96,6 +104,7 @@ impl TokenTransitionAction { TokenTransitionAction::UnfreezeAction(_) => "unfreeze", TokenTransitionAction::EmergencyActionAction(_) => "emergencyAction", TokenTransitionAction::DestroyFrozenFundsAction(_) => "destroyFrozenFunds", + TokenTransitionAction::ConfigUpdateAction(_) => "configUpdate", } } @@ -130,6 +139,7 @@ impl TokenTransitionAction { owner_id: Identifier, owner_nonce: IdentityNonce, block_info: &BlockInfo, + platform_version: &PlatformVersion, ) -> Result { self.associated_token_event() .build_historical_document_owned( @@ -138,6 +148,7 @@ impl TokenTransitionAction { owner_id, owner_nonce, block_info, + platform_version, ) .map_err(Error::Protocol) } diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/mod.rs new file mode 100644 index 0000000000..b40ecc2310 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/mod.rs @@ -0,0 +1,66 @@ +use derive_more::From; +use dpp::data_contract::associated_token::token_configuration_item::TokenConfigurationChangeItem; + +/// transformer module for token freeze transition action +pub mod transformer; +mod v0; + +pub use v0::*; // re-export the v0 module items (including TokenIssuanceTransitionActionV0) + +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; + +/// Token config update transition action +#[derive(Debug, Clone, From)] +pub enum TokenConfigUpdateTransitionAction { + /// v0 + V0(TokenConfigUpdateTransitionActionV0), +} + +impl TokenConfigUpdateTransitionActionAccessorsV0 for TokenConfigUpdateTransitionAction { + fn base(&self) -> &TokenBaseTransitionAction { + match self { + TokenConfigUpdateTransitionAction::V0(v0) => &v0.base, + } + } + + fn base_owned(self) -> TokenBaseTransitionAction { + match self { + TokenConfigUpdateTransitionAction::V0(v0) => v0.base, + } + } + + fn update_token_configuration_item(&self) -> &TokenConfigurationChangeItem { + match self { + TokenConfigUpdateTransitionAction::V0(v0) => &v0.update_token_configuration_item, + } + } + + fn set_update_token_configuration_item( + &mut self, + update_token_configuration_item: TokenConfigurationChangeItem, + ) { + match self { + TokenConfigUpdateTransitionAction::V0(v0) => { + v0.update_token_configuration_item = update_token_configuration_item + } + } + } + + fn public_note(&self) -> Option<&String> { + match self { + TokenConfigUpdateTransitionAction::V0(v0) => v0.public_note.as_ref(), + } + } + + fn public_note_owned(self) -> Option { + match self { + TokenConfigUpdateTransitionAction::V0(v0) => v0.public_note, + } + } + + fn set_public_note(&mut self, public_note: Option) { + match self { + TokenConfigUpdateTransitionAction::V0(v0) => v0.public_note = public_note, + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/transformer.rs new file mode 100644 index 0000000000..04ee9d1c1f --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/transformer.rs @@ -0,0 +1,117 @@ +use dpp::platform_value::Identifier; +use dpp::ProtocolError; +use grovedb::TransactionArg; +use std::sync::Arc; +use dpp::block::block_info::BlockInfo; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_config_update_transition_action::{TokenConfigUpdateTransitionActionV0, TokenConfigUpdateTransitionAction}; +use dpp::state_transition::batch_transition::token_config_update_transition::TokenConfigUpdateTransition; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::BatchedTransitionAction; + +/// Implement methods to transform a `TokenConfigUpdateTransition` into a `TokenConfigUpdateTransitionAction`. +impl TokenConfigUpdateTransitionAction { + /// Transform a `TokenConfigUpdateTransition` into a `TokenConfigUpdateTransitionAction` using the provided data contract lookup. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the freeze transition. + /// * `transaction` - The transaction argument used for state changes. + /// * `value` - A `TokenConfigUpdateTransition` instance. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state. + /// * `drive_operations` - A mutable reference to the vector of low-level operations that need to be performed. + /// * `get_data_contract` - A closure that fetches the `DataContractFetchInfo` given a contract ID. + /// * `platform_version` - The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - A `TokenConfigUpdateTransitionAction` if successful, otherwise `ProtocolError`. + pub fn try_from_token_config_update_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenConfigUpdateTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenConfigUpdateTransition::V0(v0) => { + TokenConfigUpdateTransitionActionV0::try_from_token_config_update_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } + + /// Transform a borrowed `TokenConfigUpdateTransition` into a `TokenConfigUpdateTransitionAction` using the provided data contract lookup. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance used for accessing the system. + /// * `owner_id` - The identifier of the owner initiating the freeze transition. + /// * `transaction` - The transaction argument used for state changes. + /// * `value` - A reference to a `TokenConfigUpdateTransition`. + /// * `approximate_without_state_for_costs` - A flag indicating whether to approximate state costs without full state. + /// * `drive_operations` - A mutable reference to the vector of low-level operations that need to be performed. + /// * `get_data_contract` - A closure that fetches the `DataContractFetchInfo` given a contract ID. + /// * `platform_version` - The platform version for the context in which the transition is being executed. + /// + /// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - A `TokenConfigUpdateTransitionAction` if successful, otherwise `ProtocolError`. + pub fn try_from_borrowed_token_config_update_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenConfigUpdateTransition, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + match value { + TokenConfigUpdateTransition::V0(v0) => { + TokenConfigUpdateTransitionActionV0::try_from_borrowed_token_config_update_transition_with_contract_lookup( + drive, + owner_id, + v0, + approximate_without_state_for_costs, + transaction, + block_info, + user_fee_increase, + get_data_contract, + platform_version, + ) + } + } + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/v0/mod.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/v0/mod.rs new file mode 100644 index 0000000000..9dcdcd4003 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/v0/mod.rs @@ -0,0 +1,104 @@ +mod transformer; + +use std::sync::Arc; +use dpp::data_contract::associated_token::token_configuration_item::TokenConfigurationChangeItem; +use dpp::data_contract::TokenContractPosition; +use dpp::identifier::Identifier; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::{TokenBaseTransitionAction, TokenBaseTransitionActionAccessorsV0}; + +/// Token config update transition action v0 +#[derive(Debug, Clone)] +pub struct TokenConfigUpdateTransitionActionV0 { + /// Base token transition action + pub base: TokenBaseTransitionAction, + /// Updated token configuration item + pub update_token_configuration_item: TokenConfigurationChangeItem, + /// A public note + pub public_note: Option, +} + +/// Accessors for `TokenIssuanceTransitionActionV0` +pub trait TokenConfigUpdateTransitionActionAccessorsV0 { + /// Returns a reference to the base token transition action + fn base(&self) -> &TokenBaseTransitionAction; + + /// Consumes self and returns the base token transition action + fn base_owned(self) -> TokenBaseTransitionAction; + + /// Returns the `update_token_configuration_item` + fn update_token_configuration_item(&self) -> &TokenConfigurationChangeItem; + + /// Sets the `update_token_configuration_item` + fn set_update_token_configuration_item( + &mut self, + update_token_configuration_item: TokenConfigurationChangeItem, + ); + + /// Returns the token position in the contract + fn token_position(&self) -> TokenContractPosition { + self.base().token_position() + } + + /// Returns the token ID + fn token_id(&self) -> Identifier { + self.base().token_id() + } + + /// Returns the data contract ID + fn data_contract_id(&self) -> Identifier { + self.base().data_contract_id() + } + + /// Returns a reference to the data contract fetch info + fn data_contract_fetch_info_ref(&self) -> &Arc { + self.base().data_contract_fetch_info_ref() + } + + /// Returns the data contract fetch info + fn data_contract_fetch_info(&self) -> Arc { + self.base().data_contract_fetch_info() + } + + /// Returns the public note (optional) + fn public_note(&self) -> Option<&String>; + + /// Returns the public note (owned) + fn public_note_owned(self) -> Option; + + /// Sets the public note + fn set_public_note(&mut self, public_note: Option); +} + +impl TokenConfigUpdateTransitionActionAccessorsV0 for TokenConfigUpdateTransitionActionV0 { + fn base(&self) -> &TokenBaseTransitionAction { + &self.base + } + + fn base_owned(self) -> TokenBaseTransitionAction { + self.base + } + + fn update_token_configuration_item(&self) -> &TokenConfigurationChangeItem { + &self.update_token_configuration_item + } + + fn set_update_token_configuration_item( + &mut self, + update_token_configuration_item: TokenConfigurationChangeItem, + ) { + self.update_token_configuration_item = update_token_configuration_item; + } + + fn public_note(&self) -> Option<&String> { + self.public_note.as_ref() + } + + fn public_note_owned(self) -> Option { + self.public_note + } + + fn set_public_note(&mut self, public_note: Option) { + self.public_note = public_note; + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/v0/transformer.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/v0/transformer.rs new file mode 100644 index 0000000000..b23f3d2ff7 --- /dev/null +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_config_update_transition_action/v0/transformer.rs @@ -0,0 +1,233 @@ +use std::sync::Arc; +use grovedb::TransactionArg; +use dpp::block::block_info::BlockInfo; +use dpp::identifier::Identifier; +use dpp::state_transition::batch_transition::token_config_update_transition::v0::TokenConfigUpdateTransitionV0; +use dpp::ProtocolError; +use crate::drive::contract::DataContractFetchInfo; +use crate::state_transition_action::batch::batched_transition::token_transition::token_base_transition_action::TokenBaseTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::token_config_update_transition_action::v0::TokenConfigUpdateTransitionActionV0; +use dpp::fee::fee_result::FeeResult; +use dpp::prelude::{ConsensusValidationResult, UserFeeIncrease}; +use platform_version::version::PlatformVersion; +use crate::drive::Drive; +use crate::error::Error; +use crate::state_transition_action::batch::batched_transition::BatchedTransitionAction; +use crate::state_transition_action::batch::batched_transition::token_transition::TokenTransitionAction; +use crate::state_transition_action::system::bump_identity_data_contract_nonce_action::BumpIdentityDataContractNonceAction; + +impl TokenConfigUpdateTransitionActionV0 { + /// Converts a `TokenConfigUpdateTransitionV0` into a `TokenConfigUpdateTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token config update transition and returns the corresponding transition action + /// while looking up necessary data contracts and applying the relevant logic for config update. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance which handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the config update transition. This is typically the identity + /// performing the transaction, such as the user's ID. + /// * `transaction` - A transaction context that includes the necessary state and other details for the transition. + /// * `value` - The `TokenConfigUpdateTransitionV0` struct containing the transition data, including token amount and recipient. + /// * `approximate_without_state_for_costs` - A flag to determine if costs should be approximated without considering + /// the full state for the operation. Useful for optimizing the transaction cost calculations. + /// * `block_info` - Information about the current block to calculate fees. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns a `DataContractFetchInfo` + /// containing the data contract details, including token configurations. + /// * `platform_version` - A reference to the platform version, ensuring the transition respects version-specific logic. + /// + /// # Returns + /// + /// * `Result, Error>` - Returns the constructed `TokenConfigUpdateTransitionActionV0` if successful, + /// or an error if any issue arises, such as missing data or an invalid state transition. + pub fn try_from_token_config_update_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: TokenConfigUpdateTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenConfigUpdateTransitionV0 { + base, + + update_token_configuration_item, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + &base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = BumpIdentityDataContractNonceAction::from_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::ConfigUpdateAction( + TokenConfigUpdateTransitionActionV0 { + base: base_action, + update_token_configuration_item, + public_note, + } + .into(), + )) + .into(), + fee_result, + )) + } + + /// Converts a borrowed `TokenConfigUpdateTransitionV0` into a `TokenConfigUpdateTransitionActionV0` using the provided contract lookup. + /// + /// This method processes the token config update transition and constructs the corresponding transition action while + /// looking up necessary data contracts and applying the relevant config update logic. It does not require `drive_operations` + /// to be passed as a parameter, but it manages them internally. + /// + /// # Arguments + /// + /// * `drive` - A reference to the `Drive` instance that handles data storage and retrieval. + /// * `owner_id` - The identifier of the owner initiating the config update transition. This is typically the identity + /// performing the transaction, such as the user's ID. + /// * `value` - A reference to the `TokenConfigUpdateTransitionV0` struct containing the transition data, including token + /// amount and recipient. + /// * `approximate_without_state_for_costs` - A flag to indicate whether costs should be approximated without full + /// state consideration. Useful for optimizing transaction cost calculations in scenarios where full state is not needed. + /// * `transaction` - The transaction context, which includes the necessary state and other details for the transition. + /// * `block_info` - Information about the current block (e.g., epoch) to help calculate transaction fees. + /// * `get_data_contract` - A closure function that takes a contract identifier and returns a `DataContractFetchInfo` + /// containing the data contract details, including token configurations. + /// * `platform_version` - A reference to the platform version to ensure the transition respects version-specific logic. + /// + //// # Returns + /// + /// * `Result<(ConsensusValidationResult, FeeResult), Error>` - Returns a tuple containing the constructed + /// `TokenConfigUpdateTransitionActionV0` and a `FeeResult` if successful. If an error occurs (e.g., missing data or + /// invalid state transition), it returns an `Error`. + /// + pub fn try_from_borrowed_token_config_update_transition_with_contract_lookup( + drive: &Drive, + owner_id: Identifier, + value: &TokenConfigUpdateTransitionV0, + approximate_without_state_for_costs: bool, + transaction: TransactionArg, + block_info: &BlockInfo, + user_fee_increase: UserFeeIncrease, + get_data_contract: impl Fn(Identifier) -> Result, ProtocolError>, + platform_version: &PlatformVersion, + ) -> Result< + ( + ConsensusValidationResult, + FeeResult, + ), + Error, + > { + let TokenConfigUpdateTransitionV0 { + base, + update_token_configuration_item, + public_note, + } = value; + + let mut drive_operations = vec![]; + + let base_action_validation_result = + TokenBaseTransitionAction::try_from_borrowed_base_transition_with_contract_lookup( + drive, + owner_id, + base, + approximate_without_state_for_costs, + transaction, + &mut drive_operations, + get_data_contract, + platform_version, + )?; + + let fee_result = Drive::calculate_fee( + None, + Some(drive_operations), + &block_info.epoch, + drive.config.epochs_per_era, + platform_version, + None, + )?; + + let base_action = match base_action_validation_result.is_valid() { + true => base_action_validation_result.into_data()?, + false => { + let bump_action = + BumpIdentityDataContractNonceAction::from_borrowed_token_base_transition( + base, + owner_id, + user_fee_increase, + ); + let batched_action = + BatchedTransitionAction::BumpIdentityDataContractNonce(bump_action); + + return Ok(( + ConsensusValidationResult::new_with_data_and_errors( + batched_action.into(), + base_action_validation_result.errors, + ), + fee_result, + )); + } + }; + + Ok(( + BatchedTransitionAction::TokenAction(TokenTransitionAction::ConfigUpdateAction( + TokenConfigUpdateTransitionActionV0 { + base: base_action, + update_token_configuration_item: update_token_configuration_item.clone(), + public_note: public_note.clone(), + } + .into(), + )) + .into(), + fee_result, + )) + } +} diff --git a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transition_action_type.rs b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transition_action_type.rs index 69689509bc..1d4e07a908 100644 --- a/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transition_action_type.rs +++ b/packages/rs-drive/src/state_transition_action/batch/batched_transition/token_transition/token_transition_action_type.rs @@ -17,6 +17,7 @@ impl TokenTransitionActionTypeGetter for TokenTransitionAction { TokenTransitionAction::DestroyFrozenFundsAction(_) => { TokenTransitionActionType::DestroyFrozenFunds } + TokenTransitionAction::ConfigUpdateAction(_) => TokenTransitionActionType::ConfigUpdate, } } } diff --git a/packages/rs-drive/src/util/batch/drive_op_batch/token.rs b/packages/rs-drive/src/util/batch/drive_op_batch/token.rs index 51b976c4dc..ad08114540 100644 --- a/packages/rs-drive/src/util/batch/drive_op_batch/token.rs +++ b/packages/rs-drive/src/util/batch/drive_op_batch/token.rs @@ -116,10 +116,6 @@ impl DriveLowLevelOperationConverter for TokenOperationType { mint_amount, allow_first_mint, } => { - println!( - "minting in {} token to id {} ({})", - token_id, identity_balance_holder_id, mint_amount - ); let token_id_bytes: [u8; 32] = token_id.to_buffer(); let identity_id_bytes: [u8; 32] = identity_balance_holder_id.to_buffer(); let batch_operations = drive.token_mint_operations( 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 640961d656..507ebc81a5 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 @@ -4,6 +4,7 @@ use dpp::block::block_info::BlockInfo; use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::accessors::v1::DataContractV1Getters; use dpp::data_contract::associated_token::token_configuration::accessors::v0::TokenConfigurationV0Getters; +use dpp::data_contract::config::v0::DataContractConfigGettersV0; use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::data_contract::serialized_version::DataContractInSerializationFormat; use dpp::document::{Document, DocumentV0Getters}; @@ -33,6 +34,7 @@ use dpp::state_transition::batch_transition::batched_transition::document_transi use dpp::state_transition::batch_transition::batched_transition::document_update_price_transition::v0::v0_methods::DocumentUpdatePriceTransitionV0Methods; use dpp::state_transition::batch_transition::batched_transition::token_transition::{TokenTransition, TokenTransitionV0Methods}; use dpp::state_transition::batch_transition::token_base_transition::v0::v0_methods::TokenBaseTransitionV0Methods; +use dpp::state_transition::batch_transition::token_config_update_transition::v0::v0_methods::TokenConfigUpdateTransitionV0Methods; use dpp::state_transition::batch_transition::token_destroy_frozen_funds_transition::v0::v0_methods::TokenDestroyFrozenFundsTransitionV0Methods; use dpp::state_transition::batch_transition::token_emergency_action_transition::v0::v0_methods::TokenEmergencyActionTransitionV0Methods; use dpp::state_transition::batch_transition::token_freeze_transition::v0::v0_methods::TokenFreezeTransitionV0Methods; @@ -335,6 +337,7 @@ impl Drive { identity_contract_nonce, &BlockInfo::default(), token_config, + platform_version, )?; let (root_hash, document) = query.verify_proof( false, @@ -500,6 +503,39 @@ impl Drive { } Ok((root_hash, VerifiedTokenStatus(token_status))) } + TokenTransition::ConfigUpdate(update) => { + let (root_hash, Some(updated_contract)) = + Drive::verify_contract( + proof, + Some(contract.config().keeps_history()), + false, + false, + contract.id().into_buffer(), + platform_version, + )? + else { + return Err(Error::Proof(ProofError::IncorrectProof( + "proof did not contain token status expected to exist because of state transition (token emergency action)".to_string()))); + }; + let mut expected_config = token_config.clone(); + expected_config.apply_token_configuration_item( + update.update_token_configuration_item().clone(), + ); + let new_token_config = updated_contract.expected_token_configuration( + token_transition.base().token_contract_position(), + ).map_err(|_| { + Error::Proof(ProofError::CorruptedProof("returned proof does not have a token configuration, which should not be possible".to_string())) + })?; + + if new_token_config != &expected_config { + return Err(Error::Proof(ProofError::IncorrectProof( + format!( + "expected token configuration does not match the token configuration from the proof: expected {}, found {}", + expected_config, new_token_config + )))); + } + Ok((root_hash, VerifiedDataContract(updated_contract))) + } } } } diff --git a/packages/rs-platform-version/Cargo.toml b/packages/rs-platform-version/Cargo.toml index f7b1c45da6..4f35482493 100644 --- a/packages/rs-platform-version/Cargo.toml +++ b/packages/rs-platform-version/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" thiserror = { version = "1.0.63" } bincode = { version = "2.0.0-rc.3" } versioned-feature-core = { git = "https://github.com/dashpay/versioned-feature-core", version = "1.0.0" } -grovedb-version = { git = "https://github.com/dashpay/grovedb", rev= "e3ac3f7883bb0f2e25936153f76d447b42ebc9c0" } +grovedb-version = { git = "https://github.com/dashpay/grovedb", rev= "44c2244bbccd3e6e684729e8cf620644f7ebbf70" } once_cell = "1.19.0" [features] diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/mod.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/mod.rs index 6f74987f92..237f7c75c0 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/mod.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/mod.rs @@ -23,6 +23,7 @@ pub struct DataContractMethodVersions { pub validate_document: FeatureVersion, pub validate_update: FeatureVersion, pub schema: FeatureVersion, + pub validate_groups: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/v1.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/v1.rs index 5483e66c95..467d367033 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/v1.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/v1.rs @@ -19,6 +19,7 @@ pub const CONTRACT_VERSIONS_V1: DPPContractVersions = DPPContractVersions { validate_document: 0, validate_update: 0, schema: 0, + validate_groups: 0, }, document_type_versions: DocumentTypeVersions { index_versions: DocumentTypeIndexVersions { diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/v2.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/v2.rs index 5dd797e201..854a3dc331 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/v2.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_contract_versions/v2.rs @@ -19,6 +19,7 @@ pub const CONTRACT_VERSIONS_V2: DPPContractVersions = DPPContractVersions { validate_document: 0, validate_update: 0, schema: 0, + validate_groups: 0, }, document_type_versions: DocumentTypeVersions { index_versions: DocumentTypeIndexVersions { diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/mod.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/mod.rs index c794e0ae1b..b96453f623 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/mod.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/mod.rs @@ -20,6 +20,7 @@ pub struct DataContractValidationVersions { pub validate_index_naming_duplicates: FeatureVersion, pub validate_not_defined_properties: FeatureVersion, pub validate_property_definition: FeatureVersion, + pub validate_token_config_groups_exist: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v1.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v1.rs index 38dd978bf0..6b92b0d549 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v1.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v1.rs @@ -18,6 +18,7 @@ pub const DPP_VALIDATION_VERSIONS_V1: DPPValidationVersions = DPPValidationVersi validate_index_naming_duplicates: 0, validate_not_defined_properties: 0, validate_property_definition: 0, + validate_token_config_groups_exist: 0, }, document_type: DocumentTypeValidationVersions { validate_update: 0, diff --git a/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v2.rs b/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v2.rs index dcc7727e15..05f6c86706 100644 --- a/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v2.rs +++ b/packages/rs-platform-version/src/version/dpp_versions/dpp_validation_versions/v2.rs @@ -18,6 +18,7 @@ pub const DPP_VALIDATION_VERSIONS_V2: DPPValidationVersions = DPPValidationVersi validate_index_naming_duplicates: 0, validate_not_defined_properties: 0, validate_property_definition: 0, + validate_token_config_groups_exist: 0, }, document_type: DocumentTypeValidationVersions { validate_update: 0, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs index 0fe429b592..587366149e 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs @@ -105,6 +105,7 @@ pub struct DriveAbciDocumentsStateTransitionValidationVersions { pub token_burn_transition_state_validation: FeatureVersion, pub token_transfer_transition_state_validation: FeatureVersion, pub token_base_transition_structure_validation: FeatureVersion, + pub token_base_transition_state_validation: FeatureVersion, pub token_freeze_transition_structure_validation: FeatureVersion, pub token_unfreeze_transition_structure_validation: FeatureVersion, pub token_freeze_transition_state_validation: FeatureVersion, @@ -113,6 +114,9 @@ pub struct DriveAbciDocumentsStateTransitionValidationVersions { pub token_destroy_frozen_funds_transition_state_validation: FeatureVersion, pub token_emergency_action_transition_structure_validation: FeatureVersion, pub token_emergency_action_transition_state_validation: FeatureVersion, + pub token_config_update_transition_structure_validation: FeatureVersion, + pub token_config_update_transition_state_validation: FeatureVersion, + pub token_base_transition_group_action_validation: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v1.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v1.rs index 11dc69053f..7b397d9642 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v1.rs @@ -136,6 +136,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V1: DriveAbciValidationVersions = token_burn_transition_state_validation: 0, token_transfer_transition_state_validation: 0, token_base_transition_structure_validation: 0, + token_base_transition_state_validation: 0, token_freeze_transition_structure_validation: 0, token_unfreeze_transition_structure_validation: 0, token_freeze_transition_state_validation: 0, @@ -144,6 +145,9 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V1: DriveAbciValidationVersions = token_destroy_frozen_funds_transition_state_validation: 0, token_emergency_action_transition_structure_validation: 0, token_emergency_action_transition_state_validation: 0, + token_config_update_transition_structure_validation: 0, + token_config_update_transition_state_validation: 0, + token_base_transition_group_action_validation: 0, }, }, has_nonce_validation: 0, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v2.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v2.rs index 2a08f59b38..3df6d962f5 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v2.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v2.rs @@ -136,6 +136,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V2: DriveAbciValidationVersions = token_burn_transition_state_validation: 0, token_transfer_transition_state_validation: 0, token_base_transition_structure_validation: 0, + token_base_transition_state_validation: 0, token_freeze_transition_structure_validation: 0, token_unfreeze_transition_structure_validation: 0, token_freeze_transition_state_validation: 0, @@ -144,6 +145,9 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V2: DriveAbciValidationVersions = token_destroy_frozen_funds_transition_state_validation: 0, token_emergency_action_transition_structure_validation: 0, token_emergency_action_transition_state_validation: 0, + token_config_update_transition_structure_validation: 0, + token_config_update_transition_state_validation: 0, + token_base_transition_group_action_validation: 0, }, }, has_nonce_validation: 0, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v3.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v3.rs index d706f0d838..e3aadceb22 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v3.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v3.rs @@ -136,6 +136,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V3: DriveAbciValidationVersions = token_burn_transition_state_validation: 0, token_transfer_transition_state_validation: 0, token_base_transition_structure_validation: 0, + token_base_transition_state_validation: 0, token_freeze_transition_structure_validation: 0, token_unfreeze_transition_structure_validation: 0, token_freeze_transition_state_validation: 0, @@ -144,6 +145,9 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V3: DriveAbciValidationVersions = token_destroy_frozen_funds_transition_state_validation: 0, token_emergency_action_transition_structure_validation: 0, token_emergency_action_transition_state_validation: 0, + token_config_update_transition_structure_validation: 0, + token_config_update_transition_state_validation: 0, + token_base_transition_group_action_validation: 0, }, }, has_nonce_validation: 0, diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v4.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v4.rs index 0faa2b63f6..aa0ded1027 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v4.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v4.rs @@ -139,6 +139,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V4: DriveAbciValidationVersions = token_burn_transition_state_validation: 0, token_transfer_transition_state_validation: 0, token_base_transition_structure_validation: 0, + token_base_transition_state_validation: 0, token_freeze_transition_structure_validation: 0, token_unfreeze_transition_structure_validation: 0, token_freeze_transition_state_validation: 0, @@ -147,6 +148,9 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V4: DriveAbciValidationVersions = token_destroy_frozen_funds_transition_state_validation: 0, token_emergency_action_transition_structure_validation: 0, token_emergency_action_transition_state_validation: 0, + token_config_update_transition_structure_validation: 0, + token_config_update_transition_state_validation: 0, + token_base_transition_group_action_validation: 0, }, }, has_nonce_validation: 1, // <---- changed this diff --git a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v5.rs b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v5.rs index b5d4d8c3aa..0c3bcfea28 100644 --- a/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v5.rs +++ b/packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v5.rs @@ -140,6 +140,7 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V5: DriveAbciValidationVersions = token_burn_transition_state_validation: 0, token_transfer_transition_state_validation: 0, token_base_transition_structure_validation: 0, + token_base_transition_state_validation: 0, token_freeze_transition_structure_validation: 0, token_unfreeze_transition_structure_validation: 0, token_freeze_transition_state_validation: 0, @@ -148,6 +149,9 @@ pub const DRIVE_ABCI_VALIDATION_VERSIONS_V5: DriveAbciValidationVersions = token_destroy_frozen_funds_transition_state_validation: 0, token_emergency_action_transition_structure_validation: 0, token_emergency_action_transition_state_validation: 0, + token_config_update_transition_structure_validation: 0, + token_config_update_transition_state_validation: 0, + token_base_transition_group_action_validation: 0, }, }, has_nonce_validation: 1, diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/mod.rs index 5d4e390d7e..c2a337ebe4 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/mod.rs @@ -39,4 +39,5 @@ pub struct DriveGroupInsertMethodVersions { #[derive(Clone, Debug, Default)] pub struct DriveGroupCostEstimationMethodVersions { pub for_add_group_action: FeatureVersion, + pub for_add_group: FeatureVersion, } diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/v1.rs index 259a9029f6..e6ee9e129f 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_group_method_versions/v1.rs @@ -26,5 +26,6 @@ pub const DRIVE_GROUP_METHOD_VERSIONS_V1: DriveGroupMethodVersions = DriveGroupM }, cost_estimation: DriveGroupCostEstimationMethodVersions { for_add_group_action: 0, + for_add_group: 0, }, }; diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/mod.rs b/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/mod.rs index 58fa89dddd..23c81d18ce 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/mod.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/mod.rs @@ -37,6 +37,7 @@ pub struct DriveStateTransitionActionConvertToHighLevelOperationsMethodVersions pub token_unfreeze_transition: FeatureVersion, pub token_emergency_action_transition: FeatureVersion, pub token_destroy_frozen_funds_transition: FeatureVersion, + pub token_config_update_transition: FeatureVersion, } #[derive(Clone, Debug, Default)] diff --git a/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/v1.rs b/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/v1.rs index 772b880711..5db70c5c19 100644 --- a/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/v1.rs +++ b/packages/rs-platform-version/src/version/drive_versions/drive_state_transition_method_versions/v1.rs @@ -39,5 +39,6 @@ pub const DRIVE_STATE_TRANSITION_METHOD_VERSIONS_V1: DriveStateTransitionMethodV token_unfreeze_transition: 0, token_emergency_action_transition: 0, token_destroy_frozen_funds_transition: 0, + token_config_update_transition: 0, }, }; diff --git a/packages/rs-platform-version/src/version/mocks/v2_test.rs b/packages/rs-platform-version/src/version/mocks/v2_test.rs index 9a4de6099f..81a8d0dbba 100644 --- a/packages/rs-platform-version/src/version/mocks/v2_test.rs +++ b/packages/rs-platform-version/src/version/mocks/v2_test.rs @@ -386,6 +386,7 @@ pub const TEST_PLATFORM_V2: PlatformVersion = PlatformVersion { withdrawal_transactions_per_block_limit: 4, retry_signing_expired_withdrawal_documents_per_block_limit: 1, max_withdrawal_amount: 50_000_000_000_000, + max_contract_group_size: 256, }, consensus: ConsensusVersions { tenderdash_consensus_version: 0, diff --git a/packages/rs-platform-version/src/version/system_limits/mod.rs b/packages/rs-platform-version/src/version/system_limits/mod.rs index 0dd2c5b922..4460d29d13 100644 --- a/packages/rs-platform-version/src/version/system_limits/mod.rs +++ b/packages/rs-platform-version/src/version/system_limits/mod.rs @@ -9,4 +9,5 @@ pub struct SystemLimits { pub withdrawal_transactions_per_block_limit: u16, pub retry_signing_expired_withdrawal_documents_per_block_limit: u16, pub max_withdrawal_amount: u64, + pub max_contract_group_size: u32, } diff --git a/packages/rs-platform-version/src/version/system_limits/v1.rs b/packages/rs-platform-version/src/version/system_limits/v1.rs index 6dacce0b35..b62f7bfcd0 100644 --- a/packages/rs-platform-version/src/version/system_limits/v1.rs +++ b/packages/rs-platform-version/src/version/system_limits/v1.rs @@ -8,4 +8,5 @@ pub const SYSTEM_LIMITS_V1: SystemLimits = SystemLimits { withdrawal_transactions_per_block_limit: 4, retry_signing_expired_withdrawal_documents_per_block_limit: 1, max_withdrawal_amount: 50_000_000_000_000, //500 Dash + max_contract_group_size: 256, }; diff --git a/packages/token-history-contract/schema/v1/token-history-contract-documents.json b/packages/token-history-contract/schema/v1/token-history-contract-documents.json index e6d96fd8f7..f8d1af53b0 100644 --- a/packages/token-history-contract/schema/v1/token-history-contract-documents.json +++ b/packages/token-history-contract/schema/v1/token-history-contract-documents.json @@ -576,5 +576,76 @@ "$createdAtBlockHeight" ], "additionalProperties": false + }, + "configUpdate": { + "type": "object", + "documentsMutable": false, + "canBeDeleted": false, + "creationRestrictionMode": 2, + "indices": [ + { + "name": "byOwnerId", + "properties": [ + { + "tokenId": "asc" + }, + { + "$ownerId": "asc" + }, + { + "changeItemType": "asc" + }, + { + "$createdAt": "asc" + } + ] + }, + { + "name": "byChangeItemType", + "properties": [ + { + "tokenId": "asc" + }, + { + "changeItemType": "asc" + }, + { + "$createdAt": "asc" + } + ] + } + ], + "properties": { + "tokenId": { + "type": "array", + "byteArray": true, + "minItems": 32, + "maxItems": 32, + "description": "The token ID", + "position": 0, + "contentMediaType": "application/x.dash.dpp.identifier" + }, + "changeItemType": { + "type": "integer", + "minimum": 0, + "description": "The action we are performing", + "position": 1 + }, + "changeItem": { + "type": "array", + "byteArray": true, + "minItems": 1, + "description": "The change item in serialized form", + "position": 2 + } + }, + "required": [ + "tokenId", + "changeItemType", + "changeItem", + "$createdAt", + "$createdAtBlockHeight" + ], + "additionalProperties": false } } diff --git a/packages/wasm-dpp/src/errors/consensus/consensus_error.rs b/packages/wasm-dpp/src/errors/consensus/consensus_error.rs index c3105e3187..36d42b5936 100644 --- a/packages/wasm-dpp/src/errors/consensus/consensus_error.rs +++ b/packages/wasm-dpp/src/errors/consensus/consensus_error.rs @@ -61,12 +61,13 @@ use dpp::consensus::state::data_trigger::DataTriggerError::{ DataTriggerConditionError, DataTriggerExecutionError, DataTriggerInvalidResultError, }; use wasm_bindgen::{JsError, JsValue}; -use dpp::consensus::basic::data_contract::{ContestedUniqueIndexOnMutableDocumentTypeError, ContestedUniqueIndexWithUniqueIndexError, DataContractTokenConfigurationUpdateError, InvalidDocumentTypeRequiredSecurityLevelError, InvalidTokenBaseSupplyError, NonContiguousContractGroupPositionsError, NonContiguousContractTokenPositionsError, UnknownDocumentCreationRestrictionModeError, UnknownSecurityLevelError, UnknownStorageKeyRequirementsError, UnknownTradeModeError, UnknownTransferableTypeError}; +use dpp::consensus::basic::data_contract::{ContestedUniqueIndexOnMutableDocumentTypeError, ContestedUniqueIndexWithUniqueIndexError, DataContractTokenConfigurationUpdateError, GroupExceedsMaxMembersError, GroupMemberHasPowerOfZeroError, GroupMemberHasPowerOverLimitError, GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError, GroupPositionDoesNotExistError, GroupTotalPowerLessThanRequiredError, InvalidDocumentTypeRequiredSecurityLevelError, InvalidTokenBaseSupplyError, NonContiguousContractGroupPositionsError, NonContiguousContractTokenPositionsError, UnknownDocumentCreationRestrictionModeError, UnknownSecurityLevelError, UnknownStorageKeyRequirementsError, UnknownTradeModeError, UnknownTransferableTypeError}; use dpp::consensus::basic::document::{ContestedDocumentsTemporarilyNotAllowedError, DocumentCreationNotAllowedError, DocumentFieldMaxSizeExceededError, MaxDocumentsTransitionsExceededError, MissingPositionsInDocumentTypePropertiesError}; use dpp::consensus::basic::group::GroupActionNotAllowedOnTransitionError; use dpp::consensus::basic::identity::{DataContractBoundsNotPresentError, DisablingKeyIdAlsoBeingAddedInSameTransitionError, InvalidIdentityCreditWithdrawalTransitionAmountError, InvalidIdentityUpdateTransitionDisableKeysError, InvalidIdentityUpdateTransitionEmptyError, TooManyMasterPublicKeyError, WithdrawalOutputScriptNotAllowedWhenSigningWithOwnerKeyError}; use dpp::consensus::basic::overflow_error::OverflowError; use dpp::consensus::basic::token::{ChoosingTokenMintRecipientNotAllowedError, ContractHasNoTokensError, DestinationIdentityForTokenMintingNotSetError, InvalidActionIdError, InvalidGroupPositionError, InvalidTokenIdError, InvalidTokenPositionError, TokenTransferToOurselfError}; +use dpp::consensus::state::data_contract::data_contract_update_action_not_allowed_error::DataContractUpdateActionNotAllowedError; 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; @@ -340,6 +341,9 @@ pub fn from_state_error(state_error: &StateError) -> JsValue { StateError::IdentityTokenAccountNotFrozenError(e) => { generic_consensus_error!(IdentityTokenAccountNotFrozenError, e).into() } + StateError::DataContractUpdateActionNotAllowedError(e) => { + generic_consensus_error!(DataContractUpdateActionNotAllowedError, e).into() + } } } @@ -646,6 +650,28 @@ fn from_basic_error(basic_error: &BasicError) -> JsValue { BasicError::GroupActionNotAllowedOnTransitionError(e) => { generic_consensus_error!(GroupActionNotAllowedOnTransitionError, e).into() } + BasicError::GroupPositionDoesNotExistError(e) => { + generic_consensus_error!(GroupPositionDoesNotExistError, e).into() + } + BasicError::GroupExceedsMaxMembersError(e) => { + generic_consensus_error!(GroupExceedsMaxMembersError, e).into() + } + BasicError::GroupMemberHasPowerOfZeroError(e) => { + generic_consensus_error!(GroupMemberHasPowerOfZeroError, e).into() + } + BasicError::GroupMemberHasPowerOverLimitError(e) => { + generic_consensus_error!(GroupMemberHasPowerOverLimitError, e).into() + } + BasicError::GroupTotalPowerLessThanRequiredError(e) => { + generic_consensus_error!(GroupTotalPowerLessThanRequiredError, e).into() + } + BasicError::GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError(e) => { + generic_consensus_error!( + GroupNonUnilateralMemberPowerHasLessThanRequiredPowerError, + e + ) + .into() + } } } From 2480ceb9d6f0ad2f0deaed0f7e191f088b81385e Mon Sep 17 00:00:00 2001 From: QuantumExplorer Date: Wed, 22 Jan 2025 16:33:13 +0700 Subject: [PATCH 6/6] chore: dapi grpc queries (#2437) --- .pnp.cjs | 23 + .../dash/platform/dapi/v0/PlatformGrpc.java | 740 + .../platform/v0/nodejs/platform_pbjs.js | 20412 +++++- .../platform/v0/nodejs/platform_protoc.js | 54082 +++++++++++----- .../platform/v0/objective-c/Platform.pbobjc.h | 2068 + .../platform/v0/objective-c/Platform.pbobjc.m | 5463 ++ .../platform/v0/objective-c/Platform.pbrpc.h | 130 + .../platform/v0/objective-c/Platform.pbrpc.m | 200 + .../platform/v0/python/platform_pb2.py | 7268 ++- .../platform/v0/python/platform_pb2_grpc.py | 330 + .../clients/platform/v0/web/platform_pb.d.ts | 2574 + .../clients/platform/v0/web/platform_pb.js | 54082 +++++++++++----- .../platform/v0/web/platform_pb_service.d.ts | 190 + .../platform/v0/web/platform_pb_service.js | 400 + .../src/data_contract/v1/serialization/mod.rs | 4 +- .../batched_transition/token_transition.rs | 8 +- packages/token-history-contract/src/lib.rs | 4 +- yarn.lock | 16 + 18 files changed, 112134 insertions(+), 35860 deletions(-) diff --git a/.pnp.cjs b/.pnp.cjs index 0aab8146f6..6b76ee666c 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -65,6 +65,10 @@ const RAW_RUNTIME_STATE = "name": "@dashevo/platform-test-suite",\ "reference": "workspace:packages/platform-test-suite"\ },\ + {\ + "name": "@dashevo/token-history-contract",\ + "reference": "workspace:packages/token-history-contract"\ + },\ {\ "name": "@dashevo/wallet-lib",\ "reference": "workspace:packages/wallet-lib"\ @@ -97,6 +101,7 @@ const RAW_RUNTIME_STATE = ["@dashevo/masternode-reward-shares-contract", ["workspace:packages/masternode-reward-shares-contract"]],\ ["@dashevo/platform", ["workspace:."]],\ ["@dashevo/platform-test-suite", ["workspace:packages/platform-test-suite"]],\ + ["@dashevo/token-history-contract", ["workspace:packages/token-history-contract"]],\ ["@dashevo/wallet-lib", ["workspace:packages/wallet-lib"]],\ ["@dashevo/wallet-utils-contract", ["workspace:packages/wallet-utils-contract"]],\ ["@dashevo/wasm-dpp", ["workspace:packages/wasm-dpp"]],\ @@ -3032,6 +3037,24 @@ const RAW_RUNTIME_STATE = "linkType": "HARD"\ }]\ ]],\ + ["@dashevo/token-history-contract", [\ + ["workspace:packages/token-history-contract", {\ + "packageLocation": "./packages/token-history-contract/",\ + "packageDependencies": [\ + ["@dashevo/token-history-contract", "workspace:packages/token-history-contract"],\ + ["@dashevo/wasm-dpp", "workspace:packages/wasm-dpp"],\ + ["chai", "npm:4.3.10"],\ + ["dirty-chai", "virtual:e2d057e7cc143d3cb9bec864f4a2d862441b5a09f81f8e6c46e7a098cbc89e4d07017cc6e2e2142d5704bb55da853cbec2d025ebc0b30e8696c31380c00f2c7d#npm:2.0.1"],\ + ["eslint", "npm:8.53.0"],\ + ["eslint-config-airbnb-base", "virtual:e2d057e7cc143d3cb9bec864f4a2d862441b5a09f81f8e6c46e7a098cbc89e4d07017cc6e2e2142d5704bb55da853cbec2d025ebc0b30e8696c31380c00f2c7d#npm:15.0.0"],\ + ["eslint-plugin-import", "virtual:e2d057e7cc143d3cb9bec864f4a2d862441b5a09f81f8e6c46e7a098cbc89e4d07017cc6e2e2142d5704bb55da853cbec2d025ebc0b30e8696c31380c00f2c7d#npm:2.29.0"],\ + ["mocha", "npm:10.2.0"],\ + ["sinon", "npm:17.0.1"],\ + ["sinon-chai", "virtual:e2d057e7cc143d3cb9bec864f4a2d862441b5a09f81f8e6c46e7a098cbc89e4d07017cc6e2e2142d5704bb55da853cbec2d025ebc0b30e8696c31380c00f2c7d#npm:3.7.0"]\ + ],\ + "linkType": "SOFT"\ + }]\ + ]],\ ["@dashevo/wallet-lib", [\ ["workspace:packages/wallet-lib", {\ "packageLocation": "./packages/wallet-lib/",\ 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 26cf1818f9..b055db5cbc 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 @@ -1007,6 +1007,316 @@ org.dash.platform.dapi.v0.PlatformOuterClass.GetCurrentQuorumsInfoResponse> getG return getGetCurrentQuorumsInfoMethod; } + private static volatile io.grpc.MethodDescriptor getGetIdentityTokenBalancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getIdentityTokenBalances", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenBalancesRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenBalancesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetIdentityTokenBalancesMethod() { + io.grpc.MethodDescriptor getGetIdentityTokenBalancesMethod; + if ((getGetIdentityTokenBalancesMethod = PlatformGrpc.getGetIdentityTokenBalancesMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetIdentityTokenBalancesMethod = PlatformGrpc.getGetIdentityTokenBalancesMethod) == null) { + PlatformGrpc.getGetIdentityTokenBalancesMethod = getGetIdentityTokenBalancesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getIdentityTokenBalances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenBalancesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenBalancesResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getIdentityTokenBalances")) + .build(); + } + } + } + return getGetIdentityTokenBalancesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetIdentitiesTokenBalancesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getIdentitiesTokenBalances", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenBalancesRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenBalancesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetIdentitiesTokenBalancesMethod() { + io.grpc.MethodDescriptor getGetIdentitiesTokenBalancesMethod; + if ((getGetIdentitiesTokenBalancesMethod = PlatformGrpc.getGetIdentitiesTokenBalancesMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetIdentitiesTokenBalancesMethod = PlatformGrpc.getGetIdentitiesTokenBalancesMethod) == null) { + PlatformGrpc.getGetIdentitiesTokenBalancesMethod = getGetIdentitiesTokenBalancesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getIdentitiesTokenBalances")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenBalancesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenBalancesResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getIdentitiesTokenBalances")) + .build(); + } + } + } + return getGetIdentitiesTokenBalancesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetIdentityTokenInfosMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getIdentityTokenInfos", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenInfosRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenInfosResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetIdentityTokenInfosMethod() { + io.grpc.MethodDescriptor getGetIdentityTokenInfosMethod; + if ((getGetIdentityTokenInfosMethod = PlatformGrpc.getGetIdentityTokenInfosMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetIdentityTokenInfosMethod = PlatformGrpc.getGetIdentityTokenInfosMethod) == null) { + PlatformGrpc.getGetIdentityTokenInfosMethod = getGetIdentityTokenInfosMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getIdentityTokenInfos")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenInfosRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenInfosResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getIdentityTokenInfos")) + .build(); + } + } + } + return getGetIdentityTokenInfosMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetIdentitiesTokenInfosMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getIdentitiesTokenInfos", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenInfosRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenInfosResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetIdentitiesTokenInfosMethod() { + io.grpc.MethodDescriptor getGetIdentitiesTokenInfosMethod; + if ((getGetIdentitiesTokenInfosMethod = PlatformGrpc.getGetIdentitiesTokenInfosMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetIdentitiesTokenInfosMethod = PlatformGrpc.getGetIdentitiesTokenInfosMethod) == null) { + PlatformGrpc.getGetIdentitiesTokenInfosMethod = getGetIdentitiesTokenInfosMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getIdentitiesTokenInfos")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenInfosRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenInfosResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getIdentitiesTokenInfos")) + .build(); + } + } + } + return getGetIdentitiesTokenInfosMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTokenStatusesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getTokenStatuses", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTokenStatusesMethod() { + io.grpc.MethodDescriptor getGetTokenStatusesMethod; + if ((getGetTokenStatusesMethod = PlatformGrpc.getGetTokenStatusesMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetTokenStatusesMethod = PlatformGrpc.getGetTokenStatusesMethod) == null) { + PlatformGrpc.getGetTokenStatusesMethod = getGetTokenStatusesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getTokenStatuses")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getTokenStatuses")) + .build(); + } + } + } + return getGetTokenStatusesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetTokenTotalSupplyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getTokenTotalSupply", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetTokenTotalSupplyMethod() { + io.grpc.MethodDescriptor getGetTokenTotalSupplyMethod; + if ((getGetTokenTotalSupplyMethod = PlatformGrpc.getGetTokenTotalSupplyMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetTokenTotalSupplyMethod = PlatformGrpc.getGetTokenTotalSupplyMethod) == null) { + PlatformGrpc.getGetTokenTotalSupplyMethod = getGetTokenTotalSupplyMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getTokenTotalSupply")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getTokenTotalSupply")) + .build(); + } + } + } + return getGetTokenTotalSupplyMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetGroupInfoMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getGroupInfo", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfoRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfoResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetGroupInfoMethod() { + io.grpc.MethodDescriptor getGetGroupInfoMethod; + if ((getGetGroupInfoMethod = PlatformGrpc.getGetGroupInfoMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetGroupInfoMethod = PlatformGrpc.getGetGroupInfoMethod) == null) { + PlatformGrpc.getGetGroupInfoMethod = getGetGroupInfoMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getGroupInfo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfoRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfoResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getGroupInfo")) + .build(); + } + } + } + return getGetGroupInfoMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetGroupInfosMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getGroupInfos", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfosRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfosResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetGroupInfosMethod() { + io.grpc.MethodDescriptor getGetGroupInfosMethod; + if ((getGetGroupInfosMethod = PlatformGrpc.getGetGroupInfosMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetGroupInfosMethod = PlatformGrpc.getGetGroupInfosMethod) == null) { + PlatformGrpc.getGetGroupInfosMethod = getGetGroupInfosMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getGroupInfos")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfosRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfosResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getGroupInfos")) + .build(); + } + } + } + return getGetGroupInfosMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetGroupActionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getGroupActions", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionsRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetGroupActionsMethod() { + io.grpc.MethodDescriptor getGetGroupActionsMethod; + if ((getGetGroupActionsMethod = PlatformGrpc.getGetGroupActionsMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetGroupActionsMethod = PlatformGrpc.getGetGroupActionsMethod) == null) { + PlatformGrpc.getGetGroupActionsMethod = getGetGroupActionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getGroupActions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getGroupActions")) + .build(); + } + } + } + return getGetGroupActionsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetGroupActionSignersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getGroupActionSigners", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionSignersRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionSignersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetGroupActionSignersMethod() { + io.grpc.MethodDescriptor getGetGroupActionSignersMethod; + if ((getGetGroupActionSignersMethod = PlatformGrpc.getGetGroupActionSignersMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetGroupActionSignersMethod = PlatformGrpc.getGetGroupActionSignersMethod) == null) { + PlatformGrpc.getGetGroupActionSignersMethod = getGetGroupActionSignersMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getGroupActionSigners")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionSignersRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionSignersResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getGroupActionSigners")) + .build(); + } + } + } + return getGetGroupActionSignersMethod; + } + /** * Creates a new async stub that supports all call types for the service */ @@ -1294,6 +1604,76 @@ public void getCurrentQuorumsInfo(org.dash.platform.dapi.v0.PlatformOuterClass.G io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetCurrentQuorumsInfoMethod(), responseObserver); } + /** + */ + public void getIdentityTokenBalances(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenBalancesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetIdentityTokenBalancesMethod(), responseObserver); + } + + /** + */ + public void getIdentitiesTokenBalances(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenBalancesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetIdentitiesTokenBalancesMethod(), responseObserver); + } + + /** + */ + public void getIdentityTokenInfos(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenInfosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetIdentityTokenInfosMethod(), responseObserver); + } + + /** + */ + public void getIdentitiesTokenInfos(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenInfosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetIdentitiesTokenInfosMethod(), responseObserver); + } + + /** + */ + public void getTokenStatuses(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTokenStatusesMethod(), responseObserver); + } + + /** + */ + public void getTokenTotalSupply(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTokenTotalSupplyMethod(), responseObserver); + } + + /** + */ + public void getGroupInfo(org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGroupInfoMethod(), responseObserver); + } + + /** + */ + public void getGroupInfos(org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGroupInfosMethod(), responseObserver); + } + + /** + */ + public void getGroupActions(org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGroupActionsMethod(), responseObserver); + } + + /** + */ + public void getGroupActionSigners(org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionSignersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGroupActionSignersMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( @@ -1520,6 +1900,76 @@ public void getCurrentQuorumsInfo(org.dash.platform.dapi.v0.PlatformOuterClass.G org.dash.platform.dapi.v0.PlatformOuterClass.GetCurrentQuorumsInfoRequest, org.dash.platform.dapi.v0.PlatformOuterClass.GetCurrentQuorumsInfoResponse>( this, METHODID_GET_CURRENT_QUORUMS_INFO))) + .addMethod( + getGetIdentityTokenBalancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenBalancesRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenBalancesResponse>( + this, METHODID_GET_IDENTITY_TOKEN_BALANCES))) + .addMethod( + getGetIdentitiesTokenBalancesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenBalancesRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenBalancesResponse>( + this, METHODID_GET_IDENTITIES_TOKEN_BALANCES))) + .addMethod( + getGetIdentityTokenInfosMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenInfosRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenInfosResponse>( + this, METHODID_GET_IDENTITY_TOKEN_INFOS))) + .addMethod( + getGetIdentitiesTokenInfosMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenInfosRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenInfosResponse>( + this, METHODID_GET_IDENTITIES_TOKEN_INFOS))) + .addMethod( + getGetTokenStatusesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesResponse>( + this, METHODID_GET_TOKEN_STATUSES))) + .addMethod( + getGetTokenTotalSupplyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyResponse>( + this, METHODID_GET_TOKEN_TOTAL_SUPPLY))) + .addMethod( + getGetGroupInfoMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfoRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfoResponse>( + this, METHODID_GET_GROUP_INFO))) + .addMethod( + getGetGroupInfosMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfosRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfosResponse>( + this, METHODID_GET_GROUP_INFOS))) + .addMethod( + getGetGroupActionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionsRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionsResponse>( + this, METHODID_GET_GROUP_ACTIONS))) + .addMethod( + getGetGroupActionSignersMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionSignersRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionSignersResponse>( + this, METHODID_GET_GROUP_ACTION_SIGNERS))) .build(); } } @@ -1808,6 +2258,86 @@ public void getCurrentQuorumsInfo(org.dash.platform.dapi.v0.PlatformOuterClass.G io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetCurrentQuorumsInfoMethod(), getCallOptions()), request, responseObserver); } + + /** + */ + public void getIdentityTokenBalances(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenBalancesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIdentityTokenBalancesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getIdentitiesTokenBalances(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenBalancesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIdentitiesTokenBalancesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getIdentityTokenInfos(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenInfosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIdentityTokenInfosMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getIdentitiesTokenInfos(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenInfosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetIdentitiesTokenInfosMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getTokenStatuses(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTokenStatusesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getTokenTotalSupply(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTokenTotalSupplyMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getGroupInfo(org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGroupInfoMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getGroupInfos(org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfosRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGroupInfosMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getGroupActions(org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGroupActionsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getGroupActionSigners(org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionSignersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGroupActionSignersMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -2062,6 +2592,76 @@ public org.dash.platform.dapi.v0.PlatformOuterClass.GetCurrentQuorumsInfoRespons return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetCurrentQuorumsInfoMethod(), getCallOptions(), request); } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenBalancesResponse getIdentityTokenBalances(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenBalancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIdentityTokenBalancesMethod(), getCallOptions(), request); + } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenBalancesResponse getIdentitiesTokenBalances(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenBalancesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIdentitiesTokenBalancesMethod(), getCallOptions(), request); + } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenInfosResponse getIdentityTokenInfos(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenInfosRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIdentityTokenInfosMethod(), getCallOptions(), request); + } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenInfosResponse getIdentitiesTokenInfos(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenInfosRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetIdentitiesTokenInfosMethod(), getCallOptions(), request); + } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesResponse getTokenStatuses(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTokenStatusesMethod(), getCallOptions(), request); + } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyResponse getTokenTotalSupply(org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTokenTotalSupplyMethod(), getCallOptions(), request); + } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfoResponse getGroupInfo(org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfoRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGroupInfoMethod(), getCallOptions(), request); + } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfosResponse getGroupInfos(org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfosRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGroupInfosMethod(), getCallOptions(), request); + } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionsResponse getGroupActions(org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGroupActionsMethod(), getCallOptions(), request); + } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionSignersResponse getGroupActionSigners(org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionSignersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGroupActionSignersMethod(), getCallOptions(), request); + } } /** @@ -2348,6 +2948,86 @@ public com.google.common.util.concurrent.ListenableFuture getIdentityTokenBalances( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenBalancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIdentityTokenBalancesMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getIdentitiesTokenBalances( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenBalancesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIdentitiesTokenBalancesMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getIdentityTokenInfos( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenInfosRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIdentityTokenInfosMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getIdentitiesTokenInfos( + org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenInfosRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetIdentitiesTokenInfosMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getTokenStatuses( + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTokenStatusesMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getTokenTotalSupply( + org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTokenTotalSupplyMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getGroupInfo( + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfoRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGroupInfoMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getGroupInfos( + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfosRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGroupInfosMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getGroupActions( + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGroupActionsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getGroupActionSigners( + org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionSignersRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGroupActionSignersMethod(), getCallOptions()), request); + } } private static final int METHODID_BROADCAST_STATE_TRANSITION = 0; @@ -2382,6 +3062,16 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2528,6 +3218,46 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.getCurrentQuorumsInfo((org.dash.platform.dapi.v0.PlatformOuterClass.GetCurrentQuorumsInfoRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_IDENTITY_TOKEN_BALANCES: + serviceImpl.getIdentityTokenBalances((org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenBalancesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_IDENTITIES_TOKEN_BALANCES: + serviceImpl.getIdentitiesTokenBalances((org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenBalancesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_IDENTITY_TOKEN_INFOS: + serviceImpl.getIdentityTokenInfos((org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityTokenInfosRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_IDENTITIES_TOKEN_INFOS: + serviceImpl.getIdentitiesTokenInfos((org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentitiesTokenInfosRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TOKEN_STATUSES: + serviceImpl.getTokenStatuses((org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenStatusesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TOKEN_TOTAL_SUPPLY: + serviceImpl.getTokenTotalSupply((org.dash.platform.dapi.v0.PlatformOuterClass.GetTokenTotalSupplyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_GROUP_INFO: + serviceImpl.getGroupInfo((org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfoRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_GROUP_INFOS: + serviceImpl.getGroupInfos((org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupInfosRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_GROUP_ACTIONS: + serviceImpl.getGroupActions((org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_GROUP_ACTION_SIGNERS: + serviceImpl.getGroupActionSigners((org.dash.platform.dapi.v0.PlatformOuterClass.GetGroupActionSignersRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -2621,6 +3351,16 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetPathElementsMethod()) .addMethod(getGetStatusMethod()) .addMethod(getGetCurrentQuorumsInfoMethod()) + .addMethod(getGetIdentityTokenBalancesMethod()) + .addMethod(getGetIdentitiesTokenBalancesMethod()) + .addMethod(getGetIdentityTokenInfosMethod()) + .addMethod(getGetIdentitiesTokenInfosMethod()) + .addMethod(getGetTokenStatusesMethod()) + .addMethod(getGetTokenTotalSupplyMethod()) + .addMethod(getGetGroupInfoMethod()) + .addMethod(getGetGroupInfosMethod()) + .addMethod(getGetGroupActionsMethod()) + .addMethod(getGetGroupActionSignersMethod()) .build(); } } 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 1818a68889..41ee1b9504 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js @@ -1142,6 +1142,336 @@ $root.org = (function() { * @variation 2 */ + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getIdentityTokenBalances}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getIdentityTokenBalancesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} [response] GetIdentityTokenBalancesResponse + */ + + /** + * Calls getIdentityTokenBalances. + * @function getIdentityTokenBalances + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenBalancesRequest} request GetIdentityTokenBalancesRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getIdentityTokenBalancesCallback} callback Node-style callback called with the error, if any, and GetIdentityTokenBalancesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getIdentityTokenBalances = function getIdentityTokenBalances(request, callback) { + return this.rpcCall(getIdentityTokenBalances, $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest, $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse, request, callback); + }, "name", { value: "getIdentityTokenBalances" }); + + /** + * Calls getIdentityTokenBalances. + * @function getIdentityTokenBalances + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenBalancesRequest} request GetIdentityTokenBalancesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getIdentitiesTokenBalances}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getIdentitiesTokenBalancesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} [response] GetIdentitiesTokenBalancesResponse + */ + + /** + * Calls getIdentitiesTokenBalances. + * @function getIdentitiesTokenBalances + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenBalancesRequest} request GetIdentitiesTokenBalancesRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getIdentitiesTokenBalancesCallback} callback Node-style callback called with the error, if any, and GetIdentitiesTokenBalancesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getIdentitiesTokenBalances = function getIdentitiesTokenBalances(request, callback) { + return this.rpcCall(getIdentitiesTokenBalances, $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest, $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse, request, callback); + }, "name", { value: "getIdentitiesTokenBalances" }); + + /** + * Calls getIdentitiesTokenBalances. + * @function getIdentitiesTokenBalances + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenBalancesRequest} request GetIdentitiesTokenBalancesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getIdentityTokenInfos}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getIdentityTokenInfosCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} [response] GetIdentityTokenInfosResponse + */ + + /** + * Calls getIdentityTokenInfos. + * @function getIdentityTokenInfos + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenInfosRequest} request GetIdentityTokenInfosRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getIdentityTokenInfosCallback} callback Node-style callback called with the error, if any, and GetIdentityTokenInfosResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getIdentityTokenInfos = function getIdentityTokenInfos(request, callback) { + return this.rpcCall(getIdentityTokenInfos, $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest, $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse, request, callback); + }, "name", { value: "getIdentityTokenInfos" }); + + /** + * Calls getIdentityTokenInfos. + * @function getIdentityTokenInfos + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenInfosRequest} request GetIdentityTokenInfosRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getIdentitiesTokenInfos}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getIdentitiesTokenInfosCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} [response] GetIdentitiesTokenInfosResponse + */ + + /** + * Calls getIdentitiesTokenInfos. + * @function getIdentitiesTokenInfos + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenInfosRequest} request GetIdentitiesTokenInfosRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getIdentitiesTokenInfosCallback} callback Node-style callback called with the error, if any, and GetIdentitiesTokenInfosResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getIdentitiesTokenInfos = function getIdentitiesTokenInfos(request, callback) { + return this.rpcCall(getIdentitiesTokenInfos, $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest, $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse, request, callback); + }, "name", { value: "getIdentitiesTokenInfos" }); + + /** + * Calls getIdentitiesTokenInfos. + * @function getIdentitiesTokenInfos + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenInfosRequest} request GetIdentitiesTokenInfosRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getTokenStatuses}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getTokenStatusesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse} [response] GetTokenStatusesResponse + */ + + /** + * Calls getTokenStatuses. + * @function getTokenStatuses + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetTokenStatusesRequest} request GetTokenStatusesRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getTokenStatusesCallback} callback Node-style callback called with the error, if any, and GetTokenStatusesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getTokenStatuses = function getTokenStatuses(request, callback) { + return this.rpcCall(getTokenStatuses, $root.org.dash.platform.dapi.v0.GetTokenStatusesRequest, $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse, request, callback); + }, "name", { value: "getTokenStatuses" }); + + /** + * Calls getTokenStatuses. + * @function getTokenStatuses + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetTokenStatusesRequest} request GetTokenStatusesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getTokenTotalSupply}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getTokenTotalSupplyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} [response] GetTokenTotalSupplyResponse + */ + + /** + * Calls getTokenTotalSupply. + * @function getTokenTotalSupply + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetTokenTotalSupplyRequest} request GetTokenTotalSupplyRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getTokenTotalSupplyCallback} callback Node-style callback called with the error, if any, and GetTokenTotalSupplyResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getTokenTotalSupply = function getTokenTotalSupply(request, callback) { + return this.rpcCall(getTokenTotalSupply, $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest, $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse, request, callback); + }, "name", { value: "getTokenTotalSupply" }); + + /** + * Calls getTokenTotalSupply. + * @function getTokenTotalSupply + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetTokenTotalSupplyRequest} request GetTokenTotalSupplyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getGroupInfo}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getGroupInfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse} [response] GetGroupInfoResponse + */ + + /** + * Calls getGroupInfo. + * @function getGroupInfo + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetGroupInfoRequest} request GetGroupInfoRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getGroupInfoCallback} callback Node-style callback called with the error, if any, and GetGroupInfoResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getGroupInfo = function getGroupInfo(request, callback) { + return this.rpcCall(getGroupInfo, $root.org.dash.platform.dapi.v0.GetGroupInfoRequest, $root.org.dash.platform.dapi.v0.GetGroupInfoResponse, request, callback); + }, "name", { value: "getGroupInfo" }); + + /** + * Calls getGroupInfo. + * @function getGroupInfo + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetGroupInfoRequest} request GetGroupInfoRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getGroupInfos}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getGroupInfosCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse} [response] GetGroupInfosResponse + */ + + /** + * Calls getGroupInfos. + * @function getGroupInfos + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetGroupInfosRequest} request GetGroupInfosRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getGroupInfosCallback} callback Node-style callback called with the error, if any, and GetGroupInfosResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getGroupInfos = function getGroupInfos(request, callback) { + return this.rpcCall(getGroupInfos, $root.org.dash.platform.dapi.v0.GetGroupInfosRequest, $root.org.dash.platform.dapi.v0.GetGroupInfosResponse, request, callback); + }, "name", { value: "getGroupInfos" }); + + /** + * Calls getGroupInfos. + * @function getGroupInfos + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetGroupInfosRequest} request GetGroupInfosRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getGroupActions}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getGroupActionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse} [response] GetGroupActionsResponse + */ + + /** + * Calls getGroupActions. + * @function getGroupActions + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetGroupActionsRequest} request GetGroupActionsRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getGroupActionsCallback} callback Node-style callback called with the error, if any, and GetGroupActionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getGroupActions = function getGroupActions(request, callback) { + return this.rpcCall(getGroupActions, $root.org.dash.platform.dapi.v0.GetGroupActionsRequest, $root.org.dash.platform.dapi.v0.GetGroupActionsResponse, request, callback); + }, "name", { value: "getGroupActions" }); + + /** + * Calls getGroupActions. + * @function getGroupActions + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetGroupActionsRequest} request GetGroupActionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getGroupActionSigners}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getGroupActionSignersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse} [response] GetGroupActionSignersResponse + */ + + /** + * Calls getGroupActionSigners. + * @function getGroupActionSigners + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetGroupActionSignersRequest} request GetGroupActionSignersRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getGroupActionSignersCallback} callback Node-style callback called with the error, if any, and GetGroupActionSignersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getGroupActionSigners = function getGroupActionSigners(request, callback) { + return this.rpcCall(getGroupActionSigners, $root.org.dash.platform.dapi.v0.GetGroupActionSignersRequest, $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse, request, callback); + }, "name", { value: "getGroupActionSigners" }); + + /** + * Calls getGroupActionSigners. + * @function getGroupActionSigners + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetGroupActionSignersRequest} request GetGroupActionSignersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return Platform; })(); @@ -14856,6 +15186,9 @@ $root.org = (function() { * @property {Array.|null} [contracts] GetProofsRequestV0 contracts * @property {Array.|null} [documents] GetProofsRequestV0 documents * @property {Array.|null} [votes] GetProofsRequestV0 votes + * @property {Array.|null} [identityTokenBalances] GetProofsRequestV0 identityTokenBalances + * @property {Array.|null} [identityTokenInfos] GetProofsRequestV0 identityTokenInfos + * @property {Array.|null} [tokenStatuses] GetProofsRequestV0 tokenStatuses */ /** @@ -14871,6 +15204,9 @@ $root.org = (function() { this.contracts = []; this.documents = []; this.votes = []; + this.identityTokenBalances = []; + this.identityTokenInfos = []; + this.tokenStatuses = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14909,6 +15245,30 @@ $root.org = (function() { */ GetProofsRequestV0.prototype.votes = $util.emptyArray; + /** + * GetProofsRequestV0 identityTokenBalances. + * @member {Array.} identityTokenBalances + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + * @instance + */ + GetProofsRequestV0.prototype.identityTokenBalances = $util.emptyArray; + + /** + * GetProofsRequestV0 identityTokenInfos. + * @member {Array.} identityTokenInfos + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + * @instance + */ + GetProofsRequestV0.prototype.identityTokenInfos = $util.emptyArray; + + /** + * GetProofsRequestV0 tokenStatuses. + * @member {Array.} tokenStatuses + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + * @instance + */ + GetProofsRequestV0.prototype.tokenStatuses = $util.emptyArray; + /** * Creates a new GetProofsRequestV0 instance using the specified properties. * @function create @@ -14945,6 +15305,15 @@ $root.org = (function() { if (message.votes != null && message.votes.length) for (var i = 0; i < message.votes.length; ++i) $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.encode(message.votes[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.identityTokenBalances != null && message.identityTokenBalances.length) + for (var i = 0; i < message.identityTokenBalances.length; ++i) + $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.encode(message.identityTokenBalances[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.identityTokenInfos != null && message.identityTokenInfos.length) + for (var i = 0; i < message.identityTokenInfos.length; ++i) + $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.encode(message.identityTokenInfos[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.tokenStatuses != null && message.tokenStatuses.length) + for (var i = 0; i < message.tokenStatuses.length; ++i) + $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.encode(message.tokenStatuses[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -14999,6 +15368,21 @@ $root.org = (function() { message.votes = []; message.votes.push($root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.decode(reader, reader.uint32())); break; + case 5: + if (!(message.identityTokenBalances && message.identityTokenBalances.length)) + message.identityTokenBalances = []; + message.identityTokenBalances.push($root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.identityTokenInfos && message.identityTokenInfos.length)) + message.identityTokenInfos = []; + message.identityTokenInfos.push($root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.tokenStatuses && message.tokenStatuses.length)) + message.tokenStatuses = []; + message.tokenStatuses.push($root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -15070,6 +15454,33 @@ $root.org = (function() { return "votes." + error; } } + if (message.identityTokenBalances != null && message.hasOwnProperty("identityTokenBalances")) { + if (!Array.isArray(message.identityTokenBalances)) + return "identityTokenBalances: array expected"; + for (var i = 0; i < message.identityTokenBalances.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.verify(message.identityTokenBalances[i]); + if (error) + return "identityTokenBalances." + error; + } + } + if (message.identityTokenInfos != null && message.hasOwnProperty("identityTokenInfos")) { + if (!Array.isArray(message.identityTokenInfos)) + return "identityTokenInfos: array expected"; + for (var i = 0; i < message.identityTokenInfos.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.verify(message.identityTokenInfos[i]); + if (error) + return "identityTokenInfos." + error; + } + } + if (message.tokenStatuses != null && message.hasOwnProperty("tokenStatuses")) { + if (!Array.isArray(message.tokenStatuses)) + return "tokenStatuses: array expected"; + for (var i = 0; i < message.tokenStatuses.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.verify(message.tokenStatuses[i]); + if (error) + return "tokenStatuses." + error; + } + } return null; }; @@ -15125,6 +15536,36 @@ $root.org = (function() { message.votes[i] = $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.fromObject(object.votes[i]); } } + if (object.identityTokenBalances) { + if (!Array.isArray(object.identityTokenBalances)) + throw TypeError(".org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.identityTokenBalances: array expected"); + message.identityTokenBalances = []; + for (var i = 0; i < object.identityTokenBalances.length; ++i) { + if (typeof object.identityTokenBalances[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.identityTokenBalances: object expected"); + message.identityTokenBalances[i] = $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.fromObject(object.identityTokenBalances[i]); + } + } + if (object.identityTokenInfos) { + if (!Array.isArray(object.identityTokenInfos)) + throw TypeError(".org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.identityTokenInfos: array expected"); + message.identityTokenInfos = []; + for (var i = 0; i < object.identityTokenInfos.length; ++i) { + if (typeof object.identityTokenInfos[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.identityTokenInfos: object expected"); + message.identityTokenInfos[i] = $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.fromObject(object.identityTokenInfos[i]); + } + } + if (object.tokenStatuses) { + if (!Array.isArray(object.tokenStatuses)) + throw TypeError(".org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.tokenStatuses: array expected"); + message.tokenStatuses = []; + for (var i = 0; i < object.tokenStatuses.length; ++i) { + if (typeof object.tokenStatuses[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.tokenStatuses: object expected"); + message.tokenStatuses[i] = $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.fromObject(object.tokenStatuses[i]); + } + } return message; }; @@ -15146,6 +15587,9 @@ $root.org = (function() { object.contracts = []; object.documents = []; object.votes = []; + object.identityTokenBalances = []; + object.identityTokenInfos = []; + object.tokenStatuses = []; } if (message.identities && message.identities.length) { object.identities = []; @@ -15167,6 +15611,21 @@ $root.org = (function() { for (var j = 0; j < message.votes.length; ++j) object.votes[j] = $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.toObject(message.votes[j], options); } + if (message.identityTokenBalances && message.identityTokenBalances.length) { + object.identityTokenBalances = []; + for (var j = 0; j < message.identityTokenBalances.length; ++j) + object.identityTokenBalances[j] = $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.toObject(message.identityTokenBalances[j], options); + } + if (message.identityTokenInfos && message.identityTokenInfos.length) { + object.identityTokenInfos = []; + for (var j = 0; j < message.identityTokenInfos.length; ++j) + object.identityTokenInfos[j] = $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.toObject(message.identityTokenInfos[j], options); + } + if (message.tokenStatuses && message.tokenStatuses.length) { + object.tokenStatuses = []; + for (var j = 0; j < message.tokenStatuses.length; ++j) + object.tokenStatuses[j] = $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.toObject(message.tokenStatuses[j], options); + } return object; }; @@ -16490,170 +16949,822 @@ $root.org = (function() { return VoteStatusRequest; })(); - return GetProofsRequestV0; - })(); - - return GetProofsRequest; - })(); + GetProofsRequestV0.IdentityTokenBalanceRequest = (function() { - v0.GetProofsResponse = (function() { + /** + * Properties of an IdentityTokenBalanceRequest. + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + * @interface IIdentityTokenBalanceRequest + * @property {Uint8Array|null} [tokenId] IdentityTokenBalanceRequest tokenId + * @property {Uint8Array|null} [identityId] IdentityTokenBalanceRequest identityId + */ - /** - * Properties of a GetProofsResponse. - * @memberof org.dash.platform.dapi.v0 - * @interface IGetProofsResponse - * @property {org.dash.platform.dapi.v0.GetProofsResponse.IGetProofsResponseV0|null} [v0] GetProofsResponse v0 - */ + /** + * Constructs a new IdentityTokenBalanceRequest. + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + * @classdesc Represents an IdentityTokenBalanceRequest. + * @implements IIdentityTokenBalanceRequest + * @constructor + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IIdentityTokenBalanceRequest=} [properties] Properties to set + */ + function IdentityTokenBalanceRequest(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]]; + } - /** - * Constructs a new GetProofsResponse. - * @memberof org.dash.platform.dapi.v0 - * @classdesc Represents a GetProofsResponse. - * @implements IGetProofsResponse - * @constructor - * @param {org.dash.platform.dapi.v0.IGetProofsResponse=} [properties] Properties to set - */ - function GetProofsResponse(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]]; - } + /** + * IdentityTokenBalanceRequest tokenId. + * @member {Uint8Array} tokenId + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + * @instance + */ + IdentityTokenBalanceRequest.prototype.tokenId = $util.newBuffer([]); - /** - * GetProofsResponse v0. - * @member {org.dash.platform.dapi.v0.GetProofsResponse.IGetProofsResponseV0|null|undefined} v0 - * @memberof org.dash.platform.dapi.v0.GetProofsResponse - * @instance - */ - GetProofsResponse.prototype.v0 = null; + /** + * IdentityTokenBalanceRequest identityId. + * @member {Uint8Array} identityId + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + * @instance + */ + IdentityTokenBalanceRequest.prototype.identityId = $util.newBuffer([]); - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a new IdentityTokenBalanceRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + * @static + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IIdentityTokenBalanceRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} IdentityTokenBalanceRequest instance + */ + IdentityTokenBalanceRequest.create = function create(properties) { + return new IdentityTokenBalanceRequest(properties); + }; - /** - * GetProofsResponse version. - * @member {"v0"|undefined} version - * @memberof org.dash.platform.dapi.v0.GetProofsResponse - * @instance - */ - Object.defineProperty(GetProofsResponse.prototype, "version", { - get: $util.oneOfGetter($oneOfFields = ["v0"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified IdentityTokenBalanceRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + * @static + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IIdentityTokenBalanceRequest} message IdentityTokenBalanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityTokenBalanceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenId != null && Object.hasOwnProperty.call(message, "tokenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenId); + if (message.identityId != null && Object.hasOwnProperty.call(message, "identityId")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.identityId); + return writer; + }; - /** - * Creates a new GetProofsResponse instance using the specified properties. - * @function create - * @memberof org.dash.platform.dapi.v0.GetProofsResponse - * @static - * @param {org.dash.platform.dapi.v0.IGetProofsResponse=} [properties] Properties to set - * @returns {org.dash.platform.dapi.v0.GetProofsResponse} GetProofsResponse instance - */ - GetProofsResponse.create = function create(properties) { - return new GetProofsResponse(properties); - }; + /** + * Encodes the specified IdentityTokenBalanceRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + * @static + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IIdentityTokenBalanceRequest} message IdentityTokenBalanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityTokenBalanceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified GetProofsResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetProofsResponse.verify|verify} messages. - * @function encode - * @memberof org.dash.platform.dapi.v0.GetProofsResponse - * @static - * @param {org.dash.platform.dapi.v0.IGetProofsResponse} message GetProofsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetProofsResponse.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.GetProofsResponse.GetProofsResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * Decodes an IdentityTokenBalanceRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + * @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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} IdentityTokenBalanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityTokenBalanceRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenId = reader.bytes(); + break; + case 2: + message.identityId = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified GetProofsResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetProofsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof org.dash.platform.dapi.v0.GetProofsResponse - * @static - * @param {org.dash.platform.dapi.v0.IGetProofsResponse} message GetProofsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetProofsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes an IdentityTokenBalanceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} IdentityTokenBalanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityTokenBalanceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a GetProofsResponse message from the specified reader or buffer. - * @function decode - * @memberof org.dash.platform.dapi.v0.GetProofsResponse - * @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.GetProofsResponse} GetProofsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetProofsResponse.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.GetProofsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.v0 = $root.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Verifies an IdentityTokenBalanceRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentityTokenBalanceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + if (!(message.tokenId && typeof message.tokenId.length === "number" || $util.isString(message.tokenId))) + return "tokenId: buffer expected"; + if (message.identityId != null && message.hasOwnProperty("identityId")) + if (!(message.identityId && typeof message.identityId.length === "number" || $util.isString(message.identityId))) + return "identityId: buffer expected"; + return null; + }; - /** - * Decodes a GetProofsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof org.dash.platform.dapi.v0.GetProofsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {org.dash.platform.dapi.v0.GetProofsResponse} GetProofsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetProofsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates an IdentityTokenBalanceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} IdentityTokenBalanceRequest + */ + IdentityTokenBalanceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest(); + if (object.tokenId != null) + if (typeof object.tokenId === "string") + $util.base64.decode(object.tokenId, message.tokenId = $util.newBuffer($util.base64.length(object.tokenId)), 0); + else if (object.tokenId.length >= 0) + message.tokenId = object.tokenId; + 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; + return message; + }; - /** - * Verifies a GetProofsResponse message. - * @function verify - * @memberof org.dash.platform.dapi.v0.GetProofsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetProofsResponse.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.GetProofsResponse.GetProofsResponseV0.verify(message.v0); - if (error) - return "v0." + error; - } - } - return null; - }; + /** + * Creates a plain object from an IdentityTokenBalanceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + * @static + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} message IdentityTokenBalanceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentityTokenBalanceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tokenId = ""; + else { + object.tokenId = []; + if (options.bytes !== Array) + object.tokenId = $util.newBuffer(object.tokenId); + } + if (options.bytes === String) + object.identityId = ""; + else { + object.identityId = []; + if (options.bytes !== Array) + object.identityId = $util.newBuffer(object.identityId); + } + } + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenId) : message.tokenId; + 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; + return object; + }; - /** - * Creates a GetProofsResponse message from a plain object. Also converts values to their respective internal types. + /** + * Converts this IdentityTokenBalanceRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest + * @instance + * @returns {Object.} JSON object + */ + IdentityTokenBalanceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentityTokenBalanceRequest; + })(); + + GetProofsRequestV0.IdentityTokenInfoRequest = (function() { + + /** + * Properties of an IdentityTokenInfoRequest. + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + * @interface IIdentityTokenInfoRequest + * @property {Uint8Array|null} [tokenId] IdentityTokenInfoRequest tokenId + * @property {Uint8Array|null} [identityId] IdentityTokenInfoRequest identityId + */ + + /** + * Constructs a new IdentityTokenInfoRequest. + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + * @classdesc Represents an IdentityTokenInfoRequest. + * @implements IIdentityTokenInfoRequest + * @constructor + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IIdentityTokenInfoRequest=} [properties] Properties to set + */ + function IdentityTokenInfoRequest(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]]; + } + + /** + * IdentityTokenInfoRequest tokenId. + * @member {Uint8Array} tokenId + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + * @instance + */ + IdentityTokenInfoRequest.prototype.tokenId = $util.newBuffer([]); + + /** + * IdentityTokenInfoRequest identityId. + * @member {Uint8Array} identityId + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + * @instance + */ + IdentityTokenInfoRequest.prototype.identityId = $util.newBuffer([]); + + /** + * Creates a new IdentityTokenInfoRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + * @static + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IIdentityTokenInfoRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} IdentityTokenInfoRequest instance + */ + IdentityTokenInfoRequest.create = function create(properties) { + return new IdentityTokenInfoRequest(properties); + }; + + /** + * Encodes the specified IdentityTokenInfoRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + * @static + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IIdentityTokenInfoRequest} message IdentityTokenInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityTokenInfoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenId != null && Object.hasOwnProperty.call(message, "tokenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenId); + if (message.identityId != null && Object.hasOwnProperty.call(message, "identityId")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.identityId); + return writer; + }; + + /** + * Encodes the specified IdentityTokenInfoRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + * @static + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IIdentityTokenInfoRequest} message IdentityTokenInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityTokenInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentityTokenInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + * @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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} IdentityTokenInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityTokenInfoRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenId = reader.bytes(); + break; + case 2: + message.identityId = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentityTokenInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} IdentityTokenInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityTokenInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentityTokenInfoRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentityTokenInfoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + if (!(message.tokenId && typeof message.tokenId.length === "number" || $util.isString(message.tokenId))) + return "tokenId: buffer expected"; + if (message.identityId != null && message.hasOwnProperty("identityId")) + if (!(message.identityId && typeof message.identityId.length === "number" || $util.isString(message.identityId))) + return "identityId: buffer expected"; + return null; + }; + + /** + * Creates an IdentityTokenInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} IdentityTokenInfoRequest + */ + IdentityTokenInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest(); + if (object.tokenId != null) + if (typeof object.tokenId === "string") + $util.base64.decode(object.tokenId, message.tokenId = $util.newBuffer($util.base64.length(object.tokenId)), 0); + else if (object.tokenId.length >= 0) + message.tokenId = object.tokenId; + 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; + return message; + }; + + /** + * Creates a plain object from an IdentityTokenInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + * @static + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} message IdentityTokenInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentityTokenInfoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tokenId = ""; + else { + object.tokenId = []; + if (options.bytes !== Array) + object.tokenId = $util.newBuffer(object.tokenId); + } + if (options.bytes === String) + object.identityId = ""; + else { + object.identityId = []; + if (options.bytes !== Array) + object.identityId = $util.newBuffer(object.identityId); + } + } + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenId) : message.tokenId; + 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; + return object; + }; + + /** + * Converts this IdentityTokenInfoRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest + * @instance + * @returns {Object.} JSON object + */ + IdentityTokenInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentityTokenInfoRequest; + })(); + + GetProofsRequestV0.TokenStatusRequest = (function() { + + /** + * Properties of a TokenStatusRequest. + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + * @interface ITokenStatusRequest + * @property {Uint8Array|null} [tokenId] TokenStatusRequest tokenId + */ + + /** + * Constructs a new TokenStatusRequest. + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0 + * @classdesc Represents a TokenStatusRequest. + * @implements ITokenStatusRequest + * @constructor + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ITokenStatusRequest=} [properties] Properties to set + */ + function TokenStatusRequest(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]]; + } + + /** + * TokenStatusRequest tokenId. + * @member {Uint8Array} tokenId + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + * @instance + */ + TokenStatusRequest.prototype.tokenId = $util.newBuffer([]); + + /** + * Creates a new TokenStatusRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + * @static + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ITokenStatusRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} TokenStatusRequest instance + */ + TokenStatusRequest.create = function create(properties) { + return new TokenStatusRequest(properties); + }; + + /** + * Encodes the specified TokenStatusRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + * @static + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ITokenStatusRequest} message TokenStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenStatusRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenId != null && Object.hasOwnProperty.call(message, "tokenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenId); + return writer; + }; + + /** + * Encodes the specified TokenStatusRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + * @static + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ITokenStatusRequest} message TokenStatusRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenStatusRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + * @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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} TokenStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenStatusRequest.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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenId = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenStatusRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} TokenStatusRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenStatusRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenStatusRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenStatusRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + if (!(message.tokenId && typeof message.tokenId.length === "number" || $util.isString(message.tokenId))) + return "tokenId: buffer expected"; + return null; + }; + + /** + * Creates a TokenStatusRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} TokenStatusRequest + */ + TokenStatusRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest(); + if (object.tokenId != null) + if (typeof object.tokenId === "string") + $util.base64.decode(object.tokenId, message.tokenId = $util.newBuffer($util.base64.length(object.tokenId)), 0); + else if (object.tokenId.length >= 0) + message.tokenId = object.tokenId; + return message; + }; + + /** + * Creates a plain object from a TokenStatusRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + * @static + * @param {org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} message TokenStatusRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenStatusRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.tokenId = ""; + else { + object.tokenId = []; + if (options.bytes !== Array) + object.tokenId = $util.newBuffer(object.tokenId); + } + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenId) : message.tokenId; + return object; + }; + + /** + * Converts this TokenStatusRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest + * @instance + * @returns {Object.} JSON object + */ + TokenStatusRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenStatusRequest; + })(); + + return GetProofsRequestV0; + })(); + + return GetProofsRequest; + })(); + + v0.GetProofsResponse = (function() { + + /** + * Properties of a GetProofsResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetProofsResponse + * @property {org.dash.platform.dapi.v0.GetProofsResponse.IGetProofsResponseV0|null} [v0] GetProofsResponse v0 + */ + + /** + * Constructs a new GetProofsResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetProofsResponse. + * @implements IGetProofsResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetProofsResponse=} [properties] Properties to set + */ + function GetProofsResponse(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]]; + } + + /** + * GetProofsResponse v0. + * @member {org.dash.platform.dapi.v0.GetProofsResponse.IGetProofsResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetProofsResponse + * @instance + */ + GetProofsResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetProofsResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetProofsResponse + * @instance + */ + Object.defineProperty(GetProofsResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetProofsResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetProofsResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetProofsResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetProofsResponse} GetProofsResponse instance + */ + GetProofsResponse.create = function create(properties) { + return new GetProofsResponse(properties); + }; + + /** + * Encodes the specified GetProofsResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetProofsResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetProofsResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetProofsResponse} message GetProofsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProofsResponse.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.GetProofsResponse.GetProofsResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetProofsResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetProofsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetProofsResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetProofsResponse} message GetProofsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProofsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetProofsResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetProofsResponse + * @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.GetProofsResponse} GetProofsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProofsResponse.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.GetProofsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetProofsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetProofsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetProofsResponse} GetProofsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProofsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetProofsResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetProofsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetProofsResponse.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.GetProofsResponse.GetProofsResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetProofsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof org.dash.platform.dapi.v0.GetProofsResponse * @static @@ -46592,6 +47703,19005 @@ $root.org = (function() { return GetCurrentQuorumsInfoResponse; })(); + v0.GetIdentityTokenBalancesRequest = (function() { + + /** + * Properties of a GetIdentityTokenBalancesRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetIdentityTokenBalancesRequest + * @property {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.IGetIdentityTokenBalancesRequestV0|null} [v0] GetIdentityTokenBalancesRequest v0 + */ + + /** + * Constructs a new GetIdentityTokenBalancesRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetIdentityTokenBalancesRequest. + * @implements IGetIdentityTokenBalancesRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenBalancesRequest=} [properties] Properties to set + */ + function GetIdentityTokenBalancesRequest(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]]; + } + + /** + * GetIdentityTokenBalancesRequest v0. + * @member {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.IGetIdentityTokenBalancesRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @instance + */ + GetIdentityTokenBalancesRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentityTokenBalancesRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @instance + */ + Object.defineProperty(GetIdentityTokenBalancesRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentityTokenBalancesRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenBalancesRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} GetIdentityTokenBalancesRequest instance + */ + GetIdentityTokenBalancesRequest.create = function create(properties) { + return new GetIdentityTokenBalancesRequest(properties); + }; + + /** + * Encodes the specified GetIdentityTokenBalancesRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenBalancesRequest} message GetIdentityTokenBalancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenBalancesRequest.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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIdentityTokenBalancesRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenBalancesRequest} message GetIdentityTokenBalancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenBalancesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentityTokenBalancesRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @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.GetIdentityTokenBalancesRequest} GetIdentityTokenBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenBalancesRequest.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.GetIdentityTokenBalancesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentityTokenBalancesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} GetIdentityTokenBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenBalancesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentityTokenBalancesRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentityTokenBalancesRequest.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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetIdentityTokenBalancesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} GetIdentityTokenBalancesRequest + */ + GetIdentityTokenBalancesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentityTokenBalancesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} message GetIdentityTokenBalancesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentityTokenBalancesRequest.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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetIdentityTokenBalancesRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @instance + * @returns {Object.} JSON object + */ + GetIdentityTokenBalancesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 = (function() { + + /** + * Properties of a GetIdentityTokenBalancesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @interface IGetIdentityTokenBalancesRequestV0 + * @property {Uint8Array|null} [identityId] GetIdentityTokenBalancesRequestV0 identityId + * @property {Array.|null} [tokenIds] GetIdentityTokenBalancesRequestV0 tokenIds + * @property {boolean|null} [prove] GetIdentityTokenBalancesRequestV0 prove + */ + + /** + * Constructs a new GetIdentityTokenBalancesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest + * @classdesc Represents a GetIdentityTokenBalancesRequestV0. + * @implements IGetIdentityTokenBalancesRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.IGetIdentityTokenBalancesRequestV0=} [properties] Properties to set + */ + function GetIdentityTokenBalancesRequestV0(properties) { + this.tokenIds = []; + 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]]; + } + + /** + * GetIdentityTokenBalancesRequestV0 identityId. + * @member {Uint8Array} identityId + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + * @instance + */ + GetIdentityTokenBalancesRequestV0.prototype.identityId = $util.newBuffer([]); + + /** + * GetIdentityTokenBalancesRequestV0 tokenIds. + * @member {Array.} tokenIds + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + * @instance + */ + GetIdentityTokenBalancesRequestV0.prototype.tokenIds = $util.emptyArray; + + /** + * GetIdentityTokenBalancesRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + * @instance + */ + GetIdentityTokenBalancesRequestV0.prototype.prove = false; + + /** + * Creates a new GetIdentityTokenBalancesRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.IGetIdentityTokenBalancesRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} GetIdentityTokenBalancesRequestV0 instance + */ + GetIdentityTokenBalancesRequestV0.create = function create(properties) { + return new GetIdentityTokenBalancesRequestV0(properties); + }; + + /** + * Encodes the specified GetIdentityTokenBalancesRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.IGetIdentityTokenBalancesRequestV0} message GetIdentityTokenBalancesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenBalancesRequestV0.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.tokenIds != null && message.tokenIds.length) + for (var i = 0; i < message.tokenIds.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.tokenIds[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 GetIdentityTokenBalancesRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.IGetIdentityTokenBalancesRequestV0} message GetIdentityTokenBalancesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenBalancesRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentityTokenBalancesRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + * @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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} GetIdentityTokenBalancesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenBalancesRequestV0.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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.identityId = reader.bytes(); + break; + case 2: + if (!(message.tokenIds && message.tokenIds.length)) + message.tokenIds = []; + message.tokenIds.push(reader.bytes()); + break; + case 3: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentityTokenBalancesRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} GetIdentityTokenBalancesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenBalancesRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentityTokenBalancesRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentityTokenBalancesRequestV0.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.tokenIds != null && message.hasOwnProperty("tokenIds")) { + if (!Array.isArray(message.tokenIds)) + return "tokenIds: array expected"; + for (var i = 0; i < message.tokenIds.length; ++i) + if (!(message.tokenIds[i] && typeof message.tokenIds[i].length === "number" || $util.isString(message.tokenIds[i]))) + return "tokenIds: buffer[] expected"; + } + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetIdentityTokenBalancesRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} GetIdentityTokenBalancesRequestV0 + */ + GetIdentityTokenBalancesRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0(); + 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.tokenIds) { + if (!Array.isArray(object.tokenIds)) + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.tokenIds: array expected"); + message.tokenIds = []; + for (var i = 0; i < object.tokenIds.length; ++i) + if (typeof object.tokenIds[i] === "string") + $util.base64.decode(object.tokenIds[i], message.tokenIds[i] = $util.newBuffer($util.base64.length(object.tokenIds[i])), 0); + else if (object.tokenIds[i].length >= 0) + message.tokenIds[i] = object.tokenIds[i]; + } + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetIdentityTokenBalancesRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} message GetIdentityTokenBalancesRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentityTokenBalancesRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tokenIds = []; + if (options.defaults) { + if (options.bytes === String) + object.identityId = ""; + else { + object.identityId = []; + if (options.bytes !== Array) + object.identityId = $util.newBuffer(object.identityId); + } + object.prove = false; + } + 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.tokenIds && message.tokenIds.length) { + object.tokenIds = []; + for (var j = 0; j < message.tokenIds.length; ++j) + object.tokenIds[j] = options.bytes === String ? $util.base64.encode(message.tokenIds[j], 0, message.tokenIds[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenIds[j]) : message.tokenIds[j]; + } + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetIdentityTokenBalancesRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetIdentityTokenBalancesRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetIdentityTokenBalancesRequestV0; + })(); + + return GetIdentityTokenBalancesRequest; + })(); + + v0.GetIdentityTokenBalancesResponse = (function() { + + /** + * Properties of a GetIdentityTokenBalancesResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetIdentityTokenBalancesResponse + * @property {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.IGetIdentityTokenBalancesResponseV0|null} [v0] GetIdentityTokenBalancesResponse v0 + */ + + /** + * Constructs a new GetIdentityTokenBalancesResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetIdentityTokenBalancesResponse. + * @implements IGetIdentityTokenBalancesResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenBalancesResponse=} [properties] Properties to set + */ + function GetIdentityTokenBalancesResponse(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]]; + } + + /** + * GetIdentityTokenBalancesResponse v0. + * @member {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.IGetIdentityTokenBalancesResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @instance + */ + GetIdentityTokenBalancesResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentityTokenBalancesResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @instance + */ + Object.defineProperty(GetIdentityTokenBalancesResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentityTokenBalancesResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenBalancesResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} GetIdentityTokenBalancesResponse instance + */ + GetIdentityTokenBalancesResponse.create = function create(properties) { + return new GetIdentityTokenBalancesResponse(properties); + }; + + /** + * Encodes the specified GetIdentityTokenBalancesResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenBalancesResponse} message GetIdentityTokenBalancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenBalancesResponse.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIdentityTokenBalancesResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenBalancesResponse} message GetIdentityTokenBalancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenBalancesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentityTokenBalancesResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @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.GetIdentityTokenBalancesResponse} GetIdentityTokenBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenBalancesResponse.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.GetIdentityTokenBalancesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentityTokenBalancesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} GetIdentityTokenBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenBalancesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentityTokenBalancesResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentityTokenBalancesResponse.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetIdentityTokenBalancesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} GetIdentityTokenBalancesResponse + */ + GetIdentityTokenBalancesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentityTokenBalancesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} message GetIdentityTokenBalancesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentityTokenBalancesResponse.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetIdentityTokenBalancesResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @instance + * @returns {Object.} JSON object + */ + GetIdentityTokenBalancesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 = (function() { + + /** + * Properties of a GetIdentityTokenBalancesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @interface IGetIdentityTokenBalancesResponseV0 + * @property {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ITokenBalances|null} [tokenBalances] GetIdentityTokenBalancesResponseV0 tokenBalances + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetIdentityTokenBalancesResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetIdentityTokenBalancesResponseV0 metadata + */ + + /** + * Constructs a new GetIdentityTokenBalancesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse + * @classdesc Represents a GetIdentityTokenBalancesResponseV0. + * @implements IGetIdentityTokenBalancesResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.IGetIdentityTokenBalancesResponseV0=} [properties] Properties to set + */ + function GetIdentityTokenBalancesResponseV0(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]]; + } + + /** + * GetIdentityTokenBalancesResponseV0 tokenBalances. + * @member {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ITokenBalances|null|undefined} tokenBalances + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @instance + */ + GetIdentityTokenBalancesResponseV0.prototype.tokenBalances = null; + + /** + * GetIdentityTokenBalancesResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @instance + */ + GetIdentityTokenBalancesResponseV0.prototype.proof = null; + + /** + * GetIdentityTokenBalancesResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @instance + */ + GetIdentityTokenBalancesResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentityTokenBalancesResponseV0 result. + * @member {"tokenBalances"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @instance + */ + Object.defineProperty(GetIdentityTokenBalancesResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["tokenBalances", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentityTokenBalancesResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.IGetIdentityTokenBalancesResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} GetIdentityTokenBalancesResponseV0 instance + */ + GetIdentityTokenBalancesResponseV0.create = function create(properties) { + return new GetIdentityTokenBalancesResponseV0(properties); + }; + + /** + * Encodes the specified GetIdentityTokenBalancesResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.IGetIdentityTokenBalancesResponseV0} message GetIdentityTokenBalancesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenBalancesResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenBalances != null && Object.hasOwnProperty.call(message, "tokenBalances")) + $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.encode(message.tokenBalances, 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 GetIdentityTokenBalancesResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.IGetIdentityTokenBalancesResponseV0} message GetIdentityTokenBalancesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenBalancesResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentityTokenBalancesResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} GetIdentityTokenBalancesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenBalancesResponseV0.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenBalances = $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.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 GetIdentityTokenBalancesResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} GetIdentityTokenBalancesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenBalancesResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentityTokenBalancesResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentityTokenBalancesResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tokenBalances != null && message.hasOwnProperty("tokenBalances")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.verify(message.tokenBalances); + if (error) + return "tokenBalances." + 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 GetIdentityTokenBalancesResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} GetIdentityTokenBalancesResponseV0 + */ + GetIdentityTokenBalancesResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0(); + if (object.tokenBalances != null) { + if (typeof object.tokenBalances !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.tokenBalances: object expected"); + message.tokenBalances = $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.fromObject(object.tokenBalances); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentityTokenBalancesResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} message GetIdentityTokenBalancesResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentityTokenBalancesResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.tokenBalances != null && message.hasOwnProperty("tokenBalances")) { + object.tokenBalances = $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.toObject(message.tokenBalances, options); + if (options.oneofs) + object.result = "tokenBalances"; + } + 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 GetIdentityTokenBalancesResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetIdentityTokenBalancesResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentityTokenBalancesResponseV0.TokenBalanceEntry = (function() { + + /** + * Properties of a TokenBalanceEntry. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @interface ITokenBalanceEntry + * @property {Uint8Array|null} [tokenId] TokenBalanceEntry tokenId + * @property {number|Long|null} [balance] TokenBalanceEntry balance + */ + + /** + * Constructs a new TokenBalanceEntry. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @classdesc Represents a TokenBalanceEntry. + * @implements ITokenBalanceEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ITokenBalanceEntry=} [properties] Properties to set + */ + function TokenBalanceEntry(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]]; + } + + /** + * TokenBalanceEntry tokenId. + * @member {Uint8Array} tokenId + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + * @instance + */ + TokenBalanceEntry.prototype.tokenId = $util.newBuffer([]); + + /** + * TokenBalanceEntry balance. + * @member {number|Long} balance + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + * @instance + */ + TokenBalanceEntry.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new TokenBalanceEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ITokenBalanceEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} TokenBalanceEntry instance + */ + TokenBalanceEntry.create = function create(properties) { + return new TokenBalanceEntry(properties); + }; + + /** + * Encodes the specified TokenBalanceEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ITokenBalanceEntry} message TokenBalanceEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenBalanceEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenId != null && Object.hasOwnProperty.call(message, "tokenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenId); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.balance); + return writer; + }; + + /** + * Encodes the specified TokenBalanceEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ITokenBalanceEntry} message TokenBalanceEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenBalanceEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenBalanceEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + * @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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} TokenBalanceEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenBalanceEntry.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenId = reader.bytes(); + break; + case 2: + message.balance = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenBalanceEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} TokenBalanceEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenBalanceEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenBalanceEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenBalanceEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + if (!(message.tokenId && typeof message.tokenId.length === "number" || $util.isString(message.tokenId))) + return "tokenId: 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 a TokenBalanceEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} TokenBalanceEntry + */ + TokenBalanceEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry(); + if (object.tokenId != null) + if (typeof object.tokenId === "string") + $util.base64.decode(object.tokenId, message.tokenId = $util.newBuffer($util.base64.length(object.tokenId)), 0); + else if (object.tokenId.length >= 0) + message.tokenId = object.tokenId; + 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 a TokenBalanceEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} message TokenBalanceEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenBalanceEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tokenId = ""; + else { + object.tokenId = []; + if (options.bytes !== Array) + object.tokenId = $util.newBuffer(object.tokenId); + } + 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.tokenId != null && message.hasOwnProperty("tokenId")) + object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenId) : message.tokenId; + 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 TokenBalanceEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry + * @instance + * @returns {Object.} JSON object + */ + TokenBalanceEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenBalanceEntry; + })(); + + GetIdentityTokenBalancesResponseV0.TokenBalances = (function() { + + /** + * Properties of a TokenBalances. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @interface ITokenBalances + * @property {Array.|null} [tokenBalances] TokenBalances tokenBalances + */ + + /** + * Constructs a new TokenBalances. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 + * @classdesc Represents a TokenBalances. + * @implements ITokenBalances + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ITokenBalances=} [properties] Properties to set + */ + function TokenBalances(properties) { + this.tokenBalances = []; + 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]]; + } + + /** + * TokenBalances tokenBalances. + * @member {Array.} tokenBalances + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + * @instance + */ + TokenBalances.prototype.tokenBalances = $util.emptyArray; + + /** + * Creates a new TokenBalances instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ITokenBalances=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} TokenBalances instance + */ + TokenBalances.create = function create(properties) { + return new TokenBalances(properties); + }; + + /** + * Encodes the specified TokenBalances message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ITokenBalances} message TokenBalances message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenBalances.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenBalances != null && message.tokenBalances.length) + for (var i = 0; i < message.tokenBalances.length; ++i) + $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.encode(message.tokenBalances[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TokenBalances message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ITokenBalances} message TokenBalances message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenBalances.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenBalances message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + * @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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} TokenBalances + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenBalances.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.tokenBalances && message.tokenBalances.length)) + message.tokenBalances = []; + message.tokenBalances.push($root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenBalances message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} TokenBalances + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenBalances.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenBalances message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenBalances.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenBalances != null && message.hasOwnProperty("tokenBalances")) { + if (!Array.isArray(message.tokenBalances)) + return "tokenBalances: array expected"; + for (var i = 0; i < message.tokenBalances.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.verify(message.tokenBalances[i]); + if (error) + return "tokenBalances." + error; + } + } + return null; + }; + + /** + * Creates a TokenBalances message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} TokenBalances + */ + TokenBalances.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances(); + if (object.tokenBalances) { + if (!Array.isArray(object.tokenBalances)) + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.tokenBalances: array expected"); + message.tokenBalances = []; + for (var i = 0; i < object.tokenBalances.length; ++i) { + if (typeof object.tokenBalances[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.tokenBalances: object expected"); + message.tokenBalances[i] = $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.fromObject(object.tokenBalances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TokenBalances message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} message TokenBalances + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenBalances.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tokenBalances = []; + if (message.tokenBalances && message.tokenBalances.length) { + object.tokenBalances = []; + for (var j = 0; j < message.tokenBalances.length; ++j) + object.tokenBalances[j] = $root.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.toObject(message.tokenBalances[j], options); + } + return object; + }; + + /** + * Converts this TokenBalances to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances + * @instance + * @returns {Object.} JSON object + */ + TokenBalances.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenBalances; + })(); + + return GetIdentityTokenBalancesResponseV0; + })(); + + return GetIdentityTokenBalancesResponse; + })(); + + v0.GetIdentitiesTokenBalancesRequest = (function() { + + /** + * Properties of a GetIdentitiesTokenBalancesRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetIdentitiesTokenBalancesRequest + * @property {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.IGetIdentitiesTokenBalancesRequestV0|null} [v0] GetIdentitiesTokenBalancesRequest v0 + */ + + /** + * Constructs a new GetIdentitiesTokenBalancesRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetIdentitiesTokenBalancesRequest. + * @implements IGetIdentitiesTokenBalancesRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenBalancesRequest=} [properties] Properties to set + */ + function GetIdentitiesTokenBalancesRequest(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]]; + } + + /** + * GetIdentitiesTokenBalancesRequest v0. + * @member {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.IGetIdentitiesTokenBalancesRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @instance + */ + GetIdentitiesTokenBalancesRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentitiesTokenBalancesRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @instance + */ + Object.defineProperty(GetIdentitiesTokenBalancesRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentitiesTokenBalancesRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenBalancesRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} GetIdentitiesTokenBalancesRequest instance + */ + GetIdentitiesTokenBalancesRequest.create = function create(properties) { + return new GetIdentitiesTokenBalancesRequest(properties); + }; + + /** + * Encodes the specified GetIdentitiesTokenBalancesRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenBalancesRequest} message GetIdentitiesTokenBalancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenBalancesRequest.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.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIdentitiesTokenBalancesRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenBalancesRequest} message GetIdentitiesTokenBalancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenBalancesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesTokenBalancesRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @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.GetIdentitiesTokenBalancesRequest} GetIdentitiesTokenBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenBalancesRequest.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.GetIdentitiesTokenBalancesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentitiesTokenBalancesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} GetIdentitiesTokenBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenBalancesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesTokenBalancesRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesTokenBalancesRequest.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.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetIdentitiesTokenBalancesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} GetIdentitiesTokenBalancesRequest + */ + GetIdentitiesTokenBalancesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesTokenBalancesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} message GetIdentitiesTokenBalancesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesTokenBalancesRequest.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.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetIdentitiesTokenBalancesRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesTokenBalancesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 = (function() { + + /** + * Properties of a GetIdentitiesTokenBalancesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @interface IGetIdentitiesTokenBalancesRequestV0 + * @property {Uint8Array|null} [tokenId] GetIdentitiesTokenBalancesRequestV0 tokenId + * @property {Array.|null} [identityIds] GetIdentitiesTokenBalancesRequestV0 identityIds + * @property {boolean|null} [prove] GetIdentitiesTokenBalancesRequestV0 prove + */ + + /** + * Constructs a new GetIdentitiesTokenBalancesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest + * @classdesc Represents a GetIdentitiesTokenBalancesRequestV0. + * @implements IGetIdentitiesTokenBalancesRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.IGetIdentitiesTokenBalancesRequestV0=} [properties] Properties to set + */ + function GetIdentitiesTokenBalancesRequestV0(properties) { + this.identityIds = []; + 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]]; + } + + /** + * GetIdentitiesTokenBalancesRequestV0 tokenId. + * @member {Uint8Array} tokenId + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + * @instance + */ + GetIdentitiesTokenBalancesRequestV0.prototype.tokenId = $util.newBuffer([]); + + /** + * GetIdentitiesTokenBalancesRequestV0 identityIds. + * @member {Array.} identityIds + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + * @instance + */ + GetIdentitiesTokenBalancesRequestV0.prototype.identityIds = $util.emptyArray; + + /** + * GetIdentitiesTokenBalancesRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + * @instance + */ + GetIdentitiesTokenBalancesRequestV0.prototype.prove = false; + + /** + * Creates a new GetIdentitiesTokenBalancesRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.IGetIdentitiesTokenBalancesRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} GetIdentitiesTokenBalancesRequestV0 instance + */ + GetIdentitiesTokenBalancesRequestV0.create = function create(properties) { + return new GetIdentitiesTokenBalancesRequestV0(properties); + }; + + /** + * Encodes the specified GetIdentitiesTokenBalancesRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.IGetIdentitiesTokenBalancesRequestV0} message GetIdentitiesTokenBalancesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenBalancesRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenId != null && Object.hasOwnProperty.call(message, "tokenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenId); + if (message.identityIds != null && message.identityIds.length) + for (var i = 0; i < message.identityIds.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.identityIds[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 GetIdentitiesTokenBalancesRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.IGetIdentitiesTokenBalancesRequestV0} message GetIdentitiesTokenBalancesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenBalancesRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesTokenBalancesRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + * @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.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} GetIdentitiesTokenBalancesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenBalancesRequestV0.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.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenId = reader.bytes(); + break; + case 2: + if (!(message.identityIds && message.identityIds.length)) + message.identityIds = []; + message.identityIds.push(reader.bytes()); + break; + case 3: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentitiesTokenBalancesRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} GetIdentitiesTokenBalancesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenBalancesRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesTokenBalancesRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesTokenBalancesRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + if (!(message.tokenId && typeof message.tokenId.length === "number" || $util.isString(message.tokenId))) + return "tokenId: buffer expected"; + if (message.identityIds != null && message.hasOwnProperty("identityIds")) { + if (!Array.isArray(message.identityIds)) + return "identityIds: array expected"; + for (var i = 0; i < message.identityIds.length; ++i) + if (!(message.identityIds[i] && typeof message.identityIds[i].length === "number" || $util.isString(message.identityIds[i]))) + return "identityIds: buffer[] expected"; + } + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetIdentitiesTokenBalancesRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} GetIdentitiesTokenBalancesRequestV0 + */ + GetIdentitiesTokenBalancesRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0(); + if (object.tokenId != null) + if (typeof object.tokenId === "string") + $util.base64.decode(object.tokenId, message.tokenId = $util.newBuffer($util.base64.length(object.tokenId)), 0); + else if (object.tokenId.length >= 0) + message.tokenId = object.tokenId; + if (object.identityIds) { + if (!Array.isArray(object.identityIds)) + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.identityIds: array expected"); + message.identityIds = []; + for (var i = 0; i < object.identityIds.length; ++i) + if (typeof object.identityIds[i] === "string") + $util.base64.decode(object.identityIds[i], message.identityIds[i] = $util.newBuffer($util.base64.length(object.identityIds[i])), 0); + else if (object.identityIds[i].length >= 0) + message.identityIds[i] = object.identityIds[i]; + } + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesTokenBalancesRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} message GetIdentitiesTokenBalancesRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesTokenBalancesRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.identityIds = []; + if (options.defaults) { + if (options.bytes === String) + object.tokenId = ""; + else { + object.tokenId = []; + if (options.bytes !== Array) + object.tokenId = $util.newBuffer(object.tokenId); + } + object.prove = false; + } + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenId) : message.tokenId; + if (message.identityIds && message.identityIds.length) { + object.identityIds = []; + for (var j = 0; j < message.identityIds.length; ++j) + object.identityIds[j] = options.bytes === String ? $util.base64.encode(message.identityIds[j], 0, message.identityIds[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.identityIds[j]) : message.identityIds[j]; + } + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetIdentitiesTokenBalancesRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesTokenBalancesRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetIdentitiesTokenBalancesRequestV0; + })(); + + return GetIdentitiesTokenBalancesRequest; + })(); + + v0.GetIdentitiesTokenBalancesResponse = (function() { + + /** + * Properties of a GetIdentitiesTokenBalancesResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetIdentitiesTokenBalancesResponse + * @property {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.IGetIdentitiesTokenBalancesResponseV0|null} [v0] GetIdentitiesTokenBalancesResponse v0 + */ + + /** + * Constructs a new GetIdentitiesTokenBalancesResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetIdentitiesTokenBalancesResponse. + * @implements IGetIdentitiesTokenBalancesResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenBalancesResponse=} [properties] Properties to set + */ + function GetIdentitiesTokenBalancesResponse(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]]; + } + + /** + * GetIdentitiesTokenBalancesResponse v0. + * @member {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.IGetIdentitiesTokenBalancesResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @instance + */ + GetIdentitiesTokenBalancesResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentitiesTokenBalancesResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @instance + */ + Object.defineProperty(GetIdentitiesTokenBalancesResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentitiesTokenBalancesResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenBalancesResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} GetIdentitiesTokenBalancesResponse instance + */ + GetIdentitiesTokenBalancesResponse.create = function create(properties) { + return new GetIdentitiesTokenBalancesResponse(properties); + }; + + /** + * Encodes the specified GetIdentitiesTokenBalancesResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenBalancesResponse} message GetIdentitiesTokenBalancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenBalancesResponse.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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIdentitiesTokenBalancesResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenBalancesResponse} message GetIdentitiesTokenBalancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenBalancesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesTokenBalancesResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @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.GetIdentitiesTokenBalancesResponse} GetIdentitiesTokenBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenBalancesResponse.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.GetIdentitiesTokenBalancesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentitiesTokenBalancesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} GetIdentitiesTokenBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenBalancesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesTokenBalancesResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesTokenBalancesResponse.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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetIdentitiesTokenBalancesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} GetIdentitiesTokenBalancesResponse + */ + GetIdentitiesTokenBalancesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesTokenBalancesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} message GetIdentitiesTokenBalancesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesTokenBalancesResponse.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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetIdentitiesTokenBalancesResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesTokenBalancesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 = (function() { + + /** + * Properties of a GetIdentitiesTokenBalancesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @interface IGetIdentitiesTokenBalancesResponseV0 + * @property {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IIdentityTokenBalances|null} [identityTokenBalances] GetIdentitiesTokenBalancesResponseV0 identityTokenBalances + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetIdentitiesTokenBalancesResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetIdentitiesTokenBalancesResponseV0 metadata + */ + + /** + * Constructs a new GetIdentitiesTokenBalancesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse + * @classdesc Represents a GetIdentitiesTokenBalancesResponseV0. + * @implements IGetIdentitiesTokenBalancesResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.IGetIdentitiesTokenBalancesResponseV0=} [properties] Properties to set + */ + function GetIdentitiesTokenBalancesResponseV0(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]]; + } + + /** + * GetIdentitiesTokenBalancesResponseV0 identityTokenBalances. + * @member {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IIdentityTokenBalances|null|undefined} identityTokenBalances + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @instance + */ + GetIdentitiesTokenBalancesResponseV0.prototype.identityTokenBalances = null; + + /** + * GetIdentitiesTokenBalancesResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @instance + */ + GetIdentitiesTokenBalancesResponseV0.prototype.proof = null; + + /** + * GetIdentitiesTokenBalancesResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @instance + */ + GetIdentitiesTokenBalancesResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentitiesTokenBalancesResponseV0 result. + * @member {"identityTokenBalances"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @instance + */ + Object.defineProperty(GetIdentitiesTokenBalancesResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["identityTokenBalances", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentitiesTokenBalancesResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.IGetIdentitiesTokenBalancesResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} GetIdentitiesTokenBalancesResponseV0 instance + */ + GetIdentitiesTokenBalancesResponseV0.create = function create(properties) { + return new GetIdentitiesTokenBalancesResponseV0(properties); + }; + + /** + * Encodes the specified GetIdentitiesTokenBalancesResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.IGetIdentitiesTokenBalancesResponseV0} message GetIdentitiesTokenBalancesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenBalancesResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identityTokenBalances != null && Object.hasOwnProperty.call(message, "identityTokenBalances")) + $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.encode(message.identityTokenBalances, 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 GetIdentitiesTokenBalancesResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.IGetIdentitiesTokenBalancesResponseV0} message GetIdentitiesTokenBalancesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenBalancesResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesTokenBalancesResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} GetIdentitiesTokenBalancesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenBalancesResponseV0.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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.identityTokenBalances = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.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 GetIdentitiesTokenBalancesResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} GetIdentitiesTokenBalancesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenBalancesResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesTokenBalancesResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesTokenBalancesResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.identityTokenBalances != null && message.hasOwnProperty("identityTokenBalances")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.verify(message.identityTokenBalances); + if (error) + return "identityTokenBalances." + 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 GetIdentitiesTokenBalancesResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} GetIdentitiesTokenBalancesResponseV0 + */ + GetIdentitiesTokenBalancesResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0(); + if (object.identityTokenBalances != null) { + if (typeof object.identityTokenBalances !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.identityTokenBalances: object expected"); + message.identityTokenBalances = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.fromObject(object.identityTokenBalances); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesTokenBalancesResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} message GetIdentitiesTokenBalancesResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesTokenBalancesResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.identityTokenBalances != null && message.hasOwnProperty("identityTokenBalances")) { + object.identityTokenBalances = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.toObject(message.identityTokenBalances, options); + if (options.oneofs) + object.result = "identityTokenBalances"; + } + 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 GetIdentitiesTokenBalancesResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesTokenBalancesResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry = (function() { + + /** + * Properties of an IdentityTokenBalanceEntry. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @interface IIdentityTokenBalanceEntry + * @property {Uint8Array|null} [identityId] IdentityTokenBalanceEntry identityId + * @property {number|Long|null} [balance] IdentityTokenBalanceEntry balance + */ + + /** + * Constructs a new IdentityTokenBalanceEntry. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @classdesc Represents an IdentityTokenBalanceEntry. + * @implements IIdentityTokenBalanceEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IIdentityTokenBalanceEntry=} [properties] Properties to set + */ + function IdentityTokenBalanceEntry(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]]; + } + + /** + * IdentityTokenBalanceEntry identityId. + * @member {Uint8Array} identityId + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + * @instance + */ + IdentityTokenBalanceEntry.prototype.identityId = $util.newBuffer([]); + + /** + * IdentityTokenBalanceEntry balance. + * @member {number|Long} balance + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + * @instance + */ + IdentityTokenBalanceEntry.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new IdentityTokenBalanceEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IIdentityTokenBalanceEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} IdentityTokenBalanceEntry instance + */ + IdentityTokenBalanceEntry.create = function create(properties) { + return new IdentityTokenBalanceEntry(properties); + }; + + /** + * Encodes the specified IdentityTokenBalanceEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IIdentityTokenBalanceEntry} message IdentityTokenBalanceEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityTokenBalanceEntry.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 IdentityTokenBalanceEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IIdentityTokenBalanceEntry} message IdentityTokenBalanceEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityTokenBalanceEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentityTokenBalanceEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + * @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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} IdentityTokenBalanceEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityTokenBalanceEntry.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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry(); + 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 IdentityTokenBalanceEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} IdentityTokenBalanceEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityTokenBalanceEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentityTokenBalanceEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentityTokenBalanceEntry.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 IdentityTokenBalanceEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} IdentityTokenBalanceEntry + */ + IdentityTokenBalanceEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry(); + 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 IdentityTokenBalanceEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} message IdentityTokenBalanceEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentityTokenBalanceEntry.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 IdentityTokenBalanceEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry + * @instance + * @returns {Object.} JSON object + */ + IdentityTokenBalanceEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentityTokenBalanceEntry; + })(); + + GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances = (function() { + + /** + * Properties of an IdentityTokenBalances. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @interface IIdentityTokenBalances + * @property {Array.|null} [identityTokenBalances] IdentityTokenBalances identityTokenBalances + */ + + /** + * Constructs a new IdentityTokenBalances. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 + * @classdesc Represents an IdentityTokenBalances. + * @implements IIdentityTokenBalances + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IIdentityTokenBalances=} [properties] Properties to set + */ + function IdentityTokenBalances(properties) { + this.identityTokenBalances = []; + 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]]; + } + + /** + * IdentityTokenBalances identityTokenBalances. + * @member {Array.} identityTokenBalances + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + * @instance + */ + IdentityTokenBalances.prototype.identityTokenBalances = $util.emptyArray; + + /** + * Creates a new IdentityTokenBalances instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IIdentityTokenBalances=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} IdentityTokenBalances instance + */ + IdentityTokenBalances.create = function create(properties) { + return new IdentityTokenBalances(properties); + }; + + /** + * Encodes the specified IdentityTokenBalances message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IIdentityTokenBalances} message IdentityTokenBalances message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityTokenBalances.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identityTokenBalances != null && message.identityTokenBalances.length) + for (var i = 0; i < message.identityTokenBalances.length; ++i) + $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.encode(message.identityTokenBalances[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IdentityTokenBalances message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IIdentityTokenBalances} message IdentityTokenBalances message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityTokenBalances.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentityTokenBalances message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + * @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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} IdentityTokenBalances + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityTokenBalances.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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.identityTokenBalances && message.identityTokenBalances.length)) + message.identityTokenBalances = []; + message.identityTokenBalances.push($root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentityTokenBalances message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} IdentityTokenBalances + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityTokenBalances.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentityTokenBalances message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentityTokenBalances.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.identityTokenBalances != null && message.hasOwnProperty("identityTokenBalances")) { + if (!Array.isArray(message.identityTokenBalances)) + return "identityTokenBalances: array expected"; + for (var i = 0; i < message.identityTokenBalances.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.verify(message.identityTokenBalances[i]); + if (error) + return "identityTokenBalances." + error; + } + } + return null; + }; + + /** + * Creates an IdentityTokenBalances message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} IdentityTokenBalances + */ + IdentityTokenBalances.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances(); + if (object.identityTokenBalances) { + if (!Array.isArray(object.identityTokenBalances)) + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.identityTokenBalances: array expected"); + message.identityTokenBalances = []; + for (var i = 0; i < object.identityTokenBalances.length; ++i) { + if (typeof object.identityTokenBalances[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.identityTokenBalances: object expected"); + message.identityTokenBalances[i] = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.fromObject(object.identityTokenBalances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an IdentityTokenBalances message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} message IdentityTokenBalances + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentityTokenBalances.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.identityTokenBalances = []; + if (message.identityTokenBalances && message.identityTokenBalances.length) { + object.identityTokenBalances = []; + for (var j = 0; j < message.identityTokenBalances.length; ++j) + object.identityTokenBalances[j] = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.toObject(message.identityTokenBalances[j], options); + } + return object; + }; + + /** + * Converts this IdentityTokenBalances to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances + * @instance + * @returns {Object.} JSON object + */ + IdentityTokenBalances.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentityTokenBalances; + })(); + + return GetIdentitiesTokenBalancesResponseV0; + })(); + + return GetIdentitiesTokenBalancesResponse; + })(); + + v0.GetIdentityTokenInfosRequest = (function() { + + /** + * Properties of a GetIdentityTokenInfosRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetIdentityTokenInfosRequest + * @property {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.IGetIdentityTokenInfosRequestV0|null} [v0] GetIdentityTokenInfosRequest v0 + */ + + /** + * Constructs a new GetIdentityTokenInfosRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetIdentityTokenInfosRequest. + * @implements IGetIdentityTokenInfosRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenInfosRequest=} [properties] Properties to set + */ + function GetIdentityTokenInfosRequest(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]]; + } + + /** + * GetIdentityTokenInfosRequest v0. + * @member {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.IGetIdentityTokenInfosRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @instance + */ + GetIdentityTokenInfosRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentityTokenInfosRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @instance + */ + Object.defineProperty(GetIdentityTokenInfosRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentityTokenInfosRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenInfosRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} GetIdentityTokenInfosRequest instance + */ + GetIdentityTokenInfosRequest.create = function create(properties) { + return new GetIdentityTokenInfosRequest(properties); + }; + + /** + * Encodes the specified GetIdentityTokenInfosRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenInfosRequest} message GetIdentityTokenInfosRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenInfosRequest.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.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIdentityTokenInfosRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenInfosRequest} message GetIdentityTokenInfosRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenInfosRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentityTokenInfosRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @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.GetIdentityTokenInfosRequest} GetIdentityTokenInfosRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenInfosRequest.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.GetIdentityTokenInfosRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentityTokenInfosRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} GetIdentityTokenInfosRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenInfosRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentityTokenInfosRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentityTokenInfosRequest.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.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetIdentityTokenInfosRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} GetIdentityTokenInfosRequest + */ + GetIdentityTokenInfosRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentityTokenInfosRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} message GetIdentityTokenInfosRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentityTokenInfosRequest.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.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetIdentityTokenInfosRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @instance + * @returns {Object.} JSON object + */ + GetIdentityTokenInfosRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 = (function() { + + /** + * Properties of a GetIdentityTokenInfosRequestV0. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @interface IGetIdentityTokenInfosRequestV0 + * @property {Uint8Array|null} [identityId] GetIdentityTokenInfosRequestV0 identityId + * @property {Array.|null} [tokenIds] GetIdentityTokenInfosRequestV0 tokenIds + * @property {boolean|null} [prove] GetIdentityTokenInfosRequestV0 prove + */ + + /** + * Constructs a new GetIdentityTokenInfosRequestV0. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest + * @classdesc Represents a GetIdentityTokenInfosRequestV0. + * @implements IGetIdentityTokenInfosRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.IGetIdentityTokenInfosRequestV0=} [properties] Properties to set + */ + function GetIdentityTokenInfosRequestV0(properties) { + this.tokenIds = []; + 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]]; + } + + /** + * GetIdentityTokenInfosRequestV0 identityId. + * @member {Uint8Array} identityId + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + * @instance + */ + GetIdentityTokenInfosRequestV0.prototype.identityId = $util.newBuffer([]); + + /** + * GetIdentityTokenInfosRequestV0 tokenIds. + * @member {Array.} tokenIds + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + * @instance + */ + GetIdentityTokenInfosRequestV0.prototype.tokenIds = $util.emptyArray; + + /** + * GetIdentityTokenInfosRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + * @instance + */ + GetIdentityTokenInfosRequestV0.prototype.prove = false; + + /** + * Creates a new GetIdentityTokenInfosRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.IGetIdentityTokenInfosRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} GetIdentityTokenInfosRequestV0 instance + */ + GetIdentityTokenInfosRequestV0.create = function create(properties) { + return new GetIdentityTokenInfosRequestV0(properties); + }; + + /** + * Encodes the specified GetIdentityTokenInfosRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.IGetIdentityTokenInfosRequestV0} message GetIdentityTokenInfosRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenInfosRequestV0.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.tokenIds != null && message.tokenIds.length) + for (var i = 0; i < message.tokenIds.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.tokenIds[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 GetIdentityTokenInfosRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.IGetIdentityTokenInfosRequestV0} message GetIdentityTokenInfosRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenInfosRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentityTokenInfosRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + * @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.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} GetIdentityTokenInfosRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenInfosRequestV0.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.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.identityId = reader.bytes(); + break; + case 2: + if (!(message.tokenIds && message.tokenIds.length)) + message.tokenIds = []; + message.tokenIds.push(reader.bytes()); + break; + case 3: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentityTokenInfosRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} GetIdentityTokenInfosRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenInfosRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentityTokenInfosRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentityTokenInfosRequestV0.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.tokenIds != null && message.hasOwnProperty("tokenIds")) { + if (!Array.isArray(message.tokenIds)) + return "tokenIds: array expected"; + for (var i = 0; i < message.tokenIds.length; ++i) + if (!(message.tokenIds[i] && typeof message.tokenIds[i].length === "number" || $util.isString(message.tokenIds[i]))) + return "tokenIds: buffer[] expected"; + } + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetIdentityTokenInfosRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} GetIdentityTokenInfosRequestV0 + */ + GetIdentityTokenInfosRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0(); + 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.tokenIds) { + if (!Array.isArray(object.tokenIds)) + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.tokenIds: array expected"); + message.tokenIds = []; + for (var i = 0; i < object.tokenIds.length; ++i) + if (typeof object.tokenIds[i] === "string") + $util.base64.decode(object.tokenIds[i], message.tokenIds[i] = $util.newBuffer($util.base64.length(object.tokenIds[i])), 0); + else if (object.tokenIds[i].length >= 0) + message.tokenIds[i] = object.tokenIds[i]; + } + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetIdentityTokenInfosRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} message GetIdentityTokenInfosRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentityTokenInfosRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tokenIds = []; + if (options.defaults) { + if (options.bytes === String) + object.identityId = ""; + else { + object.identityId = []; + if (options.bytes !== Array) + object.identityId = $util.newBuffer(object.identityId); + } + object.prove = false; + } + 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.tokenIds && message.tokenIds.length) { + object.tokenIds = []; + for (var j = 0; j < message.tokenIds.length; ++j) + object.tokenIds[j] = options.bytes === String ? $util.base64.encode(message.tokenIds[j], 0, message.tokenIds[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenIds[j]) : message.tokenIds[j]; + } + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetIdentityTokenInfosRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetIdentityTokenInfosRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetIdentityTokenInfosRequestV0; + })(); + + return GetIdentityTokenInfosRequest; + })(); + + v0.GetIdentityTokenInfosResponse = (function() { + + /** + * Properties of a GetIdentityTokenInfosResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetIdentityTokenInfosResponse + * @property {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.IGetIdentityTokenInfosResponseV0|null} [v0] GetIdentityTokenInfosResponse v0 + */ + + /** + * Constructs a new GetIdentityTokenInfosResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetIdentityTokenInfosResponse. + * @implements IGetIdentityTokenInfosResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenInfosResponse=} [properties] Properties to set + */ + function GetIdentityTokenInfosResponse(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]]; + } + + /** + * GetIdentityTokenInfosResponse v0. + * @member {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.IGetIdentityTokenInfosResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @instance + */ + GetIdentityTokenInfosResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentityTokenInfosResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @instance + */ + Object.defineProperty(GetIdentityTokenInfosResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentityTokenInfosResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenInfosResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} GetIdentityTokenInfosResponse instance + */ + GetIdentityTokenInfosResponse.create = function create(properties) { + return new GetIdentityTokenInfosResponse(properties); + }; + + /** + * Encodes the specified GetIdentityTokenInfosResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenInfosResponse} message GetIdentityTokenInfosResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenInfosResponse.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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIdentityTokenInfosResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentityTokenInfosResponse} message GetIdentityTokenInfosResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenInfosResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentityTokenInfosResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @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.GetIdentityTokenInfosResponse} GetIdentityTokenInfosResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenInfosResponse.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.GetIdentityTokenInfosResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentityTokenInfosResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} GetIdentityTokenInfosResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenInfosResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentityTokenInfosResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentityTokenInfosResponse.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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetIdentityTokenInfosResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} GetIdentityTokenInfosResponse + */ + GetIdentityTokenInfosResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentityTokenInfosResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} message GetIdentityTokenInfosResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentityTokenInfosResponse.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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetIdentityTokenInfosResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @instance + * @returns {Object.} JSON object + */ + GetIdentityTokenInfosResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 = (function() { + + /** + * Properties of a GetIdentityTokenInfosResponseV0. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @interface IGetIdentityTokenInfosResponseV0 + * @property {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenInfos|null} [tokenInfos] GetIdentityTokenInfosResponseV0 tokenInfos + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetIdentityTokenInfosResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetIdentityTokenInfosResponseV0 metadata + */ + + /** + * Constructs a new GetIdentityTokenInfosResponseV0. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse + * @classdesc Represents a GetIdentityTokenInfosResponseV0. + * @implements IGetIdentityTokenInfosResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.IGetIdentityTokenInfosResponseV0=} [properties] Properties to set + */ + function GetIdentityTokenInfosResponseV0(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]]; + } + + /** + * GetIdentityTokenInfosResponseV0 tokenInfos. + * @member {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenInfos|null|undefined} tokenInfos + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @instance + */ + GetIdentityTokenInfosResponseV0.prototype.tokenInfos = null; + + /** + * GetIdentityTokenInfosResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @instance + */ + GetIdentityTokenInfosResponseV0.prototype.proof = null; + + /** + * GetIdentityTokenInfosResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @instance + */ + GetIdentityTokenInfosResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentityTokenInfosResponseV0 result. + * @member {"tokenInfos"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @instance + */ + Object.defineProperty(GetIdentityTokenInfosResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["tokenInfos", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentityTokenInfosResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.IGetIdentityTokenInfosResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} GetIdentityTokenInfosResponseV0 instance + */ + GetIdentityTokenInfosResponseV0.create = function create(properties) { + return new GetIdentityTokenInfosResponseV0(properties); + }; + + /** + * Encodes the specified GetIdentityTokenInfosResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.IGetIdentityTokenInfosResponseV0} message GetIdentityTokenInfosResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenInfosResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenInfos != null && Object.hasOwnProperty.call(message, "tokenInfos")) + $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.encode(message.tokenInfos, 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 GetIdentityTokenInfosResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.IGetIdentityTokenInfosResponseV0} message GetIdentityTokenInfosResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentityTokenInfosResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentityTokenInfosResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} GetIdentityTokenInfosResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenInfosResponseV0.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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenInfos = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.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 GetIdentityTokenInfosResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} GetIdentityTokenInfosResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentityTokenInfosResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentityTokenInfosResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentityTokenInfosResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tokenInfos != null && message.hasOwnProperty("tokenInfos")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.verify(message.tokenInfos); + if (error) + return "tokenInfos." + 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 GetIdentityTokenInfosResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} GetIdentityTokenInfosResponseV0 + */ + GetIdentityTokenInfosResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0(); + if (object.tokenInfos != null) { + if (typeof object.tokenInfos !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.tokenInfos: object expected"); + message.tokenInfos = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.fromObject(object.tokenInfos); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentityTokenInfosResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} message GetIdentityTokenInfosResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentityTokenInfosResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.tokenInfos != null && message.hasOwnProperty("tokenInfos")) { + object.tokenInfos = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.toObject(message.tokenInfos, options); + if (options.oneofs) + object.result = "tokenInfos"; + } + 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 GetIdentityTokenInfosResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetIdentityTokenInfosResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry = (function() { + + /** + * Properties of a TokenIdentityInfoEntry. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @interface ITokenIdentityInfoEntry + * @property {boolean|null} [frozen] TokenIdentityInfoEntry frozen + */ + + /** + * Constructs a new TokenIdentityInfoEntry. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @classdesc Represents a TokenIdentityInfoEntry. + * @implements ITokenIdentityInfoEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenIdentityInfoEntry=} [properties] Properties to set + */ + function TokenIdentityInfoEntry(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]]; + } + + /** + * TokenIdentityInfoEntry frozen. + * @member {boolean} frozen + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + * @instance + */ + TokenIdentityInfoEntry.prototype.frozen = false; + + /** + * Creates a new TokenIdentityInfoEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenIdentityInfoEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} TokenIdentityInfoEntry instance + */ + TokenIdentityInfoEntry.create = function create(properties) { + return new TokenIdentityInfoEntry(properties); + }; + + /** + * Encodes the specified TokenIdentityInfoEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenIdentityInfoEntry} message TokenIdentityInfoEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenIdentityInfoEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frozen != null && Object.hasOwnProperty.call(message, "frozen")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.frozen); + return writer; + }; + + /** + * Encodes the specified TokenIdentityInfoEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenIdentityInfoEntry} message TokenIdentityInfoEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenIdentityInfoEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenIdentityInfoEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + * @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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} TokenIdentityInfoEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenIdentityInfoEntry.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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.frozen = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenIdentityInfoEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} TokenIdentityInfoEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenIdentityInfoEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenIdentityInfoEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenIdentityInfoEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frozen != null && message.hasOwnProperty("frozen")) + if (typeof message.frozen !== "boolean") + return "frozen: boolean expected"; + return null; + }; + + /** + * Creates a TokenIdentityInfoEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} TokenIdentityInfoEntry + */ + TokenIdentityInfoEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry(); + if (object.frozen != null) + message.frozen = Boolean(object.frozen); + return message; + }; + + /** + * Creates a plain object from a TokenIdentityInfoEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} message TokenIdentityInfoEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenIdentityInfoEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.frozen = false; + if (message.frozen != null && message.hasOwnProperty("frozen")) + object.frozen = message.frozen; + return object; + }; + + /** + * Converts this TokenIdentityInfoEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry + * @instance + * @returns {Object.} JSON object + */ + TokenIdentityInfoEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenIdentityInfoEntry; + })(); + + GetIdentityTokenInfosResponseV0.TokenInfoEntry = (function() { + + /** + * Properties of a TokenInfoEntry. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @interface ITokenInfoEntry + * @property {Uint8Array|null} [tokenId] TokenInfoEntry tokenId + * @property {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenIdentityInfoEntry|null} [info] TokenInfoEntry info + */ + + /** + * Constructs a new TokenInfoEntry. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @classdesc Represents a TokenInfoEntry. + * @implements ITokenInfoEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenInfoEntry=} [properties] Properties to set + */ + function TokenInfoEntry(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]]; + } + + /** + * TokenInfoEntry tokenId. + * @member {Uint8Array} tokenId + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + * @instance + */ + TokenInfoEntry.prototype.tokenId = $util.newBuffer([]); + + /** + * TokenInfoEntry info. + * @member {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenIdentityInfoEntry|null|undefined} info + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + * @instance + */ + TokenInfoEntry.prototype.info = null; + + /** + * Creates a new TokenInfoEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenInfoEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} TokenInfoEntry instance + */ + TokenInfoEntry.create = function create(properties) { + return new TokenInfoEntry(properties); + }; + + /** + * Encodes the specified TokenInfoEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenInfoEntry} message TokenInfoEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenInfoEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenId != null && Object.hasOwnProperty.call(message, "tokenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenId); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.encode(message.info, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TokenInfoEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenInfoEntry} message TokenInfoEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenInfoEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenInfoEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + * @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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} TokenInfoEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenInfoEntry.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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenId = reader.bytes(); + break; + case 2: + message.info = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenInfoEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} TokenInfoEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenInfoEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenInfoEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenInfoEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + if (!(message.tokenId && typeof message.tokenId.length === "number" || $util.isString(message.tokenId))) + return "tokenId: buffer expected"; + if (message.info != null && message.hasOwnProperty("info")) { + var error = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.verify(message.info); + if (error) + return "info." + error; + } + return null; + }; + + /** + * Creates a TokenInfoEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} TokenInfoEntry + */ + TokenInfoEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry(); + if (object.tokenId != null) + if (typeof object.tokenId === "string") + $util.base64.decode(object.tokenId, message.tokenId = $util.newBuffer($util.base64.length(object.tokenId)), 0); + else if (object.tokenId.length >= 0) + message.tokenId = object.tokenId; + if (object.info != null) { + if (typeof object.info !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.info: object expected"); + message.info = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.fromObject(object.info); + } + return message; + }; + + /** + * Creates a plain object from a TokenInfoEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} message TokenInfoEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenInfoEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tokenId = ""; + else { + object.tokenId = []; + if (options.bytes !== Array) + object.tokenId = $util.newBuffer(object.tokenId); + } + object.info = null; + } + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenId) : message.tokenId; + if (message.info != null && message.hasOwnProperty("info")) + object.info = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.toObject(message.info, options); + return object; + }; + + /** + * Converts this TokenInfoEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry + * @instance + * @returns {Object.} JSON object + */ + TokenInfoEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenInfoEntry; + })(); + + GetIdentityTokenInfosResponseV0.TokenInfos = (function() { + + /** + * Properties of a TokenInfos. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @interface ITokenInfos + * @property {Array.|null} [tokenInfos] TokenInfos tokenInfos + */ + + /** + * Constructs a new TokenInfos. + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 + * @classdesc Represents a TokenInfos. + * @implements ITokenInfos + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenInfos=} [properties] Properties to set + */ + function TokenInfos(properties) { + this.tokenInfos = []; + 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]]; + } + + /** + * TokenInfos tokenInfos. + * @member {Array.} tokenInfos + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + * @instance + */ + TokenInfos.prototype.tokenInfos = $util.emptyArray; + + /** + * Creates a new TokenInfos instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenInfos=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} TokenInfos instance + */ + TokenInfos.create = function create(properties) { + return new TokenInfos(properties); + }; + + /** + * Encodes the specified TokenInfos message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenInfos} message TokenInfos message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenInfos.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenInfos != null && message.tokenInfos.length) + for (var i = 0; i < message.tokenInfos.length; ++i) + $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.encode(message.tokenInfos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TokenInfos message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ITokenInfos} message TokenInfos message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenInfos.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenInfos message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + * @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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} TokenInfos + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenInfos.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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.tokenInfos && message.tokenInfos.length)) + message.tokenInfos = []; + message.tokenInfos.push($root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenInfos message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} TokenInfos + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenInfos.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenInfos message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenInfos.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenInfos != null && message.hasOwnProperty("tokenInfos")) { + if (!Array.isArray(message.tokenInfos)) + return "tokenInfos: array expected"; + for (var i = 0; i < message.tokenInfos.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.verify(message.tokenInfos[i]); + if (error) + return "tokenInfos." + error; + } + } + return null; + }; + + /** + * Creates a TokenInfos message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} TokenInfos + */ + TokenInfos.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos(); + if (object.tokenInfos) { + if (!Array.isArray(object.tokenInfos)) + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.tokenInfos: array expected"); + message.tokenInfos = []; + for (var i = 0; i < object.tokenInfos.length; ++i) { + if (typeof object.tokenInfos[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.tokenInfos: object expected"); + message.tokenInfos[i] = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.fromObject(object.tokenInfos[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TokenInfos message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + * @static + * @param {org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} message TokenInfos + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenInfos.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tokenInfos = []; + if (message.tokenInfos && message.tokenInfos.length) { + object.tokenInfos = []; + for (var j = 0; j < message.tokenInfos.length; ++j) + object.tokenInfos[j] = $root.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.toObject(message.tokenInfos[j], options); + } + return object; + }; + + /** + * Converts this TokenInfos to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos + * @instance + * @returns {Object.} JSON object + */ + TokenInfos.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenInfos; + })(); + + return GetIdentityTokenInfosResponseV0; + })(); + + return GetIdentityTokenInfosResponse; + })(); + + v0.GetIdentitiesTokenInfosRequest = (function() { + + /** + * Properties of a GetIdentitiesTokenInfosRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetIdentitiesTokenInfosRequest + * @property {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.IGetIdentitiesTokenInfosRequestV0|null} [v0] GetIdentitiesTokenInfosRequest v0 + */ + + /** + * Constructs a new GetIdentitiesTokenInfosRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetIdentitiesTokenInfosRequest. + * @implements IGetIdentitiesTokenInfosRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenInfosRequest=} [properties] Properties to set + */ + function GetIdentitiesTokenInfosRequest(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]]; + } + + /** + * GetIdentitiesTokenInfosRequest v0. + * @member {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.IGetIdentitiesTokenInfosRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @instance + */ + GetIdentitiesTokenInfosRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentitiesTokenInfosRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @instance + */ + Object.defineProperty(GetIdentitiesTokenInfosRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentitiesTokenInfosRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenInfosRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest} GetIdentitiesTokenInfosRequest instance + */ + GetIdentitiesTokenInfosRequest.create = function create(properties) { + return new GetIdentitiesTokenInfosRequest(properties); + }; + + /** + * Encodes the specified GetIdentitiesTokenInfosRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenInfosRequest} message GetIdentitiesTokenInfosRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenInfosRequest.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.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIdentitiesTokenInfosRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenInfosRequest} message GetIdentitiesTokenInfosRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenInfosRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesTokenInfosRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @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.GetIdentitiesTokenInfosRequest} GetIdentitiesTokenInfosRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenInfosRequest.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.GetIdentitiesTokenInfosRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentitiesTokenInfosRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest} GetIdentitiesTokenInfosRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenInfosRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesTokenInfosRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesTokenInfosRequest.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.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetIdentitiesTokenInfosRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest} GetIdentitiesTokenInfosRequest + */ + GetIdentitiesTokenInfosRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesTokenInfosRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest} message GetIdentitiesTokenInfosRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesTokenInfosRequest.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.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetIdentitiesTokenInfosRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesTokenInfosRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 = (function() { + + /** + * Properties of a GetIdentitiesTokenInfosRequestV0. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @interface IGetIdentitiesTokenInfosRequestV0 + * @property {Uint8Array|null} [tokenId] GetIdentitiesTokenInfosRequestV0 tokenId + * @property {Array.|null} [identityIds] GetIdentitiesTokenInfosRequestV0 identityIds + * @property {boolean|null} [prove] GetIdentitiesTokenInfosRequestV0 prove + */ + + /** + * Constructs a new GetIdentitiesTokenInfosRequestV0. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest + * @classdesc Represents a GetIdentitiesTokenInfosRequestV0. + * @implements IGetIdentitiesTokenInfosRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.IGetIdentitiesTokenInfosRequestV0=} [properties] Properties to set + */ + function GetIdentitiesTokenInfosRequestV0(properties) { + this.identityIds = []; + 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]]; + } + + /** + * GetIdentitiesTokenInfosRequestV0 tokenId. + * @member {Uint8Array} tokenId + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + * @instance + */ + GetIdentitiesTokenInfosRequestV0.prototype.tokenId = $util.newBuffer([]); + + /** + * GetIdentitiesTokenInfosRequestV0 identityIds. + * @member {Array.} identityIds + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + * @instance + */ + GetIdentitiesTokenInfosRequestV0.prototype.identityIds = $util.emptyArray; + + /** + * GetIdentitiesTokenInfosRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + * @instance + */ + GetIdentitiesTokenInfosRequestV0.prototype.prove = false; + + /** + * Creates a new GetIdentitiesTokenInfosRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.IGetIdentitiesTokenInfosRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} GetIdentitiesTokenInfosRequestV0 instance + */ + GetIdentitiesTokenInfosRequestV0.create = function create(properties) { + return new GetIdentitiesTokenInfosRequestV0(properties); + }; + + /** + * Encodes the specified GetIdentitiesTokenInfosRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.IGetIdentitiesTokenInfosRequestV0} message GetIdentitiesTokenInfosRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenInfosRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenId != null && Object.hasOwnProperty.call(message, "tokenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenId); + if (message.identityIds != null && message.identityIds.length) + for (var i = 0; i < message.identityIds.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.identityIds[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 GetIdentitiesTokenInfosRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.IGetIdentitiesTokenInfosRequestV0} message GetIdentitiesTokenInfosRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenInfosRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesTokenInfosRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + * @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.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} GetIdentitiesTokenInfosRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenInfosRequestV0.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.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenId = reader.bytes(); + break; + case 2: + if (!(message.identityIds && message.identityIds.length)) + message.identityIds = []; + message.identityIds.push(reader.bytes()); + break; + case 3: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentitiesTokenInfosRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} GetIdentitiesTokenInfosRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenInfosRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesTokenInfosRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesTokenInfosRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + if (!(message.tokenId && typeof message.tokenId.length === "number" || $util.isString(message.tokenId))) + return "tokenId: buffer expected"; + if (message.identityIds != null && message.hasOwnProperty("identityIds")) { + if (!Array.isArray(message.identityIds)) + return "identityIds: array expected"; + for (var i = 0; i < message.identityIds.length; ++i) + if (!(message.identityIds[i] && typeof message.identityIds[i].length === "number" || $util.isString(message.identityIds[i]))) + return "identityIds: buffer[] expected"; + } + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetIdentitiesTokenInfosRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} GetIdentitiesTokenInfosRequestV0 + */ + GetIdentitiesTokenInfosRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0(); + if (object.tokenId != null) + if (typeof object.tokenId === "string") + $util.base64.decode(object.tokenId, message.tokenId = $util.newBuffer($util.base64.length(object.tokenId)), 0); + else if (object.tokenId.length >= 0) + message.tokenId = object.tokenId; + if (object.identityIds) { + if (!Array.isArray(object.identityIds)) + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.identityIds: array expected"); + message.identityIds = []; + for (var i = 0; i < object.identityIds.length; ++i) + if (typeof object.identityIds[i] === "string") + $util.base64.decode(object.identityIds[i], message.identityIds[i] = $util.newBuffer($util.base64.length(object.identityIds[i])), 0); + else if (object.identityIds[i].length >= 0) + message.identityIds[i] = object.identityIds[i]; + } + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesTokenInfosRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} message GetIdentitiesTokenInfosRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesTokenInfosRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.identityIds = []; + if (options.defaults) { + if (options.bytes === String) + object.tokenId = ""; + else { + object.tokenId = []; + if (options.bytes !== Array) + object.tokenId = $util.newBuffer(object.tokenId); + } + object.prove = false; + } + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenId) : message.tokenId; + if (message.identityIds && message.identityIds.length) { + object.identityIds = []; + for (var j = 0; j < message.identityIds.length; ++j) + object.identityIds[j] = options.bytes === String ? $util.base64.encode(message.identityIds[j], 0, message.identityIds[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.identityIds[j]) : message.identityIds[j]; + } + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetIdentitiesTokenInfosRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesTokenInfosRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetIdentitiesTokenInfosRequestV0; + })(); + + return GetIdentitiesTokenInfosRequest; + })(); + + v0.GetIdentitiesTokenInfosResponse = (function() { + + /** + * Properties of a GetIdentitiesTokenInfosResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetIdentitiesTokenInfosResponse + * @property {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.IGetIdentitiesTokenInfosResponseV0|null} [v0] GetIdentitiesTokenInfosResponse v0 + */ + + /** + * Constructs a new GetIdentitiesTokenInfosResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetIdentitiesTokenInfosResponse. + * @implements IGetIdentitiesTokenInfosResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenInfosResponse=} [properties] Properties to set + */ + function GetIdentitiesTokenInfosResponse(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]]; + } + + /** + * GetIdentitiesTokenInfosResponse v0. + * @member {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.IGetIdentitiesTokenInfosResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @instance + */ + GetIdentitiesTokenInfosResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentitiesTokenInfosResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @instance + */ + Object.defineProperty(GetIdentitiesTokenInfosResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentitiesTokenInfosResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenInfosResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} GetIdentitiesTokenInfosResponse instance + */ + GetIdentitiesTokenInfosResponse.create = function create(properties) { + return new GetIdentitiesTokenInfosResponse(properties); + }; + + /** + * Encodes the specified GetIdentitiesTokenInfosResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenInfosResponse} message GetIdentitiesTokenInfosResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenInfosResponse.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetIdentitiesTokenInfosResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetIdentitiesTokenInfosResponse} message GetIdentitiesTokenInfosResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenInfosResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesTokenInfosResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @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.GetIdentitiesTokenInfosResponse} GetIdentitiesTokenInfosResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenInfosResponse.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.GetIdentitiesTokenInfosResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIdentitiesTokenInfosResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} GetIdentitiesTokenInfosResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenInfosResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesTokenInfosResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesTokenInfosResponse.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetIdentitiesTokenInfosResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} GetIdentitiesTokenInfosResponse + */ + GetIdentitiesTokenInfosResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesTokenInfosResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} message GetIdentitiesTokenInfosResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesTokenInfosResponse.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetIdentitiesTokenInfosResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesTokenInfosResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 = (function() { + + /** + * Properties of a GetIdentitiesTokenInfosResponseV0. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @interface IGetIdentitiesTokenInfosResponseV0 + * @property {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IIdentityTokenInfos|null} [identityTokenInfos] GetIdentitiesTokenInfosResponseV0 identityTokenInfos + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetIdentitiesTokenInfosResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetIdentitiesTokenInfosResponseV0 metadata + */ + + /** + * Constructs a new GetIdentitiesTokenInfosResponseV0. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse + * @classdesc Represents a GetIdentitiesTokenInfosResponseV0. + * @implements IGetIdentitiesTokenInfosResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.IGetIdentitiesTokenInfosResponseV0=} [properties] Properties to set + */ + function GetIdentitiesTokenInfosResponseV0(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]]; + } + + /** + * GetIdentitiesTokenInfosResponseV0 identityTokenInfos. + * @member {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IIdentityTokenInfos|null|undefined} identityTokenInfos + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @instance + */ + GetIdentitiesTokenInfosResponseV0.prototype.identityTokenInfos = null; + + /** + * GetIdentitiesTokenInfosResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @instance + */ + GetIdentitiesTokenInfosResponseV0.prototype.proof = null; + + /** + * GetIdentitiesTokenInfosResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @instance + */ + GetIdentitiesTokenInfosResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetIdentitiesTokenInfosResponseV0 result. + * @member {"identityTokenInfos"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @instance + */ + Object.defineProperty(GetIdentitiesTokenInfosResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["identityTokenInfos", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetIdentitiesTokenInfosResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.IGetIdentitiesTokenInfosResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} GetIdentitiesTokenInfosResponseV0 instance + */ + GetIdentitiesTokenInfosResponseV0.create = function create(properties) { + return new GetIdentitiesTokenInfosResponseV0(properties); + }; + + /** + * Encodes the specified GetIdentitiesTokenInfosResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.IGetIdentitiesTokenInfosResponseV0} message GetIdentitiesTokenInfosResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenInfosResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identityTokenInfos != null && Object.hasOwnProperty.call(message, "identityTokenInfos")) + $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.encode(message.identityTokenInfos, 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 GetIdentitiesTokenInfosResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.IGetIdentitiesTokenInfosResponseV0} message GetIdentitiesTokenInfosResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIdentitiesTokenInfosResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIdentitiesTokenInfosResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} GetIdentitiesTokenInfosResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenInfosResponseV0.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.identityTokenInfos = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.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 GetIdentitiesTokenInfosResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} GetIdentitiesTokenInfosResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIdentitiesTokenInfosResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIdentitiesTokenInfosResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIdentitiesTokenInfosResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.identityTokenInfos != null && message.hasOwnProperty("identityTokenInfos")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.verify(message.identityTokenInfos); + if (error) + return "identityTokenInfos." + 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 GetIdentitiesTokenInfosResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} GetIdentitiesTokenInfosResponseV0 + */ + GetIdentitiesTokenInfosResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0(); + if (object.identityTokenInfos != null) { + if (typeof object.identityTokenInfos !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.identityTokenInfos: object expected"); + message.identityTokenInfos = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.fromObject(object.identityTokenInfos); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetIdentitiesTokenInfosResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} message GetIdentitiesTokenInfosResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIdentitiesTokenInfosResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.identityTokenInfos != null && message.hasOwnProperty("identityTokenInfos")) { + object.identityTokenInfos = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.toObject(message.identityTokenInfos, options); + if (options.oneofs) + object.result = "identityTokenInfos"; + } + 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 GetIdentitiesTokenInfosResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetIdentitiesTokenInfosResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry = (function() { + + /** + * Properties of a TokenIdentityInfoEntry. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @interface ITokenIdentityInfoEntry + * @property {boolean|null} [frozen] TokenIdentityInfoEntry frozen + */ + + /** + * Constructs a new TokenIdentityInfoEntry. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @classdesc Represents a TokenIdentityInfoEntry. + * @implements ITokenIdentityInfoEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ITokenIdentityInfoEntry=} [properties] Properties to set + */ + function TokenIdentityInfoEntry(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]]; + } + + /** + * TokenIdentityInfoEntry frozen. + * @member {boolean} frozen + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + * @instance + */ + TokenIdentityInfoEntry.prototype.frozen = false; + + /** + * Creates a new TokenIdentityInfoEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ITokenIdentityInfoEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} TokenIdentityInfoEntry instance + */ + TokenIdentityInfoEntry.create = function create(properties) { + return new TokenIdentityInfoEntry(properties); + }; + + /** + * Encodes the specified TokenIdentityInfoEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ITokenIdentityInfoEntry} message TokenIdentityInfoEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenIdentityInfoEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frozen != null && Object.hasOwnProperty.call(message, "frozen")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.frozen); + return writer; + }; + + /** + * Encodes the specified TokenIdentityInfoEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ITokenIdentityInfoEntry} message TokenIdentityInfoEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenIdentityInfoEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenIdentityInfoEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + * @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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} TokenIdentityInfoEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenIdentityInfoEntry.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.frozen = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenIdentityInfoEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} TokenIdentityInfoEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenIdentityInfoEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenIdentityInfoEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenIdentityInfoEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frozen != null && message.hasOwnProperty("frozen")) + if (typeof message.frozen !== "boolean") + return "frozen: boolean expected"; + return null; + }; + + /** + * Creates a TokenIdentityInfoEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} TokenIdentityInfoEntry + */ + TokenIdentityInfoEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry(); + if (object.frozen != null) + message.frozen = Boolean(object.frozen); + return message; + }; + + /** + * Creates a plain object from a TokenIdentityInfoEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} message TokenIdentityInfoEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenIdentityInfoEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.frozen = false; + if (message.frozen != null && message.hasOwnProperty("frozen")) + object.frozen = message.frozen; + return object; + }; + + /** + * Converts this TokenIdentityInfoEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry + * @instance + * @returns {Object.} JSON object + */ + TokenIdentityInfoEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenIdentityInfoEntry; + })(); + + GetIdentitiesTokenInfosResponseV0.TokenInfoEntry = (function() { + + /** + * Properties of a TokenInfoEntry. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @interface ITokenInfoEntry + * @property {Uint8Array|null} [identityId] TokenInfoEntry identityId + * @property {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ITokenIdentityInfoEntry|null} [info] TokenInfoEntry info + */ + + /** + * Constructs a new TokenInfoEntry. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @classdesc Represents a TokenInfoEntry. + * @implements ITokenInfoEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ITokenInfoEntry=} [properties] Properties to set + */ + function TokenInfoEntry(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]]; + } + + /** + * TokenInfoEntry identityId. + * @member {Uint8Array} identityId + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + * @instance + */ + TokenInfoEntry.prototype.identityId = $util.newBuffer([]); + + /** + * TokenInfoEntry info. + * @member {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ITokenIdentityInfoEntry|null|undefined} info + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + * @instance + */ + TokenInfoEntry.prototype.info = null; + + /** + * Creates a new TokenInfoEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ITokenInfoEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} TokenInfoEntry instance + */ + TokenInfoEntry.create = function create(properties) { + return new TokenInfoEntry(properties); + }; + + /** + * Encodes the specified TokenInfoEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ITokenInfoEntry} message TokenInfoEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenInfoEntry.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.info != null && Object.hasOwnProperty.call(message, "info")) + $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.encode(message.info, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TokenInfoEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ITokenInfoEntry} message TokenInfoEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenInfoEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenInfoEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + * @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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} TokenInfoEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenInfoEntry.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.identityId = reader.bytes(); + break; + case 2: + message.info = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenInfoEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} TokenInfoEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenInfoEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenInfoEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenInfoEntry.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.info != null && message.hasOwnProperty("info")) { + var error = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.verify(message.info); + if (error) + return "info." + error; + } + return null; + }; + + /** + * Creates a TokenInfoEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} TokenInfoEntry + */ + TokenInfoEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry(); + 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.info != null) { + if (typeof object.info !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.info: object expected"); + message.info = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.fromObject(object.info); + } + return message; + }; + + /** + * Creates a plain object from a TokenInfoEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} message TokenInfoEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenInfoEntry.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); + } + object.info = null; + } + 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.info != null && message.hasOwnProperty("info")) + object.info = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.toObject(message.info, options); + return object; + }; + + /** + * Converts this TokenInfoEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry + * @instance + * @returns {Object.} JSON object + */ + TokenInfoEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenInfoEntry; + })(); + + GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos = (function() { + + /** + * Properties of an IdentityTokenInfos. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @interface IIdentityTokenInfos + * @property {Array.|null} [tokenInfos] IdentityTokenInfos tokenInfos + */ + + /** + * Constructs a new IdentityTokenInfos. + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 + * @classdesc Represents an IdentityTokenInfos. + * @implements IIdentityTokenInfos + * @constructor + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IIdentityTokenInfos=} [properties] Properties to set + */ + function IdentityTokenInfos(properties) { + this.tokenInfos = []; + 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]]; + } + + /** + * IdentityTokenInfos tokenInfos. + * @member {Array.} tokenInfos + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + * @instance + */ + IdentityTokenInfos.prototype.tokenInfos = $util.emptyArray; + + /** + * Creates a new IdentityTokenInfos instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IIdentityTokenInfos=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} IdentityTokenInfos instance + */ + IdentityTokenInfos.create = function create(properties) { + return new IdentityTokenInfos(properties); + }; + + /** + * Encodes the specified IdentityTokenInfos message. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IIdentityTokenInfos} message IdentityTokenInfos message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityTokenInfos.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenInfos != null && message.tokenInfos.length) + for (var i = 0; i < message.tokenInfos.length; ++i) + $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.encode(message.tokenInfos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IdentityTokenInfos message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IIdentityTokenInfos} message IdentityTokenInfos message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentityTokenInfos.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentityTokenInfos message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + * @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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} IdentityTokenInfos + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityTokenInfos.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.tokenInfos && message.tokenInfos.length)) + message.tokenInfos = []; + message.tokenInfos.push($root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentityTokenInfos message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} IdentityTokenInfos + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentityTokenInfos.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentityTokenInfos message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentityTokenInfos.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenInfos != null && message.hasOwnProperty("tokenInfos")) { + if (!Array.isArray(message.tokenInfos)) + return "tokenInfos: array expected"; + for (var i = 0; i < message.tokenInfos.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.verify(message.tokenInfos[i]); + if (error) + return "tokenInfos." + error; + } + } + return null; + }; + + /** + * Creates an IdentityTokenInfos message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} IdentityTokenInfos + */ + IdentityTokenInfos.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos(); + if (object.tokenInfos) { + if (!Array.isArray(object.tokenInfos)) + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.tokenInfos: array expected"); + message.tokenInfos = []; + for (var i = 0; i < object.tokenInfos.length; ++i) { + if (typeof object.tokenInfos[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.tokenInfos: object expected"); + message.tokenInfos[i] = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.fromObject(object.tokenInfos[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an IdentityTokenInfos message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + * @static + * @param {org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} message IdentityTokenInfos + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentityTokenInfos.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tokenInfos = []; + if (message.tokenInfos && message.tokenInfos.length) { + object.tokenInfos = []; + for (var j = 0; j < message.tokenInfos.length; ++j) + object.tokenInfos[j] = $root.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.toObject(message.tokenInfos[j], options); + } + return object; + }; + + /** + * Converts this IdentityTokenInfos to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos + * @instance + * @returns {Object.} JSON object + */ + IdentityTokenInfos.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IdentityTokenInfos; + })(); + + return GetIdentitiesTokenInfosResponseV0; + })(); + + return GetIdentitiesTokenInfosResponse; + })(); + + v0.GetTokenStatusesRequest = (function() { + + /** + * Properties of a GetTokenStatusesRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetTokenStatusesRequest + * @property {org.dash.platform.dapi.v0.GetTokenStatusesRequest.IGetTokenStatusesRequestV0|null} [v0] GetTokenStatusesRequest v0 + */ + + /** + * Constructs a new GetTokenStatusesRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetTokenStatusesRequest. + * @implements IGetTokenStatusesRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetTokenStatusesRequest=} [properties] Properties to set + */ + function GetTokenStatusesRequest(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]]; + } + + /** + * GetTokenStatusesRequest v0. + * @member {org.dash.platform.dapi.v0.GetTokenStatusesRequest.IGetTokenStatusesRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @instance + */ + GetTokenStatusesRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetTokenStatusesRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @instance + */ + Object.defineProperty(GetTokenStatusesRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetTokenStatusesRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenStatusesRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesRequest} GetTokenStatusesRequest instance + */ + GetTokenStatusesRequest.create = function create(properties) { + return new GetTokenStatusesRequest(properties); + }; + + /** + * Encodes the specified GetTokenStatusesRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenStatusesRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenStatusesRequest} message GetTokenStatusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenStatusesRequest.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.GetTokenStatusesRequest.GetTokenStatusesRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetTokenStatusesRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenStatusesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenStatusesRequest} message GetTokenStatusesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenStatusesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTokenStatusesRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @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.GetTokenStatusesRequest} GetTokenStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenStatusesRequest.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.GetTokenStatusesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTokenStatusesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesRequest} GetTokenStatusesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenStatusesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTokenStatusesRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTokenStatusesRequest.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.GetTokenStatusesRequest.GetTokenStatusesRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetTokenStatusesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesRequest} GetTokenStatusesRequest + */ + GetTokenStatusesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenStatusesRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenStatusesRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenStatusesRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetTokenStatusesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesRequest} message GetTokenStatusesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTokenStatusesRequest.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.GetTokenStatusesRequest.GetTokenStatusesRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetTokenStatusesRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @instance + * @returns {Object.} JSON object + */ + GetTokenStatusesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetTokenStatusesRequest.GetTokenStatusesRequestV0 = (function() { + + /** + * Properties of a GetTokenStatusesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @interface IGetTokenStatusesRequestV0 + * @property {Array.|null} [tokenIds] GetTokenStatusesRequestV0 tokenIds + * @property {boolean|null} [prove] GetTokenStatusesRequestV0 prove + */ + + /** + * Constructs a new GetTokenStatusesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest + * @classdesc Represents a GetTokenStatusesRequestV0. + * @implements IGetTokenStatusesRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenStatusesRequest.IGetTokenStatusesRequestV0=} [properties] Properties to set + */ + function GetTokenStatusesRequestV0(properties) { + this.tokenIds = []; + 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]]; + } + + /** + * GetTokenStatusesRequestV0 tokenIds. + * @member {Array.} tokenIds + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + * @instance + */ + GetTokenStatusesRequestV0.prototype.tokenIds = $util.emptyArray; + + /** + * GetTokenStatusesRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + * @instance + */ + GetTokenStatusesRequestV0.prototype.prove = false; + + /** + * Creates a new GetTokenStatusesRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesRequest.IGetTokenStatusesRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} GetTokenStatusesRequestV0 instance + */ + GetTokenStatusesRequestV0.create = function create(properties) { + return new GetTokenStatusesRequestV0(properties); + }; + + /** + * Encodes the specified GetTokenStatusesRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesRequest.IGetTokenStatusesRequestV0} message GetTokenStatusesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenStatusesRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenIds != null && message.tokenIds.length) + for (var i = 0; i < message.tokenIds.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenIds[i]); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetTokenStatusesRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesRequest.IGetTokenStatusesRequestV0} message GetTokenStatusesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenStatusesRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTokenStatusesRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + * @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.GetTokenStatusesRequest.GetTokenStatusesRequestV0} GetTokenStatusesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenStatusesRequestV0.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.GetTokenStatusesRequest.GetTokenStatusesRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.tokenIds && message.tokenIds.length)) + message.tokenIds = []; + message.tokenIds.push(reader.bytes()); + break; + case 2: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTokenStatusesRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} GetTokenStatusesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenStatusesRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTokenStatusesRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTokenStatusesRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenIds != null && message.hasOwnProperty("tokenIds")) { + if (!Array.isArray(message.tokenIds)) + return "tokenIds: array expected"; + for (var i = 0; i < message.tokenIds.length; ++i) + if (!(message.tokenIds[i] && typeof message.tokenIds[i].length === "number" || $util.isString(message.tokenIds[i]))) + return "tokenIds: buffer[] expected"; + } + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetTokenStatusesRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} GetTokenStatusesRequestV0 + */ + GetTokenStatusesRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0(); + if (object.tokenIds) { + if (!Array.isArray(object.tokenIds)) + throw TypeError(".org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.tokenIds: array expected"); + message.tokenIds = []; + for (var i = 0; i < object.tokenIds.length; ++i) + if (typeof object.tokenIds[i] === "string") + $util.base64.decode(object.tokenIds[i], message.tokenIds[i] = $util.newBuffer($util.base64.length(object.tokenIds[i])), 0); + else if (object.tokenIds[i].length >= 0) + message.tokenIds[i] = object.tokenIds[i]; + } + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetTokenStatusesRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} message GetTokenStatusesRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTokenStatusesRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tokenIds = []; + if (options.defaults) + object.prove = false; + if (message.tokenIds && message.tokenIds.length) { + object.tokenIds = []; + for (var j = 0; j < message.tokenIds.length; ++j) + object.tokenIds[j] = options.bytes === String ? $util.base64.encode(message.tokenIds[j], 0, message.tokenIds[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenIds[j]) : message.tokenIds[j]; + } + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetTokenStatusesRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetTokenStatusesRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTokenStatusesRequestV0; + })(); + + return GetTokenStatusesRequest; + })(); + + v0.GetTokenStatusesResponse = (function() { + + /** + * Properties of a GetTokenStatusesResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetTokenStatusesResponse + * @property {org.dash.platform.dapi.v0.GetTokenStatusesResponse.IGetTokenStatusesResponseV0|null} [v0] GetTokenStatusesResponse v0 + */ + + /** + * Constructs a new GetTokenStatusesResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetTokenStatusesResponse. + * @implements IGetTokenStatusesResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetTokenStatusesResponse=} [properties] Properties to set + */ + function GetTokenStatusesResponse(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]]; + } + + /** + * GetTokenStatusesResponse v0. + * @member {org.dash.platform.dapi.v0.GetTokenStatusesResponse.IGetTokenStatusesResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @instance + */ + GetTokenStatusesResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetTokenStatusesResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @instance + */ + Object.defineProperty(GetTokenStatusesResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetTokenStatusesResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenStatusesResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesResponse} GetTokenStatusesResponse instance + */ + GetTokenStatusesResponse.create = function create(properties) { + return new GetTokenStatusesResponse(properties); + }; + + /** + * Encodes the specified GetTokenStatusesResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenStatusesResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenStatusesResponse} message GetTokenStatusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenStatusesResponse.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetTokenStatusesResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenStatusesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenStatusesResponse} message GetTokenStatusesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenStatusesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTokenStatusesResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @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.GetTokenStatusesResponse} GetTokenStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenStatusesResponse.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.GetTokenStatusesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTokenStatusesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesResponse} GetTokenStatusesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenStatusesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTokenStatusesResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTokenStatusesResponse.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetTokenStatusesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesResponse} GetTokenStatusesResponse + */ + GetTokenStatusesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenStatusesResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetTokenStatusesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse} message GetTokenStatusesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTokenStatusesResponse.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetTokenStatusesResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @instance + * @returns {Object.} JSON object + */ + GetTokenStatusesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetTokenStatusesResponse.GetTokenStatusesResponseV0 = (function() { + + /** + * Properties of a GetTokenStatusesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @interface IGetTokenStatusesResponseV0 + * @property {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ITokenStatuses|null} [tokenStatuses] GetTokenStatusesResponseV0 tokenStatuses + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetTokenStatusesResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetTokenStatusesResponseV0 metadata + */ + + /** + * Constructs a new GetTokenStatusesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse + * @classdesc Represents a GetTokenStatusesResponseV0. + * @implements IGetTokenStatusesResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.IGetTokenStatusesResponseV0=} [properties] Properties to set + */ + function GetTokenStatusesResponseV0(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]]; + } + + /** + * GetTokenStatusesResponseV0 tokenStatuses. + * @member {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ITokenStatuses|null|undefined} tokenStatuses + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @instance + */ + GetTokenStatusesResponseV0.prototype.tokenStatuses = null; + + /** + * GetTokenStatusesResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @instance + */ + GetTokenStatusesResponseV0.prototype.proof = null; + + /** + * GetTokenStatusesResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @instance + */ + GetTokenStatusesResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetTokenStatusesResponseV0 result. + * @member {"tokenStatuses"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @instance + */ + Object.defineProperty(GetTokenStatusesResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["tokenStatuses", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetTokenStatusesResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.IGetTokenStatusesResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} GetTokenStatusesResponseV0 instance + */ + GetTokenStatusesResponseV0.create = function create(properties) { + return new GetTokenStatusesResponseV0(properties); + }; + + /** + * Encodes the specified GetTokenStatusesResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.IGetTokenStatusesResponseV0} message GetTokenStatusesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenStatusesResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenStatuses != null && Object.hasOwnProperty.call(message, "tokenStatuses")) + $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.encode(message.tokenStatuses, 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 GetTokenStatusesResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.IGetTokenStatusesResponseV0} message GetTokenStatusesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenStatusesResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTokenStatusesResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @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.GetTokenStatusesResponse.GetTokenStatusesResponseV0} GetTokenStatusesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenStatusesResponseV0.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenStatuses = $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.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 GetTokenStatusesResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} GetTokenStatusesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenStatusesResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTokenStatusesResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTokenStatusesResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tokenStatuses != null && message.hasOwnProperty("tokenStatuses")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.verify(message.tokenStatuses); + if (error) + return "tokenStatuses." + 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 GetTokenStatusesResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} GetTokenStatusesResponseV0 + */ + GetTokenStatusesResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0(); + if (object.tokenStatuses != null) { + if (typeof object.tokenStatuses !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.tokenStatuses: object expected"); + message.tokenStatuses = $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.fromObject(object.tokenStatuses); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetTokenStatusesResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} message GetTokenStatusesResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTokenStatusesResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.tokenStatuses != null && message.hasOwnProperty("tokenStatuses")) { + object.tokenStatuses = $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.toObject(message.tokenStatuses, options); + if (options.oneofs) + object.result = "tokenStatuses"; + } + 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 GetTokenStatusesResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetTokenStatusesResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetTokenStatusesResponseV0.TokenStatusEntry = (function() { + + /** + * Properties of a TokenStatusEntry. + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @interface ITokenStatusEntry + * @property {Uint8Array|null} [tokenId] TokenStatusEntry tokenId + * @property {boolean|null} [paused] TokenStatusEntry paused + */ + + /** + * Constructs a new TokenStatusEntry. + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @classdesc Represents a TokenStatusEntry. + * @implements ITokenStatusEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ITokenStatusEntry=} [properties] Properties to set + */ + function TokenStatusEntry(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]]; + } + + /** + * TokenStatusEntry tokenId. + * @member {Uint8Array} tokenId + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + * @instance + */ + TokenStatusEntry.prototype.tokenId = $util.newBuffer([]); + + /** + * TokenStatusEntry paused. + * @member {boolean} paused + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + * @instance + */ + TokenStatusEntry.prototype.paused = false; + + /** + * Creates a new TokenStatusEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ITokenStatusEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} TokenStatusEntry instance + */ + TokenStatusEntry.create = function create(properties) { + return new TokenStatusEntry(properties); + }; + + /** + * Encodes the specified TokenStatusEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ITokenStatusEntry} message TokenStatusEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenStatusEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenId != null && Object.hasOwnProperty.call(message, "tokenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenId); + if (message.paused != null && Object.hasOwnProperty.call(message, "paused")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.paused); + return writer; + }; + + /** + * Encodes the specified TokenStatusEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ITokenStatusEntry} message TokenStatusEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenStatusEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenStatusEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + * @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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} TokenStatusEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenStatusEntry.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenId = reader.bytes(); + break; + case 2: + message.paused = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenStatusEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} TokenStatusEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenStatusEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenStatusEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenStatusEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + if (!(message.tokenId && typeof message.tokenId.length === "number" || $util.isString(message.tokenId))) + return "tokenId: buffer expected"; + if (message.paused != null && message.hasOwnProperty("paused")) + if (typeof message.paused !== "boolean") + return "paused: boolean expected"; + return null; + }; + + /** + * Creates a TokenStatusEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} TokenStatusEntry + */ + TokenStatusEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry(); + if (object.tokenId != null) + if (typeof object.tokenId === "string") + $util.base64.decode(object.tokenId, message.tokenId = $util.newBuffer($util.base64.length(object.tokenId)), 0); + else if (object.tokenId.length >= 0) + message.tokenId = object.tokenId; + if (object.paused != null) + message.paused = Boolean(object.paused); + return message; + }; + + /** + * Creates a plain object from a TokenStatusEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} message TokenStatusEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenStatusEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tokenId = ""; + else { + object.tokenId = []; + if (options.bytes !== Array) + object.tokenId = $util.newBuffer(object.tokenId); + } + object.paused = false; + } + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenId) : message.tokenId; + if (message.paused != null && message.hasOwnProperty("paused")) + object.paused = message.paused; + return object; + }; + + /** + * Converts this TokenStatusEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry + * @instance + * @returns {Object.} JSON object + */ + TokenStatusEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenStatusEntry; + })(); + + GetTokenStatusesResponseV0.TokenStatuses = (function() { + + /** + * Properties of a TokenStatuses. + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @interface ITokenStatuses + * @property {Array.|null} [tokenStatuses] TokenStatuses tokenStatuses + */ + + /** + * Constructs a new TokenStatuses. + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0 + * @classdesc Represents a TokenStatuses. + * @implements ITokenStatuses + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ITokenStatuses=} [properties] Properties to set + */ + function TokenStatuses(properties) { + this.tokenStatuses = []; + 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]]; + } + + /** + * TokenStatuses tokenStatuses. + * @member {Array.} tokenStatuses + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + * @instance + */ + TokenStatuses.prototype.tokenStatuses = $util.emptyArray; + + /** + * Creates a new TokenStatuses instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ITokenStatuses=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} TokenStatuses instance + */ + TokenStatuses.create = function create(properties) { + return new TokenStatuses(properties); + }; + + /** + * Encodes the specified TokenStatuses message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ITokenStatuses} message TokenStatuses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenStatuses.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenStatuses != null && message.tokenStatuses.length) + for (var i = 0; i < message.tokenStatuses.length; ++i) + $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.encode(message.tokenStatuses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TokenStatuses message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ITokenStatuses} message TokenStatuses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenStatuses.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenStatuses message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + * @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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} TokenStatuses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenStatuses.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.tokenStatuses && message.tokenStatuses.length)) + message.tokenStatuses = []; + message.tokenStatuses.push($root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenStatuses message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} TokenStatuses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenStatuses.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenStatuses message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenStatuses.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenStatuses != null && message.hasOwnProperty("tokenStatuses")) { + if (!Array.isArray(message.tokenStatuses)) + return "tokenStatuses: array expected"; + for (var i = 0; i < message.tokenStatuses.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.verify(message.tokenStatuses[i]); + if (error) + return "tokenStatuses." + error; + } + } + return null; + }; + + /** + * Creates a TokenStatuses message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} TokenStatuses + */ + TokenStatuses.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses(); + if (object.tokenStatuses) { + if (!Array.isArray(object.tokenStatuses)) + throw TypeError(".org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.tokenStatuses: array expected"); + message.tokenStatuses = []; + for (var i = 0; i < object.tokenStatuses.length; ++i) { + if (typeof object.tokenStatuses[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.tokenStatuses: object expected"); + message.tokenStatuses[i] = $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.fromObject(object.tokenStatuses[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TokenStatuses message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + * @static + * @param {org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} message TokenStatuses + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenStatuses.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tokenStatuses = []; + if (message.tokenStatuses && message.tokenStatuses.length) { + object.tokenStatuses = []; + for (var j = 0; j < message.tokenStatuses.length; ++j) + object.tokenStatuses[j] = $root.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.toObject(message.tokenStatuses[j], options); + } + return object; + }; + + /** + * Converts this TokenStatuses to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses + * @instance + * @returns {Object.} JSON object + */ + TokenStatuses.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenStatuses; + })(); + + return GetTokenStatusesResponseV0; + })(); + + return GetTokenStatusesResponse; + })(); + + v0.GetTokenTotalSupplyRequest = (function() { + + /** + * Properties of a GetTokenTotalSupplyRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetTokenTotalSupplyRequest + * @property {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.IGetTokenTotalSupplyRequestV0|null} [v0] GetTokenTotalSupplyRequest v0 + */ + + /** + * Constructs a new GetTokenTotalSupplyRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetTokenTotalSupplyRequest. + * @implements IGetTokenTotalSupplyRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetTokenTotalSupplyRequest=} [properties] Properties to set + */ + function GetTokenTotalSupplyRequest(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]]; + } + + /** + * GetTokenTotalSupplyRequest v0. + * @member {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.IGetTokenTotalSupplyRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @instance + */ + GetTokenTotalSupplyRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetTokenTotalSupplyRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @instance + */ + Object.defineProperty(GetTokenTotalSupplyRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetTokenTotalSupplyRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenTotalSupplyRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} GetTokenTotalSupplyRequest instance + */ + GetTokenTotalSupplyRequest.create = function create(properties) { + return new GetTokenTotalSupplyRequest(properties); + }; + + /** + * Encodes the specified GetTokenTotalSupplyRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenTotalSupplyRequest} message GetTokenTotalSupplyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenTotalSupplyRequest.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.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetTokenTotalSupplyRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenTotalSupplyRequest} message GetTokenTotalSupplyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenTotalSupplyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTokenTotalSupplyRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @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.GetTokenTotalSupplyRequest} GetTokenTotalSupplyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenTotalSupplyRequest.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.GetTokenTotalSupplyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTokenTotalSupplyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} GetTokenTotalSupplyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenTotalSupplyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTokenTotalSupplyRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTokenTotalSupplyRequest.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.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetTokenTotalSupplyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} GetTokenTotalSupplyRequest + */ + GetTokenTotalSupplyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetTokenTotalSupplyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} message GetTokenTotalSupplyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTokenTotalSupplyRequest.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.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetTokenTotalSupplyRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @instance + * @returns {Object.} JSON object + */ + GetTokenTotalSupplyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 = (function() { + + /** + * Properties of a GetTokenTotalSupplyRequestV0. + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @interface IGetTokenTotalSupplyRequestV0 + * @property {Uint8Array|null} [tokenId] GetTokenTotalSupplyRequestV0 tokenId + * @property {boolean|null} [prove] GetTokenTotalSupplyRequestV0 prove + */ + + /** + * Constructs a new GetTokenTotalSupplyRequestV0. + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest + * @classdesc Represents a GetTokenTotalSupplyRequestV0. + * @implements IGetTokenTotalSupplyRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.IGetTokenTotalSupplyRequestV0=} [properties] Properties to set + */ + function GetTokenTotalSupplyRequestV0(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]]; + } + + /** + * GetTokenTotalSupplyRequestV0 tokenId. + * @member {Uint8Array} tokenId + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + * @instance + */ + GetTokenTotalSupplyRequestV0.prototype.tokenId = $util.newBuffer([]); + + /** + * GetTokenTotalSupplyRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + * @instance + */ + GetTokenTotalSupplyRequestV0.prototype.prove = false; + + /** + * Creates a new GetTokenTotalSupplyRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.IGetTokenTotalSupplyRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} GetTokenTotalSupplyRequestV0 instance + */ + GetTokenTotalSupplyRequestV0.create = function create(properties) { + return new GetTokenTotalSupplyRequestV0(properties); + }; + + /** + * Encodes the specified GetTokenTotalSupplyRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.IGetTokenTotalSupplyRequestV0} message GetTokenTotalSupplyRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenTotalSupplyRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenId != null && Object.hasOwnProperty.call(message, "tokenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenId); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetTokenTotalSupplyRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.IGetTokenTotalSupplyRequestV0} message GetTokenTotalSupplyRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenTotalSupplyRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTokenTotalSupplyRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + * @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.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} GetTokenTotalSupplyRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenTotalSupplyRequestV0.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.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenId = reader.bytes(); + break; + case 2: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTokenTotalSupplyRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} GetTokenTotalSupplyRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenTotalSupplyRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTokenTotalSupplyRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTokenTotalSupplyRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + if (!(message.tokenId && typeof message.tokenId.length === "number" || $util.isString(message.tokenId))) + return "tokenId: buffer expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetTokenTotalSupplyRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} GetTokenTotalSupplyRequestV0 + */ + GetTokenTotalSupplyRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0(); + if (object.tokenId != null) + if (typeof object.tokenId === "string") + $util.base64.decode(object.tokenId, message.tokenId = $util.newBuffer($util.base64.length(object.tokenId)), 0); + else if (object.tokenId.length >= 0) + message.tokenId = object.tokenId; + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetTokenTotalSupplyRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} message GetTokenTotalSupplyRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTokenTotalSupplyRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tokenId = ""; + else { + object.tokenId = []; + if (options.bytes !== Array) + object.tokenId = $util.newBuffer(object.tokenId); + } + object.prove = false; + } + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenId) : message.tokenId; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetTokenTotalSupplyRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetTokenTotalSupplyRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetTokenTotalSupplyRequestV0; + })(); + + return GetTokenTotalSupplyRequest; + })(); + + v0.GetTokenTotalSupplyResponse = (function() { + + /** + * Properties of a GetTokenTotalSupplyResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetTokenTotalSupplyResponse + * @property {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.IGetTokenTotalSupplyResponseV0|null} [v0] GetTokenTotalSupplyResponse v0 + */ + + /** + * Constructs a new GetTokenTotalSupplyResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetTokenTotalSupplyResponse. + * @implements IGetTokenTotalSupplyResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetTokenTotalSupplyResponse=} [properties] Properties to set + */ + function GetTokenTotalSupplyResponse(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]]; + } + + /** + * GetTokenTotalSupplyResponse v0. + * @member {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.IGetTokenTotalSupplyResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @instance + */ + GetTokenTotalSupplyResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetTokenTotalSupplyResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @instance + */ + Object.defineProperty(GetTokenTotalSupplyResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetTokenTotalSupplyResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenTotalSupplyResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} GetTokenTotalSupplyResponse instance + */ + GetTokenTotalSupplyResponse.create = function create(properties) { + return new GetTokenTotalSupplyResponse(properties); + }; + + /** + * Encodes the specified GetTokenTotalSupplyResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenTotalSupplyResponse} message GetTokenTotalSupplyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenTotalSupplyResponse.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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetTokenTotalSupplyResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetTokenTotalSupplyResponse} message GetTokenTotalSupplyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenTotalSupplyResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTokenTotalSupplyResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @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.GetTokenTotalSupplyResponse} GetTokenTotalSupplyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenTotalSupplyResponse.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.GetTokenTotalSupplyResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetTokenTotalSupplyResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} GetTokenTotalSupplyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenTotalSupplyResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTokenTotalSupplyResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTokenTotalSupplyResponse.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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetTokenTotalSupplyResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} GetTokenTotalSupplyResponse + */ + GetTokenTotalSupplyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetTokenTotalSupplyResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} message GetTokenTotalSupplyResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTokenTotalSupplyResponse.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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetTokenTotalSupplyResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @instance + * @returns {Object.} JSON object + */ + GetTokenTotalSupplyResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 = (function() { + + /** + * Properties of a GetTokenTotalSupplyResponseV0. + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @interface IGetTokenTotalSupplyResponseV0 + * @property {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ITokenTotalSupplyEntry|null} [tokenTotalSupply] GetTokenTotalSupplyResponseV0 tokenTotalSupply + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetTokenTotalSupplyResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetTokenTotalSupplyResponseV0 metadata + */ + + /** + * Constructs a new GetTokenTotalSupplyResponseV0. + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse + * @classdesc Represents a GetTokenTotalSupplyResponseV0. + * @implements IGetTokenTotalSupplyResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.IGetTokenTotalSupplyResponseV0=} [properties] Properties to set + */ + function GetTokenTotalSupplyResponseV0(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]]; + } + + /** + * GetTokenTotalSupplyResponseV0 tokenTotalSupply. + * @member {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ITokenTotalSupplyEntry|null|undefined} tokenTotalSupply + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @instance + */ + GetTokenTotalSupplyResponseV0.prototype.tokenTotalSupply = null; + + /** + * GetTokenTotalSupplyResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @instance + */ + GetTokenTotalSupplyResponseV0.prototype.proof = null; + + /** + * GetTokenTotalSupplyResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @instance + */ + GetTokenTotalSupplyResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetTokenTotalSupplyResponseV0 result. + * @member {"tokenTotalSupply"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @instance + */ + Object.defineProperty(GetTokenTotalSupplyResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["tokenTotalSupply", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetTokenTotalSupplyResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.IGetTokenTotalSupplyResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} GetTokenTotalSupplyResponseV0 instance + */ + GetTokenTotalSupplyResponseV0.create = function create(properties) { + return new GetTokenTotalSupplyResponseV0(properties); + }; + + /** + * Encodes the specified GetTokenTotalSupplyResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.IGetTokenTotalSupplyResponseV0} message GetTokenTotalSupplyResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenTotalSupplyResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenTotalSupply != null && Object.hasOwnProperty.call(message, "tokenTotalSupply")) + $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.encode(message.tokenTotalSupply, 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 GetTokenTotalSupplyResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.IGetTokenTotalSupplyResponseV0} message GetTokenTotalSupplyResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTokenTotalSupplyResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTokenTotalSupplyResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} GetTokenTotalSupplyResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenTotalSupplyResponseV0.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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenTotalSupply = $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.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 GetTokenTotalSupplyResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} GetTokenTotalSupplyResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTokenTotalSupplyResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTokenTotalSupplyResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTokenTotalSupplyResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tokenTotalSupply != null && message.hasOwnProperty("tokenTotalSupply")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.verify(message.tokenTotalSupply); + if (error) + return "tokenTotalSupply." + 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 GetTokenTotalSupplyResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} GetTokenTotalSupplyResponseV0 + */ + GetTokenTotalSupplyResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0(); + if (object.tokenTotalSupply != null) { + if (typeof object.tokenTotalSupply !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.tokenTotalSupply: object expected"); + message.tokenTotalSupply = $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.fromObject(object.tokenTotalSupply); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetTokenTotalSupplyResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} message GetTokenTotalSupplyResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTokenTotalSupplyResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.tokenTotalSupply != null && message.hasOwnProperty("tokenTotalSupply")) { + object.tokenTotalSupply = $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.toObject(message.tokenTotalSupply, options); + if (options.oneofs) + object.result = "tokenTotalSupply"; + } + 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 GetTokenTotalSupplyResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetTokenTotalSupplyResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry = (function() { + + /** + * Properties of a TokenTotalSupplyEntry. + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @interface ITokenTotalSupplyEntry + * @property {Uint8Array|null} [tokenId] TokenTotalSupplyEntry tokenId + * @property {number|Long|null} [totalAggregatedAmountInUserAccounts] TokenTotalSupplyEntry totalAggregatedAmountInUserAccounts + * @property {number|Long|null} [totalSystemAmount] TokenTotalSupplyEntry totalSystemAmount + */ + + /** + * Constructs a new TokenTotalSupplyEntry. + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 + * @classdesc Represents a TokenTotalSupplyEntry. + * @implements ITokenTotalSupplyEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ITokenTotalSupplyEntry=} [properties] Properties to set + */ + function TokenTotalSupplyEntry(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]]; + } + + /** + * TokenTotalSupplyEntry tokenId. + * @member {Uint8Array} tokenId + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + * @instance + */ + TokenTotalSupplyEntry.prototype.tokenId = $util.newBuffer([]); + + /** + * TokenTotalSupplyEntry totalAggregatedAmountInUserAccounts. + * @member {number|Long} totalAggregatedAmountInUserAccounts + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + * @instance + */ + TokenTotalSupplyEntry.prototype.totalAggregatedAmountInUserAccounts = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * TokenTotalSupplyEntry totalSystemAmount. + * @member {number|Long} totalSystemAmount + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + * @instance + */ + TokenTotalSupplyEntry.prototype.totalSystemAmount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new TokenTotalSupplyEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ITokenTotalSupplyEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} TokenTotalSupplyEntry instance + */ + TokenTotalSupplyEntry.create = function create(properties) { + return new TokenTotalSupplyEntry(properties); + }; + + /** + * Encodes the specified TokenTotalSupplyEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ITokenTotalSupplyEntry} message TokenTotalSupplyEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenTotalSupplyEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenId != null && Object.hasOwnProperty.call(message, "tokenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenId); + if (message.totalAggregatedAmountInUserAccounts != null && Object.hasOwnProperty.call(message, "totalAggregatedAmountInUserAccounts")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.totalAggregatedAmountInUserAccounts); + if (message.totalSystemAmount != null && Object.hasOwnProperty.call(message, "totalSystemAmount")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.totalSystemAmount); + return writer; + }; + + /** + * Encodes the specified TokenTotalSupplyEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ITokenTotalSupplyEntry} message TokenTotalSupplyEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenTotalSupplyEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenTotalSupplyEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + * @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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} TokenTotalSupplyEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenTotalSupplyEntry.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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenId = reader.bytes(); + break; + case 2: + message.totalAggregatedAmountInUserAccounts = reader.uint64(); + break; + case 3: + message.totalSystemAmount = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenTotalSupplyEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} TokenTotalSupplyEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenTotalSupplyEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenTotalSupplyEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenTotalSupplyEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + if (!(message.tokenId && typeof message.tokenId.length === "number" || $util.isString(message.tokenId))) + return "tokenId: buffer expected"; + if (message.totalAggregatedAmountInUserAccounts != null && message.hasOwnProperty("totalAggregatedAmountInUserAccounts")) + if (!$util.isInteger(message.totalAggregatedAmountInUserAccounts) && !(message.totalAggregatedAmountInUserAccounts && $util.isInteger(message.totalAggregatedAmountInUserAccounts.low) && $util.isInteger(message.totalAggregatedAmountInUserAccounts.high))) + return "totalAggregatedAmountInUserAccounts: integer|Long expected"; + if (message.totalSystemAmount != null && message.hasOwnProperty("totalSystemAmount")) + if (!$util.isInteger(message.totalSystemAmount) && !(message.totalSystemAmount && $util.isInteger(message.totalSystemAmount.low) && $util.isInteger(message.totalSystemAmount.high))) + return "totalSystemAmount: integer|Long expected"; + return null; + }; + + /** + * Creates a TokenTotalSupplyEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} TokenTotalSupplyEntry + */ + TokenTotalSupplyEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry(); + if (object.tokenId != null) + if (typeof object.tokenId === "string") + $util.base64.decode(object.tokenId, message.tokenId = $util.newBuffer($util.base64.length(object.tokenId)), 0); + else if (object.tokenId.length >= 0) + message.tokenId = object.tokenId; + if (object.totalAggregatedAmountInUserAccounts != null) + if ($util.Long) + (message.totalAggregatedAmountInUserAccounts = $util.Long.fromValue(object.totalAggregatedAmountInUserAccounts)).unsigned = true; + else if (typeof object.totalAggregatedAmountInUserAccounts === "string") + message.totalAggregatedAmountInUserAccounts = parseInt(object.totalAggregatedAmountInUserAccounts, 10); + else if (typeof object.totalAggregatedAmountInUserAccounts === "number") + message.totalAggregatedAmountInUserAccounts = object.totalAggregatedAmountInUserAccounts; + else if (typeof object.totalAggregatedAmountInUserAccounts === "object") + message.totalAggregatedAmountInUserAccounts = new $util.LongBits(object.totalAggregatedAmountInUserAccounts.low >>> 0, object.totalAggregatedAmountInUserAccounts.high >>> 0).toNumber(true); + if (object.totalSystemAmount != null) + if ($util.Long) + (message.totalSystemAmount = $util.Long.fromValue(object.totalSystemAmount)).unsigned = true; + else if (typeof object.totalSystemAmount === "string") + message.totalSystemAmount = parseInt(object.totalSystemAmount, 10); + else if (typeof object.totalSystemAmount === "number") + message.totalSystemAmount = object.totalSystemAmount; + else if (typeof object.totalSystemAmount === "object") + message.totalSystemAmount = new $util.LongBits(object.totalSystemAmount.low >>> 0, object.totalSystemAmount.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a TokenTotalSupplyEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + * @static + * @param {org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} message TokenTotalSupplyEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenTotalSupplyEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tokenId = ""; + else { + object.tokenId = []; + if (options.bytes !== Array) + object.tokenId = $util.newBuffer(object.tokenId); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.totalAggregatedAmountInUserAccounts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalAggregatedAmountInUserAccounts = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.totalSystemAmount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalSystemAmount = options.longs === String ? "0" : 0; + } + if (message.tokenId != null && message.hasOwnProperty("tokenId")) + object.tokenId = options.bytes === String ? $util.base64.encode(message.tokenId, 0, message.tokenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenId) : message.tokenId; + if (message.totalAggregatedAmountInUserAccounts != null && message.hasOwnProperty("totalAggregatedAmountInUserAccounts")) + if (typeof message.totalAggregatedAmountInUserAccounts === "number") + object.totalAggregatedAmountInUserAccounts = options.longs === String ? String(message.totalAggregatedAmountInUserAccounts) : message.totalAggregatedAmountInUserAccounts; + else + object.totalAggregatedAmountInUserAccounts = options.longs === String ? $util.Long.prototype.toString.call(message.totalAggregatedAmountInUserAccounts) : options.longs === Number ? new $util.LongBits(message.totalAggregatedAmountInUserAccounts.low >>> 0, message.totalAggregatedAmountInUserAccounts.high >>> 0).toNumber(true) : message.totalAggregatedAmountInUserAccounts; + if (message.totalSystemAmount != null && message.hasOwnProperty("totalSystemAmount")) + if (typeof message.totalSystemAmount === "number") + object.totalSystemAmount = options.longs === String ? String(message.totalSystemAmount) : message.totalSystemAmount; + else + object.totalSystemAmount = options.longs === String ? $util.Long.prototype.toString.call(message.totalSystemAmount) : options.longs === Number ? new $util.LongBits(message.totalSystemAmount.low >>> 0, message.totalSystemAmount.high >>> 0).toNumber(true) : message.totalSystemAmount; + return object; + }; + + /** + * Converts this TokenTotalSupplyEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry + * @instance + * @returns {Object.} JSON object + */ + TokenTotalSupplyEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenTotalSupplyEntry; + })(); + + return GetTokenTotalSupplyResponseV0; + })(); + + return GetTokenTotalSupplyResponse; + })(); + + v0.GetGroupInfoRequest = (function() { + + /** + * Properties of a GetGroupInfoRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetGroupInfoRequest + * @property {org.dash.platform.dapi.v0.GetGroupInfoRequest.IGetGroupInfoRequestV0|null} [v0] GetGroupInfoRequest v0 + */ + + /** + * Constructs a new GetGroupInfoRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetGroupInfoRequest. + * @implements IGetGroupInfoRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetGroupInfoRequest=} [properties] Properties to set + */ + function GetGroupInfoRequest(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]]; + } + + /** + * GetGroupInfoRequest v0. + * @member {org.dash.platform.dapi.v0.GetGroupInfoRequest.IGetGroupInfoRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @instance + */ + GetGroupInfoRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetGroupInfoRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @instance + */ + Object.defineProperty(GetGroupInfoRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetGroupInfoRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupInfoRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfoRequest} GetGroupInfoRequest instance + */ + GetGroupInfoRequest.create = function create(properties) { + return new GetGroupInfoRequest(properties); + }; + + /** + * Encodes the specified GetGroupInfoRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupInfoRequest} message GetGroupInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfoRequest.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.GetGroupInfoRequest.GetGroupInfoRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetGroupInfoRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupInfoRequest} message GetGroupInfoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupInfoRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @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.GetGroupInfoRequest} GetGroupInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfoRequest.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.GetGroupInfoRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupInfoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfoRequest} GetGroupInfoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupInfoRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupInfoRequest.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.GetGroupInfoRequest.GetGroupInfoRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetGroupInfoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfoRequest} GetGroupInfoRequest + */ + GetGroupInfoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfoRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfoRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfoRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetGroupInfoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoRequest} message GetGroupInfoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupInfoRequest.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.GetGroupInfoRequest.GetGroupInfoRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetGroupInfoRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @instance + * @returns {Object.} JSON object + */ + GetGroupInfoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetGroupInfoRequest.GetGroupInfoRequestV0 = (function() { + + /** + * Properties of a GetGroupInfoRequestV0. + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @interface IGetGroupInfoRequestV0 + * @property {Uint8Array|null} [contractId] GetGroupInfoRequestV0 contractId + * @property {number|null} [groupContractPosition] GetGroupInfoRequestV0 groupContractPosition + * @property {boolean|null} [prove] GetGroupInfoRequestV0 prove + */ + + /** + * Constructs a new GetGroupInfoRequestV0. + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest + * @classdesc Represents a GetGroupInfoRequestV0. + * @implements IGetGroupInfoRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupInfoRequest.IGetGroupInfoRequestV0=} [properties] Properties to set + */ + function GetGroupInfoRequestV0(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]]; + } + + /** + * GetGroupInfoRequestV0 contractId. + * @member {Uint8Array} contractId + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + * @instance + */ + GetGroupInfoRequestV0.prototype.contractId = $util.newBuffer([]); + + /** + * GetGroupInfoRequestV0 groupContractPosition. + * @member {number} groupContractPosition + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + * @instance + */ + GetGroupInfoRequestV0.prototype.groupContractPosition = 0; + + /** + * GetGroupInfoRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + * @instance + */ + GetGroupInfoRequestV0.prototype.prove = false; + + /** + * Creates a new GetGroupInfoRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoRequest.IGetGroupInfoRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} GetGroupInfoRequestV0 instance + */ + GetGroupInfoRequestV0.create = function create(properties) { + return new GetGroupInfoRequestV0(properties); + }; + + /** + * Encodes the specified GetGroupInfoRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoRequest.IGetGroupInfoRequestV0} message GetGroupInfoRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfoRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contractId != null && Object.hasOwnProperty.call(message, "contractId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.contractId); + if (message.groupContractPosition != null && Object.hasOwnProperty.call(message, "groupContractPosition")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.groupContractPosition); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetGroupInfoRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoRequest.IGetGroupInfoRequestV0} message GetGroupInfoRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfoRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupInfoRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + * @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.GetGroupInfoRequest.GetGroupInfoRequestV0} GetGroupInfoRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfoRequestV0.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.GetGroupInfoRequest.GetGroupInfoRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.contractId = reader.bytes(); + break; + case 2: + message.groupContractPosition = reader.uint32(); + break; + case 3: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupInfoRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} GetGroupInfoRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfoRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupInfoRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupInfoRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contractId != null && message.hasOwnProperty("contractId")) + if (!(message.contractId && typeof message.contractId.length === "number" || $util.isString(message.contractId))) + return "contractId: buffer expected"; + if (message.groupContractPosition != null && message.hasOwnProperty("groupContractPosition")) + if (!$util.isInteger(message.groupContractPosition)) + return "groupContractPosition: integer expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetGroupInfoRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} GetGroupInfoRequestV0 + */ + GetGroupInfoRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0(); + if (object.contractId != null) + if (typeof object.contractId === "string") + $util.base64.decode(object.contractId, message.contractId = $util.newBuffer($util.base64.length(object.contractId)), 0); + else if (object.contractId.length >= 0) + message.contractId = object.contractId; + if (object.groupContractPosition != null) + message.groupContractPosition = object.groupContractPosition >>> 0; + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetGroupInfoRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} message GetGroupInfoRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupInfoRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.contractId = ""; + else { + object.contractId = []; + if (options.bytes !== Array) + object.contractId = $util.newBuffer(object.contractId); + } + object.groupContractPosition = 0; + object.prove = false; + } + if (message.contractId != null && message.hasOwnProperty("contractId")) + object.contractId = options.bytes === String ? $util.base64.encode(message.contractId, 0, message.contractId.length) : options.bytes === Array ? Array.prototype.slice.call(message.contractId) : message.contractId; + if (message.groupContractPosition != null && message.hasOwnProperty("groupContractPosition")) + object.groupContractPosition = message.groupContractPosition; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetGroupInfoRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetGroupInfoRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetGroupInfoRequestV0; + })(); + + return GetGroupInfoRequest; + })(); + + v0.GetGroupInfoResponse = (function() { + + /** + * Properties of a GetGroupInfoResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetGroupInfoResponse + * @property {org.dash.platform.dapi.v0.GetGroupInfoResponse.IGetGroupInfoResponseV0|null} [v0] GetGroupInfoResponse v0 + */ + + /** + * Constructs a new GetGroupInfoResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetGroupInfoResponse. + * @implements IGetGroupInfoResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetGroupInfoResponse=} [properties] Properties to set + */ + function GetGroupInfoResponse(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]]; + } + + /** + * GetGroupInfoResponse v0. + * @member {org.dash.platform.dapi.v0.GetGroupInfoResponse.IGetGroupInfoResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @instance + */ + GetGroupInfoResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetGroupInfoResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @instance + */ + Object.defineProperty(GetGroupInfoResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetGroupInfoResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupInfoResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse} GetGroupInfoResponse instance + */ + GetGroupInfoResponse.create = function create(properties) { + return new GetGroupInfoResponse(properties); + }; + + /** + * Encodes the specified GetGroupInfoResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupInfoResponse} message GetGroupInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfoResponse.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.GetGroupInfoResponse.GetGroupInfoResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetGroupInfoResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupInfoResponse} message GetGroupInfoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupInfoResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @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.GetGroupInfoResponse} GetGroupInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfoResponse.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.GetGroupInfoResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupInfoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse} GetGroupInfoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupInfoResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupInfoResponse.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.GetGroupInfoResponse.GetGroupInfoResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetGroupInfoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse} GetGroupInfoResponse + */ + GetGroupInfoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfoResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfoResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfoResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetGroupInfoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse} message GetGroupInfoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupInfoResponse.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.GetGroupInfoResponse.GetGroupInfoResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetGroupInfoResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @instance + * @returns {Object.} JSON object + */ + GetGroupInfoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetGroupInfoResponse.GetGroupInfoResponseV0 = (function() { + + /** + * Properties of a GetGroupInfoResponseV0. + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @interface IGetGroupInfoResponseV0 + * @property {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupInfo|null} [groupInfo] GetGroupInfoResponseV0 groupInfo + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetGroupInfoResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetGroupInfoResponseV0 metadata + */ + + /** + * Constructs a new GetGroupInfoResponseV0. + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse + * @classdesc Represents a GetGroupInfoResponseV0. + * @implements IGetGroupInfoResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.IGetGroupInfoResponseV0=} [properties] Properties to set + */ + function GetGroupInfoResponseV0(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]]; + } + + /** + * GetGroupInfoResponseV0 groupInfo. + * @member {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupInfo|null|undefined} groupInfo + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @instance + */ + GetGroupInfoResponseV0.prototype.groupInfo = null; + + /** + * GetGroupInfoResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @instance + */ + GetGroupInfoResponseV0.prototype.proof = null; + + /** + * GetGroupInfoResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @instance + */ + GetGroupInfoResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetGroupInfoResponseV0 result. + * @member {"groupInfo"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @instance + */ + Object.defineProperty(GetGroupInfoResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["groupInfo", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetGroupInfoResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.IGetGroupInfoResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} GetGroupInfoResponseV0 instance + */ + GetGroupInfoResponseV0.create = function create(properties) { + return new GetGroupInfoResponseV0(properties); + }; + + /** + * Encodes the specified GetGroupInfoResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.IGetGroupInfoResponseV0} message GetGroupInfoResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfoResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupInfo != null && Object.hasOwnProperty.call(message, "groupInfo")) + $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.encode(message.groupInfo, 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 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetGroupInfoResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.IGetGroupInfoResponseV0} message GetGroupInfoResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfoResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupInfoResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @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.GetGroupInfoResponse.GetGroupInfoResponseV0} GetGroupInfoResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfoResponseV0.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.GetGroupInfoResponse.GetGroupInfoResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.groupInfo = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.decode(reader, reader.uint32()); + break; + case 2: + message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32()); + break; + case 4: + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupInfoResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} GetGroupInfoResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfoResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupInfoResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupInfoResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.groupInfo != null && message.hasOwnProperty("groupInfo")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.verify(message.groupInfo); + if (error) + return "groupInfo." + 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 GetGroupInfoResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} GetGroupInfoResponseV0 + */ + GetGroupInfoResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0(); + if (object.groupInfo != null) { + if (typeof object.groupInfo !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.groupInfo: object expected"); + message.groupInfo = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.fromObject(object.groupInfo); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.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.GetGroupInfoResponse.GetGroupInfoResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetGroupInfoResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} message GetGroupInfoResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupInfoResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.groupInfo != null && message.hasOwnProperty("groupInfo")) { + object.groupInfo = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.toObject(message.groupInfo, options); + if (options.oneofs) + object.result = "groupInfo"; + } + 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 GetGroupInfoResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetGroupInfoResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetGroupInfoResponseV0.GroupMemberEntry = (function() { + + /** + * Properties of a GroupMemberEntry. + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @interface IGroupMemberEntry + * @property {Uint8Array|null} [memberId] GroupMemberEntry memberId + * @property {number|null} [power] GroupMemberEntry power + */ + + /** + * Constructs a new GroupMemberEntry. + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @classdesc Represents a GroupMemberEntry. + * @implements IGroupMemberEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupMemberEntry=} [properties] Properties to set + */ + function GroupMemberEntry(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]]; + } + + /** + * GroupMemberEntry memberId. + * @member {Uint8Array} memberId + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + * @instance + */ + GroupMemberEntry.prototype.memberId = $util.newBuffer([]); + + /** + * GroupMemberEntry power. + * @member {number} power + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + * @instance + */ + GroupMemberEntry.prototype.power = 0; + + /** + * Creates a new GroupMemberEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupMemberEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} GroupMemberEntry instance + */ + GroupMemberEntry.create = function create(properties) { + return new GroupMemberEntry(properties); + }; + + /** + * Encodes the specified GroupMemberEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupMemberEntry} message GroupMemberEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupMemberEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.memberId != null && Object.hasOwnProperty.call(message, "memberId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.memberId); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.power); + return writer; + }; + + /** + * Encodes the specified GroupMemberEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupMemberEntry} message GroupMemberEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupMemberEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupMemberEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + * @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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} GroupMemberEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupMemberEntry.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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.memberId = reader.bytes(); + break; + case 2: + message.power = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupMemberEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} GroupMemberEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupMemberEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupMemberEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupMemberEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.memberId != null && message.hasOwnProperty("memberId")) + if (!(message.memberId && typeof message.memberId.length === "number" || $util.isString(message.memberId))) + return "memberId: buffer expected"; + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power)) + return "power: integer expected"; + return null; + }; + + /** + * Creates a GroupMemberEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} GroupMemberEntry + */ + GroupMemberEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry(); + if (object.memberId != null) + if (typeof object.memberId === "string") + $util.base64.decode(object.memberId, message.memberId = $util.newBuffer($util.base64.length(object.memberId)), 0); + else if (object.memberId.length >= 0) + message.memberId = object.memberId; + if (object.power != null) + message.power = object.power >>> 0; + return message; + }; + + /** + * Creates a plain object from a GroupMemberEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} message GroupMemberEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupMemberEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.memberId = ""; + else { + object.memberId = []; + if (options.bytes !== Array) + object.memberId = $util.newBuffer(object.memberId); + } + object.power = 0; + } + if (message.memberId != null && message.hasOwnProperty("memberId")) + object.memberId = options.bytes === String ? $util.base64.encode(message.memberId, 0, message.memberId.length) : options.bytes === Array ? Array.prototype.slice.call(message.memberId) : message.memberId; + if (message.power != null && message.hasOwnProperty("power")) + object.power = message.power; + return object; + }; + + /** + * Converts this GroupMemberEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry + * @instance + * @returns {Object.} JSON object + */ + GroupMemberEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupMemberEntry; + })(); + + GetGroupInfoResponseV0.GroupInfoEntry = (function() { + + /** + * Properties of a GroupInfoEntry. + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @interface IGroupInfoEntry + * @property {Array.|null} [members] GroupInfoEntry members + * @property {number|null} [groupRequiredPower] GroupInfoEntry groupRequiredPower + */ + + /** + * Constructs a new GroupInfoEntry. + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @classdesc Represents a GroupInfoEntry. + * @implements IGroupInfoEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupInfoEntry=} [properties] Properties to set + */ + function GroupInfoEntry(properties) { + this.members = []; + 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]]; + } + + /** + * GroupInfoEntry members. + * @member {Array.} members + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + * @instance + */ + GroupInfoEntry.prototype.members = $util.emptyArray; + + /** + * GroupInfoEntry groupRequiredPower. + * @member {number} groupRequiredPower + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + * @instance + */ + GroupInfoEntry.prototype.groupRequiredPower = 0; + + /** + * Creates a new GroupInfoEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupInfoEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} GroupInfoEntry instance + */ + GroupInfoEntry.create = function create(properties) { + return new GroupInfoEntry(properties); + }; + + /** + * Encodes the specified GroupInfoEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupInfoEntry} message GroupInfoEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupInfoEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.encode(message.members[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.groupRequiredPower != null && Object.hasOwnProperty.call(message, "groupRequiredPower")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.groupRequiredPower); + return writer; + }; + + /** + * Encodes the specified GroupInfoEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupInfoEntry} message GroupInfoEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupInfoEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupInfoEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + * @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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} GroupInfoEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupInfoEntry.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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.members && message.members.length)) + message.members = []; + message.members.push($root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.decode(reader, reader.uint32())); + break; + case 2: + message.groupRequiredPower = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupInfoEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} GroupInfoEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupInfoEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupInfoEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupInfoEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.verify(message.members[i]); + if (error) + return "members." + error; + } + } + if (message.groupRequiredPower != null && message.hasOwnProperty("groupRequiredPower")) + if (!$util.isInteger(message.groupRequiredPower)) + return "groupRequiredPower: integer expected"; + return null; + }; + + /** + * Creates a GroupInfoEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} GroupInfoEntry + */ + GroupInfoEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry(); + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) { + if (typeof object.members[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.members: object expected"); + message.members[i] = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.fromObject(object.members[i]); + } + } + if (object.groupRequiredPower != null) + message.groupRequiredPower = object.groupRequiredPower >>> 0; + return message; + }; + + /** + * Creates a plain object from a GroupInfoEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} message GroupInfoEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupInfoEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) + object.groupRequiredPower = 0; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.toObject(message.members[j], options); + } + if (message.groupRequiredPower != null && message.hasOwnProperty("groupRequiredPower")) + object.groupRequiredPower = message.groupRequiredPower; + return object; + }; + + /** + * Converts this GroupInfoEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry + * @instance + * @returns {Object.} JSON object + */ + GroupInfoEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupInfoEntry; + })(); + + GetGroupInfoResponseV0.GroupInfo = (function() { + + /** + * Properties of a GroupInfo. + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @interface IGroupInfo + * @property {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupInfoEntry|null} [groupInfo] GroupInfo groupInfo + */ + + /** + * Constructs a new GroupInfo. + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0 + * @classdesc Represents a GroupInfo. + * @implements IGroupInfo + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupInfo=} [properties] Properties to set + */ + function GroupInfo(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]]; + } + + /** + * GroupInfo groupInfo. + * @member {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupInfoEntry|null|undefined} groupInfo + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + * @instance + */ + GroupInfo.prototype.groupInfo = null; + + /** + * Creates a new GroupInfo instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupInfo=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} GroupInfo instance + */ + GroupInfo.create = function create(properties) { + return new GroupInfo(properties); + }; + + /** + * Encodes the specified GroupInfo message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupInfo} message GroupInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupInfo != null && Object.hasOwnProperty.call(message, "groupInfo")) + $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.encode(message.groupInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GroupInfo message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.IGroupInfo} message GroupInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupInfo message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + * @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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} GroupInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupInfo.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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.groupInfo = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} GroupInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupInfo message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.groupInfo != null && message.hasOwnProperty("groupInfo")) { + var error = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.verify(message.groupInfo); + if (error) + return "groupInfo." + error; + } + return null; + }; + + /** + * Creates a GroupInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} GroupInfo + */ + GroupInfo.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo(); + if (object.groupInfo != null) { + if (typeof object.groupInfo !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.groupInfo: object expected"); + message.groupInfo = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.fromObject(object.groupInfo); + } + return message; + }; + + /** + * Creates a plain object from a GroupInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} message GroupInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.groupInfo = null; + if (message.groupInfo != null && message.hasOwnProperty("groupInfo")) + object.groupInfo = $root.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.toObject(message.groupInfo, options); + return object; + }; + + /** + * Converts this GroupInfo to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo + * @instance + * @returns {Object.} JSON object + */ + GroupInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupInfo; + })(); + + return GetGroupInfoResponseV0; + })(); + + return GetGroupInfoResponse; + })(); + + v0.GetGroupInfosRequest = (function() { + + /** + * Properties of a GetGroupInfosRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetGroupInfosRequest + * @property {org.dash.platform.dapi.v0.GetGroupInfosRequest.IGetGroupInfosRequestV0|null} [v0] GetGroupInfosRequest v0 + */ + + /** + * Constructs a new GetGroupInfosRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetGroupInfosRequest. + * @implements IGetGroupInfosRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetGroupInfosRequest=} [properties] Properties to set + */ + function GetGroupInfosRequest(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]]; + } + + /** + * GetGroupInfosRequest v0. + * @member {org.dash.platform.dapi.v0.GetGroupInfosRequest.IGetGroupInfosRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @instance + */ + GetGroupInfosRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetGroupInfosRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @instance + */ + Object.defineProperty(GetGroupInfosRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetGroupInfosRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupInfosRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfosRequest} GetGroupInfosRequest instance + */ + GetGroupInfosRequest.create = function create(properties) { + return new GetGroupInfosRequest(properties); + }; + + /** + * Encodes the specified GetGroupInfosRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupInfosRequest} message GetGroupInfosRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfosRequest.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.GetGroupInfosRequest.GetGroupInfosRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetGroupInfosRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupInfosRequest} message GetGroupInfosRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfosRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupInfosRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @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.GetGroupInfosRequest} GetGroupInfosRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfosRequest.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.GetGroupInfosRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupInfosRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfosRequest} GetGroupInfosRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfosRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupInfosRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupInfosRequest.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.GetGroupInfosRequest.GetGroupInfosRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetGroupInfosRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfosRequest} GetGroupInfosRequest + */ + GetGroupInfosRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfosRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfosRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfosRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetGroupInfosRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosRequest} message GetGroupInfosRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupInfosRequest.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.GetGroupInfosRequest.GetGroupInfosRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetGroupInfosRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @instance + * @returns {Object.} JSON object + */ + GetGroupInfosRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetGroupInfosRequest.StartAtGroupContractPosition = (function() { + + /** + * Properties of a StartAtGroupContractPosition. + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @interface IStartAtGroupContractPosition + * @property {number|null} [startGroupContractPosition] StartAtGroupContractPosition startGroupContractPosition + * @property {boolean|null} [startGroupContractPositionIncluded] StartAtGroupContractPosition startGroupContractPositionIncluded + */ + + /** + * Constructs a new StartAtGroupContractPosition. + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @classdesc Represents a StartAtGroupContractPosition. + * @implements IStartAtGroupContractPosition + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupInfosRequest.IStartAtGroupContractPosition=} [properties] Properties to set + */ + function StartAtGroupContractPosition(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]]; + } + + /** + * StartAtGroupContractPosition startGroupContractPosition. + * @member {number} startGroupContractPosition + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + * @instance + */ + StartAtGroupContractPosition.prototype.startGroupContractPosition = 0; + + /** + * StartAtGroupContractPosition startGroupContractPositionIncluded. + * @member {boolean} startGroupContractPositionIncluded + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + * @instance + */ + StartAtGroupContractPosition.prototype.startGroupContractPositionIncluded = false; + + /** + * Creates a new StartAtGroupContractPosition instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosRequest.IStartAtGroupContractPosition=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} StartAtGroupContractPosition instance + */ + StartAtGroupContractPosition.create = function create(properties) { + return new StartAtGroupContractPosition(properties); + }; + + /** + * Encodes the specified StartAtGroupContractPosition message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosRequest.IStartAtGroupContractPosition} message StartAtGroupContractPosition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartAtGroupContractPosition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startGroupContractPosition != null && Object.hasOwnProperty.call(message, "startGroupContractPosition")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.startGroupContractPosition); + if (message.startGroupContractPositionIncluded != null && Object.hasOwnProperty.call(message, "startGroupContractPositionIncluded")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.startGroupContractPositionIncluded); + return writer; + }; + + /** + * Encodes the specified StartAtGroupContractPosition message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosRequest.IStartAtGroupContractPosition} message StartAtGroupContractPosition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartAtGroupContractPosition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartAtGroupContractPosition message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + * @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.GetGroupInfosRequest.StartAtGroupContractPosition} StartAtGroupContractPosition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartAtGroupContractPosition.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.GetGroupInfosRequest.StartAtGroupContractPosition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startGroupContractPosition = reader.uint32(); + break; + case 2: + message.startGroupContractPositionIncluded = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartAtGroupContractPosition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} StartAtGroupContractPosition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartAtGroupContractPosition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartAtGroupContractPosition message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartAtGroupContractPosition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startGroupContractPosition != null && message.hasOwnProperty("startGroupContractPosition")) + if (!$util.isInteger(message.startGroupContractPosition)) + return "startGroupContractPosition: integer expected"; + if (message.startGroupContractPositionIncluded != null && message.hasOwnProperty("startGroupContractPositionIncluded")) + if (typeof message.startGroupContractPositionIncluded !== "boolean") + return "startGroupContractPositionIncluded: boolean expected"; + return null; + }; + + /** + * Creates a StartAtGroupContractPosition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} StartAtGroupContractPosition + */ + StartAtGroupContractPosition.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition(); + if (object.startGroupContractPosition != null) + message.startGroupContractPosition = object.startGroupContractPosition >>> 0; + if (object.startGroupContractPositionIncluded != null) + message.startGroupContractPositionIncluded = Boolean(object.startGroupContractPositionIncluded); + return message; + }; + + /** + * Creates a plain object from a StartAtGroupContractPosition message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} message StartAtGroupContractPosition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartAtGroupContractPosition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startGroupContractPosition = 0; + object.startGroupContractPositionIncluded = false; + } + if (message.startGroupContractPosition != null && message.hasOwnProperty("startGroupContractPosition")) + object.startGroupContractPosition = message.startGroupContractPosition; + if (message.startGroupContractPositionIncluded != null && message.hasOwnProperty("startGroupContractPositionIncluded")) + object.startGroupContractPositionIncluded = message.startGroupContractPositionIncluded; + return object; + }; + + /** + * Converts this StartAtGroupContractPosition to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition + * @instance + * @returns {Object.} JSON object + */ + StartAtGroupContractPosition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StartAtGroupContractPosition; + })(); + + GetGroupInfosRequest.GetGroupInfosRequestV0 = (function() { + + /** + * Properties of a GetGroupInfosRequestV0. + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @interface IGetGroupInfosRequestV0 + * @property {Uint8Array|null} [contractId] GetGroupInfosRequestV0 contractId + * @property {org.dash.platform.dapi.v0.GetGroupInfosRequest.IStartAtGroupContractPosition|null} [startAtGroupContractPosition] GetGroupInfosRequestV0 startAtGroupContractPosition + * @property {number|null} [count] GetGroupInfosRequestV0 count + * @property {boolean|null} [prove] GetGroupInfosRequestV0 prove + */ + + /** + * Constructs a new GetGroupInfosRequestV0. + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest + * @classdesc Represents a GetGroupInfosRequestV0. + * @implements IGetGroupInfosRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupInfosRequest.IGetGroupInfosRequestV0=} [properties] Properties to set + */ + function GetGroupInfosRequestV0(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]]; + } + + /** + * GetGroupInfosRequestV0 contractId. + * @member {Uint8Array} contractId + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @instance + */ + GetGroupInfosRequestV0.prototype.contractId = $util.newBuffer([]); + + /** + * GetGroupInfosRequestV0 startAtGroupContractPosition. + * @member {org.dash.platform.dapi.v0.GetGroupInfosRequest.IStartAtGroupContractPosition|null|undefined} startAtGroupContractPosition + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @instance + */ + GetGroupInfosRequestV0.prototype.startAtGroupContractPosition = null; + + /** + * GetGroupInfosRequestV0 count. + * @member {number} count + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @instance + */ + GetGroupInfosRequestV0.prototype.count = 0; + + /** + * GetGroupInfosRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @instance + */ + GetGroupInfosRequestV0.prototype.prove = false; + + /** + * Creates a new GetGroupInfosRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosRequest.IGetGroupInfosRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} GetGroupInfosRequestV0 instance + */ + GetGroupInfosRequestV0.create = function create(properties) { + return new GetGroupInfosRequestV0(properties); + }; + + /** + * Encodes the specified GetGroupInfosRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosRequest.IGetGroupInfosRequestV0} message GetGroupInfosRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfosRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contractId != null && Object.hasOwnProperty.call(message, "contractId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.contractId); + if (message.startAtGroupContractPosition != null && Object.hasOwnProperty.call(message, "startAtGroupContractPosition")) + $root.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.encode(message.startAtGroupContractPosition, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.count); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetGroupInfosRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosRequest.IGetGroupInfosRequestV0} message GetGroupInfosRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfosRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupInfosRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @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.GetGroupInfosRequest.GetGroupInfosRequestV0} GetGroupInfosRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfosRequestV0.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.GetGroupInfosRequest.GetGroupInfosRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.contractId = reader.bytes(); + break; + case 2: + message.startAtGroupContractPosition = $root.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.decode(reader, reader.uint32()); + break; + case 3: + message.count = reader.uint32(); + break; + case 4: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupInfosRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} GetGroupInfosRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfosRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupInfosRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupInfosRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contractId != null && message.hasOwnProperty("contractId")) + if (!(message.contractId && typeof message.contractId.length === "number" || $util.isString(message.contractId))) + return "contractId: buffer expected"; + if (message.startAtGroupContractPosition != null && message.hasOwnProperty("startAtGroupContractPosition")) { + var error = $root.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.verify(message.startAtGroupContractPosition); + if (error) + return "startAtGroupContractPosition." + error; + } + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetGroupInfosRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} GetGroupInfosRequestV0 + */ + GetGroupInfosRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0(); + if (object.contractId != null) + if (typeof object.contractId === "string") + $util.base64.decode(object.contractId, message.contractId = $util.newBuffer($util.base64.length(object.contractId)), 0); + else if (object.contractId.length >= 0) + message.contractId = object.contractId; + if (object.startAtGroupContractPosition != null) { + if (typeof object.startAtGroupContractPosition !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.startAtGroupContractPosition: object expected"); + message.startAtGroupContractPosition = $root.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.fromObject(object.startAtGroupContractPosition); + } + if (object.count != null) + message.count = object.count >>> 0; + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetGroupInfosRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} message GetGroupInfosRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupInfosRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.contractId = ""; + else { + object.contractId = []; + if (options.bytes !== Array) + object.contractId = $util.newBuffer(object.contractId); + } + object.startAtGroupContractPosition = null; + object.count = 0; + object.prove = false; + } + if (message.contractId != null && message.hasOwnProperty("contractId")) + object.contractId = options.bytes === String ? $util.base64.encode(message.contractId, 0, message.contractId.length) : options.bytes === Array ? Array.prototype.slice.call(message.contractId) : message.contractId; + if (message.startAtGroupContractPosition != null && message.hasOwnProperty("startAtGroupContractPosition")) + object.startAtGroupContractPosition = $root.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.toObject(message.startAtGroupContractPosition, options); + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetGroupInfosRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetGroupInfosRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetGroupInfosRequestV0; + })(); + + return GetGroupInfosRequest; + })(); + + v0.GetGroupInfosResponse = (function() { + + /** + * Properties of a GetGroupInfosResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetGroupInfosResponse + * @property {org.dash.platform.dapi.v0.GetGroupInfosResponse.IGetGroupInfosResponseV0|null} [v0] GetGroupInfosResponse v0 + */ + + /** + * Constructs a new GetGroupInfosResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetGroupInfosResponse. + * @implements IGetGroupInfosResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetGroupInfosResponse=} [properties] Properties to set + */ + function GetGroupInfosResponse(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]]; + } + + /** + * GetGroupInfosResponse v0. + * @member {org.dash.platform.dapi.v0.GetGroupInfosResponse.IGetGroupInfosResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @instance + */ + GetGroupInfosResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetGroupInfosResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @instance + */ + Object.defineProperty(GetGroupInfosResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetGroupInfosResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupInfosResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse} GetGroupInfosResponse instance + */ + GetGroupInfosResponse.create = function create(properties) { + return new GetGroupInfosResponse(properties); + }; + + /** + * Encodes the specified GetGroupInfosResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupInfosResponse} message GetGroupInfosResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfosResponse.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.GetGroupInfosResponse.GetGroupInfosResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetGroupInfosResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupInfosResponse} message GetGroupInfosResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfosResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupInfosResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @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.GetGroupInfosResponse} GetGroupInfosResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfosResponse.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.GetGroupInfosResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupInfosResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse} GetGroupInfosResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfosResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupInfosResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupInfosResponse.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.GetGroupInfosResponse.GetGroupInfosResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetGroupInfosResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse} GetGroupInfosResponse + */ + GetGroupInfosResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfosResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfosResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfosResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetGroupInfosResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse} message GetGroupInfosResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupInfosResponse.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.GetGroupInfosResponse.GetGroupInfosResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetGroupInfosResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @instance + * @returns {Object.} JSON object + */ + GetGroupInfosResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetGroupInfosResponse.GetGroupInfosResponseV0 = (function() { + + /** + * Properties of a GetGroupInfosResponseV0. + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @interface IGetGroupInfosResponseV0 + * @property {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupInfos|null} [groupInfos] GetGroupInfosResponseV0 groupInfos + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetGroupInfosResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetGroupInfosResponseV0 metadata + */ + + /** + * Constructs a new GetGroupInfosResponseV0. + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse + * @classdesc Represents a GetGroupInfosResponseV0. + * @implements IGetGroupInfosResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.IGetGroupInfosResponseV0=} [properties] Properties to set + */ + function GetGroupInfosResponseV0(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]]; + } + + /** + * GetGroupInfosResponseV0 groupInfos. + * @member {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupInfos|null|undefined} groupInfos + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @instance + */ + GetGroupInfosResponseV0.prototype.groupInfos = null; + + /** + * GetGroupInfosResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @instance + */ + GetGroupInfosResponseV0.prototype.proof = null; + + /** + * GetGroupInfosResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @instance + */ + GetGroupInfosResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetGroupInfosResponseV0 result. + * @member {"groupInfos"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @instance + */ + Object.defineProperty(GetGroupInfosResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["groupInfos", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetGroupInfosResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.IGetGroupInfosResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} GetGroupInfosResponseV0 instance + */ + GetGroupInfosResponseV0.create = function create(properties) { + return new GetGroupInfosResponseV0(properties); + }; + + /** + * Encodes the specified GetGroupInfosResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.IGetGroupInfosResponseV0} message GetGroupInfosResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfosResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupInfos != null && Object.hasOwnProperty.call(message, "groupInfos")) + $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.encode(message.groupInfos, 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 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetGroupInfosResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.IGetGroupInfosResponseV0} message GetGroupInfosResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupInfosResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupInfosResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @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.GetGroupInfosResponse.GetGroupInfosResponseV0} GetGroupInfosResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfosResponseV0.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.GetGroupInfosResponse.GetGroupInfosResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.groupInfos = $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.decode(reader, reader.uint32()); + break; + case 2: + message.proof = $root.org.dash.platform.dapi.v0.Proof.decode(reader, reader.uint32()); + break; + case 4: + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupInfosResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} GetGroupInfosResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupInfosResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupInfosResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupInfosResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.groupInfos != null && message.hasOwnProperty("groupInfos")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.verify(message.groupInfos); + if (error) + return "groupInfos." + 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 GetGroupInfosResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} GetGroupInfosResponseV0 + */ + GetGroupInfosResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0(); + if (object.groupInfos != null) { + if (typeof object.groupInfos !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.groupInfos: object expected"); + message.groupInfos = $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.fromObject(object.groupInfos); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.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.GetGroupInfosResponse.GetGroupInfosResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetGroupInfosResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} message GetGroupInfosResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupInfosResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.groupInfos != null && message.hasOwnProperty("groupInfos")) { + object.groupInfos = $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.toObject(message.groupInfos, options); + if (options.oneofs) + object.result = "groupInfos"; + } + 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 GetGroupInfosResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetGroupInfosResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetGroupInfosResponseV0.GroupMemberEntry = (function() { + + /** + * Properties of a GroupMemberEntry. + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @interface IGroupMemberEntry + * @property {Uint8Array|null} [memberId] GroupMemberEntry memberId + * @property {number|null} [power] GroupMemberEntry power + */ + + /** + * Constructs a new GroupMemberEntry. + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @classdesc Represents a GroupMemberEntry. + * @implements IGroupMemberEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupMemberEntry=} [properties] Properties to set + */ + function GroupMemberEntry(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]]; + } + + /** + * GroupMemberEntry memberId. + * @member {Uint8Array} memberId + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + * @instance + */ + GroupMemberEntry.prototype.memberId = $util.newBuffer([]); + + /** + * GroupMemberEntry power. + * @member {number} power + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + * @instance + */ + GroupMemberEntry.prototype.power = 0; + + /** + * Creates a new GroupMemberEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupMemberEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} GroupMemberEntry instance + */ + GroupMemberEntry.create = function create(properties) { + return new GroupMemberEntry(properties); + }; + + /** + * Encodes the specified GroupMemberEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupMemberEntry} message GroupMemberEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupMemberEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.memberId != null && Object.hasOwnProperty.call(message, "memberId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.memberId); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.power); + return writer; + }; + + /** + * Encodes the specified GroupMemberEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupMemberEntry} message GroupMemberEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupMemberEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupMemberEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + * @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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} GroupMemberEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupMemberEntry.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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.memberId = reader.bytes(); + break; + case 2: + message.power = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupMemberEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} GroupMemberEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupMemberEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupMemberEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupMemberEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.memberId != null && message.hasOwnProperty("memberId")) + if (!(message.memberId && typeof message.memberId.length === "number" || $util.isString(message.memberId))) + return "memberId: buffer expected"; + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power)) + return "power: integer expected"; + return null; + }; + + /** + * Creates a GroupMemberEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} GroupMemberEntry + */ + GroupMemberEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry(); + if (object.memberId != null) + if (typeof object.memberId === "string") + $util.base64.decode(object.memberId, message.memberId = $util.newBuffer($util.base64.length(object.memberId)), 0); + else if (object.memberId.length >= 0) + message.memberId = object.memberId; + if (object.power != null) + message.power = object.power >>> 0; + return message; + }; + + /** + * Creates a plain object from a GroupMemberEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} message GroupMemberEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupMemberEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.memberId = ""; + else { + object.memberId = []; + if (options.bytes !== Array) + object.memberId = $util.newBuffer(object.memberId); + } + object.power = 0; + } + if (message.memberId != null && message.hasOwnProperty("memberId")) + object.memberId = options.bytes === String ? $util.base64.encode(message.memberId, 0, message.memberId.length) : options.bytes === Array ? Array.prototype.slice.call(message.memberId) : message.memberId; + if (message.power != null && message.hasOwnProperty("power")) + object.power = message.power; + return object; + }; + + /** + * Converts this GroupMemberEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry + * @instance + * @returns {Object.} JSON object + */ + GroupMemberEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupMemberEntry; + })(); + + GetGroupInfosResponseV0.GroupPositionInfoEntry = (function() { + + /** + * Properties of a GroupPositionInfoEntry. + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @interface IGroupPositionInfoEntry + * @property {number|null} [groupContractPosition] GroupPositionInfoEntry groupContractPosition + * @property {Array.|null} [members] GroupPositionInfoEntry members + * @property {number|null} [groupRequiredPower] GroupPositionInfoEntry groupRequiredPower + */ + + /** + * Constructs a new GroupPositionInfoEntry. + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @classdesc Represents a GroupPositionInfoEntry. + * @implements IGroupPositionInfoEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupPositionInfoEntry=} [properties] Properties to set + */ + function GroupPositionInfoEntry(properties) { + this.members = []; + 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]]; + } + + /** + * GroupPositionInfoEntry groupContractPosition. + * @member {number} groupContractPosition + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + * @instance + */ + GroupPositionInfoEntry.prototype.groupContractPosition = 0; + + /** + * GroupPositionInfoEntry members. + * @member {Array.} members + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + * @instance + */ + GroupPositionInfoEntry.prototype.members = $util.emptyArray; + + /** + * GroupPositionInfoEntry groupRequiredPower. + * @member {number} groupRequiredPower + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + * @instance + */ + GroupPositionInfoEntry.prototype.groupRequiredPower = 0; + + /** + * Creates a new GroupPositionInfoEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupPositionInfoEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} GroupPositionInfoEntry instance + */ + GroupPositionInfoEntry.create = function create(properties) { + return new GroupPositionInfoEntry(properties); + }; + + /** + * Encodes the specified GroupPositionInfoEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupPositionInfoEntry} message GroupPositionInfoEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupPositionInfoEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupContractPosition != null && Object.hasOwnProperty.call(message, "groupContractPosition")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.groupContractPosition); + if (message.members != null && message.members.length) + for (var i = 0; i < message.members.length; ++i) + $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.encode(message.members[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.groupRequiredPower != null && Object.hasOwnProperty.call(message, "groupRequiredPower")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.groupRequiredPower); + return writer; + }; + + /** + * Encodes the specified GroupPositionInfoEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupPositionInfoEntry} message GroupPositionInfoEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupPositionInfoEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupPositionInfoEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + * @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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} GroupPositionInfoEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupPositionInfoEntry.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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.groupContractPosition = reader.uint32(); + break; + case 2: + if (!(message.members && message.members.length)) + message.members = []; + message.members.push($root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.decode(reader, reader.uint32())); + break; + case 3: + message.groupRequiredPower = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupPositionInfoEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} GroupPositionInfoEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupPositionInfoEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupPositionInfoEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupPositionInfoEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.groupContractPosition != null && message.hasOwnProperty("groupContractPosition")) + if (!$util.isInteger(message.groupContractPosition)) + return "groupContractPosition: integer expected"; + if (message.members != null && message.hasOwnProperty("members")) { + if (!Array.isArray(message.members)) + return "members: array expected"; + for (var i = 0; i < message.members.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.verify(message.members[i]); + if (error) + return "members." + error; + } + } + if (message.groupRequiredPower != null && message.hasOwnProperty("groupRequiredPower")) + if (!$util.isInteger(message.groupRequiredPower)) + return "groupRequiredPower: integer expected"; + return null; + }; + + /** + * Creates a GroupPositionInfoEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} GroupPositionInfoEntry + */ + GroupPositionInfoEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry(); + if (object.groupContractPosition != null) + message.groupContractPosition = object.groupContractPosition >>> 0; + if (object.members) { + if (!Array.isArray(object.members)) + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.members: array expected"); + message.members = []; + for (var i = 0; i < object.members.length; ++i) { + if (typeof object.members[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.members: object expected"); + message.members[i] = $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.fromObject(object.members[i]); + } + } + if (object.groupRequiredPower != null) + message.groupRequiredPower = object.groupRequiredPower >>> 0; + return message; + }; + + /** + * Creates a plain object from a GroupPositionInfoEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} message GroupPositionInfoEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupPositionInfoEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.members = []; + if (options.defaults) { + object.groupContractPosition = 0; + object.groupRequiredPower = 0; + } + if (message.groupContractPosition != null && message.hasOwnProperty("groupContractPosition")) + object.groupContractPosition = message.groupContractPosition; + if (message.members && message.members.length) { + object.members = []; + for (var j = 0; j < message.members.length; ++j) + object.members[j] = $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.toObject(message.members[j], options); + } + if (message.groupRequiredPower != null && message.hasOwnProperty("groupRequiredPower")) + object.groupRequiredPower = message.groupRequiredPower; + return object; + }; + + /** + * Converts this GroupPositionInfoEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry + * @instance + * @returns {Object.} JSON object + */ + GroupPositionInfoEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupPositionInfoEntry; + })(); + + GetGroupInfosResponseV0.GroupInfos = (function() { + + /** + * Properties of a GroupInfos. + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @interface IGroupInfos + * @property {Array.|null} [groupInfos] GroupInfos groupInfos + */ + + /** + * Constructs a new GroupInfos. + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0 + * @classdesc Represents a GroupInfos. + * @implements IGroupInfos + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupInfos=} [properties] Properties to set + */ + function GroupInfos(properties) { + this.groupInfos = []; + 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]]; + } + + /** + * GroupInfos groupInfos. + * @member {Array.} groupInfos + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + * @instance + */ + GroupInfos.prototype.groupInfos = $util.emptyArray; + + /** + * Creates a new GroupInfos instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupInfos=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} GroupInfos instance + */ + GroupInfos.create = function create(properties) { + return new GroupInfos(properties); + }; + + /** + * Encodes the specified GroupInfos message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupInfos} message GroupInfos message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupInfos.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupInfos != null && message.groupInfos.length) + for (var i = 0; i < message.groupInfos.length; ++i) + $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.encode(message.groupInfos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GroupInfos message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.IGroupInfos} message GroupInfos message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupInfos.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupInfos message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + * @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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} GroupInfos + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupInfos.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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.groupInfos && message.groupInfos.length)) + message.groupInfos = []; + message.groupInfos.push($root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupInfos message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} GroupInfos + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupInfos.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupInfos message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupInfos.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.groupInfos != null && message.hasOwnProperty("groupInfos")) { + if (!Array.isArray(message.groupInfos)) + return "groupInfos: array expected"; + for (var i = 0; i < message.groupInfos.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.verify(message.groupInfos[i]); + if (error) + return "groupInfos." + error; + } + } + return null; + }; + + /** + * Creates a GroupInfos message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} GroupInfos + */ + GroupInfos.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos(); + if (object.groupInfos) { + if (!Array.isArray(object.groupInfos)) + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.groupInfos: array expected"); + message.groupInfos = []; + for (var i = 0; i < object.groupInfos.length; ++i) { + if (typeof object.groupInfos[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.groupInfos: object expected"); + message.groupInfos[i] = $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.fromObject(object.groupInfos[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GroupInfos message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + * @static + * @param {org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} message GroupInfos + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupInfos.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.groupInfos = []; + if (message.groupInfos && message.groupInfos.length) { + object.groupInfos = []; + for (var j = 0; j < message.groupInfos.length; ++j) + object.groupInfos[j] = $root.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.toObject(message.groupInfos[j], options); + } + return object; + }; + + /** + * Converts this GroupInfos to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos + * @instance + * @returns {Object.} JSON object + */ + GroupInfos.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupInfos; + })(); + + return GetGroupInfosResponseV0; + })(); + + return GetGroupInfosResponse; + })(); + + v0.GetGroupActionsRequest = (function() { + + /** + * Properties of a GetGroupActionsRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetGroupActionsRequest + * @property {org.dash.platform.dapi.v0.GetGroupActionsRequest.IGetGroupActionsRequestV0|null} [v0] GetGroupActionsRequest v0 + */ + + /** + * Constructs a new GetGroupActionsRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetGroupActionsRequest. + * @implements IGetGroupActionsRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetGroupActionsRequest=} [properties] Properties to set + */ + function GetGroupActionsRequest(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]]; + } + + /** + * GetGroupActionsRequest v0. + * @member {org.dash.platform.dapi.v0.GetGroupActionsRequest.IGetGroupActionsRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @instance + */ + GetGroupActionsRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetGroupActionsRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @instance + */ + Object.defineProperty(GetGroupActionsRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetGroupActionsRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupActionsRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsRequest} GetGroupActionsRequest instance + */ + GetGroupActionsRequest.create = function create(properties) { + return new GetGroupActionsRequest(properties); + }; + + /** + * Encodes the specified GetGroupActionsRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupActionsRequest} message GetGroupActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionsRequest.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.GetGroupActionsRequest.GetGroupActionsRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetGroupActionsRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupActionsRequest} message GetGroupActionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupActionsRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @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.GetGroupActionsRequest} GetGroupActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionsRequest.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.GetGroupActionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupActionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsRequest} GetGroupActionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupActionsRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupActionsRequest.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.GetGroupActionsRequest.GetGroupActionsRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetGroupActionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsRequest} GetGroupActionsRequest + */ + GetGroupActionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetGroupActionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsRequest} message GetGroupActionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupActionsRequest.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.GetGroupActionsRequest.GetGroupActionsRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetGroupActionsRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @instance + * @returns {Object.} JSON object + */ + GetGroupActionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ActionStatus enum. + * @name org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus + * @enum {number} + * @property {number} ACTIVE=0 ACTIVE value + * @property {number} CLOSED=1 CLOSED value + */ + GetGroupActionsRequest.ActionStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTIVE"] = 0; + values[valuesById[1] = "CLOSED"] = 1; + return values; + })(); + + GetGroupActionsRequest.StartAtActionId = (function() { + + /** + * Properties of a StartAtActionId. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @interface IStartAtActionId + * @property {Uint8Array|null} [startActionId] StartAtActionId startActionId + * @property {boolean|null} [startActionIdIncluded] StartAtActionId startActionIdIncluded + */ + + /** + * Constructs a new StartAtActionId. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @classdesc Represents a StartAtActionId. + * @implements IStartAtActionId + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsRequest.IStartAtActionId=} [properties] Properties to set + */ + function StartAtActionId(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]]; + } + + /** + * StartAtActionId startActionId. + * @member {Uint8Array} startActionId + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + * @instance + */ + StartAtActionId.prototype.startActionId = $util.newBuffer([]); + + /** + * StartAtActionId startActionIdIncluded. + * @member {boolean} startActionIdIncluded + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + * @instance + */ + StartAtActionId.prototype.startActionIdIncluded = false; + + /** + * Creates a new StartAtActionId instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsRequest.IStartAtActionId=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} StartAtActionId instance + */ + StartAtActionId.create = function create(properties) { + return new StartAtActionId(properties); + }; + + /** + * Encodes the specified StartAtActionId message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsRequest.IStartAtActionId} message StartAtActionId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartAtActionId.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startActionId != null && Object.hasOwnProperty.call(message, "startActionId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.startActionId); + if (message.startActionIdIncluded != null && Object.hasOwnProperty.call(message, "startActionIdIncluded")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.startActionIdIncluded); + return writer; + }; + + /** + * Encodes the specified StartAtActionId message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsRequest.IStartAtActionId} message StartAtActionId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartAtActionId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartAtActionId message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + * @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.GetGroupActionsRequest.StartAtActionId} StartAtActionId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartAtActionId.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.GetGroupActionsRequest.StartAtActionId(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startActionId = reader.bytes(); + break; + case 2: + message.startActionIdIncluded = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartAtActionId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} StartAtActionId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartAtActionId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartAtActionId message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartAtActionId.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startActionId != null && message.hasOwnProperty("startActionId")) + if (!(message.startActionId && typeof message.startActionId.length === "number" || $util.isString(message.startActionId))) + return "startActionId: buffer expected"; + if (message.startActionIdIncluded != null && message.hasOwnProperty("startActionIdIncluded")) + if (typeof message.startActionIdIncluded !== "boolean") + return "startActionIdIncluded: boolean expected"; + return null; + }; + + /** + * Creates a StartAtActionId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} StartAtActionId + */ + StartAtActionId.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId(); + if (object.startActionId != null) + if (typeof object.startActionId === "string") + $util.base64.decode(object.startActionId, message.startActionId = $util.newBuffer($util.base64.length(object.startActionId)), 0); + else if (object.startActionId.length >= 0) + message.startActionId = object.startActionId; + if (object.startActionIdIncluded != null) + message.startActionIdIncluded = Boolean(object.startActionIdIncluded); + return message; + }; + + /** + * Creates a plain object from a StartAtActionId message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} message StartAtActionId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartAtActionId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.startActionId = ""; + else { + object.startActionId = []; + if (options.bytes !== Array) + object.startActionId = $util.newBuffer(object.startActionId); + } + object.startActionIdIncluded = false; + } + if (message.startActionId != null && message.hasOwnProperty("startActionId")) + object.startActionId = options.bytes === String ? $util.base64.encode(message.startActionId, 0, message.startActionId.length) : options.bytes === Array ? Array.prototype.slice.call(message.startActionId) : message.startActionId; + if (message.startActionIdIncluded != null && message.hasOwnProperty("startActionIdIncluded")) + object.startActionIdIncluded = message.startActionIdIncluded; + return object; + }; + + /** + * Converts this StartAtActionId to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId + * @instance + * @returns {Object.} JSON object + */ + StartAtActionId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StartAtActionId; + })(); + + GetGroupActionsRequest.GetGroupActionsRequestV0 = (function() { + + /** + * Properties of a GetGroupActionsRequestV0. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @interface IGetGroupActionsRequestV0 + * @property {Uint8Array|null} [contractId] GetGroupActionsRequestV0 contractId + * @property {number|null} [groupContractPosition] GetGroupActionsRequestV0 groupContractPosition + * @property {org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus|null} [status] GetGroupActionsRequestV0 status + * @property {org.dash.platform.dapi.v0.GetGroupActionsRequest.IStartAtActionId|null} [startAtActionId] GetGroupActionsRequestV0 startAtActionId + * @property {number|null} [count] GetGroupActionsRequestV0 count + * @property {boolean|null} [prove] GetGroupActionsRequestV0 prove + */ + + /** + * Constructs a new GetGroupActionsRequestV0. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest + * @classdesc Represents a GetGroupActionsRequestV0. + * @implements IGetGroupActionsRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsRequest.IGetGroupActionsRequestV0=} [properties] Properties to set + */ + function GetGroupActionsRequestV0(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]]; + } + + /** + * GetGroupActionsRequestV0 contractId. + * @member {Uint8Array} contractId + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @instance + */ + GetGroupActionsRequestV0.prototype.contractId = $util.newBuffer([]); + + /** + * GetGroupActionsRequestV0 groupContractPosition. + * @member {number} groupContractPosition + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @instance + */ + GetGroupActionsRequestV0.prototype.groupContractPosition = 0; + + /** + * GetGroupActionsRequestV0 status. + * @member {org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus} status + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @instance + */ + GetGroupActionsRequestV0.prototype.status = 0; + + /** + * GetGroupActionsRequestV0 startAtActionId. + * @member {org.dash.platform.dapi.v0.GetGroupActionsRequest.IStartAtActionId|null|undefined} startAtActionId + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @instance + */ + GetGroupActionsRequestV0.prototype.startAtActionId = null; + + /** + * GetGroupActionsRequestV0 count. + * @member {number} count + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @instance + */ + GetGroupActionsRequestV0.prototype.count = 0; + + /** + * GetGroupActionsRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @instance + */ + GetGroupActionsRequestV0.prototype.prove = false; + + /** + * Creates a new GetGroupActionsRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsRequest.IGetGroupActionsRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} GetGroupActionsRequestV0 instance + */ + GetGroupActionsRequestV0.create = function create(properties) { + return new GetGroupActionsRequestV0(properties); + }; + + /** + * Encodes the specified GetGroupActionsRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsRequest.IGetGroupActionsRequestV0} message GetGroupActionsRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionsRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contractId != null && Object.hasOwnProperty.call(message, "contractId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.contractId); + if (message.groupContractPosition != null && Object.hasOwnProperty.call(message, "groupContractPosition")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.groupContractPosition); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); + if (message.startAtActionId != null && Object.hasOwnProperty.call(message, "startAtActionId")) + $root.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.encode(message.startAtActionId, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.count); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetGroupActionsRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsRequest.IGetGroupActionsRequestV0} message GetGroupActionsRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionsRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupActionsRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @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.GetGroupActionsRequest.GetGroupActionsRequestV0} GetGroupActionsRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionsRequestV0.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.GetGroupActionsRequest.GetGroupActionsRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.contractId = reader.bytes(); + break; + case 2: + message.groupContractPosition = reader.uint32(); + break; + case 3: + message.status = reader.int32(); + break; + case 4: + message.startAtActionId = $root.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.decode(reader, reader.uint32()); + break; + case 5: + message.count = reader.uint32(); + break; + case 6: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupActionsRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} GetGroupActionsRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionsRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupActionsRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupActionsRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contractId != null && message.hasOwnProperty("contractId")) + if (!(message.contractId && typeof message.contractId.length === "number" || $util.isString(message.contractId))) + return "contractId: buffer expected"; + if (message.groupContractPosition != null && message.hasOwnProperty("groupContractPosition")) + if (!$util.isInteger(message.groupContractPosition)) + return "groupContractPosition: integer expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + break; + } + if (message.startAtActionId != null && message.hasOwnProperty("startAtActionId")) { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.verify(message.startAtActionId); + if (error) + return "startAtActionId." + error; + } + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetGroupActionsRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} GetGroupActionsRequestV0 + */ + GetGroupActionsRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0(); + if (object.contractId != null) + if (typeof object.contractId === "string") + $util.base64.decode(object.contractId, message.contractId = $util.newBuffer($util.base64.length(object.contractId)), 0); + else if (object.contractId.length >= 0) + message.contractId = object.contractId; + if (object.groupContractPosition != null) + message.groupContractPosition = object.groupContractPosition >>> 0; + switch (object.status) { + case "ACTIVE": + case 0: + message.status = 0; + break; + case "CLOSED": + case 1: + message.status = 1; + break; + } + if (object.startAtActionId != null) { + if (typeof object.startAtActionId !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.startAtActionId: object expected"); + message.startAtActionId = $root.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.fromObject(object.startAtActionId); + } + if (object.count != null) + message.count = object.count >>> 0; + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetGroupActionsRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} message GetGroupActionsRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupActionsRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.contractId = ""; + else { + object.contractId = []; + if (options.bytes !== Array) + object.contractId = $util.newBuffer(object.contractId); + } + object.groupContractPosition = 0; + object.status = options.enums === String ? "ACTIVE" : 0; + object.startAtActionId = null; + object.count = 0; + object.prove = false; + } + if (message.contractId != null && message.hasOwnProperty("contractId")) + object.contractId = options.bytes === String ? $util.base64.encode(message.contractId, 0, message.contractId.length) : options.bytes === Array ? Array.prototype.slice.call(message.contractId) : message.contractId; + if (message.groupContractPosition != null && message.hasOwnProperty("groupContractPosition")) + object.groupContractPosition = message.groupContractPosition; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus[message.status] : message.status; + if (message.startAtActionId != null && message.hasOwnProperty("startAtActionId")) + object.startAtActionId = $root.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.toObject(message.startAtActionId, options); + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetGroupActionsRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetGroupActionsRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetGroupActionsRequestV0; + })(); + + return GetGroupActionsRequest; + })(); + + v0.GetGroupActionsResponse = (function() { + + /** + * Properties of a GetGroupActionsResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetGroupActionsResponse + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.IGetGroupActionsResponseV0|null} [v0] GetGroupActionsResponse v0 + */ + + /** + * Constructs a new GetGroupActionsResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetGroupActionsResponse. + * @implements IGetGroupActionsResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetGroupActionsResponse=} [properties] Properties to set + */ + function GetGroupActionsResponse(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]]; + } + + /** + * GetGroupActionsResponse v0. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.IGetGroupActionsResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @instance + */ + GetGroupActionsResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetGroupActionsResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @instance + */ + Object.defineProperty(GetGroupActionsResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetGroupActionsResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupActionsResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse} GetGroupActionsResponse instance + */ + GetGroupActionsResponse.create = function create(properties) { + return new GetGroupActionsResponse(properties); + }; + + /** + * Encodes the specified GetGroupActionsResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupActionsResponse} message GetGroupActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionsResponse.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.GetGroupActionsResponse.GetGroupActionsResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetGroupActionsResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupActionsResponse} message GetGroupActionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupActionsResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @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.GetGroupActionsResponse} GetGroupActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionsResponse.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.GetGroupActionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupActionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse} GetGroupActionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupActionsResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupActionsResponse.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.GetGroupActionsResponse.GetGroupActionsResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetGroupActionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse} GetGroupActionsResponse + */ + GetGroupActionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetGroupActionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse} message GetGroupActionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupActionsResponse.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.GetGroupActionsResponse.GetGroupActionsResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetGroupActionsResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @instance + * @returns {Object.} JSON object + */ + GetGroupActionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetGroupActionsResponse.GetGroupActionsResponseV0 = (function() { + + /** + * Properties of a GetGroupActionsResponseV0. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @interface IGetGroupActionsResponseV0 + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActions|null} [groupActions] GetGroupActionsResponseV0 groupActions + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetGroupActionsResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetGroupActionsResponseV0 metadata + */ + + /** + * Constructs a new GetGroupActionsResponseV0. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse + * @classdesc Represents a GetGroupActionsResponseV0. + * @implements IGetGroupActionsResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.IGetGroupActionsResponseV0=} [properties] Properties to set + */ + function GetGroupActionsResponseV0(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]]; + } + + /** + * GetGroupActionsResponseV0 groupActions. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActions|null|undefined} groupActions + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @instance + */ + GetGroupActionsResponseV0.prototype.groupActions = null; + + /** + * GetGroupActionsResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @instance + */ + GetGroupActionsResponseV0.prototype.proof = null; + + /** + * GetGroupActionsResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @instance + */ + GetGroupActionsResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetGroupActionsResponseV0 result. + * @member {"groupActions"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @instance + */ + Object.defineProperty(GetGroupActionsResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["groupActions", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetGroupActionsResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.IGetGroupActionsResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} GetGroupActionsResponseV0 instance + */ + GetGroupActionsResponseV0.create = function create(properties) { + return new GetGroupActionsResponseV0(properties); + }; + + /** + * Encodes the specified GetGroupActionsResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.IGetGroupActionsResponseV0} message GetGroupActionsResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionsResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupActions != null && Object.hasOwnProperty.call(message, "groupActions")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.encode(message.groupActions, 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 GetGroupActionsResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.IGetGroupActionsResponseV0} message GetGroupActionsResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionsResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupActionsResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0} GetGroupActionsResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionsResponseV0.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.GetGroupActionsResponse.GetGroupActionsResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.groupActions = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.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 GetGroupActionsResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} GetGroupActionsResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionsResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupActionsResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupActionsResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.groupActions != null && message.hasOwnProperty("groupActions")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.verify(message.groupActions); + if (error) + return "groupActions." + 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 GetGroupActionsResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} GetGroupActionsResponseV0 + */ + GetGroupActionsResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0(); + if (object.groupActions != null) { + if (typeof object.groupActions !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.groupActions: object expected"); + message.groupActions = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.fromObject(object.groupActions); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetGroupActionsResponse.GetGroupActionsResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetGroupActionsResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} message GetGroupActionsResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupActionsResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.groupActions != null && message.hasOwnProperty("groupActions")) { + object.groupActions = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.toObject(message.groupActions, options); + if (options.oneofs) + object.result = "groupActions"; + } + 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 GetGroupActionsResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetGroupActionsResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetGroupActionsResponseV0.MintEvent = (function() { + + /** + * Properties of a MintEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IMintEvent + * @property {number|Long|null} [amount] MintEvent amount + * @property {Uint8Array|null} [recipientId] MintEvent recipientId + * @property {string|null} [publicNote] MintEvent publicNote + */ + + /** + * Constructs a new MintEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a MintEvent. + * @implements IMintEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IMintEvent=} [properties] Properties to set + */ + function MintEvent(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]]; + } + + /** + * MintEvent amount. + * @member {number|Long} amount + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + * @instance + */ + MintEvent.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MintEvent recipientId. + * @member {Uint8Array} recipientId + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + * @instance + */ + MintEvent.prototype.recipientId = $util.newBuffer([]); + + /** + * MintEvent publicNote. + * @member {string} publicNote + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + * @instance + */ + MintEvent.prototype.publicNote = ""; + + /** + * Creates a new MintEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IMintEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} MintEvent instance + */ + MintEvent.create = function create(properties) { + return new MintEvent(properties); + }; + + /** + * Encodes the specified MintEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IMintEvent} message MintEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MintEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.amount); + if (message.recipientId != null && Object.hasOwnProperty.call(message, "recipientId")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.recipientId); + if (message.publicNote != null && Object.hasOwnProperty.call(message, "publicNote")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.publicNote); + return writer; + }; + + /** + * Encodes the specified MintEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IMintEvent} message MintEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MintEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MintEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} MintEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MintEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.amount = reader.uint64(); + break; + case 2: + message.recipientId = reader.bytes(); + break; + case 3: + message.publicNote = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MintEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} MintEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MintEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MintEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MintEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high))) + return "amount: integer|Long expected"; + if (message.recipientId != null && message.hasOwnProperty("recipientId")) + if (!(message.recipientId && typeof message.recipientId.length === "number" || $util.isString(message.recipientId))) + return "recipientId: buffer expected"; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + if (!$util.isString(message.publicNote)) + return "publicNote: string expected"; + return null; + }; + + /** + * Creates a MintEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} MintEvent + */ + MintEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent(); + if (object.amount != null) + if ($util.Long) + (message.amount = $util.Long.fromValue(object.amount)).unsigned = true; + else if (typeof object.amount === "string") + message.amount = parseInt(object.amount, 10); + else if (typeof object.amount === "number") + message.amount = object.amount; + else if (typeof object.amount === "object") + message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true); + if (object.recipientId != null) + if (typeof object.recipientId === "string") + $util.base64.decode(object.recipientId, message.recipientId = $util.newBuffer($util.base64.length(object.recipientId)), 0); + else if (object.recipientId.length >= 0) + message.recipientId = object.recipientId; + if (object.publicNote != null) + message.publicNote = String(object.publicNote); + return message; + }; + + /** + * Creates a plain object from a MintEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} message MintEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MintEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.amount = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.recipientId = ""; + else { + object.recipientId = []; + if (options.bytes !== Array) + object.recipientId = $util.newBuffer(object.recipientId); + } + object.publicNote = ""; + } + if (message.amount != null && message.hasOwnProperty("amount")) + if (typeof message.amount === "number") + object.amount = options.longs === String ? String(message.amount) : message.amount; + else + object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount; + if (message.recipientId != null && message.hasOwnProperty("recipientId")) + object.recipientId = options.bytes === String ? $util.base64.encode(message.recipientId, 0, message.recipientId.length) : options.bytes === Array ? Array.prototype.slice.call(message.recipientId) : message.recipientId; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + object.publicNote = message.publicNote; + return object; + }; + + /** + * Converts this MintEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent + * @instance + * @returns {Object.} JSON object + */ + MintEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MintEvent; + })(); + + GetGroupActionsResponseV0.BurnEvent = (function() { + + /** + * Properties of a BurnEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IBurnEvent + * @property {number|Long|null} [amount] BurnEvent amount + * @property {string|null} [publicNote] BurnEvent publicNote + */ + + /** + * Constructs a new BurnEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a BurnEvent. + * @implements IBurnEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IBurnEvent=} [properties] Properties to set + */ + function BurnEvent(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]]; + } + + /** + * BurnEvent amount. + * @member {number|Long} amount + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + * @instance + */ + BurnEvent.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * BurnEvent publicNote. + * @member {string} publicNote + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + * @instance + */ + BurnEvent.prototype.publicNote = ""; + + /** + * Creates a new BurnEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IBurnEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} BurnEvent instance + */ + BurnEvent.create = function create(properties) { + return new BurnEvent(properties); + }; + + /** + * Encodes the specified BurnEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IBurnEvent} message BurnEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BurnEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.amount); + if (message.publicNote != null && Object.hasOwnProperty.call(message, "publicNote")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.publicNote); + return writer; + }; + + /** + * Encodes the specified BurnEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IBurnEvent} message BurnEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BurnEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BurnEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} BurnEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BurnEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.amount = reader.uint64(); + break; + case 2: + message.publicNote = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BurnEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} BurnEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BurnEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BurnEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BurnEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high))) + return "amount: integer|Long expected"; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + if (!$util.isString(message.publicNote)) + return "publicNote: string expected"; + return null; + }; + + /** + * Creates a BurnEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} BurnEvent + */ + BurnEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent(); + if (object.amount != null) + if ($util.Long) + (message.amount = $util.Long.fromValue(object.amount)).unsigned = true; + else if (typeof object.amount === "string") + message.amount = parseInt(object.amount, 10); + else if (typeof object.amount === "number") + message.amount = object.amount; + else if (typeof object.amount === "object") + message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true); + if (object.publicNote != null) + message.publicNote = String(object.publicNote); + return message; + }; + + /** + * Creates a plain object from a BurnEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} message BurnEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BurnEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.amount = options.longs === String ? "0" : 0; + object.publicNote = ""; + } + if (message.amount != null && message.hasOwnProperty("amount")) + if (typeof message.amount === "number") + object.amount = options.longs === String ? String(message.amount) : message.amount; + else + object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + object.publicNote = message.publicNote; + return object; + }; + + /** + * Converts this BurnEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent + * @instance + * @returns {Object.} JSON object + */ + BurnEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BurnEvent; + })(); + + GetGroupActionsResponseV0.FreezeEvent = (function() { + + /** + * Properties of a FreezeEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IFreezeEvent + * @property {Uint8Array|null} [frozenId] FreezeEvent frozenId + * @property {string|null} [publicNote] FreezeEvent publicNote + */ + + /** + * Constructs a new FreezeEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a FreezeEvent. + * @implements IFreezeEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IFreezeEvent=} [properties] Properties to set + */ + function FreezeEvent(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]]; + } + + /** + * FreezeEvent frozenId. + * @member {Uint8Array} frozenId + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + * @instance + */ + FreezeEvent.prototype.frozenId = $util.newBuffer([]); + + /** + * FreezeEvent publicNote. + * @member {string} publicNote + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + * @instance + */ + FreezeEvent.prototype.publicNote = ""; + + /** + * Creates a new FreezeEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IFreezeEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} FreezeEvent instance + */ + FreezeEvent.create = function create(properties) { + return new FreezeEvent(properties); + }; + + /** + * Encodes the specified FreezeEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IFreezeEvent} message FreezeEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FreezeEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frozenId != null && Object.hasOwnProperty.call(message, "frozenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.frozenId); + if (message.publicNote != null && Object.hasOwnProperty.call(message, "publicNote")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.publicNote); + return writer; + }; + + /** + * Encodes the specified FreezeEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IFreezeEvent} message FreezeEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FreezeEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FreezeEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} FreezeEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FreezeEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.frozenId = reader.bytes(); + break; + case 2: + message.publicNote = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FreezeEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} FreezeEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FreezeEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FreezeEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FreezeEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frozenId != null && message.hasOwnProperty("frozenId")) + if (!(message.frozenId && typeof message.frozenId.length === "number" || $util.isString(message.frozenId))) + return "frozenId: buffer expected"; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + if (!$util.isString(message.publicNote)) + return "publicNote: string expected"; + return null; + }; + + /** + * Creates a FreezeEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} FreezeEvent + */ + FreezeEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent(); + if (object.frozenId != null) + if (typeof object.frozenId === "string") + $util.base64.decode(object.frozenId, message.frozenId = $util.newBuffer($util.base64.length(object.frozenId)), 0); + else if (object.frozenId.length >= 0) + message.frozenId = object.frozenId; + if (object.publicNote != null) + message.publicNote = String(object.publicNote); + return message; + }; + + /** + * Creates a plain object from a FreezeEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} message FreezeEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FreezeEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.frozenId = ""; + else { + object.frozenId = []; + if (options.bytes !== Array) + object.frozenId = $util.newBuffer(object.frozenId); + } + object.publicNote = ""; + } + if (message.frozenId != null && message.hasOwnProperty("frozenId")) + object.frozenId = options.bytes === String ? $util.base64.encode(message.frozenId, 0, message.frozenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.frozenId) : message.frozenId; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + object.publicNote = message.publicNote; + return object; + }; + + /** + * Converts this FreezeEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent + * @instance + * @returns {Object.} JSON object + */ + FreezeEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FreezeEvent; + })(); + + GetGroupActionsResponseV0.UnfreezeEvent = (function() { + + /** + * Properties of an UnfreezeEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IUnfreezeEvent + * @property {Uint8Array|null} [frozenId] UnfreezeEvent frozenId + * @property {string|null} [publicNote] UnfreezeEvent publicNote + */ + + /** + * Constructs a new UnfreezeEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents an UnfreezeEvent. + * @implements IUnfreezeEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IUnfreezeEvent=} [properties] Properties to set + */ + function UnfreezeEvent(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]]; + } + + /** + * UnfreezeEvent frozenId. + * @member {Uint8Array} frozenId + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + * @instance + */ + UnfreezeEvent.prototype.frozenId = $util.newBuffer([]); + + /** + * UnfreezeEvent publicNote. + * @member {string} publicNote + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + * @instance + */ + UnfreezeEvent.prototype.publicNote = ""; + + /** + * Creates a new UnfreezeEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IUnfreezeEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} UnfreezeEvent instance + */ + UnfreezeEvent.create = function create(properties) { + return new UnfreezeEvent(properties); + }; + + /** + * Encodes the specified UnfreezeEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IUnfreezeEvent} message UnfreezeEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnfreezeEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frozenId != null && Object.hasOwnProperty.call(message, "frozenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.frozenId); + if (message.publicNote != null && Object.hasOwnProperty.call(message, "publicNote")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.publicNote); + return writer; + }; + + /** + * Encodes the specified UnfreezeEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IUnfreezeEvent} message UnfreezeEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnfreezeEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnfreezeEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} UnfreezeEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnfreezeEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.frozenId = reader.bytes(); + break; + case 2: + message.publicNote = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnfreezeEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} UnfreezeEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnfreezeEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnfreezeEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnfreezeEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frozenId != null && message.hasOwnProperty("frozenId")) + if (!(message.frozenId && typeof message.frozenId.length === "number" || $util.isString(message.frozenId))) + return "frozenId: buffer expected"; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + if (!$util.isString(message.publicNote)) + return "publicNote: string expected"; + return null; + }; + + /** + * Creates an UnfreezeEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} UnfreezeEvent + */ + UnfreezeEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent(); + if (object.frozenId != null) + if (typeof object.frozenId === "string") + $util.base64.decode(object.frozenId, message.frozenId = $util.newBuffer($util.base64.length(object.frozenId)), 0); + else if (object.frozenId.length >= 0) + message.frozenId = object.frozenId; + if (object.publicNote != null) + message.publicNote = String(object.publicNote); + return message; + }; + + /** + * Creates a plain object from an UnfreezeEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} message UnfreezeEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnfreezeEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.frozenId = ""; + else { + object.frozenId = []; + if (options.bytes !== Array) + object.frozenId = $util.newBuffer(object.frozenId); + } + object.publicNote = ""; + } + if (message.frozenId != null && message.hasOwnProperty("frozenId")) + object.frozenId = options.bytes === String ? $util.base64.encode(message.frozenId, 0, message.frozenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.frozenId) : message.frozenId; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + object.publicNote = message.publicNote; + return object; + }; + + /** + * Converts this UnfreezeEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent + * @instance + * @returns {Object.} JSON object + */ + UnfreezeEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnfreezeEvent; + })(); + + GetGroupActionsResponseV0.DestroyFrozenFundsEvent = (function() { + + /** + * Properties of a DestroyFrozenFundsEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IDestroyFrozenFundsEvent + * @property {Uint8Array|null} [frozenId] DestroyFrozenFundsEvent frozenId + * @property {number|Long|null} [amount] DestroyFrozenFundsEvent amount + * @property {string|null} [publicNote] DestroyFrozenFundsEvent publicNote + */ + + /** + * Constructs a new DestroyFrozenFundsEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a DestroyFrozenFundsEvent. + * @implements IDestroyFrozenFundsEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDestroyFrozenFundsEvent=} [properties] Properties to set + */ + function DestroyFrozenFundsEvent(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]]; + } + + /** + * DestroyFrozenFundsEvent frozenId. + * @member {Uint8Array} frozenId + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + * @instance + */ + DestroyFrozenFundsEvent.prototype.frozenId = $util.newBuffer([]); + + /** + * DestroyFrozenFundsEvent amount. + * @member {number|Long} amount + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + * @instance + */ + DestroyFrozenFundsEvent.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * DestroyFrozenFundsEvent publicNote. + * @member {string} publicNote + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + * @instance + */ + DestroyFrozenFundsEvent.prototype.publicNote = ""; + + /** + * Creates a new DestroyFrozenFundsEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDestroyFrozenFundsEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} DestroyFrozenFundsEvent instance + */ + DestroyFrozenFundsEvent.create = function create(properties) { + return new DestroyFrozenFundsEvent(properties); + }; + + /** + * Encodes the specified DestroyFrozenFundsEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDestroyFrozenFundsEvent} message DestroyFrozenFundsEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DestroyFrozenFundsEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frozenId != null && Object.hasOwnProperty.call(message, "frozenId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.frozenId); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.amount); + if (message.publicNote != null && Object.hasOwnProperty.call(message, "publicNote")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.publicNote); + return writer; + }; + + /** + * Encodes the specified DestroyFrozenFundsEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDestroyFrozenFundsEvent} message DestroyFrozenFundsEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DestroyFrozenFundsEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DestroyFrozenFundsEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} DestroyFrozenFundsEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DestroyFrozenFundsEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.frozenId = reader.bytes(); + break; + case 2: + message.amount = reader.uint64(); + break; + case 3: + message.publicNote = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DestroyFrozenFundsEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} DestroyFrozenFundsEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DestroyFrozenFundsEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DestroyFrozenFundsEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DestroyFrozenFundsEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.frozenId != null && message.hasOwnProperty("frozenId")) + if (!(message.frozenId && typeof message.frozenId.length === "number" || $util.isString(message.frozenId))) + return "frozenId: buffer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high))) + return "amount: integer|Long expected"; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + if (!$util.isString(message.publicNote)) + return "publicNote: string expected"; + return null; + }; + + /** + * Creates a DestroyFrozenFundsEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} DestroyFrozenFundsEvent + */ + DestroyFrozenFundsEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent(); + if (object.frozenId != null) + if (typeof object.frozenId === "string") + $util.base64.decode(object.frozenId, message.frozenId = $util.newBuffer($util.base64.length(object.frozenId)), 0); + else if (object.frozenId.length >= 0) + message.frozenId = object.frozenId; + if (object.amount != null) + if ($util.Long) + (message.amount = $util.Long.fromValue(object.amount)).unsigned = true; + else if (typeof object.amount === "string") + message.amount = parseInt(object.amount, 10); + else if (typeof object.amount === "number") + message.amount = object.amount; + else if (typeof object.amount === "object") + message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true); + if (object.publicNote != null) + message.publicNote = String(object.publicNote); + return message; + }; + + /** + * Creates a plain object from a DestroyFrozenFundsEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} message DestroyFrozenFundsEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DestroyFrozenFundsEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.frozenId = ""; + else { + object.frozenId = []; + if (options.bytes !== Array) + object.frozenId = $util.newBuffer(object.frozenId); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.amount = options.longs === String ? "0" : 0; + object.publicNote = ""; + } + if (message.frozenId != null && message.hasOwnProperty("frozenId")) + object.frozenId = options.bytes === String ? $util.base64.encode(message.frozenId, 0, message.frozenId.length) : options.bytes === Array ? Array.prototype.slice.call(message.frozenId) : message.frozenId; + if (message.amount != null && message.hasOwnProperty("amount")) + if (typeof message.amount === "number") + object.amount = options.longs === String ? String(message.amount) : message.amount; + else + object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + object.publicNote = message.publicNote; + return object; + }; + + /** + * Converts this DestroyFrozenFundsEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent + * @instance + * @returns {Object.} JSON object + */ + DestroyFrozenFundsEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DestroyFrozenFundsEvent; + })(); + + GetGroupActionsResponseV0.SharedEncryptedNote = (function() { + + /** + * Properties of a SharedEncryptedNote. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface ISharedEncryptedNote + * @property {number|null} [senderKeyIndex] SharedEncryptedNote senderKeyIndex + * @property {number|null} [recipientKeyIndex] SharedEncryptedNote recipientKeyIndex + * @property {Uint8Array|null} [encryptedData] SharedEncryptedNote encryptedData + */ + + /** + * Constructs a new SharedEncryptedNote. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a SharedEncryptedNote. + * @implements ISharedEncryptedNote + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ISharedEncryptedNote=} [properties] Properties to set + */ + function SharedEncryptedNote(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]]; + } + + /** + * SharedEncryptedNote senderKeyIndex. + * @member {number} senderKeyIndex + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + * @instance + */ + SharedEncryptedNote.prototype.senderKeyIndex = 0; + + /** + * SharedEncryptedNote recipientKeyIndex. + * @member {number} recipientKeyIndex + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + * @instance + */ + SharedEncryptedNote.prototype.recipientKeyIndex = 0; + + /** + * SharedEncryptedNote encryptedData. + * @member {Uint8Array} encryptedData + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + * @instance + */ + SharedEncryptedNote.prototype.encryptedData = $util.newBuffer([]); + + /** + * Creates a new SharedEncryptedNote instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ISharedEncryptedNote=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} SharedEncryptedNote instance + */ + SharedEncryptedNote.create = function create(properties) { + return new SharedEncryptedNote(properties); + }; + + /** + * Encodes the specified SharedEncryptedNote message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ISharedEncryptedNote} message SharedEncryptedNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SharedEncryptedNote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.senderKeyIndex != null && Object.hasOwnProperty.call(message, "senderKeyIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.senderKeyIndex); + if (message.recipientKeyIndex != null && Object.hasOwnProperty.call(message, "recipientKeyIndex")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.recipientKeyIndex); + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encryptedData); + return writer; + }; + + /** + * Encodes the specified SharedEncryptedNote message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ISharedEncryptedNote} message SharedEncryptedNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SharedEncryptedNote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SharedEncryptedNote message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} SharedEncryptedNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SharedEncryptedNote.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.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.senderKeyIndex = reader.uint32(); + break; + case 2: + message.recipientKeyIndex = reader.uint32(); + break; + case 3: + message.encryptedData = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SharedEncryptedNote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} SharedEncryptedNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SharedEncryptedNote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SharedEncryptedNote message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SharedEncryptedNote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.senderKeyIndex != null && message.hasOwnProperty("senderKeyIndex")) + if (!$util.isInteger(message.senderKeyIndex)) + return "senderKeyIndex: integer expected"; + if (message.recipientKeyIndex != null && message.hasOwnProperty("recipientKeyIndex")) + if (!$util.isInteger(message.recipientKeyIndex)) + return "recipientKeyIndex: integer expected"; + if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (!(message.encryptedData && typeof message.encryptedData.length === "number" || $util.isString(message.encryptedData))) + return "encryptedData: buffer expected"; + return null; + }; + + /** + * Creates a SharedEncryptedNote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} SharedEncryptedNote + */ + SharedEncryptedNote.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote(); + if (object.senderKeyIndex != null) + message.senderKeyIndex = object.senderKeyIndex >>> 0; + if (object.recipientKeyIndex != null) + message.recipientKeyIndex = object.recipientKeyIndex >>> 0; + if (object.encryptedData != null) + if (typeof object.encryptedData === "string") + $util.base64.decode(object.encryptedData, message.encryptedData = $util.newBuffer($util.base64.length(object.encryptedData)), 0); + else if (object.encryptedData.length >= 0) + message.encryptedData = object.encryptedData; + return message; + }; + + /** + * Creates a plain object from a SharedEncryptedNote message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} message SharedEncryptedNote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SharedEncryptedNote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.senderKeyIndex = 0; + object.recipientKeyIndex = 0; + if (options.bytes === String) + object.encryptedData = ""; + else { + object.encryptedData = []; + if (options.bytes !== Array) + object.encryptedData = $util.newBuffer(object.encryptedData); + } + } + if (message.senderKeyIndex != null && message.hasOwnProperty("senderKeyIndex")) + object.senderKeyIndex = message.senderKeyIndex; + if (message.recipientKeyIndex != null && message.hasOwnProperty("recipientKeyIndex")) + object.recipientKeyIndex = message.recipientKeyIndex; + if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + object.encryptedData = options.bytes === String ? $util.base64.encode(message.encryptedData, 0, message.encryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedData) : message.encryptedData; + return object; + }; + + /** + * Converts this SharedEncryptedNote to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote + * @instance + * @returns {Object.} JSON object + */ + SharedEncryptedNote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SharedEncryptedNote; + })(); + + GetGroupActionsResponseV0.PersonalEncryptedNote = (function() { + + /** + * Properties of a PersonalEncryptedNote. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IPersonalEncryptedNote + * @property {number|null} [rootEncryptionKeyIndex] PersonalEncryptedNote rootEncryptionKeyIndex + * @property {number|null} [derivationEncryptionKeyIndex] PersonalEncryptedNote derivationEncryptionKeyIndex + * @property {Uint8Array|null} [encryptedData] PersonalEncryptedNote encryptedData + */ + + /** + * Constructs a new PersonalEncryptedNote. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a PersonalEncryptedNote. + * @implements IPersonalEncryptedNote + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IPersonalEncryptedNote=} [properties] Properties to set + */ + function PersonalEncryptedNote(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]]; + } + + /** + * PersonalEncryptedNote rootEncryptionKeyIndex. + * @member {number} rootEncryptionKeyIndex + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + * @instance + */ + PersonalEncryptedNote.prototype.rootEncryptionKeyIndex = 0; + + /** + * PersonalEncryptedNote derivationEncryptionKeyIndex. + * @member {number} derivationEncryptionKeyIndex + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + * @instance + */ + PersonalEncryptedNote.prototype.derivationEncryptionKeyIndex = 0; + + /** + * PersonalEncryptedNote encryptedData. + * @member {Uint8Array} encryptedData + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + * @instance + */ + PersonalEncryptedNote.prototype.encryptedData = $util.newBuffer([]); + + /** + * Creates a new PersonalEncryptedNote instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IPersonalEncryptedNote=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} PersonalEncryptedNote instance + */ + PersonalEncryptedNote.create = function create(properties) { + return new PersonalEncryptedNote(properties); + }; + + /** + * Encodes the specified PersonalEncryptedNote message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IPersonalEncryptedNote} message PersonalEncryptedNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PersonalEncryptedNote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rootEncryptionKeyIndex != null && Object.hasOwnProperty.call(message, "rootEncryptionKeyIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rootEncryptionKeyIndex); + if (message.derivationEncryptionKeyIndex != null && Object.hasOwnProperty.call(message, "derivationEncryptionKeyIndex")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.derivationEncryptionKeyIndex); + if (message.encryptedData != null && Object.hasOwnProperty.call(message, "encryptedData")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.encryptedData); + return writer; + }; + + /** + * Encodes the specified PersonalEncryptedNote message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IPersonalEncryptedNote} message PersonalEncryptedNote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PersonalEncryptedNote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PersonalEncryptedNote message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} PersonalEncryptedNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PersonalEncryptedNote.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.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rootEncryptionKeyIndex = reader.uint32(); + break; + case 2: + message.derivationEncryptionKeyIndex = reader.uint32(); + break; + case 3: + message.encryptedData = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PersonalEncryptedNote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} PersonalEncryptedNote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PersonalEncryptedNote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PersonalEncryptedNote message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PersonalEncryptedNote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rootEncryptionKeyIndex != null && message.hasOwnProperty("rootEncryptionKeyIndex")) + if (!$util.isInteger(message.rootEncryptionKeyIndex)) + return "rootEncryptionKeyIndex: integer expected"; + if (message.derivationEncryptionKeyIndex != null && message.hasOwnProperty("derivationEncryptionKeyIndex")) + if (!$util.isInteger(message.derivationEncryptionKeyIndex)) + return "derivationEncryptionKeyIndex: integer expected"; + if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + if (!(message.encryptedData && typeof message.encryptedData.length === "number" || $util.isString(message.encryptedData))) + return "encryptedData: buffer expected"; + return null; + }; + + /** + * Creates a PersonalEncryptedNote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} PersonalEncryptedNote + */ + PersonalEncryptedNote.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote(); + if (object.rootEncryptionKeyIndex != null) + message.rootEncryptionKeyIndex = object.rootEncryptionKeyIndex >>> 0; + if (object.derivationEncryptionKeyIndex != null) + message.derivationEncryptionKeyIndex = object.derivationEncryptionKeyIndex >>> 0; + if (object.encryptedData != null) + if (typeof object.encryptedData === "string") + $util.base64.decode(object.encryptedData, message.encryptedData = $util.newBuffer($util.base64.length(object.encryptedData)), 0); + else if (object.encryptedData.length >= 0) + message.encryptedData = object.encryptedData; + return message; + }; + + /** + * Creates a plain object from a PersonalEncryptedNote message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} message PersonalEncryptedNote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PersonalEncryptedNote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rootEncryptionKeyIndex = 0; + object.derivationEncryptionKeyIndex = 0; + if (options.bytes === String) + object.encryptedData = ""; + else { + object.encryptedData = []; + if (options.bytes !== Array) + object.encryptedData = $util.newBuffer(object.encryptedData); + } + } + if (message.rootEncryptionKeyIndex != null && message.hasOwnProperty("rootEncryptionKeyIndex")) + object.rootEncryptionKeyIndex = message.rootEncryptionKeyIndex; + if (message.derivationEncryptionKeyIndex != null && message.hasOwnProperty("derivationEncryptionKeyIndex")) + object.derivationEncryptionKeyIndex = message.derivationEncryptionKeyIndex; + if (message.encryptedData != null && message.hasOwnProperty("encryptedData")) + object.encryptedData = options.bytes === String ? $util.base64.encode(message.encryptedData, 0, message.encryptedData.length) : options.bytes === Array ? Array.prototype.slice.call(message.encryptedData) : message.encryptedData; + return object; + }; + + /** + * Converts this PersonalEncryptedNote to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote + * @instance + * @returns {Object.} JSON object + */ + PersonalEncryptedNote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PersonalEncryptedNote; + })(); + + GetGroupActionsResponseV0.TransferEvent = (function() { + + /** + * Properties of a TransferEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface ITransferEvent + * @property {Uint8Array|null} [recipientId] TransferEvent recipientId + * @property {string|null} [publicNote] TransferEvent publicNote + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ISharedEncryptedNote|null} [sharedEncryptedNote] TransferEvent sharedEncryptedNote + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IPersonalEncryptedNote|null} [personalEncryptedNote] TransferEvent personalEncryptedNote + * @property {number|Long|null} [amount] TransferEvent amount + */ + + /** + * Constructs a new TransferEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a TransferEvent. + * @implements ITransferEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITransferEvent=} [properties] Properties to set + */ + function TransferEvent(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]]; + } + + /** + * TransferEvent recipientId. + * @member {Uint8Array} recipientId + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @instance + */ + TransferEvent.prototype.recipientId = $util.newBuffer([]); + + /** + * TransferEvent publicNote. + * @member {string} publicNote + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @instance + */ + TransferEvent.prototype.publicNote = ""; + + /** + * TransferEvent sharedEncryptedNote. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ISharedEncryptedNote|null|undefined} sharedEncryptedNote + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @instance + */ + TransferEvent.prototype.sharedEncryptedNote = null; + + /** + * TransferEvent personalEncryptedNote. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IPersonalEncryptedNote|null|undefined} personalEncryptedNote + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @instance + */ + TransferEvent.prototype.personalEncryptedNote = null; + + /** + * TransferEvent amount. + * @member {number|Long} amount + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @instance + */ + TransferEvent.prototype.amount = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new TransferEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITransferEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} TransferEvent instance + */ + TransferEvent.create = function create(properties) { + return new TransferEvent(properties); + }; + + /** + * Encodes the specified TransferEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITransferEvent} message TransferEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recipientId != null && Object.hasOwnProperty.call(message, "recipientId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.recipientId); + if (message.publicNote != null && Object.hasOwnProperty.call(message, "publicNote")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.publicNote); + if (message.sharedEncryptedNote != null && Object.hasOwnProperty.call(message, "sharedEncryptedNote")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.encode(message.sharedEncryptedNote, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.personalEncryptedNote != null && Object.hasOwnProperty.call(message, "personalEncryptedNote")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.encode(message.personalEncryptedNote, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.amount); + return writer; + }; + + /** + * Encodes the specified TransferEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITransferEvent} message TransferEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransferEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransferEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} TransferEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.recipientId = reader.bytes(); + break; + case 2: + message.publicNote = reader.string(); + break; + case 3: + message.sharedEncryptedNote = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.decode(reader, reader.uint32()); + break; + case 4: + message.personalEncryptedNote = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.decode(reader, reader.uint32()); + break; + case 5: + message.amount = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TransferEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} TransferEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransferEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransferEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransferEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.recipientId != null && message.hasOwnProperty("recipientId")) + if (!(message.recipientId && typeof message.recipientId.length === "number" || $util.isString(message.recipientId))) + return "recipientId: buffer expected"; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + if (!$util.isString(message.publicNote)) + return "publicNote: string expected"; + if (message.sharedEncryptedNote != null && message.hasOwnProperty("sharedEncryptedNote")) { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.verify(message.sharedEncryptedNote); + if (error) + return "sharedEncryptedNote." + error; + } + if (message.personalEncryptedNote != null && message.hasOwnProperty("personalEncryptedNote")) { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.verify(message.personalEncryptedNote); + if (error) + return "personalEncryptedNote." + error; + } + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isInteger(message.amount) && !(message.amount && $util.isInteger(message.amount.low) && $util.isInteger(message.amount.high))) + return "amount: integer|Long expected"; + return null; + }; + + /** + * Creates a TransferEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} TransferEvent + */ + TransferEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent(); + if (object.recipientId != null) + if (typeof object.recipientId === "string") + $util.base64.decode(object.recipientId, message.recipientId = $util.newBuffer($util.base64.length(object.recipientId)), 0); + else if (object.recipientId.length >= 0) + message.recipientId = object.recipientId; + if (object.publicNote != null) + message.publicNote = String(object.publicNote); + if (object.sharedEncryptedNote != null) { + if (typeof object.sharedEncryptedNote !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.sharedEncryptedNote: object expected"); + message.sharedEncryptedNote = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.fromObject(object.sharedEncryptedNote); + } + if (object.personalEncryptedNote != null) { + if (typeof object.personalEncryptedNote !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.personalEncryptedNote: object expected"); + message.personalEncryptedNote = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.fromObject(object.personalEncryptedNote); + } + if (object.amount != null) + if ($util.Long) + (message.amount = $util.Long.fromValue(object.amount)).unsigned = true; + else if (typeof object.amount === "string") + message.amount = parseInt(object.amount, 10); + else if (typeof object.amount === "number") + message.amount = object.amount; + else if (typeof object.amount === "object") + message.amount = new $util.LongBits(object.amount.low >>> 0, object.amount.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a TransferEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} message TransferEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransferEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.recipientId = ""; + else { + object.recipientId = []; + if (options.bytes !== Array) + object.recipientId = $util.newBuffer(object.recipientId); + } + object.publicNote = ""; + object.sharedEncryptedNote = null; + object.personalEncryptedNote = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.amount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.amount = options.longs === String ? "0" : 0; + } + if (message.recipientId != null && message.hasOwnProperty("recipientId")) + object.recipientId = options.bytes === String ? $util.base64.encode(message.recipientId, 0, message.recipientId.length) : options.bytes === Array ? Array.prototype.slice.call(message.recipientId) : message.recipientId; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + object.publicNote = message.publicNote; + if (message.sharedEncryptedNote != null && message.hasOwnProperty("sharedEncryptedNote")) + object.sharedEncryptedNote = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.toObject(message.sharedEncryptedNote, options); + if (message.personalEncryptedNote != null && message.hasOwnProperty("personalEncryptedNote")) + object.personalEncryptedNote = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.toObject(message.personalEncryptedNote, options); + if (message.amount != null && message.hasOwnProperty("amount")) + if (typeof message.amount === "number") + object.amount = options.longs === String ? String(message.amount) : message.amount; + else + object.amount = options.longs === String ? $util.Long.prototype.toString.call(message.amount) : options.longs === Number ? new $util.LongBits(message.amount.low >>> 0, message.amount.high >>> 0).toNumber(true) : message.amount; + return object; + }; + + /** + * Converts this TransferEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent + * @instance + * @returns {Object.} JSON object + */ + TransferEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TransferEvent; + })(); + + GetGroupActionsResponseV0.EmergencyActionEvent = (function() { + + /** + * Properties of an EmergencyActionEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IEmergencyActionEvent + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType|null} [actionType] EmergencyActionEvent actionType + * @property {string|null} [publicNote] EmergencyActionEvent publicNote + */ + + /** + * Constructs a new EmergencyActionEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents an EmergencyActionEvent. + * @implements IEmergencyActionEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IEmergencyActionEvent=} [properties] Properties to set + */ + function EmergencyActionEvent(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]]; + } + + /** + * EmergencyActionEvent actionType. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType} actionType + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + * @instance + */ + EmergencyActionEvent.prototype.actionType = 0; + + /** + * EmergencyActionEvent publicNote. + * @member {string} publicNote + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + * @instance + */ + EmergencyActionEvent.prototype.publicNote = ""; + + /** + * Creates a new EmergencyActionEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IEmergencyActionEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} EmergencyActionEvent instance + */ + EmergencyActionEvent.create = function create(properties) { + return new EmergencyActionEvent(properties); + }; + + /** + * Encodes the specified EmergencyActionEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IEmergencyActionEvent} message EmergencyActionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmergencyActionEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actionType != null && Object.hasOwnProperty.call(message, "actionType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.actionType); + if (message.publicNote != null && Object.hasOwnProperty.call(message, "publicNote")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.publicNote); + return writer; + }; + + /** + * Encodes the specified EmergencyActionEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IEmergencyActionEvent} message EmergencyActionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EmergencyActionEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EmergencyActionEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} EmergencyActionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmergencyActionEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.actionType = reader.int32(); + break; + case 2: + message.publicNote = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EmergencyActionEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} EmergencyActionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EmergencyActionEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EmergencyActionEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EmergencyActionEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actionType != null && message.hasOwnProperty("actionType")) + switch (message.actionType) { + default: + return "actionType: enum value expected"; + case 0: + case 1: + break; + } + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + if (!$util.isString(message.publicNote)) + return "publicNote: string expected"; + return null; + }; + + /** + * Creates an EmergencyActionEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} EmergencyActionEvent + */ + EmergencyActionEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent(); + switch (object.actionType) { + case "PAUSE": + case 0: + message.actionType = 0; + break; + case "RESUME": + case 1: + message.actionType = 1; + break; + } + if (object.publicNote != null) + message.publicNote = String(object.publicNote); + return message; + }; + + /** + * Creates a plain object from an EmergencyActionEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} message EmergencyActionEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EmergencyActionEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.actionType = options.enums === String ? "PAUSE" : 0; + object.publicNote = ""; + } + if (message.actionType != null && message.hasOwnProperty("actionType")) + object.actionType = options.enums === String ? $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType[message.actionType] : message.actionType; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + object.publicNote = message.publicNote; + return object; + }; + + /** + * Converts this EmergencyActionEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent + * @instance + * @returns {Object.} JSON object + */ + EmergencyActionEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ActionType enum. + * @name org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType + * @enum {number} + * @property {number} PAUSE=0 PAUSE value + * @property {number} RESUME=1 RESUME value + */ + EmergencyActionEvent.ActionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PAUSE"] = 0; + values[valuesById[1] = "RESUME"] = 1; + return values; + })(); + + return EmergencyActionEvent; + })(); + + GetGroupActionsResponseV0.TokenConfigUpdateEvent = (function() { + + /** + * Properties of a TokenConfigUpdateEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface ITokenConfigUpdateEvent + * @property {Uint8Array|null} [tokenConfigUpdateItem] TokenConfigUpdateEvent tokenConfigUpdateItem + * @property {string|null} [publicNote] TokenConfigUpdateEvent publicNote + */ + + /** + * Constructs a new TokenConfigUpdateEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a TokenConfigUpdateEvent. + * @implements ITokenConfigUpdateEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITokenConfigUpdateEvent=} [properties] Properties to set + */ + function TokenConfigUpdateEvent(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]]; + } + + /** + * TokenConfigUpdateEvent tokenConfigUpdateItem. + * @member {Uint8Array} tokenConfigUpdateItem + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + * @instance + */ + TokenConfigUpdateEvent.prototype.tokenConfigUpdateItem = $util.newBuffer([]); + + /** + * TokenConfigUpdateEvent publicNote. + * @member {string} publicNote + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + * @instance + */ + TokenConfigUpdateEvent.prototype.publicNote = ""; + + /** + * Creates a new TokenConfigUpdateEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITokenConfigUpdateEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} TokenConfigUpdateEvent instance + */ + TokenConfigUpdateEvent.create = function create(properties) { + return new TokenConfigUpdateEvent(properties); + }; + + /** + * Encodes the specified TokenConfigUpdateEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITokenConfigUpdateEvent} message TokenConfigUpdateEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenConfigUpdateEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenConfigUpdateItem != null && Object.hasOwnProperty.call(message, "tokenConfigUpdateItem")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tokenConfigUpdateItem); + if (message.publicNote != null && Object.hasOwnProperty.call(message, "publicNote")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.publicNote); + return writer; + }; + + /** + * Encodes the specified TokenConfigUpdateEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITokenConfigUpdateEvent} message TokenConfigUpdateEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenConfigUpdateEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenConfigUpdateEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} TokenConfigUpdateEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenConfigUpdateEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenConfigUpdateItem = reader.bytes(); + break; + case 2: + message.publicNote = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenConfigUpdateEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} TokenConfigUpdateEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenConfigUpdateEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenConfigUpdateEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenConfigUpdateEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokenConfigUpdateItem != null && message.hasOwnProperty("tokenConfigUpdateItem")) + if (!(message.tokenConfigUpdateItem && typeof message.tokenConfigUpdateItem.length === "number" || $util.isString(message.tokenConfigUpdateItem))) + return "tokenConfigUpdateItem: buffer expected"; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + if (!$util.isString(message.publicNote)) + return "publicNote: string expected"; + return null; + }; + + /** + * Creates a TokenConfigUpdateEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} TokenConfigUpdateEvent + */ + TokenConfigUpdateEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent(); + if (object.tokenConfigUpdateItem != null) + if (typeof object.tokenConfigUpdateItem === "string") + $util.base64.decode(object.tokenConfigUpdateItem, message.tokenConfigUpdateItem = $util.newBuffer($util.base64.length(object.tokenConfigUpdateItem)), 0); + else if (object.tokenConfigUpdateItem.length >= 0) + message.tokenConfigUpdateItem = object.tokenConfigUpdateItem; + if (object.publicNote != null) + message.publicNote = String(object.publicNote); + return message; + }; + + /** + * Creates a plain object from a TokenConfigUpdateEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} message TokenConfigUpdateEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenConfigUpdateEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tokenConfigUpdateItem = ""; + else { + object.tokenConfigUpdateItem = []; + if (options.bytes !== Array) + object.tokenConfigUpdateItem = $util.newBuffer(object.tokenConfigUpdateItem); + } + object.publicNote = ""; + } + if (message.tokenConfigUpdateItem != null && message.hasOwnProperty("tokenConfigUpdateItem")) + object.tokenConfigUpdateItem = options.bytes === String ? $util.base64.encode(message.tokenConfigUpdateItem, 0, message.tokenConfigUpdateItem.length) : options.bytes === Array ? Array.prototype.slice.call(message.tokenConfigUpdateItem) : message.tokenConfigUpdateItem; + if (message.publicNote != null && message.hasOwnProperty("publicNote")) + object.publicNote = message.publicNote; + return object; + }; + + /** + * Converts this TokenConfigUpdateEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent + * @instance + * @returns {Object.} JSON object + */ + TokenConfigUpdateEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenConfigUpdateEvent; + })(); + + GetGroupActionsResponseV0.GroupActionEvent = (function() { + + /** + * Properties of a GroupActionEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IGroupActionEvent + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITokenEvent|null} [tokenEvent] GroupActionEvent tokenEvent + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDocumentEvent|null} [documentEvent] GroupActionEvent documentEvent + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IContractEvent|null} [contractEvent] GroupActionEvent contractEvent + */ + + /** + * Constructs a new GroupActionEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a GroupActionEvent. + * @implements IGroupActionEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActionEvent=} [properties] Properties to set + */ + function GroupActionEvent(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]]; + } + + /** + * GroupActionEvent tokenEvent. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITokenEvent|null|undefined} tokenEvent + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @instance + */ + GroupActionEvent.prototype.tokenEvent = null; + + /** + * GroupActionEvent documentEvent. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDocumentEvent|null|undefined} documentEvent + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @instance + */ + GroupActionEvent.prototype.documentEvent = null; + + /** + * GroupActionEvent contractEvent. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IContractEvent|null|undefined} contractEvent + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @instance + */ + GroupActionEvent.prototype.contractEvent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GroupActionEvent eventType. + * @member {"tokenEvent"|"documentEvent"|"contractEvent"|undefined} eventType + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @instance + */ + Object.defineProperty(GroupActionEvent.prototype, "eventType", { + get: $util.oneOfGetter($oneOfFields = ["tokenEvent", "documentEvent", "contractEvent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GroupActionEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActionEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} GroupActionEvent instance + */ + GroupActionEvent.create = function create(properties) { + return new GroupActionEvent(properties); + }; + + /** + * Encodes the specified GroupActionEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActionEvent} message GroupActionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupActionEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokenEvent != null && Object.hasOwnProperty.call(message, "tokenEvent")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.encode(message.tokenEvent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.documentEvent != null && Object.hasOwnProperty.call(message, "documentEvent")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.encode(message.documentEvent, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.contractEvent != null && Object.hasOwnProperty.call(message, "contractEvent")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.encode(message.contractEvent, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GroupActionEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActionEvent} message GroupActionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupActionEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupActionEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} GroupActionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupActionEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tokenEvent = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.decode(reader, reader.uint32()); + break; + case 2: + message.documentEvent = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.decode(reader, reader.uint32()); + break; + case 3: + message.contractEvent = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupActionEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} GroupActionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupActionEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupActionEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupActionEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tokenEvent != null && message.hasOwnProperty("tokenEvent")) { + properties.eventType = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.verify(message.tokenEvent); + if (error) + return "tokenEvent." + error; + } + } + if (message.documentEvent != null && message.hasOwnProperty("documentEvent")) { + if (properties.eventType === 1) + return "eventType: multiple values"; + properties.eventType = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.verify(message.documentEvent); + if (error) + return "documentEvent." + error; + } + } + if (message.contractEvent != null && message.hasOwnProperty("contractEvent")) { + if (properties.eventType === 1) + return "eventType: multiple values"; + properties.eventType = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.verify(message.contractEvent); + if (error) + return "contractEvent." + error; + } + } + return null; + }; + + /** + * Creates a GroupActionEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} GroupActionEvent + */ + GroupActionEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent(); + if (object.tokenEvent != null) { + if (typeof object.tokenEvent !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.tokenEvent: object expected"); + message.tokenEvent = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.fromObject(object.tokenEvent); + } + if (object.documentEvent != null) { + if (typeof object.documentEvent !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.documentEvent: object expected"); + message.documentEvent = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.fromObject(object.documentEvent); + } + if (object.contractEvent != null) { + if (typeof object.contractEvent !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.contractEvent: object expected"); + message.contractEvent = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.fromObject(object.contractEvent); + } + return message; + }; + + /** + * Creates a plain object from a GroupActionEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} message GroupActionEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupActionEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.tokenEvent != null && message.hasOwnProperty("tokenEvent")) { + object.tokenEvent = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.toObject(message.tokenEvent, options); + if (options.oneofs) + object.eventType = "tokenEvent"; + } + if (message.documentEvent != null && message.hasOwnProperty("documentEvent")) { + object.documentEvent = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.toObject(message.documentEvent, options); + if (options.oneofs) + object.eventType = "documentEvent"; + } + if (message.contractEvent != null && message.hasOwnProperty("contractEvent")) { + object.contractEvent = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.toObject(message.contractEvent, options); + if (options.oneofs) + object.eventType = "contractEvent"; + } + return object; + }; + + /** + * Converts this GroupActionEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent + * @instance + * @returns {Object.} JSON object + */ + GroupActionEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupActionEvent; + })(); + + GetGroupActionsResponseV0.DocumentEvent = (function() { + + /** + * Properties of a DocumentEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IDocumentEvent + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDocumentCreateEvent|null} [create] DocumentEvent create + */ + + /** + * Constructs a new DocumentEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a DocumentEvent. + * @implements IDocumentEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDocumentEvent=} [properties] Properties to set + */ + function DocumentEvent(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]]; + } + + /** + * DocumentEvent create. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDocumentCreateEvent|null|undefined} create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + * @instance + */ + DocumentEvent.prototype.create = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DocumentEvent type. + * @member {"create"|undefined} type + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + * @instance + */ + Object.defineProperty(DocumentEvent.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["create"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DocumentEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDocumentEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} DocumentEvent instance + */ + DocumentEvent.create = function create(properties) { + return new DocumentEvent(properties); + }; + + /** + * Encodes the specified DocumentEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDocumentEvent} message DocumentEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.create != null && Object.hasOwnProperty.call(message, "create")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.encode(message.create, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DocumentEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDocumentEvent} message DocumentEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} DocumentEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.create = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} DocumentEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.create != null && message.hasOwnProperty("create")) { + properties.type = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.verify(message.create); + if (error) + return "create." + error; + } + } + return null; + }; + + /** + * Creates a DocumentEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} DocumentEvent + */ + DocumentEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent(); + if (object.create != null) { + if (typeof object.create !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.create: object expected"); + message.create = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.fromObject(object.create); + } + return message; + }; + + /** + * Creates a plain object from a DocumentEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} message DocumentEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.create != null && message.hasOwnProperty("create")) { + object.create = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.toObject(message.create, options); + if (options.oneofs) + object.type = "create"; + } + return object; + }; + + /** + * Converts this DocumentEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent + * @instance + * @returns {Object.} JSON object + */ + DocumentEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DocumentEvent; + })(); + + GetGroupActionsResponseV0.DocumentCreateEvent = (function() { + + /** + * Properties of a DocumentCreateEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IDocumentCreateEvent + * @property {Uint8Array|null} [createdDocument] DocumentCreateEvent createdDocument + */ + + /** + * Constructs a new DocumentCreateEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a DocumentCreateEvent. + * @implements IDocumentCreateEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDocumentCreateEvent=} [properties] Properties to set + */ + function DocumentCreateEvent(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]]; + } + + /** + * DocumentCreateEvent createdDocument. + * @member {Uint8Array} createdDocument + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + * @instance + */ + DocumentCreateEvent.prototype.createdDocument = $util.newBuffer([]); + + /** + * Creates a new DocumentCreateEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDocumentCreateEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} DocumentCreateEvent instance + */ + DocumentCreateEvent.create = function create(properties) { + return new DocumentCreateEvent(properties); + }; + + /** + * Encodes the specified DocumentCreateEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDocumentCreateEvent} message DocumentCreateEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentCreateEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createdDocument != null && Object.hasOwnProperty.call(message, "createdDocument")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.createdDocument); + return writer; + }; + + /** + * Encodes the specified DocumentCreateEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDocumentCreateEvent} message DocumentCreateEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentCreateEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentCreateEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} DocumentCreateEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentCreateEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.createdDocument = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentCreateEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} DocumentCreateEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentCreateEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentCreateEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentCreateEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createdDocument != null && message.hasOwnProperty("createdDocument")) + if (!(message.createdDocument && typeof message.createdDocument.length === "number" || $util.isString(message.createdDocument))) + return "createdDocument: buffer expected"; + return null; + }; + + /** + * Creates a DocumentCreateEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} DocumentCreateEvent + */ + DocumentCreateEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent(); + if (object.createdDocument != null) + if (typeof object.createdDocument === "string") + $util.base64.decode(object.createdDocument, message.createdDocument = $util.newBuffer($util.base64.length(object.createdDocument)), 0); + else if (object.createdDocument.length >= 0) + message.createdDocument = object.createdDocument; + return message; + }; + + /** + * Creates a plain object from a DocumentCreateEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} message DocumentCreateEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentCreateEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.createdDocument = ""; + else { + object.createdDocument = []; + if (options.bytes !== Array) + object.createdDocument = $util.newBuffer(object.createdDocument); + } + if (message.createdDocument != null && message.hasOwnProperty("createdDocument")) + object.createdDocument = options.bytes === String ? $util.base64.encode(message.createdDocument, 0, message.createdDocument.length) : options.bytes === Array ? Array.prototype.slice.call(message.createdDocument) : message.createdDocument; + return object; + }; + + /** + * Converts this DocumentCreateEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent + * @instance + * @returns {Object.} JSON object + */ + DocumentCreateEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DocumentCreateEvent; + })(); + + GetGroupActionsResponseV0.ContractUpdateEvent = (function() { + + /** + * Properties of a ContractUpdateEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IContractUpdateEvent + * @property {Uint8Array|null} [updatedContract] ContractUpdateEvent updatedContract + */ + + /** + * Constructs a new ContractUpdateEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a ContractUpdateEvent. + * @implements IContractUpdateEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IContractUpdateEvent=} [properties] Properties to set + */ + function ContractUpdateEvent(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]]; + } + + /** + * ContractUpdateEvent updatedContract. + * @member {Uint8Array} updatedContract + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + * @instance + */ + ContractUpdateEvent.prototype.updatedContract = $util.newBuffer([]); + + /** + * Creates a new ContractUpdateEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IContractUpdateEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} ContractUpdateEvent instance + */ + ContractUpdateEvent.create = function create(properties) { + return new ContractUpdateEvent(properties); + }; + + /** + * Encodes the specified ContractUpdateEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IContractUpdateEvent} message ContractUpdateEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContractUpdateEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updatedContract != null && Object.hasOwnProperty.call(message, "updatedContract")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.updatedContract); + return writer; + }; + + /** + * Encodes the specified ContractUpdateEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IContractUpdateEvent} message ContractUpdateEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContractUpdateEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContractUpdateEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} ContractUpdateEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContractUpdateEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.updatedContract = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContractUpdateEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} ContractUpdateEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContractUpdateEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContractUpdateEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContractUpdateEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updatedContract != null && message.hasOwnProperty("updatedContract")) + if (!(message.updatedContract && typeof message.updatedContract.length === "number" || $util.isString(message.updatedContract))) + return "updatedContract: buffer expected"; + return null; + }; + + /** + * Creates a ContractUpdateEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} ContractUpdateEvent + */ + ContractUpdateEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent(); + if (object.updatedContract != null) + if (typeof object.updatedContract === "string") + $util.base64.decode(object.updatedContract, message.updatedContract = $util.newBuffer($util.base64.length(object.updatedContract)), 0); + else if (object.updatedContract.length >= 0) + message.updatedContract = object.updatedContract; + return message; + }; + + /** + * Creates a plain object from a ContractUpdateEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} message ContractUpdateEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContractUpdateEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.updatedContract = ""; + else { + object.updatedContract = []; + if (options.bytes !== Array) + object.updatedContract = $util.newBuffer(object.updatedContract); + } + if (message.updatedContract != null && message.hasOwnProperty("updatedContract")) + object.updatedContract = options.bytes === String ? $util.base64.encode(message.updatedContract, 0, message.updatedContract.length) : options.bytes === Array ? Array.prototype.slice.call(message.updatedContract) : message.updatedContract; + return object; + }; + + /** + * Converts this ContractUpdateEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent + * @instance + * @returns {Object.} JSON object + */ + ContractUpdateEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContractUpdateEvent; + })(); + + GetGroupActionsResponseV0.ContractEvent = (function() { + + /** + * Properties of a ContractEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IContractEvent + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IContractUpdateEvent|null} [update] ContractEvent update + */ + + /** + * Constructs a new ContractEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a ContractEvent. + * @implements IContractEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IContractEvent=} [properties] Properties to set + */ + function ContractEvent(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]]; + } + + /** + * ContractEvent update. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IContractUpdateEvent|null|undefined} update + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + * @instance + */ + ContractEvent.prototype.update = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ContractEvent type. + * @member {"update"|undefined} type + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + * @instance + */ + Object.defineProperty(ContractEvent.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["update"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ContractEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IContractEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} ContractEvent instance + */ + ContractEvent.create = function create(properties) { + return new ContractEvent(properties); + }; + + /** + * Encodes the specified ContractEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IContractEvent} message ContractEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContractEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.update != null && Object.hasOwnProperty.call(message, "update")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.encode(message.update, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContractEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IContractEvent} message ContractEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContractEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContractEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} ContractEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContractEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.update = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContractEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} ContractEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContractEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContractEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContractEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.update != null && message.hasOwnProperty("update")) { + properties.type = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.verify(message.update); + if (error) + return "update." + error; + } + } + return null; + }; + + /** + * Creates a ContractEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} ContractEvent + */ + ContractEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent(); + if (object.update != null) { + if (typeof object.update !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.update: object expected"); + message.update = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.fromObject(object.update); + } + return message; + }; + + /** + * Creates a plain object from a ContractEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} message ContractEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContractEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.update != null && message.hasOwnProperty("update")) { + object.update = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.toObject(message.update, options); + if (options.oneofs) + object.type = "update"; + } + return object; + }; + + /** + * Converts this ContractEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent + * @instance + * @returns {Object.} JSON object + */ + ContractEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContractEvent; + })(); + + GetGroupActionsResponseV0.TokenEvent = (function() { + + /** + * Properties of a TokenEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface ITokenEvent + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IMintEvent|null} [mint] TokenEvent mint + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IBurnEvent|null} [burn] TokenEvent burn + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IFreezeEvent|null} [freeze] TokenEvent freeze + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IUnfreezeEvent|null} [unfreeze] TokenEvent unfreeze + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDestroyFrozenFundsEvent|null} [destroyFrozenFunds] TokenEvent destroyFrozenFunds + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITransferEvent|null} [transfer] TokenEvent transfer + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IEmergencyActionEvent|null} [emergencyAction] TokenEvent emergencyAction + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITokenConfigUpdateEvent|null} [tokenConfigUpdate] TokenEvent tokenConfigUpdate + */ + + /** + * Constructs a new TokenEvent. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a TokenEvent. + * @implements ITokenEvent + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITokenEvent=} [properties] Properties to set + */ + function TokenEvent(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]]; + } + + /** + * TokenEvent mint. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IMintEvent|null|undefined} mint + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @instance + */ + TokenEvent.prototype.mint = null; + + /** + * TokenEvent burn. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IBurnEvent|null|undefined} burn + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @instance + */ + TokenEvent.prototype.burn = null; + + /** + * TokenEvent freeze. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IFreezeEvent|null|undefined} freeze + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @instance + */ + TokenEvent.prototype.freeze = null; + + /** + * TokenEvent unfreeze. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IUnfreezeEvent|null|undefined} unfreeze + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @instance + */ + TokenEvent.prototype.unfreeze = null; + + /** + * TokenEvent destroyFrozenFunds. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IDestroyFrozenFundsEvent|null|undefined} destroyFrozenFunds + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @instance + */ + TokenEvent.prototype.destroyFrozenFunds = null; + + /** + * TokenEvent transfer. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITransferEvent|null|undefined} transfer + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @instance + */ + TokenEvent.prototype.transfer = null; + + /** + * TokenEvent emergencyAction. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IEmergencyActionEvent|null|undefined} emergencyAction + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @instance + */ + TokenEvent.prototype.emergencyAction = null; + + /** + * TokenEvent tokenConfigUpdate. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITokenConfigUpdateEvent|null|undefined} tokenConfigUpdate + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @instance + */ + TokenEvent.prototype.tokenConfigUpdate = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TokenEvent type. + * @member {"mint"|"burn"|"freeze"|"unfreeze"|"destroyFrozenFunds"|"transfer"|"emergencyAction"|"tokenConfigUpdate"|undefined} type + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @instance + */ + Object.defineProperty(TokenEvent.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["mint", "burn", "freeze", "unfreeze", "destroyFrozenFunds", "transfer", "emergencyAction", "tokenConfigUpdate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TokenEvent instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITokenEvent=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} TokenEvent instance + */ + TokenEvent.create = function create(properties) { + return new TokenEvent(properties); + }; + + /** + * Encodes the specified TokenEvent message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITokenEvent} message TokenEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mint != null && Object.hasOwnProperty.call(message, "mint")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.encode(message.mint, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.burn != null && Object.hasOwnProperty.call(message, "burn")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.encode(message.burn, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.freeze != null && Object.hasOwnProperty.call(message, "freeze")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.encode(message.freeze, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.unfreeze != null && Object.hasOwnProperty.call(message, "unfreeze")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.encode(message.unfreeze, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.destroyFrozenFunds != null && Object.hasOwnProperty.call(message, "destroyFrozenFunds")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.encode(message.destroyFrozenFunds, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.transfer != null && Object.hasOwnProperty.call(message, "transfer")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.encode(message.transfer, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.emergencyAction != null && Object.hasOwnProperty.call(message, "emergencyAction")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.encode(message.emergencyAction, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.tokenConfigUpdate != null && Object.hasOwnProperty.call(message, "tokenConfigUpdate")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.encode(message.tokenConfigUpdate, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TokenEvent message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ITokenEvent} message TokenEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TokenEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TokenEvent message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} TokenEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mint = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.decode(reader, reader.uint32()); + break; + case 2: + message.burn = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.decode(reader, reader.uint32()); + break; + case 3: + message.freeze = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.decode(reader, reader.uint32()); + break; + case 4: + message.unfreeze = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.decode(reader, reader.uint32()); + break; + case 5: + message.destroyFrozenFunds = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.decode(reader, reader.uint32()); + break; + case 6: + message.transfer = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.decode(reader, reader.uint32()); + break; + case 7: + message.emergencyAction = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.decode(reader, reader.uint32()); + break; + case 8: + message.tokenConfigUpdate = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TokenEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} TokenEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TokenEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TokenEvent message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TokenEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mint != null && message.hasOwnProperty("mint")) { + properties.type = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.verify(message.mint); + if (error) + return "mint." + error; + } + } + if (message.burn != null && message.hasOwnProperty("burn")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.verify(message.burn); + if (error) + return "burn." + error; + } + } + if (message.freeze != null && message.hasOwnProperty("freeze")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.verify(message.freeze); + if (error) + return "freeze." + error; + } + } + if (message.unfreeze != null && message.hasOwnProperty("unfreeze")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.verify(message.unfreeze); + if (error) + return "unfreeze." + error; + } + } + if (message.destroyFrozenFunds != null && message.hasOwnProperty("destroyFrozenFunds")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.verify(message.destroyFrozenFunds); + if (error) + return "destroyFrozenFunds." + error; + } + } + if (message.transfer != null && message.hasOwnProperty("transfer")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.verify(message.transfer); + if (error) + return "transfer." + error; + } + } + if (message.emergencyAction != null && message.hasOwnProperty("emergencyAction")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.verify(message.emergencyAction); + if (error) + return "emergencyAction." + error; + } + } + if (message.tokenConfigUpdate != null && message.hasOwnProperty("tokenConfigUpdate")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.verify(message.tokenConfigUpdate); + if (error) + return "tokenConfigUpdate." + error; + } + } + return null; + }; + + /** + * Creates a TokenEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} TokenEvent + */ + TokenEvent.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent(); + if (object.mint != null) { + if (typeof object.mint !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.mint: object expected"); + message.mint = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.fromObject(object.mint); + } + if (object.burn != null) { + if (typeof object.burn !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.burn: object expected"); + message.burn = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.fromObject(object.burn); + } + if (object.freeze != null) { + if (typeof object.freeze !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.freeze: object expected"); + message.freeze = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.fromObject(object.freeze); + } + if (object.unfreeze != null) { + if (typeof object.unfreeze !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.unfreeze: object expected"); + message.unfreeze = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.fromObject(object.unfreeze); + } + if (object.destroyFrozenFunds != null) { + if (typeof object.destroyFrozenFunds !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.destroyFrozenFunds: object expected"); + message.destroyFrozenFunds = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.fromObject(object.destroyFrozenFunds); + } + if (object.transfer != null) { + if (typeof object.transfer !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.transfer: object expected"); + message.transfer = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.fromObject(object.transfer); + } + if (object.emergencyAction != null) { + if (typeof object.emergencyAction !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.emergencyAction: object expected"); + message.emergencyAction = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.fromObject(object.emergencyAction); + } + if (object.tokenConfigUpdate != null) { + if (typeof object.tokenConfigUpdate !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.tokenConfigUpdate: object expected"); + message.tokenConfigUpdate = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.fromObject(object.tokenConfigUpdate); + } + return message; + }; + + /** + * Creates a plain object from a TokenEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} message TokenEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TokenEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.mint != null && message.hasOwnProperty("mint")) { + object.mint = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.toObject(message.mint, options); + if (options.oneofs) + object.type = "mint"; + } + if (message.burn != null && message.hasOwnProperty("burn")) { + object.burn = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.toObject(message.burn, options); + if (options.oneofs) + object.type = "burn"; + } + if (message.freeze != null && message.hasOwnProperty("freeze")) { + object.freeze = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.toObject(message.freeze, options); + if (options.oneofs) + object.type = "freeze"; + } + if (message.unfreeze != null && message.hasOwnProperty("unfreeze")) { + object.unfreeze = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.toObject(message.unfreeze, options); + if (options.oneofs) + object.type = "unfreeze"; + } + if (message.destroyFrozenFunds != null && message.hasOwnProperty("destroyFrozenFunds")) { + object.destroyFrozenFunds = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.toObject(message.destroyFrozenFunds, options); + if (options.oneofs) + object.type = "destroyFrozenFunds"; + } + if (message.transfer != null && message.hasOwnProperty("transfer")) { + object.transfer = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.toObject(message.transfer, options); + if (options.oneofs) + object.type = "transfer"; + } + if (message.emergencyAction != null && message.hasOwnProperty("emergencyAction")) { + object.emergencyAction = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.toObject(message.emergencyAction, options); + if (options.oneofs) + object.type = "emergencyAction"; + } + if (message.tokenConfigUpdate != null && message.hasOwnProperty("tokenConfigUpdate")) { + object.tokenConfigUpdate = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.toObject(message.tokenConfigUpdate, options); + if (options.oneofs) + object.type = "tokenConfigUpdate"; + } + return object; + }; + + /** + * Converts this TokenEvent to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent + * @instance + * @returns {Object.} JSON object + */ + TokenEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TokenEvent; + })(); + + GetGroupActionsResponseV0.GroupActionEntry = (function() { + + /** + * Properties of a GroupActionEntry. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IGroupActionEntry + * @property {Uint8Array|null} [actionId] GroupActionEntry actionId + * @property {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActionEvent|null} [event] GroupActionEntry event + */ + + /** + * Constructs a new GroupActionEntry. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a GroupActionEntry. + * @implements IGroupActionEntry + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActionEntry=} [properties] Properties to set + */ + function GroupActionEntry(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]]; + } + + /** + * GroupActionEntry actionId. + * @member {Uint8Array} actionId + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + * @instance + */ + GroupActionEntry.prototype.actionId = $util.newBuffer([]); + + /** + * GroupActionEntry event. + * @member {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActionEvent|null|undefined} event + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + * @instance + */ + GroupActionEntry.prototype.event = null; + + /** + * Creates a new GroupActionEntry instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActionEntry=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} GroupActionEntry instance + */ + GroupActionEntry.create = function create(properties) { + return new GroupActionEntry(properties); + }; + + /** + * Encodes the specified GroupActionEntry message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActionEntry} message GroupActionEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupActionEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.actionId != null && Object.hasOwnProperty.call(message, "actionId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.actionId); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.encode(message.event, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GroupActionEntry message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActionEntry} message GroupActionEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupActionEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupActionEntry message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} GroupActionEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupActionEntry.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.actionId = reader.bytes(); + break; + case 2: + message.event = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupActionEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} GroupActionEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupActionEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupActionEntry message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupActionEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.actionId != null && message.hasOwnProperty("actionId")) + if (!(message.actionId && typeof message.actionId.length === "number" || $util.isString(message.actionId))) + return "actionId: buffer expected"; + if (message.event != null && message.hasOwnProperty("event")) { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.verify(message.event); + if (error) + return "event." + error; + } + return null; + }; + + /** + * Creates a GroupActionEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} GroupActionEntry + */ + GroupActionEntry.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry(); + if (object.actionId != null) + if (typeof object.actionId === "string") + $util.base64.decode(object.actionId, message.actionId = $util.newBuffer($util.base64.length(object.actionId)), 0); + else if (object.actionId.length >= 0) + message.actionId = object.actionId; + if (object.event != null) { + if (typeof object.event !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.event: object expected"); + message.event = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.fromObject(object.event); + } + return message; + }; + + /** + * Creates a plain object from a GroupActionEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} message GroupActionEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupActionEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.actionId = ""; + else { + object.actionId = []; + if (options.bytes !== Array) + object.actionId = $util.newBuffer(object.actionId); + } + object.event = null; + } + if (message.actionId != null && message.hasOwnProperty("actionId")) + object.actionId = options.bytes === String ? $util.base64.encode(message.actionId, 0, message.actionId.length) : options.bytes === Array ? Array.prototype.slice.call(message.actionId) : message.actionId; + if (message.event != null && message.hasOwnProperty("event")) + object.event = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.toObject(message.event, options); + return object; + }; + + /** + * Converts this GroupActionEntry to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry + * @instance + * @returns {Object.} JSON object + */ + GroupActionEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupActionEntry; + })(); + + GetGroupActionsResponseV0.GroupActions = (function() { + + /** + * Properties of a GroupActions. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @interface IGroupActions + * @property {Array.|null} [groupActions] GroupActions groupActions + */ + + /** + * Constructs a new GroupActions. + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0 + * @classdesc Represents a GroupActions. + * @implements IGroupActions + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActions=} [properties] Properties to set + */ + function GroupActions(properties) { + this.groupActions = []; + 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]]; + } + + /** + * GroupActions groupActions. + * @member {Array.} groupActions + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + * @instance + */ + GroupActions.prototype.groupActions = $util.emptyArray; + + /** + * Creates a new GroupActions instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActions=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} GroupActions instance + */ + GroupActions.create = function create(properties) { + return new GroupActions(properties); + }; + + /** + * Encodes the specified GroupActions message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActions} message GroupActions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupActions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupActions != null && message.groupActions.length) + for (var i = 0; i < message.groupActions.length; ++i) + $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.encode(message.groupActions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GroupActions message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.IGroupActions} message GroupActions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupActions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupActions message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + * @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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} GroupActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupActions.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.groupActions && message.groupActions.length)) + message.groupActions = []; + message.groupActions.push($root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupActions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} GroupActions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupActions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupActions message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupActions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.groupActions != null && message.hasOwnProperty("groupActions")) { + if (!Array.isArray(message.groupActions)) + return "groupActions: array expected"; + for (var i = 0; i < message.groupActions.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.verify(message.groupActions[i]); + if (error) + return "groupActions." + error; + } + } + return null; + }; + + /** + * Creates a GroupActions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} GroupActions + */ + GroupActions.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions(); + if (object.groupActions) { + if (!Array.isArray(object.groupActions)) + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.groupActions: array expected"); + message.groupActions = []; + for (var i = 0; i < object.groupActions.length; ++i) { + if (typeof object.groupActions[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.groupActions: object expected"); + message.groupActions[i] = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.fromObject(object.groupActions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GroupActions message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} message GroupActions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupActions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.groupActions = []; + if (message.groupActions && message.groupActions.length) { + object.groupActions = []; + for (var j = 0; j < message.groupActions.length; ++j) + object.groupActions[j] = $root.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.toObject(message.groupActions[j], options); + } + return object; + }; + + /** + * Converts this GroupActions to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions + * @instance + * @returns {Object.} JSON object + */ + GroupActions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupActions; + })(); + + return GetGroupActionsResponseV0; + })(); + + return GetGroupActionsResponse; + })(); + + v0.GetGroupActionSignersRequest = (function() { + + /** + * Properties of a GetGroupActionSignersRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetGroupActionSignersRequest + * @property {org.dash.platform.dapi.v0.GetGroupActionSignersRequest.IGetGroupActionSignersRequestV0|null} [v0] GetGroupActionSignersRequest v0 + */ + + /** + * Constructs a new GetGroupActionSignersRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetGroupActionSignersRequest. + * @implements IGetGroupActionSignersRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetGroupActionSignersRequest=} [properties] Properties to set + */ + function GetGroupActionSignersRequest(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]]; + } + + /** + * GetGroupActionSignersRequest v0. + * @member {org.dash.platform.dapi.v0.GetGroupActionSignersRequest.IGetGroupActionSignersRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @instance + */ + GetGroupActionSignersRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetGroupActionSignersRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @instance + */ + Object.defineProperty(GetGroupActionSignersRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetGroupActionSignersRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupActionSignersRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersRequest} GetGroupActionSignersRequest instance + */ + GetGroupActionSignersRequest.create = function create(properties) { + return new GetGroupActionSignersRequest(properties); + }; + + /** + * Encodes the specified GetGroupActionSignersRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionSignersRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupActionSignersRequest} message GetGroupActionSignersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionSignersRequest.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.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetGroupActionSignersRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionSignersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupActionSignersRequest} message GetGroupActionSignersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionSignersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupActionSignersRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @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.GetGroupActionSignersRequest} GetGroupActionSignersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionSignersRequest.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.GetGroupActionSignersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupActionSignersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersRequest} GetGroupActionSignersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionSignersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupActionSignersRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupActionSignersRequest.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.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetGroupActionSignersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersRequest} GetGroupActionSignersRequest + */ + GetGroupActionSignersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionSignersRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionSignersRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionSignersRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetGroupActionSignersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersRequest} message GetGroupActionSignersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupActionSignersRequest.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.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetGroupActionSignersRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @instance + * @returns {Object.} JSON object + */ + GetGroupActionSignersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * ActionStatus enum. + * @name org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus + * @enum {number} + * @property {number} ACTIVE=0 ACTIVE value + * @property {number} CLOSED=1 CLOSED value + */ + GetGroupActionSignersRequest.ActionStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTIVE"] = 0; + values[valuesById[1] = "CLOSED"] = 1; + return values; + })(); + + GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 = (function() { + + /** + * Properties of a GetGroupActionSignersRequestV0. + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @interface IGetGroupActionSignersRequestV0 + * @property {Uint8Array|null} [contractId] GetGroupActionSignersRequestV0 contractId + * @property {number|null} [groupContractPosition] GetGroupActionSignersRequestV0 groupContractPosition + * @property {org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus|null} [status] GetGroupActionSignersRequestV0 status + * @property {Uint8Array|null} [actionId] GetGroupActionSignersRequestV0 actionId + * @property {boolean|null} [prove] GetGroupActionSignersRequestV0 prove + */ + + /** + * Constructs a new GetGroupActionSignersRequestV0. + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest + * @classdesc Represents a GetGroupActionSignersRequestV0. + * @implements IGetGroupActionSignersRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersRequest.IGetGroupActionSignersRequestV0=} [properties] Properties to set + */ + function GetGroupActionSignersRequestV0(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]]; + } + + /** + * GetGroupActionSignersRequestV0 contractId. + * @member {Uint8Array} contractId + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @instance + */ + GetGroupActionSignersRequestV0.prototype.contractId = $util.newBuffer([]); + + /** + * GetGroupActionSignersRequestV0 groupContractPosition. + * @member {number} groupContractPosition + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @instance + */ + GetGroupActionSignersRequestV0.prototype.groupContractPosition = 0; + + /** + * GetGroupActionSignersRequestV0 status. + * @member {org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus} status + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @instance + */ + GetGroupActionSignersRequestV0.prototype.status = 0; + + /** + * GetGroupActionSignersRequestV0 actionId. + * @member {Uint8Array} actionId + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @instance + */ + GetGroupActionSignersRequestV0.prototype.actionId = $util.newBuffer([]); + + /** + * GetGroupActionSignersRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @instance + */ + GetGroupActionSignersRequestV0.prototype.prove = false; + + /** + * Creates a new GetGroupActionSignersRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersRequest.IGetGroupActionSignersRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} GetGroupActionSignersRequestV0 instance + */ + GetGroupActionSignersRequestV0.create = function create(properties) { + return new GetGroupActionSignersRequestV0(properties); + }; + + /** + * Encodes the specified GetGroupActionSignersRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersRequest.IGetGroupActionSignersRequestV0} message GetGroupActionSignersRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionSignersRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contractId != null && Object.hasOwnProperty.call(message, "contractId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.contractId); + if (message.groupContractPosition != null && Object.hasOwnProperty.call(message, "groupContractPosition")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.groupContractPosition); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); + if (message.actionId != null && Object.hasOwnProperty.call(message, "actionId")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.actionId); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetGroupActionSignersRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersRequest.IGetGroupActionSignersRequestV0} message GetGroupActionSignersRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionSignersRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupActionSignersRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @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.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} GetGroupActionSignersRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionSignersRequestV0.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.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.contractId = reader.bytes(); + break; + case 2: + message.groupContractPosition = reader.uint32(); + break; + case 3: + message.status = reader.int32(); + break; + case 4: + message.actionId = reader.bytes(); + break; + case 5: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupActionSignersRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} GetGroupActionSignersRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionSignersRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupActionSignersRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupActionSignersRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contractId != null && message.hasOwnProperty("contractId")) + if (!(message.contractId && typeof message.contractId.length === "number" || $util.isString(message.contractId))) + return "contractId: buffer expected"; + if (message.groupContractPosition != null && message.hasOwnProperty("groupContractPosition")) + if (!$util.isInteger(message.groupContractPosition)) + return "groupContractPosition: integer expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + break; + } + if (message.actionId != null && message.hasOwnProperty("actionId")) + if (!(message.actionId && typeof message.actionId.length === "number" || $util.isString(message.actionId))) + return "actionId: buffer expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetGroupActionSignersRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} GetGroupActionSignersRequestV0 + */ + GetGroupActionSignersRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0(); + if (object.contractId != null) + if (typeof object.contractId === "string") + $util.base64.decode(object.contractId, message.contractId = $util.newBuffer($util.base64.length(object.contractId)), 0); + else if (object.contractId.length >= 0) + message.contractId = object.contractId; + if (object.groupContractPosition != null) + message.groupContractPosition = object.groupContractPosition >>> 0; + switch (object.status) { + case "ACTIVE": + case 0: + message.status = 0; + break; + case "CLOSED": + case 1: + message.status = 1; + break; + } + if (object.actionId != null) + if (typeof object.actionId === "string") + $util.base64.decode(object.actionId, message.actionId = $util.newBuffer($util.base64.length(object.actionId)), 0); + else if (object.actionId.length >= 0) + message.actionId = object.actionId; + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetGroupActionSignersRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} message GetGroupActionSignersRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupActionSignersRequestV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.contractId = ""; + else { + object.contractId = []; + if (options.bytes !== Array) + object.contractId = $util.newBuffer(object.contractId); + } + object.groupContractPosition = 0; + object.status = options.enums === String ? "ACTIVE" : 0; + if (options.bytes === String) + object.actionId = ""; + else { + object.actionId = []; + if (options.bytes !== Array) + object.actionId = $util.newBuffer(object.actionId); + } + object.prove = false; + } + if (message.contractId != null && message.hasOwnProperty("contractId")) + object.contractId = options.bytes === String ? $util.base64.encode(message.contractId, 0, message.contractId.length) : options.bytes === Array ? Array.prototype.slice.call(message.contractId) : message.contractId; + if (message.groupContractPosition != null && message.hasOwnProperty("groupContractPosition")) + object.groupContractPosition = message.groupContractPosition; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus[message.status] : message.status; + if (message.actionId != null && message.hasOwnProperty("actionId")) + object.actionId = options.bytes === String ? $util.base64.encode(message.actionId, 0, message.actionId.length) : options.bytes === Array ? Array.prototype.slice.call(message.actionId) : message.actionId; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetGroupActionSignersRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetGroupActionSignersRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetGroupActionSignersRequestV0; + })(); + + return GetGroupActionSignersRequest; + })(); + + v0.GetGroupActionSignersResponse = (function() { + + /** + * Properties of a GetGroupActionSignersResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetGroupActionSignersResponse + * @property {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.IGetGroupActionSignersResponseV0|null} [v0] GetGroupActionSignersResponse v0 + */ + + /** + * Constructs a new GetGroupActionSignersResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetGroupActionSignersResponse. + * @implements IGetGroupActionSignersResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetGroupActionSignersResponse=} [properties] Properties to set + */ + function GetGroupActionSignersResponse(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]]; + } + + /** + * GetGroupActionSignersResponse v0. + * @member {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.IGetGroupActionSignersResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @instance + */ + GetGroupActionSignersResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetGroupActionSignersResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @instance + */ + Object.defineProperty(GetGroupActionSignersResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetGroupActionSignersResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupActionSignersResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersResponse} GetGroupActionSignersResponse instance + */ + GetGroupActionSignersResponse.create = function create(properties) { + return new GetGroupActionSignersResponse(properties); + }; + + /** + * Encodes the specified GetGroupActionSignersResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionSignersResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupActionSignersResponse} message GetGroupActionSignersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionSignersResponse.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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetGroupActionSignersResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionSignersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetGroupActionSignersResponse} message GetGroupActionSignersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionSignersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupActionSignersResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @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.GetGroupActionSignersResponse} GetGroupActionSignersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionSignersResponse.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.GetGroupActionSignersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGroupActionSignersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersResponse} GetGroupActionSignersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionSignersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupActionSignersResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupActionSignersResponse.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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetGroupActionSignersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersResponse} GetGroupActionSignersResponse + */ + GetGroupActionSignersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionSignersResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetGroupActionSignersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse} message GetGroupActionSignersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupActionSignersResponse.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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetGroupActionSignersResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @instance + * @returns {Object.} JSON object + */ + GetGroupActionSignersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 = (function() { + + /** + * Properties of a GetGroupActionSignersResponseV0. + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @interface IGetGroupActionSignersResponseV0 + * @property {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.IGroupActionSigners|null} [groupActionSigners] GetGroupActionSignersResponseV0 groupActionSigners + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetGroupActionSignersResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetGroupActionSignersResponseV0 metadata + */ + + /** + * Constructs a new GetGroupActionSignersResponseV0. + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse + * @classdesc Represents a GetGroupActionSignersResponseV0. + * @implements IGetGroupActionSignersResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.IGetGroupActionSignersResponseV0=} [properties] Properties to set + */ + function GetGroupActionSignersResponseV0(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]]; + } + + /** + * GetGroupActionSignersResponseV0 groupActionSigners. + * @member {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.IGroupActionSigners|null|undefined} groupActionSigners + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @instance + */ + GetGroupActionSignersResponseV0.prototype.groupActionSigners = null; + + /** + * GetGroupActionSignersResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @instance + */ + GetGroupActionSignersResponseV0.prototype.proof = null; + + /** + * GetGroupActionSignersResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @instance + */ + GetGroupActionSignersResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetGroupActionSignersResponseV0 result. + * @member {"groupActionSigners"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @instance + */ + Object.defineProperty(GetGroupActionSignersResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["groupActionSigners", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetGroupActionSignersResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.IGetGroupActionSignersResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} GetGroupActionSignersResponseV0 instance + */ + GetGroupActionSignersResponseV0.create = function create(properties) { + return new GetGroupActionSignersResponseV0(properties); + }; + + /** + * Encodes the specified GetGroupActionSignersResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.IGetGroupActionSignersResponseV0} message GetGroupActionSignersResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionSignersResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.groupActionSigners != null && Object.hasOwnProperty.call(message, "groupActionSigners")) + $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.encode(message.groupActionSigners, 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 GetGroupActionSignersResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.IGetGroupActionSignersResponseV0} message GetGroupActionSignersResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGroupActionSignersResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGroupActionSignersResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} GetGroupActionSignersResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionSignersResponseV0.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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.groupActionSigners = $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.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 GetGroupActionSignersResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} GetGroupActionSignersResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGroupActionSignersResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGroupActionSignersResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGroupActionSignersResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.groupActionSigners != null && message.hasOwnProperty("groupActionSigners")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.verify(message.groupActionSigners); + if (error) + return "groupActionSigners." + 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 GetGroupActionSignersResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} GetGroupActionSignersResponseV0 + */ + GetGroupActionSignersResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0(); + if (object.groupActionSigners != null) { + if (typeof object.groupActionSigners !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.groupActionSigners: object expected"); + message.groupActionSigners = $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.fromObject(object.groupActionSigners); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetGroupActionSignersResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} message GetGroupActionSignersResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGroupActionSignersResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.groupActionSigners != null && message.hasOwnProperty("groupActionSigners")) { + object.groupActionSigners = $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.toObject(message.groupActionSigners, options); + if (options.oneofs) + object.result = "groupActionSigners"; + } + 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 GetGroupActionSignersResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetGroupActionSignersResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetGroupActionSignersResponseV0.GroupActionSigner = (function() { + + /** + * Properties of a GroupActionSigner. + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @interface IGroupActionSigner + * @property {Uint8Array|null} [signerId] GroupActionSigner signerId + * @property {number|null} [power] GroupActionSigner power + */ + + /** + * Constructs a new GroupActionSigner. + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @classdesc Represents a GroupActionSigner. + * @implements IGroupActionSigner + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.IGroupActionSigner=} [properties] Properties to set + */ + function GroupActionSigner(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]]; + } + + /** + * GroupActionSigner signerId. + * @member {Uint8Array} signerId + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + * @instance + */ + GroupActionSigner.prototype.signerId = $util.newBuffer([]); + + /** + * GroupActionSigner power. + * @member {number} power + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + * @instance + */ + GroupActionSigner.prototype.power = 0; + + /** + * Creates a new GroupActionSigner instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.IGroupActionSigner=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} GroupActionSigner instance + */ + GroupActionSigner.create = function create(properties) { + return new GroupActionSigner(properties); + }; + + /** + * Encodes the specified GroupActionSigner message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.IGroupActionSigner} message GroupActionSigner message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupActionSigner.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signerId != null && Object.hasOwnProperty.call(message, "signerId")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signerId); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.power); + return writer; + }; + + /** + * Encodes the specified GroupActionSigner message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.IGroupActionSigner} message GroupActionSigner message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupActionSigner.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupActionSigner message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + * @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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} GroupActionSigner + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupActionSigner.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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.signerId = reader.bytes(); + break; + case 2: + message.power = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupActionSigner message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} GroupActionSigner + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupActionSigner.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupActionSigner message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupActionSigner.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signerId != null && message.hasOwnProperty("signerId")) + if (!(message.signerId && typeof message.signerId.length === "number" || $util.isString(message.signerId))) + return "signerId: buffer expected"; + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power)) + return "power: integer expected"; + return null; + }; + + /** + * Creates a GroupActionSigner message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} GroupActionSigner + */ + GroupActionSigner.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner(); + if (object.signerId != null) + if (typeof object.signerId === "string") + $util.base64.decode(object.signerId, message.signerId = $util.newBuffer($util.base64.length(object.signerId)), 0); + else if (object.signerId.length >= 0) + message.signerId = object.signerId; + if (object.power != null) + message.power = object.power >>> 0; + return message; + }; + + /** + * Creates a plain object from a GroupActionSigner message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} message GroupActionSigner + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupActionSigner.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.signerId = ""; + else { + object.signerId = []; + if (options.bytes !== Array) + object.signerId = $util.newBuffer(object.signerId); + } + object.power = 0; + } + if (message.signerId != null && message.hasOwnProperty("signerId")) + object.signerId = options.bytes === String ? $util.base64.encode(message.signerId, 0, message.signerId.length) : options.bytes === Array ? Array.prototype.slice.call(message.signerId) : message.signerId; + if (message.power != null && message.hasOwnProperty("power")) + object.power = message.power; + return object; + }; + + /** + * Converts this GroupActionSigner to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner + * @instance + * @returns {Object.} JSON object + */ + GroupActionSigner.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupActionSigner; + })(); + + GetGroupActionSignersResponseV0.GroupActionSigners = (function() { + + /** + * Properties of a GroupActionSigners. + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @interface IGroupActionSigners + * @property {Array.|null} [signers] GroupActionSigners signers + */ + + /** + * Constructs a new GroupActionSigners. + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 + * @classdesc Represents a GroupActionSigners. + * @implements IGroupActionSigners + * @constructor + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.IGroupActionSigners=} [properties] Properties to set + */ + function GroupActionSigners(properties) { + this.signers = []; + 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]]; + } + + /** + * GroupActionSigners signers. + * @member {Array.} signers + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + * @instance + */ + GroupActionSigners.prototype.signers = $util.emptyArray; + + /** + * Creates a new GroupActionSigners instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.IGroupActionSigners=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} GroupActionSigners instance + */ + GroupActionSigners.create = function create(properties) { + return new GroupActionSigners(properties); + }; + + /** + * Encodes the specified GroupActionSigners message. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.IGroupActionSigners} message GroupActionSigners message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupActionSigners.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signers != null && message.signers.length) + for (var i = 0; i < message.signers.length; ++i) + $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.encode(message.signers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GroupActionSigners message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.IGroupActionSigners} message GroupActionSigners message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GroupActionSigners.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GroupActionSigners message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + * @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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} GroupActionSigners + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupActionSigners.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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.signers && message.signers.length)) + message.signers = []; + message.signers.push($root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GroupActionSigners message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} GroupActionSigners + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GroupActionSigners.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GroupActionSigners message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GroupActionSigners.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signers != null && message.hasOwnProperty("signers")) { + if (!Array.isArray(message.signers)) + return "signers: array expected"; + for (var i = 0; i < message.signers.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.verify(message.signers[i]); + if (error) + return "signers." + error; + } + } + return null; + }; + + /** + * Creates a GroupActionSigners message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} GroupActionSigners + */ + GroupActionSigners.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners(); + if (object.signers) { + if (!Array.isArray(object.signers)) + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.signers: array expected"); + message.signers = []; + for (var i = 0; i < object.signers.length; ++i) { + if (typeof object.signers[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.signers: object expected"); + message.signers[i] = $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.fromObject(object.signers[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GroupActionSigners message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + * @static + * @param {org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} message GroupActionSigners + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GroupActionSigners.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signers = []; + if (message.signers && message.signers.length) { + object.signers = []; + for (var j = 0; j < message.signers.length; ++j) + object.signers[j] = $root.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.toObject(message.signers[j], options); + } + return object; + }; + + /** + * Converts this GroupActionSigners to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners + * @instance + * @returns {Object.} JSON object + */ + GroupActionSigners.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GroupActionSigners; + })(); + + return GetGroupActionSignersResponseV0; + })(); + + return GetGroupActionSignersResponse; + })(); + return v0; })(); 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 ca80ce2ad7..32492c8ade 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js @@ -139,6 +139,69 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlock 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.GetGroupActionSignersRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.TypeCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.TypeCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.EventTypeCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.TypeCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.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.VersionCase', null, { proto }); @@ -158,6 +221,25 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResp goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase', null, { proto }); @@ -209,6 +291,25 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse', null, { goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetPathElementsRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase', null, { proto }); @@ -231,6 +332,9 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsReq goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase', null, { proto }); @@ -273,6 +377,23 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusRe goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase', null, { proto }); @@ -1652,6 +1773,69 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest'; } +/** + * 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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest'; +} +/** + * 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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest'; +} +/** + * 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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -4256,382 +4440,19185 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0'; } - - - -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.GetIdentityTokenBalancesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest'; +} /** - * 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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.repeatedFields_, null); }; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0'; } - - /** - * 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.GetIdentityTokenBalancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse'; +} /** - * 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} + * 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.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; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0'; +} /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * 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.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry'; +} /** - * 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 + * 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.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 - ); - } +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.repeatedFields_, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances'; +} /** - * optional bytes grovedb_proof = 1; - * @return {string} + * 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.getGrovedbProof = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest'; +} /** - * optional bytes grovedb_proof = 1; - * This is a type-conversion wrapper around `getGrovedbProof()` - * @return {string} + * 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.getGrovedbProof_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getGrovedbProof())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.repeatedFields_, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0'; +} /** - * 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} + * 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.getGrovedbProof_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getGrovedbProof())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse'; +} /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * 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.setGrovedbProof = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0'; +} /** - * optional bytes quorum_hash = 2; - * @return {string} + * 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.getQuorumHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry'; +} /** - * optional bytes quorum_hash = 2; - * This is a type-conversion wrapper around `getQuorumHash()` - * @return {string} + * 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.getQuorumHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getQuorumHash())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.repeatedFields_, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances'; +} /** - * 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} + * 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.getQuorumHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getQuorumHash())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest'; +} /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * 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.setQuorumHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.repeatedFields_, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0'; +} /** - * optional bytes signature = 3; - * @return {string} + * 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.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse'; +} /** - * optional bytes signature = 3; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} + * 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.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0'; +} /** - * 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} - */ + * 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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry'; +} +/** + * 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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry'; +} +/** + * 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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos'; +} +/** + * 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.GetIdentitiesTokenInfosRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest'; +} +/** + * 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.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0'; +} +/** + * 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.GetIdentitiesTokenInfosResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse'; +} +/** + * 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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0'; +} +/** + * 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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry'; +} +/** + * 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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry'; +} +/** + * 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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos'; +} +/** + * 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.GetTokenStatusesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest'; +} +/** + * 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.GetTokenStatusesRequest.GetTokenStatusesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0'; +} +/** + * 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.GetTokenStatusesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse'; +} +/** + * 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.GetTokenStatusesResponse.GetTokenStatusesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0'; +} +/** + * 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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry'; +} +/** + * 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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses'; +} +/** + * 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.GetTokenTotalSupplyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest'; +} +/** + * 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.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0'; +} +/** + * 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.GetTokenTotalSupplyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse'; +} +/** + * 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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0'; +} +/** + * 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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry'; +} +/** + * 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.GetGroupInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoRequest'; +} +/** + * 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.GetGroupInfoRequest.GetGroupInfoRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0'; +} +/** + * 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.GetGroupInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoResponse'; +} +/** + * 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.GetGroupInfoResponse.GetGroupInfoResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0'; +} +/** + * 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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry'; +} +/** + * 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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry'; +} +/** + * 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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo'; +} +/** + * 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.GetGroupInfosRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosRequest'; +} +/** + * 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.GetGroupInfosRequest.StartAtGroupContractPosition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition'; +} +/** + * 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.GetGroupInfosRequest.GetGroupInfosRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0'; +} +/** + * 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.GetGroupInfosResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosResponse'; +} +/** + * 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.GetGroupInfosResponse.GetGroupInfosResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0'; +} +/** + * 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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry'; +} +/** + * 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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry'; +} +/** + * 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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos'; +} +/** + * 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.GetGroupActionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsRequest'; +} +/** + * 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.GetGroupActionsRequest.StartAtActionId = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId'; +} +/** + * 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.GetGroupActionsRequest.GetGroupActionsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0'; +} +/** + * 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.GetGroupActionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions'; +} +/** + * 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.GetGroupActionSignersRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest'; +} +/** + * 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.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0'; +} +/** + * 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.GetGroupActionSignersResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse'; +} +/** + * 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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0'; +} +/** + * 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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner'; +} +/** + * 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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners'; +} + + + +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())); + 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.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; + } + 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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequestV0} 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) { + 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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetIdentityBalanceAndRevisionRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + */ +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)); +}; + + +/** + * @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); +}; + + +/** + * 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); +}; + + +/** + * 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; +}; + + + +/** + * 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.GetIdentityResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +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])); +}; + + + +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.GetIdentityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityResponse.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.GetIdentityResponse} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.GetIdentityResponse} + */ +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.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.GetIdentityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.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.GetIdentityResponse.GetIdentityResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.GetIdentityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityResponse.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} 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) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITY: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase} + */ +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. + * 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.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.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.GetIdentityResponse.GetIdentityResponseV0.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) + }; + + 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.GetIdentityResponse.GetIdentityResponseV0} + */ +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.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.GetIdentityResponse.GetIdentityResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.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); + 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.GetIdentityResponse.GetIdentityResponseV0.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; +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +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 {?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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.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)); +}; + + +/** + * @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); +}; + + +/** + * 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.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentityResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} + */ +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)); +}; + + +/** + * @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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.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.GetIdentityNonceResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +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])); +}; + + + +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.GetIdentityNonceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.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.GetIdentityNonceResponse} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.GetIdentityNonceResponse} + */ +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.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.GetIdentityNonceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} + */ +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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.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.GetIdentityNonceResponse} 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) { + 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 +}; + +/** + * @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])); +}; + + + +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.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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) + }; + + 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.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + */ +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.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0} 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) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 identity_nonce = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getIdentityNonce = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + */ +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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + */ +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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasIdentityNonce = 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.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)); +}; + + +/** + * @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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * 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; +}; + + +/** + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + */ +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)); +}; + + +/** + * @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.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentityNonceResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + */ +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.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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.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.GetIdentityContractNonceResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase} + */ +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])); +}; + + + +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.GetIdentityContractNonceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.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.GetIdentityContractNonceResponse} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse} + */ +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.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.GetIdentityContractNonceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.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.GetIdentityContractNonceResponse} 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) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + 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) { +/** + * 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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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) + }; + + 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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + */ +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.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.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); + 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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} 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) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 identity_contract_nonce = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getIdentityContractNonce = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + */ +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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + */ +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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasIdentityContractNonce = 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.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.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)); +}; + + +/** + * @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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * 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.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.GetIdentityContractNonceResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.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.GetIdentityBalanceResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.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])); +}; + + + +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.GetIdentityBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.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.GetIdentityBalanceResponse} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse} + */ +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.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.GetIdentityBalanceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.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.GetIdentityBalanceResponse} 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) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + 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) { +/** + * 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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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) + }; + + 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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + */ +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.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.setBalance(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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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 + ); + } +}; + + +/** + * optional uint64 balance = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} 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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} 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); +}; + + +/** + * 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; +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +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); +}; + + +/** + * 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.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.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); +}; + + +/** + * 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.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); +}; + + +/** + * 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.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; +}; +} + + +/** + * 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.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); +}; + + +/** + * 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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +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(); +}; + + +/** + * 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.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 + ); + } +}; + + + +/** + * 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.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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])); +}; + + + +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.GetIdentityBalanceAndRevisionResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + 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) { + 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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + */ +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.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} 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) { + var f = undefined; + f = message.getBalanceAndRevision(); + if (f != null) { + writer.writeMessage( + 1, + f, + 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 + ); + } +}; + + + + + +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.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.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.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.toObject = function(includeInstance, msg) { + var f, obj = { + balance: jspb.Message.getFieldWithDefault(msg, 1, 0), + revision: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} + */ +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.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.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.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.setBalance(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevision(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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} 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) { + var f = undefined; + f = message.getBalance(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getRevision(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 balance = 1; + * @return {number} + */ +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 uint64 revision = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.getRevision = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 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.setRevision = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional BalanceAndRevision balance_and_revision = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} + */ +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)); +}; + + +/** + * @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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearBalanceAndRevision = function() { + return this.setBalanceAndRevision(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasBalanceAndRevision = 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.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.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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.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)); +}; + + +/** + * @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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentityBalanceAndRevisionResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + */ +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)); +}; + + +/** + * @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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.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.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])); +}; + + + +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.KeyRequestType.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.KeyRequestType.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.KeyRequestType} 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) { + 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) + }; + + 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.KeyRequestType} + */ +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.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.KeyRequestType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} + */ +proto.org.dash.platform.dapi.v0.KeyRequestType.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.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); + 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.KeyRequestType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.KeyRequestType.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 + */ +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 + ); + } +}; + + +/** + * optional AllKeys all_keys = 1; + * @return {?proto.org.dash.platform.dapi.v0.AllKeys} + */ +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)); +}; + + +/** + * @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.KeyRequestType.prototype.clearAllKeys = function() { + return this.setAllKeys(undefined); +}; + + +/** + * 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; +}; + + +/** + * optional SpecificKeys specific_keys = 2; + * @return {?proto.org.dash.platform.dapi.v0.SpecificKeys} + */ +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)); +}; + + +/** + * @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.KeyRequestType.prototype.clearSpecificKeys = function() { + return this.setSpecificKeys(undefined); +}; + + +/** + * 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; +}; + + +/** + * optional SearchKey search_key = 3; + * @return {?proto.org.dash.platform.dapi.v0.SearchKey} + */ +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.SearchKey|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} 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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + */ +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSearchKey = function() { + return this.setSearchKey(undefined); +}; + + +/** + * 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; +}; + + + + + +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.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(); +}; + + +/** + * 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.AllKeys.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.SpecificKeys.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.SpecificKeys.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.SpecificKeys} 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) { + var f, obj = { + keyIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.SpecificKeys} + */ +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.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.SpecificKeys} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} + */ +proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + 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]); + } + 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.SpecificKeys.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.SpecificKeys.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.SpecificKeys} 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) { + var f = undefined; + f = message.getKeyIdsList(); + if (f.length > 0) { + writer.writePackedUint32( + 1, + 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)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this + */ +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.setKeyIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this + */ +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.addKeyIds = 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.SpecificKeys} returns this + */ +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. + * 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.SearchKey.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.SearchKey.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.SearchKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.SearchKey} + */ +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); +}; + + +/** + * 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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +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(); +}; + + +/** + * 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.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); + } +}; + + +/** + * 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 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.SearchKey.prototype.clearPurposeMapMap = function() { + this.getPurposeMapMap().clear(); + return this;}; + + + + + +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.SecurityLevelMap.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.SecurityLevelMap.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.SecurityLevelMap} 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) { + var f, obj = { + securityLevelMapMap: (f = msg.getSecurityLevelMapMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + 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.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); +}; + + +/** + * 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.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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +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(); +}; + + +/** + * 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.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); + } +}; + + +/** + * @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 + * 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.GetIdentityKeysRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase} + */ +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])); +}; + + + +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.GetIdentityKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.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.GetIdentityKeysRequest} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.GetIdentityKeysRequest} + */ +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.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.GetIdentityKeysRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.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.GetIdentityKeysRequest.GetIdentityKeysRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.GetIdentityKeysRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.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.GetIdentityKeysRequest} 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) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.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.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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) + }; + + 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.GetIdentityKeysRequest.GetIdentityKeysRequestV0} + */ +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.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.GetIdentityKeysRequest.GetIdentityKeysRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.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); + 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.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.GetIdentityKeysRequest.GetIdentityKeysRequestV0} 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) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getRequestType(); + if (f != null) { + writer.writeMessage( + 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 + ); + } +}; + + +/** + * 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} + */ +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.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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.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.GetIdentityKeysResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @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) { +/** + * 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.GetIdentityKeysResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.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.GetIdentityKeysResponse} 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) { + 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; +}; +} + + +/** + * 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.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); +}; + + +/** + * 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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +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(); +}; + + +/** + * 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.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 + ); + } +}; + + + +/** + * 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.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + KEYS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase} + */ +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])); +}; + + + +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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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) + }; + + 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.GetIdentityKeysResponse.GetIdentityKeysResponseV0} + */ +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.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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); + 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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0} 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) { + var f = undefined; + 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( + 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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.toObject = function(includeInstance, msg) { + var f, obj = { + 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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} + */ +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.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.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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.addKeysBytes(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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} 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) { + var f = undefined; + f = message.getKeysBytesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes keys_bytes = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes keys_bytes = 1; + * This is a type-conversion wrapper around `getKeysBytesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getKeysBytesList())); +}; + + +/** + * 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.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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasKeys = 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.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)); +}; + + +/** + * @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); +}; + + +/** + * 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.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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.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)); +}; + + +/** + * @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); +}; + + +/** + * 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.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * 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; +}; + + +/** + * optional GetIdentityKeysResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} + */ +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.GetIdentityKeysResponse.GetIdentityKeysResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} 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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.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.GetIdentitiesContractKeysRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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])); +}; + + + +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.GetIdentitiesContractKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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.GetIdentitiesContractKeysRequest} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.GetIdentitiesContractKeysRequest} + */ +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.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.GetIdentitiesContractKeysRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.GetIdentitiesContractKeysRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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} 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) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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) { +/** + * 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.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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) + }; + + 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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + */ +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.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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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; + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * 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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string document_type_name = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getDocumentTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearDocumentTypeName = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.hasDocumentTypeName = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated KeyPurpose purposes = 4; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getPurposesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @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.KeyPurpose} 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.addPurposes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, 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.clearPurposesList = function() { + return this.setPurposesList([]); +}; + + +/** + * optional bool prove = 5; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional GetIdentitiesContractKeysRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + */ +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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} 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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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.GetIdentitiesContractKeysResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.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])); +}; + + + +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.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.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} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.GetIdentitiesContractKeysResponse} + */ +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.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.GetIdentitiesContractKeysResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.GetIdentitiesContractKeysResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.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} 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) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITIES_KEYS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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])); +}; + + + +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.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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} 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) { + var f, obj = { + 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) + }; + + 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} + */ +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.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.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; + 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; + 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.PurposeKeys.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.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.PurposeKeys} 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) { + var f = undefined; + f = message.getPurpose(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getKeysBytesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } +}; + + +/** + * 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) { +/** + * 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); +}; + + +/** + * 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; +}; +} + + +/** + * 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.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); +}; + + +/** + * 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.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 bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * repeated PurposeKeys keys = 2; + * @return {!Array} + */ +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 {!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 {!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.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); +}; + + +/** + * 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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.clearKeysList = function() { + return this.setKeysList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.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.IdentitiesKeys} 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) { + var f, obj = { + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} + */ +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.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.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + 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.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasIdentitiesKeys = 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.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.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} 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); +}; + + +/** + * 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.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.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.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this +*/ +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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentitiesContractKeysResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} + */ +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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} 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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +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) { +/** + * 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.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.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.GetEvonodesProposedEpochBlocksByIdsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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) { + 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.GetEvonodesProposedEpochBlocksByIdsRequest} + */ +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.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.GetEvonodesProposedEpochBlocksByIdsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} + */ +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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.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.GetEvonodesProposedEpochBlocksByIdsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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 + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.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.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), + idsList: msg.getIdsList_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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} + */ +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.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.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.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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + 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 + ); + } +}; + + +/** + * 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.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.clearEpoch = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.hasEpoch = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * 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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + */ +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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.clearIdsList = function() { + return this.setIdsList([]); +}; + + +/** + * optional bool prove = 3; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional GetEvonodesProposedEpochBlocksByIdsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} + */ +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)); +}; + + +/** + * @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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.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.GetEvonodesProposedEpochBlocksResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +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])); +}; + + + +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.GetEvonodesProposedEpochBlocksResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.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.GetEvonodesProposedEpochBlocksResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse} + */ +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.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.GetEvonodesProposedEpochBlocksResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.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.GetEvonodesProposedEpochBlocksResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.ResultCase} + */ +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])); +}; + + + +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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + 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) { + 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} + */ +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.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + 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( + 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.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.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject = function(includeInstance, msg) { + var f, obj = { + proTxHash: msg.getProTxHash_asB64(), + count: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} + */ +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.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.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.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.setProTxHash(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProTxHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getCount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes pro_tx_hash = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * 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())); +}; + + +/** + * 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProTxHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.setProTxHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 count = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.toObject = function(includeInstance, msg) { + var f, obj = { + evonodesProposedBlockCountsList: jspb.Message.toObjectList(msg.getEvonodesProposedBlockCountsList(), + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} + */ +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.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.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinaryFromReader); + msg.addEvonodesProposedBlockCounts(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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvonodesProposedBlockCountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + 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 + * 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.GetEvonodesProposedEpochBlocksByRangeRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase} + */ +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])); +}; + + + +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.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.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.GetEvonodesProposedEpochBlocksByRangeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.GetEvonodesProposedEpochBlocksByRangeRequest} + */ +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.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.GetEvonodesProposedEpochBlocksByRangeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} + */ +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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.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.GetEvonodesProposedEpochBlocksByRangeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.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])); +}; + + + +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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + 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) { + 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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} + */ +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.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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.setEpoch(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLimit(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + 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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + 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 + ); + } +}; + + +/** + * optional uint32 epoch = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setEpoch = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearEpoch = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasEpoch = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 limit = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearLimit = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasLimit = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes start_after = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * 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())); +}; + + +/** + * 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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartAfter())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +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); +}; + + +/** + * 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; +}; + + +/** + * optional bytes start_at = 4; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes start_at = 4; + * This is a type-conversion wrapper around `getStartAt()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartAt())); +}; + + +/** + * 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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartAt())); +}; + + +/** + * @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 field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +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 GetEvonodesProposedEpochBlocksByRangeRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} + */ +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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} returns this +*/ +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.GetEvonodesProposedEpochBlocksByRangeRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.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.GetIdentitiesBalancesRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase} + */ +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])); +}; + + + +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.GetIdentitiesBalancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.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.GetIdentitiesBalancesRequest} + */ +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.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.GetIdentitiesBalancesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.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.GetIdentitiesBalancesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.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.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + idsList: msg.getIdsList_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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} + */ +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.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.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.addIds(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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * repeated bytes ids = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes ids = 1; + * This is a type-conversion wrapper around `getIdsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdsList())); +}; + + +/** + * repeated bytes ids = 1; + * 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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.setIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.addIds = 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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.clearIdsList = function() { + return this.setIdsList([]); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetIdentitiesBalancesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} + */ +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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} returns this +*/ +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.GetIdentitiesBalancesRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase} + */ +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])); +}; + + + +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.GetIdentitiesBalancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesBalancesResponse} + */ +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.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.GetIdentitiesBalancesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesBalancesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITIES_BALANCES: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase} + */ +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])); +}; + + + +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + 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) + }; + + 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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} + */ +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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentitiesBalances(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + balance: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} + */ +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.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.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 {number} */ (reader.readUint64()); + msg.setBalance(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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 balance = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.clearBalance = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.hasBalance = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.toObject = function(includeInstance, msg) { + var f, obj = { + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} + */ +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.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentityBalance entries = 1; + * @return {!Array} + */ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} returns this +*/ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} + */ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + +/** + * optional IdentitiesBalances identities_balances = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} + */ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this +*/ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearIdentitiesBalances = function() { + return this.setIdentitiesBalances(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasIdentitiesBalances = 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.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)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this +*/ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.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)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this +*/ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentitiesBalancesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} + */ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} returns this +*/ +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.GetIdentitiesBalancesResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetProofsRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetProofsRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProofsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.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.GetProofsRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest.GetProofsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.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.GetProofsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.repeatedFields_ = [1,2,3,4,5,6,7]; + + + +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.GetProofsRequest.GetProofsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.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.GetProofsRequest.GetProofsRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + identitiesList: jspb.Message.toObjectList(msg.getIdentitiesList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.toObject, includeInstance), + contractsList: jspb.Message.toObjectList(msg.getContractsList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.toObject, includeInstance), + documentsList: jspb.Message.toObjectList(msg.getDocumentsList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.toObject, includeInstance), + votesList: jspb.Message.toObjectList(msg.getVotesList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.toObject, includeInstance), + identityTokenBalancesList: jspb.Message.toObjectList(msg.getIdentityTokenBalancesList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.toObject, includeInstance), + identityTokenInfosList: jspb.Message.toObjectList(msg.getIdentityTokenInfosList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.toObject, includeInstance), + tokenStatusesList: jspb.Message.toObjectList(msg.getTokenStatusesList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.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.GetProofsRequest.GetProofsRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.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.GetProofsRequest.GetProofsRequestV0.IdentityRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.deserializeBinaryFromReader); + msg.addIdentities(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.deserializeBinaryFromReader); + msg.addContracts(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.deserializeBinaryFromReader); + msg.addDocuments(value); + break; + case 4: + var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.deserializeBinaryFromReader); + msg.addVotes(value); + break; + case 5: + var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.deserializeBinaryFromReader); + msg.addIdentityTokenBalances(value); + break; + case 6: + var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.deserializeBinaryFromReader); + msg.addIdentityTokenInfos(value); + break; + case 7: + var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.deserializeBinaryFromReader); + msg.addTokenStatuses(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.GetProofsRequest.GetProofsRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.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.GetProofsRequest.GetProofsRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentitiesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.serializeBinaryToWriter + ); + } + f = message.getContractsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.serializeBinaryToWriter + ); + } + f = message.getDocumentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.serializeBinaryToWriter + ); + } + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.serializeBinaryToWriter + ); + } + f = message.getIdentityTokenBalancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.serializeBinaryToWriter + ); + } + f = message.getIdentityTokenInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.serializeBinaryToWriter + ); + } + f = message.getTokenStatusesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.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.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.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.GetProofsRequest.GetProofsRequestV0.DocumentRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.toObject = function(includeInstance, msg) { + var f, obj = { + contractId: msg.getContractId_asB64(), + documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + documentTypeKeepsHistory: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + documentId: msg.getDocumentId_asB64(), + documentContestedStatus: jspb.Message.getFieldWithDefault(msg, 5, 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.GetProofsRequest.GetProofsRequestV0.DocumentRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.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.GetProofsRequest.GetProofsRequestV0.DocumentRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.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.setContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentType(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDocumentTypeKeepsHistory(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDocumentId(value); + break; + case 5: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} */ (reader.readEnum()); + msg.setDocumentContestedStatus(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.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.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.GetProofsRequest.GetProofsRequestV0.DocumentRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDocumentTypeKeepsHistory(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getDocumentId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getDocumentContestedStatus(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus = { + NOT_CONTESTED: 0, + MAYBE_CONTESTED: 1, + CONTESTED: 2 +}; + +/** + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string document_type = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool document_type_keeps_history = 3; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentTypeKeepsHistory = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentTypeKeepsHistory = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional bytes document_id = 4; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes document_id = 4; + * This is a type-conversion wrapper around `getDocumentId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDocumentId())); +}; + + +/** + * optional bytes document_id = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDocumentId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDocumentId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentId = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional DocumentContestedStatus document_contested_status = 5; + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentContestedStatus = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentContestedStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 5, 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.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + requestType: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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 {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} */ (reader.readEnum()); + msg.setRequestType(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.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getRequestType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type = { + FULL_IDENTITY: 0, + BALANCE: 1, + KEYS: 2, + REVISION: 3 +}; + +/** + * optional bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional Type request_type = 2; + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.getRequestType = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.setRequestType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, 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.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.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.GetProofsRequest.GetProofsRequestV0.ContractRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.toObject = function(includeInstance, msg) { + var f, obj = { + contractId: msg.getContractId_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.GetProofsRequest.GetProofsRequestV0.ContractRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.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.GetProofsRequest.GetProofsRequestV0.ContractRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.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.setContractId(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.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.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.GetProofsRequest.GetProofsRequestV0.ContractRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.setContractId = 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 + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase = { + REQUEST_TYPE_NOT_SET: 0, + CONTESTED_RESOURCE_VOTE_STATUS_REQUEST: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.getRequestTypeCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + contestedResourceVoteStatusRequest: (f = msg.getContestedResourceVoteStatusRequest()) && proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.deserializeBinaryFromReader); + msg.setContestedResourceVoteStatusRequest(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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContestedResourceVoteStatusRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.repeatedFields_ = [4]; + + + +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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + contractId: msg.getContractId_asB64(), + documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), + indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), + indexValuesList: msg.getIndexValuesList_asB64(), + voterIdentifier: msg.getVoterIdentifier_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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.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.setContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentTypeName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setIndexName(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIndexValues(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setVoterIdentifier(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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentTypeName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIndexName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getIndexValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } + f = message.getVoterIdentifier_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string document_type_name = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getDocumentTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setDocumentTypeName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string index_name = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setIndexName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated bytes index_values = 4; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * repeated bytes index_values = 4; + * This is a type-conversion wrapper around `getIndexValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexValuesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIndexValuesList())); +}; + + +/** + * repeated bytes index_values = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIndexValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexValuesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIndexValuesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setIndexValuesList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.addIndexValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.clearIndexValuesList = function() { + return this.setIndexValuesList([]); +}; + + +/** + * optional bytes voter_identifier = 5; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getVoterIdentifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes voter_identifier = 5; + * This is a type-conversion wrapper around `getVoterIdentifier()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getVoterIdentifier_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getVoterIdentifier())); +}; + + +/** + * optional bytes voter_identifier = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getVoterIdentifier()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getVoterIdentifier_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getVoterIdentifier())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setVoterIdentifier = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional ContestedResourceVoteStatusRequest contested_resource_vote_status_request = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.getContestedResourceVoteStatusRequest = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.setContestedResourceVoteStatusRequest = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.clearContestedResourceVoteStatusRequest = function() { + return this.setContestedResourceVoteStatusRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.hasContestedResourceVoteStatusRequest = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tokenId: msg.getTokenId_asB64(), + identityId: msg.getIdentityId_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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.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.setTokenId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setIdentityId(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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes token_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes identity_id = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes identity_id = 2; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); +}; + + +/** + * optional bytes identity_id = 2; + * 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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, 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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tokenId: msg.getTokenId_asB64(), + identityId: msg.getIdentityId_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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.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.setTokenId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setIdentityId(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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes token_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes identity_id = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes identity_id = 2; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); +}; + + +/** + * optional bytes identity_id = 2; + * 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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, 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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tokenId: msg.getTokenId_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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.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.setTokenId(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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes token_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * repeated IdentityRequest identities = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getIdentitiesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setIdentitiesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addIdentities = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearIdentitiesList = function() { + return this.setIdentitiesList([]); +}; + + +/** + * repeated ContractRequest contracts = 2; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getContractsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setContractsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addContracts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearContractsList = function() { + return this.setContractsList([]); +}; + + +/** + * repeated DocumentRequest documents = 3; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getDocumentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setDocumentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addDocuments = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearDocumentsList = function() { + return this.setDocumentsList([]); +}; + + +/** + * repeated VoteStatusRequest votes = 4; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearVotesList = function() { + return this.setVotesList([]); +}; + + +/** + * repeated IdentityTokenBalanceRequest identity_token_balances = 5; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getIdentityTokenBalancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setIdentityTokenBalancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addIdentityTokenBalances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearIdentityTokenBalancesList = function() { + return this.setIdentityTokenBalancesList([]); +}; + + +/** + * repeated IdentityTokenInfoRequest identity_token_infos = 6; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getIdentityTokenInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setIdentityTokenInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addIdentityTokenInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearIdentityTokenInfosList = function() { + return this.setIdentityTokenInfosList([]); +}; + + +/** + * repeated TokenStatusRequest token_statuses = 7; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getTokenStatusesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setTokenStatusesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addTokenStatuses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearTokenStatusesList = function() { + return this.setTokenStatusesList([]); +}; + + +/** + * optional GetProofsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetProofsResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProofsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetProofsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetProofsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsResponse; + return proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetProofsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetProofsResponse.GetProofsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetProofsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.GetProofsResponseV0.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + PROOF: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.GetProofsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.GetProofsResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0; + return proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.GetProofsResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.Proof; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + case 2: + 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.GetProofsResponse.GetProofsResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.GetProofsResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Proof proof = 1; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ResponseMetadata metadata = 2; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional GetProofsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetDataContractRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractRequest; + return proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest.GetDataContractRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0; + return proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetDataContractRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractResponse; + return proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse.GetDataContractResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + DATA_CONTRACT: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + dataContract: msg.getDataContract_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) { + 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.GetDataContractResponse.GetDataContractResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0; + return proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.setDataContract(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.GetDataContractResponse.GetDataContractResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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 data_contract = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getDataContract = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data_contract = 1; + * This is a type-conversion wrapper around `getDataContract()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getDataContract_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataContract())); +}; + + +/** + * optional bytes data_contract = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataContract()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getDataContract_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDataContract())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.setDataContract = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.clearDataContract = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.hasDataContract = 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.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetDataContractResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractsRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractsRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.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.GetDataContractsRequest} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsRequest; + return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest.GetDataContractsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.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.GetDataContractsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.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.GetDataContractsRequest.GetDataContractsRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + idsList: msg.getIdsList_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.GetDataContractsRequest.GetDataContractsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0; + return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.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.GetDataContractsRequest.GetDataContractsRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.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.addIds(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.GetDataContractsRequest.GetDataContractsRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.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.GetDataContractsRequest.GetDataContractsRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * repeated bytes ids = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes ids = 1; + * This is a type-conversion wrapper around `getIdsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdsList())); +}; + + +/** + * repeated bytes ids = 1; + * 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.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.setIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.addIds = 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.GetDataContractsRequest.GetDataContractsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.clearIdsList = function() { + return this.setIdsList([]); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetDataContractsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse; + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractsResponse.GetDataContractsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.DataContractEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.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.GetDataContractsResponse.DataContractEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.toObject = function(includeInstance, msg) { + var f, obj = { + identifier: msg.getIdentifier_asB64(), + dataContract: (f = msg.getDataContract()) && google_protobuf_wrappers_pb.BytesValue.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.GetDataContractsResponse.DataContractEntry} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry; + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.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.GetDataContractsResponse.DataContractEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.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.setIdentifier(value); + break; + case 2: + var value = new google_protobuf_wrappers_pb.BytesValue; + reader.readMessage(value,google_protobuf_wrappers_pb.BytesValue.deserializeBinaryFromReader); + msg.setDataContract(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.GetDataContractsResponse.DataContractEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.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.GetDataContractsResponse.DataContractEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentifier_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDataContract(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_wrappers_pb.BytesValue.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes identifier = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getIdentifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes identifier = 1; + * This is a type-conversion wrapper around `getIdentifier()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getIdentifier_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentifier())); +}; + + +/** + * optional bytes identifier = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentifier()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getIdentifier_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentifier())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.setIdentifier = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional google.protobuf.BytesValue data_contract = 2; + * @return {?proto.google.protobuf.BytesValue} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getDataContract = function() { + return /** @type{?proto.google.protobuf.BytesValue} */ ( + jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BytesValue, 2)); +}; + + +/** + * @param {?proto.google.protobuf.BytesValue|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.setDataContract = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.clearDataContract = function() { + return this.setDataContract(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.hasDataContract = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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.GetDataContractsResponse.DataContracts} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.toObject = function(includeInstance, msg) { + var f, obj = { + dataContractEntriesList: jspb.Message.toObjectList(msg.getDataContractEntriesList(), + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts; + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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.GetDataContractsResponse.DataContracts} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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.GetDataContractsResponse.DataContractEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deserializeBinaryFromReader); + msg.addDataContractEntries(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.GetDataContractsResponse.DataContracts.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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.GetDataContractsResponse.DataContracts} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataContractEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DataContractEntry data_contract_entries = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.getDataContractEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.setDataContractEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.addDataContractEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.clearDataContractEntriesList = function() { + return this.setDataContractEntriesList([]); +}; + + + +/** + * 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.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + DATA_CONTRACTS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + dataContracts: (f = msg.getDataContracts()) && proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.toObject(includeInstance, f), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0; + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.DataContracts; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deserializeBinaryFromReader); + msg.setDataContracts(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.GetDataContractsResponse.GetDataContractsResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataContracts(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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 + ); + } +}; + + +/** + * optional DataContracts data_contracts = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.getDataContracts = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.setDataContracts = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.clearDataContracts = function() { + return this.setDataContracts(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.hasDataContracts = 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.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetDataContractsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractHistoryRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.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.GetDataContractHistoryRequest} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest; + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional uint32 round = 4; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -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.GetDataContractHistoryRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.serializeBinaryToWriter + ); + } }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} 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.Proof.prototype.setRound = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.toObject(opt_includeInstance, this); }; /** - * optional bytes block_id_hash = 5; + * 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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + limit: (f = msg.getLimit()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + offset: (f = msg.getOffset()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + startAtMs: jspb.Message.getFieldWithDefault(msg, 4, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0; + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.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 = new google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setLimit(value); + break; + case 3: + var value = new google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setOffset(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartAtMs(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getLimit(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter + ); + } + f = message.getOffset(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter + ); + } + f = message.getStartAtMs(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional bytes id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes block_id_hash = 5; - * This is a type-conversion wrapper around `getBlockIdHash()` + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockIdHash())); + this.getId())); }; /** - * optional bytes block_id_hash = 5; + * 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 `getBlockIdHash()` + * This is a type-conversion wrapper around `getId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBlockIdHash())); + this.getId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setBlockIdHash = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional google.protobuf.UInt32Value limit = 2; + * @return {?proto.google.protobuf.UInt32Value} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getLimit = function() { + return /** @type{?proto.google.protobuf.UInt32Value} */ ( + jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 2)); +}; + + +/** + * @param {?proto.google.protobuf.UInt32Value|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.clearLimit = function() { + return this.setLimit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.hasLimit = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.UInt32Value offset = 3; + * @return {?proto.google.protobuf.UInt32Value} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getOffset = 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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setOffset = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.clearOffset = function() { + return this.setOffset(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.hasOffset = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 start_at_ms = 4; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getStartAtMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setStartAtMs = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bool prove = 5; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional GetDataContractHistoryRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.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.GetDataContractHistoryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.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.GetDataContractHistoryResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse; + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.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.GetDataContractHistoryResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.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.GetDataContractHistoryResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.serializeBinaryToWriter + ); + } }; + /** - * 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_ = [[1,2]]; /** - * @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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + DATA_CONTRACT_HISTORY: 1, + PROOF: 2 }; - +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_[0])); +}; @@ -4648,8 +23635,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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.toObject(opt_includeInstance, this); }; @@ -4658,18 +23645,15 @@ 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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, "") + dataContractHistory: (f = msg.getDataContractHistory()) && proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.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) { @@ -4683,23 +23667,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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0; + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4707,28 +23691,19 @@ 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); + var value = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.deserializeBinaryFromReader); + msg.setDataContractHistory(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCoreChainLockedHeight(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 {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.ResponseMetadata; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); break; default: reader.skipField(); @@ -4743,9 +23718,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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4753,166 +23728,231 @@ 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeUint64( + f = message.getDataContractHistory(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.serializeBinaryToWriter ); } - f = message.getCoreChainLockedHeight(); - if (f !== 0) { - writer.writeUint32( + f = message.getProof(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter ); } - f = message.getEpoch(); - if (f !== 0) { - writer.writeUint32( + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( 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.ResponseMetadata.serializeBinaryToWriter ); } }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional uint64 height = 1; - * @return {number} + * 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.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.toObject(opt_includeInstance, this); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.toObject = function(includeInstance, msg) { + var f, obj = { + date: jspb.Message.getFieldWithDefault(msg, 1, 0), + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint32 core_chain_locked_height = 2; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getCoreChainLockedHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry; + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setCoreChainLockedHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.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.setDate(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint32 epoch = 3; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getEpoch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setEpoch = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDate(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } }; /** - * optional uint64 time_ms = 4; + * optional uint64 date = 1; * @return {number} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getTimeMs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getDate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} returns this */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setTimeMs = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.setDate = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional uint32 protocol_version = 5; - * @return {number} + * optional bytes value = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getProtocolVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + * optional bytes value = 2; + * This is a type-conversion wrapper around `getValue()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setProtocolVersion = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); }; /** - * optional string chain_id = 6; - * @return {string} + * optional bytes value = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getChainId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} returns this */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setChainId = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4928,8 +23968,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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.toObject(opt_includeInstance, this); }; @@ -4938,15 +23978,14 @@ 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - data: msg.getData_asB64() + dataContractEntriesList: jspb.Message.toObjectList(msg.getDataContractEntriesList(), + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.toObject, includeInstance) }; if (includeInstance) { @@ -4960,23 +23999,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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory; + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4984,16 +24023,9 @@ 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); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); + var value = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinaryFromReader); + msg.addDataContractEntries(value); break; default: reader.skipField(); @@ -5005,130 +24037,250 @@ 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() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataContractEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DataContractHistoryEntry data_contract_entries = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.getDataContractEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.setDataContractEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.addDataContractEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.clearDataContractEntriesList = function() { + return this.setDataContractEntriesList([]); +}; + + +/** + * optional DataContractHistory data_contract_history = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.getDataContractHistory = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.setDataContractHistory = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.clearDataContractHistory = function() { + return this.setDataContractHistory(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.hasDataContractHistory = 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * 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 + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this */ -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 - ); - } +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * optional uint32 code = 1; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + * optional GetDataContractHistoryResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0, 1)); }; /** - * 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 {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.oneofGroups_[0], value); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} 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.GetDataContractHistoryResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * optional bytes data = 3; - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional bytes data = 3; - * This is a type-conversion wrapper around `getData()` - * @return {string} + * 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.StateTransitionBroadcastError.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_ = [[1]]; /** - * 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} + * @enum {number} */ -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.GetDocumentsRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; - /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -5142,8 +24294,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.toObject(opt_includeInstance, this); }; @@ -5152,13 +24304,13 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.BroadcastStateTransitionRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} 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) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.toObject = function(includeInstance, msg) { var f, obj = { - stateTransition: msg.getStateTransition_asB64() + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -5172,23 +24324,23 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.toObject = funct /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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 {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5196,8 +24348,9 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinar var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStateTransition(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -5212,9 +24365,9 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinar * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5222,67 +24375,52 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.BroadcastStateTransitionRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} 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) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStateTransition_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getV0(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter ); } }; -/** - * 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} + * 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_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStateTransition())); -}; - +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_ = [[6,7]]; /** - * 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} + * @enum {number} */ -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.GetDocumentsRequest.GetDocumentsRequestV0.StartCase = { + START_NOT_SET: 0, + START_AFTER: 6, + START_AT: 7 }; - /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} returns this + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.setStateTransition = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -5296,8 +24434,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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject(opt_includeInstance, this); }; @@ -5306,13 +24444,20 @@ 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.GetDocumentsRequest.GetDocumentsRequestV0} 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.GetDocumentsRequest.GetDocumentsRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - + dataContractId: msg.getDataContractId_asB64(), + documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + where: msg.getWhere_asB64(), + orderBy: msg.getOrderBy_asB64(), + limit: jspb.Message.getFieldWithDefault(msg, 5, 0), + startAfter: msg.getStartAfter_asB64(), + startAt: msg.getStartAt_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) }; if (includeInstance) { @@ -5326,29 +24471,61 @@ 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.GetDocumentsRequest.GetDocumentsRequestV0} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.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.GetDocumentsRequest.GetDocumentsRequestV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.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.GetDocumentsRequest.GetDocumentsRequestV0} 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.GetDocumentsRequest.GetDocumentsRequestV0} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDataContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentType(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWhere(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOrderBy(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLimit(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartAfter(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartAt(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; default: reader.skipField(); break; @@ -5362,9 +24539,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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5372,514 +24549,433 @@ 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.GetDocumentsRequest.GetDocumentsRequestV0} 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.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getDataContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWhere_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getOrderBy_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 8, + f + ); + } }; - /** - * 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 bytes data_contract_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + /** - * @enum {number} + * optional bytes data_contract_id = 1; + * This is a type-conversion wrapper around `getDataContractId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataContractId())); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase} + * optional bytes data_contract_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataContractId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDataContractId())); }; - -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} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setDataContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, 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.GetIdentityRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional string document_type = 2; + * @return {string} */ -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; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDocumentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setDocumentType = function(value) { + return jspb.Message.setProto3StringField(this, 2, 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} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} + * optional bytes where = 3; + * @return {string} */ -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; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getWhere = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bytes where = 3; + * This is a type-conversion wrapper around `getWhere()` + * @return {string} */ -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(); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getWhere_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getWhere())); }; /** - * 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 + * optional bytes where = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getWhere()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.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 - ); - } +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getWhere_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getWhere())); }; - - - -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); + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setWhere = function(value) { + return jspb.Message.setProto3BytesField(this, 3, 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.GetIdentityRequest.GetIdentityRequestV0} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional bytes order_by = 4; + * @return {string} */ -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) - }; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getOrderBy = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * optional bytes order_by = 4; + * This is a type-conversion wrapper around `getOrderBy()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getOrderBy_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOrderBy())); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + * optional bytes order_by = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOrderBy()` + * @return {!Uint8Array} */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getOrderBy_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOrderBy())); }; /** - * 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} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} 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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setOrderBy = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint32 limit = 5; + * @return {number} */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * 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 + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional bytes id = 1; + * optional bytes start_after = 6; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAfter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` + * optional bytes start_after = 6; + * This is a type-conversion wrapper around `getStartAfter()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAfter_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + this.getStartAfter())); }; /** - * optional bytes id = 1; + * optional bytes start_after = 6; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` + * This is a type-conversion wrapper around `getStartAfter()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAfter_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); + this.getStartAfter())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setStartAfter = function(value) { + return jspb.Message.setOneofField(this, 6, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], value); }; /** - * optional bool prove = 2; - * @return {boolean} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} 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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.clearStartAfter = function() { + return jspb.Message.setOneofField(this, 6, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], 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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.hasStartAfter = function() { + return jspb.Message.getField(this, 6) != null; }; /** - * optional GetIdentityRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + * optional bytes start_at = 7; + * @return {string} */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** - * @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); + * optional bytes start_at = 7; + * This is a type-conversion wrapper around `getStartAt()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartAt())); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} returns this + * optional bytes start_at = 7; + * 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.GetIdentityRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartAt())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setStartAt = function(value) { + return jspb.Message.setOneofField(this, 7, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], 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 + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.clearStartAt = function() { + return jspb.Message.setOneofField(this, 7, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], undefined); +}; + /** - * @enum {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.hasStartAt = function() { + return jspb.Message.getField(this, 7) != null; }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase} + * optional bool prove = 8; + * @return {boolean} */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; - -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} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, 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.GetIdentityNonceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional GetDocumentsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} */ -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; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0, 1)); }; -} /** - * 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); + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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.GetIdentityNonceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} returns this */ -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; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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.GetIdentityNonceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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.GetIdentityNonceRequest} 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.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 - ); - } -}; +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_ = [[1]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_[0])); +}; @@ -5896,8 +24992,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.GetDocumentsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.toObject(opt_includeInstance, this); }; @@ -5906,14 +25002,13 @@ 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.GetDocumentsResponse} 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.GetDocumentsResponse.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -5927,23 +25022,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.GetDocumentsResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.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.GetDocumentsResponse; + return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.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.GetDocumentsResponse} 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.GetDocumentsResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5951,153 +25046,47 @@ 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); - 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); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.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.GetIdentityNonceRequest} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.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.GetDocumentsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.serializeBinaryToWriter + ); + } }; @@ -6110,21 +25099,22 @@ 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.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + DOCUMENTS: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase} */ -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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_[0])); }; @@ -6142,8 +25132,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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.toObject(opt_includeInstance, this); }; @@ -6152,13 +25142,15 @@ 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.GetDocumentsResponse.GetDocumentsResponseV0} 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.GetDocumentsResponse.GetDocumentsResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.toObject(includeInstance, f) + documents: (f = msg.getDocuments()) && proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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) { @@ -6172,23 +25164,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.GetDocumentsResponse.GetDocumentsResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.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.GetDocumentsResponse.GetDocumentsResponseV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.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.GetDocumentsResponse.GetDocumentsResponseV0} 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.GetDocumentsResponse.GetDocumentsResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6196,9 +25188,19 @@ 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); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.deserializeBinaryFromReader); + msg.setDocuments(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(); @@ -6213,9 +25215,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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6223,24 +25225,47 @@ 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.GetDocumentsResponse.GetDocumentsResponseV0} 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.GetDocumentsResponse.GetDocumentsResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getDocuments(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -6256,8 +25281,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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.toObject(opt_includeInstance, this); }; @@ -6266,15 +25291,13 @@ 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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} 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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - contractId: msg.getContractId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + documentsList: msg.getDocumentsList_asB64() }; if (includeInstance) { @@ -6288,23 +25311,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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents; + return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} 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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6313,15 +25336,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContr 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); + msg.addDocuments(value); break; default: reader.skipField(); @@ -6336,9 +25351,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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6346,162 +25361,218 @@ 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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} 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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); + f = message.getDocumentsList_asU8(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedBytes( 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} + * repeated bytes documents = 1; + * @return {!Array} */ -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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.getDocumentsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * optional bytes identity_id = 1; - * This is a type-conversion wrapper around `getIdentityId()` - * @return {string} + * repeated bytes documents = 1; + * This is a type-conversion wrapper around `getDocumentsList()` + * @return {!Array} */ -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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.getDocumentsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getDocumentsList())); }; /** - * optional bytes identity_id = 1; + * repeated bytes documents = 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} + * This is a type-conversion wrapper around `getDocumentsList()` + * @return {!Array} */ -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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.getDocumentsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getDocumentsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.setDocumentsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns this + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} returns this */ -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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.addDocuments = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * optional bytes contract_id = 2; - * @return {string} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} returns this */ -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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.clearDocumentsList = function() { + return this.setDocumentsList([]); }; /** - * optional bytes contract_id = 2; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} + * optional Documents documents = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} */ -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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.getDocuments = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents, 1)); }; /** - * 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} + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.setDocuments = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this */ -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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.clearDocuments = function() { + return this.setDocuments(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.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.hasDocuments = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bool prove = 3; + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.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.GetDocumentsResponse.GetDocumentsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.clearProof = function() { + return this.setProof(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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {boolean} 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.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.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 GetIdentityContractNonceRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.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.GetDocumentsResponse.GetDocumentsResponseV0} returns this */ -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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} returns this + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetDocumentsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse} 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); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -6510,7 +25581,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.clearV * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -6524,21 +25595,21 @@ 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.GetIdentityByPublicKeyHashRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.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])); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.oneofGroups_[0])); }; @@ -6556,8 +25627,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.GetIdentityByPublicKeyHashRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.toObject(opt_includeInstance, this); }; @@ -6566,13 +25637,13 @@ 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.GetIdentityByPublicKeyHashRequest} 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.GetIdentityByPublicKeyHashRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -6586,23 +25657,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.GetIdentityByPublicKeyHashRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.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.GetIdentityByPublicKeyHashRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.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.GetIdentityByPublicKeyHashRequest} 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.GetIdentityByPublicKeyHashRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6610,8 +25681,8 @@ 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); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -6627,9 +25698,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.GetIdentityByPublicKeyHashRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6637,18 +25708,18 @@ 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.GetIdentityByPublicKeyHashRequest} 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.GetIdentityByPublicKeyHashRequest.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 + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.serializeBinaryToWriter ); } }; @@ -6670,8 +25741,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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.toObject(opt_includeInstance, this); }; @@ -6680,13 +25751,13 @@ 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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} 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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), + publicKeyHash: msg.getPublicKeyHash_asB64(), prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; @@ -6701,23 +25772,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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} 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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6726,7 +25797,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + msg.setPublicKeyHash(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); @@ -6745,9 +25816,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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6755,13 +25826,13 @@ 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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} 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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); + f = message.getPublicKeyHash_asU8(); if (f.length > 0) { writer.writeBytes( 1, @@ -6779,43 +25850,43 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ /** - * optional bytes id = 1; + * optional bytes public_key_hash = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getPublicKeyHash = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` + * optional bytes public_key_hash = 1; + * This is a type-conversion wrapper around `getPublicKeyHash()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getPublicKeyHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + this.getPublicKeyHash())); }; /** - * optional bytes id = 1; + * optional bytes public_key_hash = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` + * This is a type-conversion wrapper around `getPublicKeyHash()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getPublicKeyHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); + this.getPublicKeyHash())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.setId = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.setPublicKeyHash = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -6824,44 +25895,44 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ * optional bool prove = 2; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getProve = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.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 + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.setProve = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.setProve = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetIdentityBalanceRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + * optional GetIdentityByPublicKeyHashRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} */ -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.GetIdentityByPublicKeyHashRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0, 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); + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.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.GetIdentityByPublicKeyHashRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -6870,7 +25941,7 @@ 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() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -6884,21 +25955,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.hasV0 = func * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.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])); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_[0])); }; @@ -6916,8 +25987,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.toObject(opt_includeInstance, this); }; @@ -6926,13 +25997,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.t * @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. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} 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) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -6946,23 +26017,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.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); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.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 {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6970,8 +26041,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserialize 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); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -6987,9 +26058,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserialize * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6997,24 +26068,50 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.s /** * 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 {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} 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) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITY: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -7030,8 +26127,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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.toObject(opt_includeInstance, this); }; @@ -7040,14 +26137,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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} 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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + 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) { @@ -7061,23 +26159,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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} 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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7086,11 +26184,17 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentity switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + msg.setIdentity(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(); @@ -7105,9 +26209,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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7115,113 +26219,196 @@ 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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} 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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { writer.writeBytes( 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 id = 1; + * optional bytes identity = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getIdentity = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` + * optional bytes identity = 1; + * This is a type-conversion wrapper around `getIdentity()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getIdentity_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + this.getIdentity())); }; /** - * optional bytes id = 1; + * 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 `getId()` + * This is a type-conversion wrapper around `getIdentity()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getIdentity_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); + this.getIdentity())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this */ -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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.setIdentity = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0], value); }; /** - * optional bool prove = 2; + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.clearIdentity = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.hasIdentity = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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 GetIdentityBalanceAndRevisionRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this */ -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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} returns this + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} 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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityBalanceAndRevisionRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentityByPublicKeyHashResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -7230,7 +26417,7 @@ 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() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -7244,21 +26431,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.h * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.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])); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_[0])); }; @@ -7276,8 +26463,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.WaitForStateTransitionResultRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.toObject(opt_includeInstance, this); }; @@ -7286,13 +26473,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.WaitForStateTransitionResultRequest} 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.WaitForStateTransitionResultRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -7306,23 +26493,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.WaitForStateTransitionResultRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.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.WaitForStateTransitionResultRequest; + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.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.WaitForStateTransitionResultRequest} 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.WaitForStateTransitionResultRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7330,8 +26517,8 @@ 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); + var value = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -7347,9 +26534,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.WaitForStateTransitionResultRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7357,50 +26544,24 @@ 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.WaitForStateTransitionResultRequest} 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.WaitForStateTransitionResultRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.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.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - IDENTITY: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase} - */ -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) { @@ -7416,8 +26577,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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.toObject(opt_includeInstance, this); }; @@ -7426,15 +26587,14 @@ 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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} 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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.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) + stateTransitionHash: msg.getStateTransitionHash_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -7448,23 +26608,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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0; + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} 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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7473,17 +26633,11 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deseri switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentity(value); + msg.setStateTransitionHash(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 {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -7498,206 +26652,123 @@ 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() { - 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; -}; - - -/** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} - */ -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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @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); + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStateTransitionHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this + * optional bytes state_transition_hash = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getStateTransitionHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes state_transition_hash = 1; + * This is a type-conversion wrapper around `getStateTransitionHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getStateTransitionHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStateTransitionHash())); }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * optional bytes state_transition_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStateTransitionHash()` + * @return {!Uint8Array} */ -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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getStateTransitionHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStateTransitionHash())); }; /** - * @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); + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.setStateTransitionHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this + * optional bool prove = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetIdentityResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} + * optional WaitForStateTransitionResultRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} */ -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.WaitForStateTransitionResultRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} 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); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -7706,7 +26777,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.clearV0 = function * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -7720,21 +26791,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.WaitForStateTransitionResultResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.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.WaitForStateTransitionResultResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_[0])); }; @@ -7752,8 +26823,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.WaitForStateTransitionResultResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.toObject(opt_includeInstance, this); }; @@ -7762,13 +26833,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.WaitForStateTransitionResultResponse} 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.WaitForStateTransitionResultResponse.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -7782,23 +26853,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.WaitForStateTransitionResultResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.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.WaitForStateTransitionResultResponse; + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.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.WaitForStateTransitionResultResponse} 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.WaitForStateTransitionResultResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7806,8 +26877,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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -7823,9 +26894,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.WaitForStateTransitionResultResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7833,18 +26904,18 @@ 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.WaitForStateTransitionResultResponse} 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.WaitForStateTransitionResultResponse.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 + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.serializeBinaryToWriter ); } }; @@ -7859,22 +26930,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.serializeBinaryToWriter * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.ResultCase = { RESULT_NOT_SET: 0, - IDENTITY_NONCE: 1, + ERROR: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.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])); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_[0])); }; @@ -7892,8 +26963,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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.toObject(opt_includeInstance, this); }; @@ -7902,13 +26973,13 @@ 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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} 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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - identityNonce: jspb.Message.getFieldWithDefault(msg, 1, 0), + error: (f = msg.getError()) && proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.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) }; @@ -7924,23 +26995,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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0; + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} 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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7948,8 +27019,9 @@ 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 = new proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryFromReader); + msg.setError(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -7974,9 +27046,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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7984,17 +27056,18 @@ 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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} 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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); + f = message.getError(); if (f != null) { - writer.writeUint64( + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.serializeBinaryToWriter ); } f = message.getProof(); @@ -8017,29 +27090,30 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons /** - * optional uint64 identity_nonce = 1; - * @return {number} + * optional StateTransitionBroadcastError error = 1; + * @return {?proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} */ -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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getError = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError, 1)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this - */ -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); + * @param {?proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.setError = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_[0], value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this */ -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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.clearError = function() { + return this.setError(undefined); }; @@ -8047,7 +27121,7 @@ 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.hasIdentityNonce = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.hasError = function() { return jspb.Message.getField(this, 1) != null; }; @@ -8056,7 +27130,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -8064,18 +27138,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} 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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -8084,7 +27158,7 @@ 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() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -8093,7 +27167,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -8101,18 +27175,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.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 + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -8121,35 +27195,35 @@ 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.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetIdentityNonceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + * optional WaitForStateTransitionResultResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} */ -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.WaitForStateTransitionResultResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} 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); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -8158,7 +27232,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.clearV0 = fun * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -8172,21 +27246,21 @@ 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.GetConsensusParamsRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.VersionCase} */ -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.GetConsensusParamsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.oneofGroups_[0])); }; @@ -8204,8 +27278,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.GetConsensusParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.toObject(opt_includeInstance, this); }; @@ -8214,13 +27288,13 @@ 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.GetConsensusParamsRequest} 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.GetConsensusParamsRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -8234,23 +27308,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.GetConsensusParamsRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.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.GetConsensusParamsRequest; + return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.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.GetConsensusParamsRequest} 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.GetConsensusParamsRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8258,8 +27332,8 @@ 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); + var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -8275,9 +27349,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.GetConsensusParamsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8285,50 +27359,24 @@ 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.GetConsensusParamsRequest} 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.GetConsensusParamsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.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) { @@ -8344,8 +27392,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.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.toObject(opt_includeInstance, this); }; @@ -8354,15 +27402,14 @@ 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.GetConsensusParamsRequest.GetConsensusParamsRequestV0} 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.GetConsensusParamsRequest.GetConsensusParamsRequestV0.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) + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -8374,234 +27421,145 @@ 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} - */ -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.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} - */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.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); - 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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} 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) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint64( - 1, - f - ); - } - f = message.getProof(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter - ); - } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 identity_contract_nonce = 1; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getIdentityContractNonce = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this - */ -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); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this - */ -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); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasIdentityContractNonce = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} */ -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)); +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0; + return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinaryFromReader(msg, reader); }; /** - * @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); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.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.GetConsensusParamsRequest.GetConsensusParamsRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * optional int32 height = 1; + * @return {number} */ -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)); +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @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); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * optional bool prove = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetIdentityContractNonceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + * optional GetConsensusParamsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} */ -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.GetConsensusParamsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0, 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.GetConsensusParamsRequest.GetConsensusParamsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest} 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.GetConsensusParamsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.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.GetConsensusParamsRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -8610,7 +27568,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.GetConsensusParamsRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -8624,21 +27582,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.GetConsensusParamsResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetConsensusParamsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_[0])); }; @@ -8656,8 +27614,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.GetConsensusParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.toObject(opt_includeInstance, this); }; @@ -8666,13 +27624,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.GetConsensusParamsResponse} 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.GetConsensusParamsResponse.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.GetConsensusParamsResponse.GetConsensusParamsResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -8686,23 +27644,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.GetConsensusParamsResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetConsensusParamsResponse; + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetConsensusParamsResponse} 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.GetConsensusParamsResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8710,8 +27668,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.GetConsensusParamsResponse.GetConsensusParamsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -8727,9 +27685,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.GetConsensusParamsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8737,50 +27695,24 @@ 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.GetConsensusParamsResponse} 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.GetConsensusParamsResponse.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.GetConsensusParamsResponse.GetConsensusParamsResponseV0.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) { @@ -8796,8 +27728,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.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.toObject(opt_includeInstance, this); }; @@ -8806,15 +27738,15 @@ 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.GetConsensusParamsResponse.ConsensusParamsBlock} 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.GetConsensusParamsResponse.ConsensusParamsBlock.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) + maxBytes: jspb.Message.getFieldWithDefault(msg, 1, ""), + maxGas: jspb.Message.getFieldWithDefault(msg, 2, ""), + timeIotaMs: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -8828,23 +27760,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.GetConsensusParamsResponse.ConsensusParamsBlock} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.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.GetConsensusParamsResponse.ConsensusParamsBlock; + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.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.GetConsensusParamsResponse.ConsensusParamsBlock} 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.GetConsensusParamsResponse.ConsensusParamsBlock} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8852,18 +27784,16 @@ 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 {string} */ (reader.readString()); + msg.setMaxBytes(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 {string} */ (reader.readString()); + msg.setMaxGas(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.setTimeIotaMs(value); break; default: reader.skipField(); @@ -8878,9 +27808,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8888,213 +27818,283 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes /** * 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 {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint64( + f = message.getMaxBytes(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getMaxGas(); + if (f.length > 0) { + writer.writeString( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( + f = message.getTimeIotaMs(); + if (f.length > 0) { + writer.writeString( 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + f ); } }; /** - * optional uint64 balance = 1; - * @return {number} + * optional string max_bytes = 1; + * @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.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.getMaxBytes = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} 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.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * optional string max_gas = 2; + * @return {string} */ -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.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.getMaxGas = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasBalance = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.setMaxGas = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * optional string time_iota_ms = 3; + * @return {string} */ -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)); +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.getTimeIotaMs = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @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); + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} returns this + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.setTimeIotaMs = function(value) { + return jspb.Message.setProto3StringField(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.clearProof = function() { - return this.setProof(undefined); -}; + +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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.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.GetConsensusParamsResponse.ConsensusParamsEvidence} 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.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.GetConsensusParamsResponse.ConsensusParamsEvidence.toObject = function(includeInstance, msg) { + var f, obj = { + maxAgeNumBlocks: jspb.Message.getFieldWithDefault(msg, 1, ""), + maxAgeDuration: jspb.Message.getFieldWithDefault(msg, 2, ""), + maxBytes: jspb.Message.getFieldWithDefault(msg, 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); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence; + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.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.GetConsensusParamsResponse.ConsensusParamsEvidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMaxAgeNumBlocks(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMaxAgeDuration(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMaxBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional GetIdentityBalanceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -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.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @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); + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxAgeNumBlocks(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMaxAgeDuration(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMaxBytes(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} returns this + * optional string max_age_num_blocks = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.getMaxAgeNumBlocks = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.setMaxAgeNumBlocks = function(value) { + return jspb.Message.setProto3StringField(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 string max_age_duration = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.getMaxAgeDuration = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.setMaxAgeDuration = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + /** - * @enum {number} + * optional string max_bytes = 3; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.getMaxBytes = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase} + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} returns this */ -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.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -9108,8 +28108,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.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.toObject(opt_includeInstance, this); }; @@ -9118,13 +28118,14 @@ 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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} 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.GetConsensusParamsResponse.GetConsensusParamsResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject(includeInstance, f) + block: (f = msg.getBlock()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.toObject(includeInstance, f), + evidence: (f = msg.getEvidence()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.toObject(includeInstance, f) }; if (includeInstance) { @@ -9138,23 +28139,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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.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.GetConsensusParamsResponse.GetConsensusParamsResponseV0; + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} 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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9162,9 +28163,14 @@ 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); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinaryFromReader); + msg.setEvidence(value); break; default: reader.skipField(); @@ -9179,9 +28185,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.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9189,23 +28195,142 @@ 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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} 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.GetConsensusParamsResponse.GetConsensusParamsResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getBlock(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.serializeBinaryToWriter + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.serializeBinaryToWriter ); } }; +/** + * optional ConsensusParamsBlock block = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.getBlock = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.hasBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ConsensusParamsEvidence evidence = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.getEvidence = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.hasEvidence = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional GetConsensusParamsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + /** * Oneof group definitions for this message. Each group defines the field @@ -9215,22 +28340,21 @@ 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.GetProtocolVersionUpgradeStateRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - BALANCE_AND_REVISION: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.VersionCase} */ -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.GetProtocolVersionUpgradeStateRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.oneofGroups_[0])); }; @@ -9248,8 +28372,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.GetProtocolVersionUpgradeStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.toObject(opt_includeInstance, this); }; @@ -9258,15 +28382,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.GetProtocolVersionUpgradeStateRequest} 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.GetProtocolVersionUpgradeStateRequest.toObject = function(includeInstance, msg) { var f, obj = { - 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) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -9280,23 +28402,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.GetProtocolVersionUpgradeStateRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.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.GetProtocolVersionUpgradeStateRequest; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.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.GetProtocolVersionUpgradeStateRequest} 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.GetProtocolVersionUpgradeStateRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9304,19 +28426,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); - 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 = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -9331,9 +28443,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.GetProtocolVersionUpgradeStateRequest.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.GetProtocolVersionUpgradeStateRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9341,34 +28453,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.GetProtocolVersionUpgradeStateRequest} 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.GetProtocolVersionUpgradeStateRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBalanceAndRevision(); + f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - 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 + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.serializeBinaryToWriter ); } }; @@ -9390,8 +28486,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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.toObject(opt_includeInstance, this); }; @@ -9400,14 +28496,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.BalanceAndRevision} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} 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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - balance: jspb.Message.getFieldWithDefault(msg, 1, 0), - revision: jspb.Message.getFieldWithDefault(msg, 2, 0) + prove: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -9421,23 +28516,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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} 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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9445,12 +28540,8 @@ 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); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRevision(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -9465,9 +28556,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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9475,200 +28566,64 @@ 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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} 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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBalance(); - if (f !== 0) { - writer.writeUint64( + f = message.getProve(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getRevision(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional uint64 balance = 1; - * @return {number} - */ -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 uint64 revision = 2; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.getRevision = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 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.setRevision = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional BalanceAndRevision balance_and_revision = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} - */ -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)); -}; - - -/** - * @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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearBalanceAndRevision = function() { - return this.setBalanceAndRevision(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasBalanceAndRevision = 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.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.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); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); }; /** - * Returns whether this field is set. + * optional bool prove = 1; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.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)); -}; - - -/** - * @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); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} 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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional GetIdentityBalanceAndRevisionResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + * optional GetProtocolVersionUpgradeStateRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} */ -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.GetProtocolVersionUpgradeStateRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} 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.GetProtocolVersionUpgradeStateRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -9677,7 +28632,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype. * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -9691,23 +28646,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype. * @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 +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase} + * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.VersionCase} */ -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.GetProtocolVersionUpgradeStateResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_[0])); }; @@ -9725,8 +28678,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.GetProtocolVersionUpgradeStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.toObject(opt_includeInstance, this); }; @@ -9735,15 +28688,13 @@ 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.GetProtocolVersionUpgradeStateResponse} 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.GetProtocolVersionUpgradeStateResponse.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) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -9757,23 +28708,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.GetProtocolVersionUpgradeStateResponse} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.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.GetProtocolVersionUpgradeStateResponse; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.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.GetProtocolVersionUpgradeStateResponse} 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.GetProtocolVersionUpgradeStateResponse} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9781,19 +28732,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -9808,9 +28749,9 @@ 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.GetProtocolVersionUpgradeStateResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9818,153 +28759,52 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.serializeBinary = funct /** * 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 {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAllKeys(); + f = message.getV0(); 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.serializeBinaryToWriter ); } }; -/** - * optional AllKeys all_keys = 1; - * @return {?proto.org.dash.platform.dapi.v0.AllKeys} - */ -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)); -}; - - -/** - * @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.KeyRequestType.prototype.clearAllKeys = function() { - return this.setAllKeys(undefined); -}; - - -/** - * 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; -}; - - -/** - * optional SpecificKeys specific_keys = 2; - * @return {?proto.org.dash.platform.dapi.v0.SpecificKeys} - */ -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)); -}; - - -/** - * @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.KeyRequestType.prototype.clearSpecificKeys = function() { - return this.setSpecificKeys(undefined); -}; - - -/** - * 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; -}; - /** - * optional SearchKey search_key = 3; - * @return {?proto.org.dash.platform.dapi.v0.SearchKey} + * 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.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.SearchKey|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_ = [[1,2]]; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSearchKey = function() { - return this.setSearchKey(undefined); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + VERSIONS: 1, + PROOF: 2 }; - /** - * Returns whether this field is set. - * @return {boolean} + * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasSearchKey = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -9978,8 +28818,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.toObject(opt_includeInstance, this); }; @@ -9988,13 +28828,15 @@ 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - + versions: (f = msg.getVersions()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.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) { @@ -10008,29 +28850,44 @@ 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} */ -proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} */ -proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.deserializeBinaryFromReader); + msg.setVersions(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; @@ -10044,9 +28901,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10054,12 +28911,36 @@ 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getVersions(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.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 + ); + } }; @@ -10069,7 +28950,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.repeatedFields_ = [1]; @@ -10086,8 +28967,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.toObject(opt_includeInstance, this); }; @@ -10096,13 +28977,14 @@ 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.toObject = function(includeInstance, msg) { var f, obj = { - keyIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + versionsList: jspb.Message.toObjectList(msg.getVersionsList(), + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.toObject, includeInstance) }; if (includeInstance) { @@ -10116,23 +28998,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10140,10 +29022,9 @@ 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 = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.deserializeBinaryFromReader); + msg.addVersions(value); break; default: reader.skipField(); @@ -10158,9 +29039,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10168,56 +29049,58 @@ 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeyIdsList(); + f = message.getVersionsList(); if (f.length > 0) { - writer.writePackedUint32( + writer.writeRepeatedMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.serializeBinaryToWriter ); } }; /** - * repeated uint32 key_ids = 1; - * @return {!Array} + * repeated VersionEntry versions = 1; + * @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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.getVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry, 1)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this - */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.setKeyIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.setVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {number} value + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry=} opt_value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} */ -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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.addVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry, 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} returns this */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.clearKeyIdsList = function() { - return this.setKeyIdsList([]); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.clearVersionsList = function() { + return this.setVersionsList([]); }; @@ -10237,8 +29120,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.toObject(opt_includeInstance, this); }; @@ -10247,13 +29130,14 @@ proto.org.dash.platform.dapi.v0.SearchKey.prototype.toObject = function(opt_incl * @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. + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.SearchKey.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.toObject = function(includeInstance, msg) { var f, obj = { - purposeMapMap: (f = msg.getPurposeMapMap()) ? f.toObject(includeInstance, proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject) : [] + versionNumber: jspb.Message.getFieldWithDefault(msg, 1, 0), + voteCount: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -10267,23 +29151,23 @@ proto.org.dash.platform.dapi.v0.SearchKey.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.SearchKey} + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} */ -proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.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); + var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.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.SearchKey} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.SearchKey} + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} */ -proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10291,10 +29175,12 @@ proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader = function 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()); - }); + var value = /** @type {number} */ (reader.readUint32()); + msg.setVersionNumber(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setVoteCount(value); break; default: reader.skipField(); @@ -10309,9 +29195,9 @@ proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.SearchKey.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10319,180 +29205,211 @@ proto.org.dash.platform.dapi.v0.SearchKey.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.SearchKey} message + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.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); + f = message.getVersionNumber(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getVoteCount(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); } }; /** - * map purpose_map = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional uint32 version_number = 1; + * @return {number} */ -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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.getVersionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.org.dash.platform.dapi.v0.SearchKey} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} returns this */ -proto.org.dash.platform.dapi.v0.SearchKey.prototype.clearPurposeMapMap = function() { - this.getPurposeMapMap().clear(); - return this;}; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.setVersionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 vote_count = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.getVoteCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.setVoteCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional Versions versions = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.getVersions = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.setVersions = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.clearVersions = function() { + return this.setVersions(undefined); +}; +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.hasVersions = 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_[0], value); +}; +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.SecurityLevelMap.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.SecurityLevelMap} 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.SecurityLevelMap.toObject = function(includeInstance, msg) { - var f, obj = { - securityLevelMapMap: (f = msg.getSecurityLevelMapMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; -} /** - * 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); + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * 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} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this */ -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; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(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.SecurityLevelMap.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * 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 + * optional GetProtocolVersionUpgradeStateResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} */ -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); - } +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0, 1)); }; /** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType = { - CURRENT_KEY_OF_KIND_REQUEST: 0, - ALL_KEYS_OF_KIND_REQUEST: 1 + * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_[0], value); }; + /** - * map security_level_map = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} returns this */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.getSecurityLevelMapMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.clearSecurityLevelMapMap = function() { - this.getSecurityLevelMapMap().clear(); - return this;}; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; @@ -10504,21 +29421,21 @@ 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.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.VersionCase} */ -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.GetProtocolVersionUpgradeVoteStatusRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_[0])); }; @@ -10536,8 +29453,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.GetProtocolVersionUpgradeVoteStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.toObject(opt_includeInstance, this); }; @@ -10546,13 +29463,13 @@ 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.GetProtocolVersionUpgradeVoteStatusRequest} 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.GetProtocolVersionUpgradeVoteStatusRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -10566,23 +29483,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.GetProtocolVersionUpgradeVoteStatusRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.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.GetProtocolVersionUpgradeVoteStatusRequest; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.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.GetProtocolVersionUpgradeVoteStatusRequest} 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.GetProtocolVersionUpgradeVoteStatusRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10590,8 +29507,8 @@ 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); + var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -10607,9 +29524,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.GetProtocolVersionUpgradeVoteStatusRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10617,18 +29534,18 @@ 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.GetProtocolVersionUpgradeVoteStatusRequest} 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.GetProtocolVersionUpgradeVoteStatusRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.serializeBinaryToWriter ); } }; @@ -10650,8 +29567,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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.toObject(opt_includeInstance, this); }; @@ -10660,17 +29577,15 @@ 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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} 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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.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) + startProTxHash: msg.getStartProTxHash_asB64(), + count: jspb.Message.getFieldWithDefault(msg, 2, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -10684,23 +29599,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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} 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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10709,24 +29624,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); + msg.setStartProTxHash(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); + var value = /** @type {number} */ (reader.readUint32()); + msg.setCount(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); break; @@ -10743,9 +29647,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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10753,47 +29657,30 @@ 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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} 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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); + f = message.getStartProTxHash_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getRequestType(); - if (f != null) { - writer.writeMessage( + f = message.getCount(); + if (f !== 0) { + writer.writeUint32( 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 ); } f = message.getProve(); if (f) { writer.writeBool( - 5, + 3, f ); } @@ -10801,200 +29688,107 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. /** - * optional bytes identity_id = 1; + * optional bytes start_pro_tx_hash = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getStartProTxHash = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes identity_id = 1; - * This is a type-conversion wrapper around `getIdentityId()` + * optional bytes start_pro_tx_hash = 1; + * This is a type-conversion wrapper around `getStartProTxHash()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getStartProTxHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); + this.getStartProTxHash())); }; /** - * optional bytes identity_id = 1; + * optional bytes start_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 `getIdentityId()` + * This is a type-conversion wrapper around `getStartProTxHash()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getStartProTxHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); + this.getStartProTxHash())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setIdentityId = function(value) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.setStartProTxHash = 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 + * optional uint32 count = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearOffset = function() { - return this.setOffset(undefined); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasOffset = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional bool prove = 5; + * optional bool prove = 3; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional GetIdentityKeysRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} + * optional GetProtocolVersionUpgradeVoteStatusRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} */ -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.GetProtocolVersionUpgradeVoteStatusRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} 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); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -11003,7 +29797,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.clearV0 = funct * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -11017,21 +29811,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.hasV0 = functio * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.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])); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_[0])); }; @@ -11049,8 +29843,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.GetProtocolVersionUpgradeVoteStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.toObject(opt_includeInstance, this); }; @@ -11059,13 +29853,13 @@ 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.GetProtocolVersionUpgradeVoteStatusResponse} 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.GetProtocolVersionUpgradeVoteStatusResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -11079,23 +29873,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.GetProtocolVersionUpgradeVoteStatusResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.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.GetProtocolVersionUpgradeVoteStatusResponse; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.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.GetProtocolVersionUpgradeVoteStatusResponse} 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.GetProtocolVersionUpgradeVoteStatusResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11103,8 +29897,8 @@ 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); + var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -11120,9 +29914,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.GetProtocolVersionUpgradeVoteStatusResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11130,18 +29924,18 @@ 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.GetProtocolVersionUpgradeVoteStatusResponse} 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.GetProtocolVersionUpgradeVoteStatusResponse.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 + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.serializeBinaryToWriter ); } }; @@ -11156,22 +29950,22 @@ 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.ResultCase = { RESULT_NOT_SET: 0, - KEYS: 1, + VERSIONS: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.ResultCase} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_[0])); }; @@ -11189,8 +29983,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.toObject(opt_includeInstance, this); }; @@ -11199,13 +29993,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - keys: (f = msg.getKeys()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.toObject(includeInstance, f), + versions: (f = msg.getVersions()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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) }; @@ -11221,23 +30015,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} + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11245,9 +30039,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV 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); + var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.deserializeBinaryFromReader); + msg.setVersions(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -11272,9 +30066,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11282,18 +30076,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeys(); + f = message.getVersions(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.serializeBinaryToWriter ); } f = message.getProof(); @@ -11321,7 +30115,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.repeatedFields_ = [1]; @@ -11338,8 +30132,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.toObject(opt_includeInstance, this); }; @@ -11348,13 +30142,14 @@ 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.toObject = function(includeInstance, msg) { var f, obj = { - keysBytesList: msg.getKeysBytesList_asB64() + versionSignalsList: jspb.Message.toObjectList(msg.getVersionSignalsList(), + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.toObject, includeInstance) }; if (includeInstance) { @@ -11368,23 +30163,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11392,8 +30187,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addKeysBytes(value); + var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.deserializeBinaryFromReader); + msg.addVersionSignals(value); break; default: reader.skipField(); @@ -11408,9 +30204,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11418,378 +30214,62 @@ 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeysBytesList_asU8(); + f = message.getVersionSignalsList(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeRepeatedMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.serializeBinaryToWriter ); } }; /** - * repeated bytes keys_bytes = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes keys_bytes = 1; - * This is a type-conversion wrapper around `getKeysBytesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getKeysBytesList())); -}; - - -/** - * 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} + * repeated VersionSignal version_signals = 1; + * @return {!Array} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.getVersionSignalsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal, 1)); }; /** - * @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 {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.setVersionSignalsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal=} opt_value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.addVersionSignals = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal, 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); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasKeys = 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.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)); -}; - - -/** - * @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); -}; - - -/** - * 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.clearProof = function() { - return this.setProof(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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.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)); -}; - - -/** - * @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); -}; - - -/** - * 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.clearMetadata = function() { - return this.setMetadata(undefined); -}; - - -/** - * 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; -}; - - -/** - * optional GetIdentityKeysResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} - */ -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.GetIdentityKeysResponse.GetIdentityKeysResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} 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); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.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.GetIdentitiesContractKeysRequest.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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])); -}; - - - -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.GetIdentitiesContractKeysRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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.GetIdentitiesContractKeysRequest} 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) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.GetIdentitiesContractKeysRequest} - */ -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.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.GetIdentitiesContractKeysRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.GetIdentitiesContractKeysRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} returns this */ -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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.clearVersionSignalsList = function() { + return this.setVersionSignalsList([]); }; -/** - * 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) { @@ -11805,8 +30285,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.toObject(opt_includeInstance, this); }; @@ -11815,17 +30295,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.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) + proTxHash: msg.getProTxHash_asB64(), + version: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -11839,23 +30316,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11864,25 +30341,11 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIdentitiesIds(value); + msg.setProTxHash(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); + var value = /** @type {number} */ (reader.readUint32()); + msg.setVersion(value); break; default: reader.skipField(); @@ -11897,9 +30360,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11907,44 +30370,23 @@ 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 {!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(); + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProTxHash_asU8(); if (f.length > 0) { - writer.writePackedEnum( - 4, + writer.writeBytes( + 1, f ); } - f = message.getProve(); - if (f) { - writer.writeBool( - 5, + f = message.getVersion(); + if (f !== 0) { + writer.writeUint32( + 2, f ); } @@ -11952,132 +30394,127 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo /** - * repeated bytes identities_ids = 1; - * @return {!Array} + * optional bytes pro_tx_hash = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getProTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * repeated bytes identities_ids = 1; - * This is a type-conversion wrapper around `getIdentitiesIdsList()` - * @return {!Array} + * optional bytes pro_tx_hash = 1; + * This is a type-conversion wrapper around `getProTxHash()` + * @return {string} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getProTxHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProTxHash())); }; /** - * repeated bytes identities_ids = 1; + * 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 `getIdentitiesIdsList()` - * @return {!Array} + * This is a type-conversion wrapper around `getProTxHash()` + * @return {!Uint8Array} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getProTxHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProTxHash())); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} returns this */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.setProTxHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * optional uint32 version = 2; + * @return {number} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearIdentitiesIdsList = function() { - return this.setIdentitiesIdsList([]); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional bytes contract_id = 2; - * @return {string} + * optional VersionSignals versions = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.getVersions = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals, 1)); }; /** - * 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())); + * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.setVersions = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_[0], value); }; /** - * 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} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.clearVersions = function() { + return this.setVersions(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @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.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.hasVersions = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional string document_type_name = 3; - * @return {string} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setDocumentTypeName = function(value) { - return jspb.Message.setField(this, 3, value); + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_[0], value); }; /** - * Clears the field making it undefined. - * @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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; @@ -12085,90 +30522,72 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.hasDocumentTypeName = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * repeated KeyPurpose purposes = 4; - * @return {!Array} - */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setPurposesList = function(value) { - return jspb.Message.setField(this, 4, value || []); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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.KeyPurpose} 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.addPurposes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * Clears the list making it empty but non-null. - * @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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearPurposesList = function() { - return this.setPurposesList([]); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * optional bool prove = 5; + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional GetIdentitiesContractKeysRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + * optional GetProtocolVersionUpgradeVoteStatusResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0, 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} 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.GetProtocolVersionUpgradeVoteStatusResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.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.GetProtocolVersionUpgradeVoteStatusResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -12177,7 +30596,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.GetProtocolVersionUpgradeVoteStatusResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -12191,21 +30610,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.GetEpochsInfoRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.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.GetEpochsInfoRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_[0])); }; @@ -12223,8 +30642,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.GetEpochsInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.toObject(opt_includeInstance, this); }; @@ -12233,13 +30652,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.GetEpochsInfoRequest} 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.GetEpochsInfoRequest.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.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -12253,23 +30672,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.GetEpochsInfoRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.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.GetEpochsInfoRequest; + return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.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.GetEpochsInfoRequest} 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.GetEpochsInfoRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12277,8 +30696,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.GetEpochsInfoRequest.GetEpochsInfoRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -12294,9 +30713,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.GetEpochsInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12304,50 +30723,24 @@ 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.GetEpochsInfoRequest} 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.GetEpochsInfoRequest.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.GetEpochsInfoRequest.GetEpochsInfoRequestV0.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - IDENTITIES_KEYS: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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])); -}; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -12363,8 +30756,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.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toObject(opt_includeInstance, this); }; @@ -12373,15 +30766,16 @@ 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.GetEpochsInfoRequest.GetEpochsInfoRequestV0} 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.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - 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) + startEpoch: (f = msg.getStartEpoch()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + count: jspb.Message.getFieldWithDefault(msg, 2, 0), + ascending: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) }; if (includeInstance) { @@ -12395,23 +30789,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.GetEpochsInfoRequest.GetEpochsInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.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.GetEpochsInfoRequest.GetEpochsInfoRequestV0; + return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.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.GetEpochsInfoRequest.GetEpochsInfoRequestV0} 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.GetEpochsInfoRequest.GetEpochsInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12419,19 +30813,21 @@ 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 google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setStartEpoch(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 {number} */ (reader.readUint32()); + msg.setCount(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 {boolean} */ (reader.readBool()); + msg.setAscending(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -12446,9 +30842,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.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12456,256 +30852,197 @@ 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} message + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} 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) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentitiesKeys(); + f = message.getStartEpoch(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.serializeBinaryToWriter + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getCount(); + if (f !== 0) { + writer.writeUint32( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( + f = message.getAscending(); + if (f) { + writer.writeBool( 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 4, + f ); } -}; - - - -/** - * 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 + * optional google.protobuf.UInt32Value start_epoch = 1; + * @return {?proto.google.protobuf.UInt32Value} */ -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; +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getStartEpoch = function() { + return /** @type{?proto.google.protobuf.UInt32Value} */ ( + jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 1)); }; -} /** - * 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); + * @param {?proto.google.protobuf.UInt32Value|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setStartEpoch = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * 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} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this */ -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; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.clearStartEpoch = function() { + return this.setStartEpoch(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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.hasStartEpoch = 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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint32 count = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPurpose(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getKeysBytesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * optional KeyPurpose purpose = 1; - * @return {!proto.org.dash.platform.dapi.v0.KeyPurpose} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this */ -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)); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.KeyPurpose} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this + * optional bool ascending = 3; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.setPurpose = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getAscending = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * repeated bytes keys_bytes = 2; - * @return {!Array} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setAscending = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * repeated bytes keys_bytes = 2; - * This is a type-conversion wrapper around `getKeysBytesList()` - * @return {!Array} + * optional bool prove = 4; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getKeysBytesList())); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** - * 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} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getKeysBytesList())); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this + * optional GetEpochsInfoRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.setKeysBytesList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0, 1)); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest} 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); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.clearKeysBytesList = function() { - return this.setKeysBytesList([]); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * 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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.repeatedFields_ = [2]; +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_[0])); +}; @@ -12722,8 +31059,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.GetEpochsInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.toObject(opt_includeInstance, this); }; @@ -12732,15 +31069,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.IdentityKeys} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} 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.GetEpochsInfoResponse.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) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -12754,23 +31089,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.GetEpochsInfoResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.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.GetEpochsInfoResponse; + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.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.GetEpochsInfoResponse} 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.GetEpochsInfoResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12778,13 +31113,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC 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); + var value = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -12799,9 +31130,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.GetEpochsInfoResponse.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.GetEpochsInfoResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12809,120 +31140,52 @@ 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.GetEpochsInfoResponse} 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.GetEpochsInfoResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getV0(); + if (f != null) { + writer.writeMessage( 1, - f - ); - } - f = message.getKeysList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.serializeBinaryToWriter ); } }; -/** - * optional bytes identity_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - /** - * repeated PurposeKeys keys = 2; - * @return {!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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getKeysList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys, 2)); -}; - - -/** - * @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); -}; - +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_ = [[1,2]]; /** - * @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} + * @enum {number} */ -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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + EPOCHS: 1, + PROOF: 2 }; - /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this + * @return {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.clearKeysList = function() { - return this.setKeysList([]); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_[0])); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.repeatedFields_ = [1]; - - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -12936,8 +31199,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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.toObject(opt_includeInstance, this); }; @@ -12946,14 +31209,15 @@ 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - entriesList: jspb.Message.toObjectList(msg.getEntriesList(), - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject, includeInstance) + epochs: (f = msg.getEpochs()) && proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.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) { @@ -12967,23 +31231,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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0; + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12991,9 +31255,19 @@ 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); - msg.addEntries(value); + var value = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.deserializeBinaryFromReader); + msg.setEpochs(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(); @@ -13008,9 +31282,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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13018,234 +31292,46 @@ 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEntriesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getEpochs(); + if (f != null) { + writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.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 ); } -}; - - -/** - * 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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasIdentitiesKeys = 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.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.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} 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); -}; - - -/** - * 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.clearProof = function() { - return this.setProof(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.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.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this -*/ -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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional GetIdentitiesContractKeysResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} - */ -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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} 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); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -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>} + * List of repeated fields within this message type. + * @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])); -}; +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.repeatedFields_ = [1]; @@ -13262,8 +31348,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.toObject(opt_includeInstance, this); }; @@ -13272,13 +31358,14 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.proto * @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.GetEvonodesProposedEpochBlocksByIdsRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject(includeInstance, f) + epochInfosList: jspb.Message.toObjectList(msg.getEpochInfosList(), + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.toObject, includeInstance) }; if (includeInstance) { @@ -13292,23 +31379,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.toObj /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos; + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.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.GetEvonodesProposedEpochBlocksByIdsRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13316,9 +31403,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.deser 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); + var value = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinaryFromReader); + msg.addEpochInfos(value); break; default: reader.skipField(); @@ -13333,9 +31420,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.deser * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13343,30 +31430,61 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.proto /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getEpochInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.serializeBinaryToWriter ); } }; +/** + * repeated EpochInfo epoch_infos = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.getEpochInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.setEpochInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.repeatedFields_ = [2]; +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.addEpochInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} returns this + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.clearEpochInfosList = function() { + return this.setEpochInfosList([]); +}; + + @@ -13383,8 +31501,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.toObject(opt_includeInstance, this); }; @@ -13393,15 +31511,18 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEv * @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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.toObject = function(includeInstance, msg) { var f, obj = { - epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), - idsList: msg.getIdsList_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + number: jspb.Message.getFieldWithDefault(msg, 1, 0), + firstBlockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + firstCoreBlockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + startTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + feeMultiplier: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), + protocolVersion: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -13415,23 +31536,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEv /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo; + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13440,15 +31561,27 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEv switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); - msg.setEpoch(value); + msg.setNumber(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIds(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setFirstBlockHeight(value); break; case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setFirstCoreBlockHeight(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readDouble()); + msg.setFeeMultiplier(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setProtocolVersion(value); break; default: reader.skipField(); @@ -13463,9 +31596,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEv * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13473,175 +31606,300 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEv /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { + f = message.getNumber(); + if (f !== 0) { writer.writeUint32( 1, f ); } - f = message.getIdsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( + f = message.getFirstBlockHeight(); + if (f !== 0) { + writer.writeUint64( 2, f ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = message.getFirstCoreBlockHeight(); + if (f !== 0) { + writer.writeUint32( 3, f ); } + f = message.getStartTime(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getFeeMultiplier(); + if (f !== 0.0) { + writer.writeDouble( + 5, + f + ); + } + f = message.getProtocolVersion(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } }; /** - * optional uint32 epoch = 1; + * optional uint32 number = 1; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getEpoch = function() { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getNumber = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setEpoch = function(value) { - return jspb.Message.setField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + * optional uint64 first_block_height = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.clearEpoch = function() { - return jspb.Message.setField(this, 1, undefined); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getFirstBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.hasEpoch = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setFirstBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * repeated bytes ids = 2; - * @return {!Array} + * optional uint32 first_core_block_height = 3; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getFirstCoreBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * repeated bytes ids = 2; - * This is a type-conversion wrapper around `getIdsList()` - * @return {!Array} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIdsList())); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setFirstCoreBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * 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} + * optional uint64 start_time = 4; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIdsList())); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getStartTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setIdsList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setStartTime = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + * optional double fee_multiplier = 5; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.addIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getFeeMultiplier = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.clearIdsList = function() { - return this.setIdsList([]); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setFeeMultiplier = function(value) { + return jspb.Message.setProto3FloatField(this, 5, value); }; /** - * optional bool prove = 3; + * optional uint32 protocol_version = 6; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getProtocolVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setProtocolVersion = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional EpochInfos epochs = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.getEpochs = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.setEpochs = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.clearEpochs = function() { + return this.setEpochs(undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.hasEpochs = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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 GetEvonodesProposedEpochBlocksByIdsRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this */ -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)); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} returns this + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} 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); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEvonodesProposedEpochBlocksByIdsRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetEpochsInfoResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -13650,7 +31908,7 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.proto * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -13664,21 +31922,21 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.proto * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.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])); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_[0])); }; @@ -13696,8 +31954,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.toObject(opt_includeInstance, this); }; @@ -13706,13 +31964,13 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.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.GetEvonodesProposedEpochBlocksResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -13726,23 +31984,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.toObject /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest; + return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.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.GetEvonodesProposedEpochBlocksResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13750,8 +32008,8 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deseriali var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -13767,9 +32025,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deseriali * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13777,18 +32035,18 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.serializeBinaryToWriter ); } }; @@ -13796,30 +32054,11 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.serialize /** - * 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.ResultCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -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])); -}; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.repeatedFields_ = [4,5]; @@ -13836,8 +32075,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.toObject(opt_includeInstance, this); }; @@ -13846,15 +32085,21 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod * @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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - 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) + contractId: msg.getContractId_asB64(), + documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), + indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), + startIndexValuesList: msg.getStartIndexValuesList_asB64(), + endIndexValuesList: msg.getEndIndexValuesList_asB64(), + startAtValueInfo: (f = msg.getStartAtValueInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.toObject(includeInstance, f), + count: jspb.Message.getFieldWithDefault(msg, 7, 0), + orderAscending: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) }; if (includeInstance) { @@ -13868,23 +32113,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13892,19 +32137,41 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod var field = reader.getFieldNumber(); switch (field) { case 1: - 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); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractId(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 {string} */ (reader.readString()); + msg.setDocumentTypeName(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.setIndexName(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addStartIndexValues(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addEndIndexValues(value); + break; + case 6: + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.deserializeBinaryFromReader); + msg.setStartAtValueInfo(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCount(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOrderAscending(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -13919,9 +32186,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13929,34 +32196,74 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEvonodesProposedBlockCountsInfo(); - if (f != null) { - writer.writeMessage( + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.serializeBinaryToWriter + f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getDocumentTypeName(); + if (f.length > 0) { + writer.writeString( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); + f = message.getIndexName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStartIndexValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } + f = message.getEndIndexValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 5, + f + ); + } + f = message.getStartAtValueInfo(); if (f != null) { writer.writeMessage( - 3, + 6, f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeUint32( + 7, + f + ); + } + f = message.getOrderAscending(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 9, + f ); } }; @@ -13978,8 +32285,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.toObject(opt_includeInstance, this); }; @@ -13988,14 +32295,14 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod * @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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.toObject = function(includeInstance, msg) { var f, obj = { - proTxHash: msg.getProTxHash_asB64(), - count: jspb.Message.getFieldWithDefault(msg, 2, 0) + startValue: msg.getStartValue_asB64(), + startValueIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -14009,23 +32316,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - 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); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo; + return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14034,11 +32341,11 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProTxHash(value); + msg.setStartValue(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCount(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStartValueIncluded(value); break; default: reader.skipField(); @@ -14053,9 +32360,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14063,22 +32370,22 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProTxHash_asU8(); + f = message.getStartValue_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getCount(); - if (f !== 0) { - writer.writeUint64( + f = message.getStartValueIncluded(); + if (f) { + writer.writeBool( 2, f ); @@ -14087,287 +32394,326 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod /** - * optional bytes pro_tx_hash = 1; + * optional bytes start_value = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValue = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes pro_tx_hash = 1; - * This is a type-conversion wrapper around `getProTxHash()` + * optional bytes start_value = 1; + * This is a type-conversion wrapper around `getStartValue()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValue_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProTxHash())); + this.getStartValue())); }; /** - * optional bytes pro_tx_hash = 1; + * optional bytes start_value = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProTxHash()` + * This is a type-conversion wrapper around `getStartValue()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValue_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProTxHash())); + this.getStartValue())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.setProTxHash = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.setStartValue = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint64 count = 2; - * @return {number} + * optional bool start_value_included = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValueIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.setCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.setStartValueIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; +/** + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; +/** + * optional bytes contract_id = 1; + * 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.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + -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} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns 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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional string document_type_name = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.toObject = function(includeInstance, msg) { - var f, obj = { - evonodesProposedBlockCountsList: jspb.Message.toObjectList(msg.getEvonodesProposedBlockCountsList(), - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject, includeInstance) - }; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getDocumentTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setDocumentTypeName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} + * optional string index_name = 3; + * @return {string} */ -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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getIndexName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinaryFromReader); - msg.addEvonodesProposedBlockCounts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setIndexName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * repeated bytes start_index_values = 4; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartIndexValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated bytes start_index_values = 4; + * This is a type-conversion wrapper around `getStartIndexValuesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEvonodesProposedBlockCountsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartIndexValuesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getStartIndexValuesList())); }; /** - * repeated EvonodeProposedBlocks evonodes_proposed_block_counts = 1; - * @return {!Array} + * repeated bytes start_index_values = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartIndexValuesList()` + * @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)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartIndexValuesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getStartIndexValuesList())); }; /** - * @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 {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setStartIndexValuesList = function(value) { + return jspb.Message.setField(this, 4, value || []); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks=} opt_value + * @param {!(string|Uint8Array)} value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.addStartIndexValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.clearEvonodesProposedBlockCountsList = function() { - return this.setEvonodesProposedBlockCountsList([]); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearStartIndexValuesList = function() { + return this.setStartIndexValuesList([]); }; /** - * optional EvonodesProposedBlocks evonodes_proposed_block_counts_info = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} + * repeated bytes end_index_values = 5; + * @return {!Array} */ -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)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getEndIndexValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + * repeated bytes end_index_values = 5; + * This is a type-conversion wrapper around `getEndIndexValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getEndIndexValuesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getEndIndexValuesList())); +}; + + +/** + * repeated bytes end_index_values = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEndIndexValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getEndIndexValuesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getEndIndexValuesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setEndIndexValuesList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.addEndIndexValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearEndIndexValuesList = function() { + return this.setEndIndexValuesList([]); +}; + + +/** + * optional StartAtValueInfo start_at_value_info = 6; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartAtValueInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo, 6)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} 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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setStartAtValueInfo = function(value) { + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.clearEvonodesProposedBlockCountsInfo = function() { - return this.setEvonodesProposedBlockCountsInfo(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearStartAtValueInfo = function() { + return this.setStartAtValueInfo(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; + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.hasStartAtValueInfo = function() { + return jspb.Message.getField(this, 6) != null; }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * optional uint32 count = 7; + * @return {number} */ -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)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * @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); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setCount = function(value) { + return jspb.Message.setField(this, 7, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearCount = function() { + return jspb.Message.setField(this, 7, undefined); }; @@ -14375,72 +32721,71 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod * 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; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.hasCount = function() { + return jspb.Message.getField(this, 7) != null; }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * optional bool order_ascending = 8; + * @return {boolean} */ -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)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getOrderAscending = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; /** - * @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); + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setOrderAscending = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + * optional bool prove = 9; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); }; /** - * optional GetEvonodesProposedEpochBlocksResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} + * optional GetContestedResourcesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} */ -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)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} 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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -14449,7 +32794,7 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -14463,21 +32808,21 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.VersionCase} */ -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])); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_[0])); }; @@ -14495,8 +32840,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.toObject(opt_includeInstance, this); }; @@ -14505,13 +32850,13 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.pro * @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.GetEvonodesProposedEpochBlocksByRangeRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -14525,23 +32870,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.toO /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse; + return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.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.GetEvonodesProposedEpochBlocksByRangeRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14549,8 +32894,8 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.des var field = reader.getFieldNumber(); switch (field) { 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); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -14566,9 +32911,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.des * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14576,18 +32921,18 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.pro /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.serializeBinaryToWriter ); } }; @@ -14602,22 +32947,22 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.ser * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_ = [[3,4]]; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase = { - START_NOT_SET: 0, - START_AFTER: 3, - START_AT: 4 +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + CONTESTED_RESOURCE_VALUES: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ResultCase} */ -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])); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_[0])); }; @@ -14635,8 +32980,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.toObject(opt_includeInstance, this); }; @@ -14645,17 +32990,15 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.Get * @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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - 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) + contestedResourceValues: (f = msg.getContestedResourceValues()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.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) { @@ -14669,23 +33012,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.Get /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14693,24 +33036,19 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.Get var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setEpoch(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinaryFromReader); + msg.setContestedResourceValues(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLimit(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.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); + 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(); @@ -14725,9 +33063,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.Get * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14735,230 +33073,281 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.Get /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); + f = message.getContestedResourceValues(); if (f != null) { - writer.writeUint32( + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.serializeBinaryToWriter ); } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); + f = message.getProof(); if (f != null) { - writer.writeUint32( + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter ); } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + f = message.getMetadata(); if (f != null) { - writer.writeBytes( + writer.writeMessage( 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 + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter ); } }; + /** - * optional uint32 epoch = 1; - * @return {number} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getEpoch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} 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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setEpoch = function(value) { - return jspb.Message.setField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.toObject(opt_includeInstance, this); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} 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.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearEpoch = function() { - return jspb.Message.setField(this, 1, undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.toObject = function(includeInstance, msg) { + var f, obj = { + contestedResourceValuesList: msg.getContestedResourceValuesList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasEpoch = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues; + return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinaryFromReader(msg, reader); }; /** - * optional uint32 limit = 2; - * @return {number} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.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.addContestedResourceValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setLimit = function(value) { - return jspb.Message.setField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearLimit = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContestedResourceValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } }; /** - * Returns whether this field is set. - * @return {boolean} + * repeated bytes contested_resource_values = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasLimit = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.getContestedResourceValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * optional bytes start_after = 3; - * @return {string} + * repeated bytes contested_resource_values = 1; + * This is a type-conversion wrapper around `getContestedResourceValuesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.getContestedResourceValuesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getContestedResourceValuesList())); }; /** - * optional bytes start_after = 3; - * This is a type-conversion wrapper around `getStartAfter()` - * @return {string} + * repeated bytes contested_resource_values = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContestedResourceValuesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartAfter())); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.getContestedResourceValuesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getContestedResourceValuesList())); }; /** - * 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} + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartAfter())); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.setContestedResourceValuesList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.addContestedResourceValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.clearContestedResourceValuesList = function() { + return this.setContestedResourceValuesList([]); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional ContestedResourceValues contested_resource_values = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasStartAfter = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getContestedResourceValues = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues, 1)); }; /** - * optional bytes start_at = 4; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.setContestedResourceValues = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_[0], value); }; /** - * optional bytes start_at = 4; - * This is a type-conversion wrapper around `getStartAt()` - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartAt())); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.clearContestedResourceValues = function() { + return this.setContestedResourceValues(undefined); }; /** - * 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} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartAt())); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.hasContestedResourceValues = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; @@ -14966,53 +33355,72 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.Get * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasStartAt = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.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.GetContestedResourcesResponse.GetContestedResourcesResponseV0.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.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * optional bool prove = 5; - * @return {boolean} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional GetEvonodesProposedEpochBlocksByRangeRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} + * optional GetContestedResourcesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} */ -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)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -15021,7 +33429,7 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.pro * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -15035,21 +33443,21 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.pro * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.VersionCase} */ -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])); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_[0])); }; @@ -15067,8 +33475,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.toObject(opt_includeInstance, this); }; @@ -15077,13 +33485,13 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -15097,23 +33505,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.toObject = function /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest; - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.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.GetIdentitiesBalancesRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -15121,8 +33529,8 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinaryFr var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -15138,9 +33546,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinaryFr * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15148,31 +33556,24 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.serialize /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.serializeBinaryToWriter ); } }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -15188,8 +33589,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.toObject(opt_includeInstance, this); }; @@ -15198,14 +33599,18 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalanc * @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} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - idsList: msg.getIdsList_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + startTimeInfo: (f = msg.getStartTimeInfo()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.toObject(includeInstance, f), + endTimeInfo: (f = msg.getEndTimeInfo()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.toObject(includeInstance, f), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0), + offset: jspb.Message.getFieldWithDefault(msg, 4, 0), + ascending: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -15219,23 +33624,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -15243,10 +33648,28 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalanc var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIds(value); + var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.deserializeBinaryFromReader); + msg.setStartTimeInfo(value); break; case 2: + var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinaryFromReader); + msg.setEndTimeInfo(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLimit(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOffset(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAscending(value); + break; + case 6: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -15263,9 +33686,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalanc * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15273,170 +33696,59 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalanc /** * 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} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( + f = message.getStartTimeInfo(); + if (f != null) { + writer.writeMessage( 1, + f, + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.serializeBinaryToWriter + ); + } + f = message.getEndTimeInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f + ); + } + f = message.getAscending(); + if (f) { + writer.writeBool( + 5, f ); } f = message.getProve(); if (f) { writer.writeBool( - 2, + 6, f ); } }; -/** - * repeated bytes ids = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes ids = 1; - * This is a type-conversion wrapper around `getIdsList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIdsList())); -}; - - -/** - * repeated bytes ids = 1; - * 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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIdsList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.setIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.addIds = 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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.clearIdsList = function() { - return this.setIdsList([]); -}; - - -/** - * optional bool prove = 2; - * @return {boolean} - */ -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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional GetIdentitiesBalancesRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} - */ -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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} returns this -*/ -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.GetIdentitiesBalancesRequest} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesResponse.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase} - */ -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])); -}; @@ -15453,8 +33765,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.toObject(opt_includeInstance, this); }; @@ -15463,13 +33775,14 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject(includeInstance, f) + startTimeMs: jspb.Message.getFieldWithDefault(msg, 1, 0), + startTimeIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -15483,23 +33796,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse; - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.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.GetIdentitiesBalancesResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -15507,9 +33820,12 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - 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); + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartTimeMs(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStartTimeIncluded(value); break; default: reader.skipField(); @@ -15524,9 +33840,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15534,188 +33850,62 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getStartTimeMs(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter + f ); } -}; - - - -/** - * 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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - IDENTITIES_BALANCES: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase} - */ -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])); -}; - - - -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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject = function(includeInstance, msg) { - var f, obj = { - 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) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; + f = message.getStartTimeIncluded(); + if (f) { + writer.writeBool( + 2, + f + ); } - return obj; }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} + * optional uint64 start_time_ms = 1; + * @return {number} */ -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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.getStartTimeMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.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; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.setStartTimeMs = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bool start_time_included = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.getStartTimeIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIdentitiesBalances(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.setStartTimeIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -15735,8 +33925,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.toObject(opt_includeInstance, this); }; @@ -15745,14 +33935,14 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan * @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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - balance: jspb.Message.getFieldWithDefault(msg, 2, 0) + endTimeMs: jspb.Message.getFieldWithDefault(msg, 1, 0), + endTimeIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -15766,23 +33956,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - 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); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -15790,12 +33980,12 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setEndTimeMs(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBalance(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEndTimeIncluded(value); break; default: reader.skipField(); @@ -15810,9 +34000,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15820,22 +34010,22 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getEndTimeMs(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint64( + f = message.getEndTimeIncluded(); + if (f) { + writer.writeBool( 2, f ); @@ -15844,71 +34034,66 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan /** - * optional bytes identity_id = 1; - * @return {string} + * optional uint64 end_time_ms = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.getEndTimeMs = 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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.setEndTimeMs = function(value) { + return jspb.Message.setProto3IntField(this, 1, 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} + * optional bool end_time_included = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.getEndTimeIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.setEndTimeIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional uint64 balance = 2; - * @return {number} + * optional StartAtTimeInfo start_time_info = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getStartTimeInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo, 1)); }; /** - * @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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setStartTimeInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.clearBalance = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearStartTimeInfo = function() { + return this.setStartTimeInfo(undefined); }; @@ -15916,233 +34101,181 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.hasBalance = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasStartTimeInfo = function() { + return jspb.Message.getField(this, 1) != null; }; - /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * optional EndAtTimeInfo end_time_info = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getEndTimeInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo, 2)); +}; +/** + * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setEndTimeInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, 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} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns 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); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearEndTimeInfo = function() { + return this.setEndTimeInfo(undefined); }; /** - * 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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasEndTimeInfo = function() { + return jspb.Message.getField(this, 2) != null; }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} + * optional uint32 limit = 3; + * @return {number} */ -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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances; - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinaryFromReader); - msg.addEntries(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearLimit = function() { + return jspb.Message.setField(this, 3, undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} 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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasLimit = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * repeated IdentityBalance entries = 1; - * @return {!Array} + * optional uint32 offset = 4; + * @return {number} */ -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)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.setEntriesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setOffset = function(value) { + return jspb.Message.setField(this, 4, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearOffset = function() { + return jspb.Message.setField(this, 4, undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.clearEntriesList = function() { - return this.setEntriesList([]); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasOffset = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional IdentitiesBalances identities_balances = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} + * optional bool ascending = 5; + * @return {boolean} */ -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)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getAscending = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; /** - * @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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.setIdentitiesBalances = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_[0], value); + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setAscending = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this + * optional bool prove = 6; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearIdentitiesBalances = function() { - return this.setIdentitiesBalances(undefined); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasIdentitiesBalances = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * optional GetVotePollsByEndDateRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} */ -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)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; @@ -16150,82 +34283,147 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.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.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)); -}; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_ = [[1]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * @return {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} 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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.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.GetVotePollsByEndDateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional GetIdentitiesBalancesResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} */ -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)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @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.GetIdentitiesBalancesResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetVotePollsByEndDateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.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.GetIdentitiesBalancesResponse} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.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.GetVotePollsByEndDateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.serializeBinaryToWriter + ); + } }; @@ -16238,21 +34436,22 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.hasV0 = * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + VOTE_POLLS_BY_TIMESTAMPS: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetProofsRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProofsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_[0])); }; @@ -16270,8 +34469,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.toObject(opt_includeInstance, this); }; @@ -16280,13 +34479,15 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.toObject(includeInstance, f) + votePollsByTimestamps: (f = msg.getVotePollsByTimestamps()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.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) { @@ -16300,23 +34501,23 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.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.GetProofsRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -16324,9 +34525,19 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.deserializeBinaryFromReader = f var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinaryFromReader); + msg.setVotePollsByTimestamps(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(); @@ -16341,9 +34552,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16351,18 +34562,34 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getVotePollsByTimestamps(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.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 ); } }; @@ -16374,7 +34601,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.serializeBinaryToWriter = funct * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.repeatedFields_ = [1,2,3,4]; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.repeatedFields_ = [2]; @@ -16391,8 +34618,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.toObject(opt_includeInstance, this); }; @@ -16401,20 +34628,14 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.to * @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.GetProofsRequest.GetProofsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.toObject = function(includeInstance, msg) { var f, obj = { - identitiesList: jspb.Message.toObjectList(msg.getIdentitiesList(), - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.toObject, includeInstance), - contractsList: jspb.Message.toObjectList(msg.getContractsList(), - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.toObject, includeInstance), - documentsList: jspb.Message.toObjectList(msg.getDocumentsList(), - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.toObject, includeInstance), - votesList: jspb.Message.toObjectList(msg.getVotesList(), - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.toObject, includeInstance) + timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), + serializedVotePollsList: msg.getSerializedVotePollsList_asB64() }; if (includeInstance) { @@ -16428,23 +34649,23 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.toObject = f /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.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.GetProofsRequest.GetProofsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -16452,24 +34673,12 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeB var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.deserializeBinaryFromReader); - msg.addIdentities(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.deserializeBinaryFromReader); - msg.addContracts(value); - break; - case 3: - var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.deserializeBinaryFromReader); - msg.addDocuments(value); - break; - case 4: - var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.deserializeBinaryFromReader); - msg.addVotes(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSerializedVotePolls(value); break; default: reader.skipField(); @@ -16484,9 +34693,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeB * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16494,47 +34703,115 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.se /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentitiesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.serializeBinaryToWriter + f ); } - f = message.getContractsList(); + f = message.getSerializedVotePollsList_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeRepeatedBytes( 2, - f, - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.serializeBinaryToWriter - ); - } - f = message.getDocumentsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.serializeBinaryToWriter - ); - } - f = message.getVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.serializeBinaryToWriter + f ); } }; +/** + * optional uint64 timestamp = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated bytes serialized_vote_polls = 2; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getSerializedVotePollsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes serialized_vote_polls = 2; + * This is a type-conversion wrapper around `getSerializedVotePollsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getSerializedVotePollsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSerializedVotePollsList())); +}; + + +/** + * repeated bytes serialized_vote_polls = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSerializedVotePollsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getSerializedVotePollsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSerializedVotePollsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.setSerializedVotePollsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.addSerializedVotePolls = 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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.clearSerializedVotePollsList = function() { + return this.setSerializedVotePollsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.repeatedFields_ = [1]; @@ -16551,8 +34828,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.toObject(opt_includeInstance, this); }; @@ -16561,17 +34838,15 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequ * @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.GetProofsRequest.GetProofsRequestV0.DocumentRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64(), - documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), - documentTypeKeepsHistory: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - documentId: msg.getDocumentId_asB64(), - documentContestedStatus: jspb.Message.getFieldWithDefault(msg, 5, 0) + votePollsByTimestampsList: jspb.Message.toObjectList(msg.getVotePollsByTimestampsList(), + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.toObject, includeInstance), + finishedResults: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -16585,23 +34860,23 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.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.GetProofsRequest.GetProofsRequestV0.DocumentRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -16609,24 +34884,13 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); + var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinaryFromReader); + msg.addVotePollsByTimestamps(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentType(value); - break; - case 3: var value = /** @type {boolean} */ (reader.readBool()); - msg.setDocumentTypeKeepsHistory(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDocumentId(value); - break; - case 5: - var value = /** @type {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} */ (reader.readEnum()); - msg.setDocumentContestedStatus(value); + msg.setFinishedResults(value); break; default: reader.skipField(); @@ -16641,9 +34905,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16651,44 +34915,24 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); + f = message.getVotePollsByTimestampsList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getDocumentType(); - if (f.length > 0) { - writer.writeString( - 2, - f + f, + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.serializeBinaryToWriter ); } - f = message.getDocumentTypeKeepsHistory(); + f = message.getFinishedResults(); if (f) { writer.writeBool( - 3, - f - ); - } - f = message.getDocumentId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getDocumentContestedStatus(); - if (f !== 0.0) { - writer.writeEnum( - 5, + 2, f ); } @@ -16696,349 +34940,237 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequ /** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus = { - NOT_CONTESTED: 0, - MAYBE_CONTESTED: 1, - CONTESTED: 2 -}; - -/** - * optional bytes contract_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes contract_id = 1; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); -}; - - -/** - * optional bytes contract_id = 1; - * 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 SerializedVotePollsByTimestamp vote_polls_by_timestamps = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.getVotePollsByTimestampsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp, 1)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.setVotePollsByTimestampsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional string document_type = 2; - * @return {string} + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.addVotePollsByTimestamps = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp, opt_index); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentType = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.clearVotePollsByTimestampsList = function() { + return this.setVotePollsByTimestampsList([]); }; /** - * optional bool document_type_keeps_history = 3; + * optional bool finished_results = 2; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentTypeKeepsHistory = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.getFinishedResults = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentTypeKeepsHistory = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional bytes document_id = 4; - * @return {string} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.setFinishedResults = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional bytes document_id = 4; - * This is a type-conversion wrapper around `getDocumentId()` - * @return {string} + * optional SerializedVotePollsByTimestamps vote_polls_by_timestamps = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDocumentId())); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getVotePollsByTimestamps = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps, 1)); }; /** - * optional bytes document_id = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDocumentId()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDocumentId())); + * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.setVotePollsByTimestamps = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_[0], value); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentId = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.clearVotePollsByTimestamps = function() { + return this.setVotePollsByTimestamps(undefined); }; /** - * optional DocumentContestedStatus document_contested_status = 5; - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentContestedStatus = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.hasVotePollsByTimestamps = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentContestedStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_[0], 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} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * 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.GetProofsRequest.GetProofsRequestV0.IdentityRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.toObject = function(includeInstance, msg) { - var f, obj = { - identityId: msg.getIdentityId_asB64(), - requestType: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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 {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} */ (reader.readEnum()); - msg.setRequestType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, 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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} 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.GetProofsRequest.GetProofsRequestV0.IdentityRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIdentityId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getRequestType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * @enum {number} + * optional GetVotePollsByEndDateResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type = { - FULL_IDENTITY: 0, - BALANCE: 1, - KEYS: 2, - REVISION: 3 +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0, 1)); }; + /** - * optional bytes identity_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.getIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); + * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_[0], value); }; /** - * optional bytes identity_id = 1; - * This is a type-conversion wrapper around `getIdentityId()` - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.getIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * 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} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} 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.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_ = [[1]]; /** - * optional Type request_type = 2; - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.getRequestType = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; - /** - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} returns this + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.setRequestType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -17052,8 +35184,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.toObject(opt_includeInstance, this); }; @@ -17062,13 +35194,13 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequ * @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.GetProofsRequest.GetProofsRequestV0.ContractRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64() + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -17082,23 +35214,23 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.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.GetProofsRequest.GetProofsRequestV0.ContractRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -17106,8 +35238,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -17122,9 +35255,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -17132,89 +35265,30 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getV0(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.serializeBinaryToWriter ); } }; -/** - * optional bytes contract_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes contract_id = 1; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); -}; - - -/** - * optional bytes contract_id = 1; - * 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.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.setContractId = 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>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase = { - REQUEST_TYPE_NOT_SET: 0, - CONTESTED_RESOURCE_VOTE_STATUS_REQUEST: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.getRequestTypeCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.repeatedFields_ = [4]; @@ -17231,8 +35305,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.toObject(opt_includeInstance, this); }; @@ -17241,13 +35315,21 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * @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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - contestedResourceVoteStatusRequest: (f = msg.getContestedResourceVoteStatusRequest()) && proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.toObject(includeInstance, f) + contractId: msg.getContractId_asB64(), + documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), + indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), + indexValuesList: msg.getIndexValuesList_asB64(), + resultType: jspb.Message.getFieldWithDefault(msg, 5, 0), + allowIncludeLockedAndAbstainingVoteTally: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + startAtIdentifierInfo: (f = msg.getStartAtIdentifierInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.toObject(includeInstance, f), + count: jspb.Message.getFieldWithDefault(msg, 8, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) }; if (includeInstance) { @@ -17261,23 +35343,23 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -17285,9 +35367,41 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.deserializeBinaryFromReader); - msg.setContestedResourceVoteStatusRequest(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentTypeName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setIndexName(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIndexValues(value); + break; + case 5: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} */ (reader.readEnum()); + msg.setResultType(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowIncludeLockedAndAbstainingVoteTally(value); + break; + case 7: + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader); + msg.setStartAtIdentifierInfo(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCount(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -17302,9 +35416,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -17312,30 +35426,88 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContestedResourceVoteStatusRequest(); + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentTypeName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIndexName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getIndexValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } + f = message.getResultType(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } + f = message.getAllowIncludeLockedAndAbstainingVoteTally(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getStartAtIdentifierInfo(); if (f != null) { writer.writeMessage( - 1, + 7, f, - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeUint32( + 8, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 9, + f ); } }; - /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.repeatedFields_ = [4]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType = { + DOCUMENTS: 0, + VOTE_TALLY: 1, + DOCUMENTS_AND_VOTE_TALLY: 2 +}; + @@ -17352,8 +35524,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.toObject(opt_includeInstance, this); }; @@ -17362,17 +35534,14 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * @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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64(), - documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), - indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), - indexValuesList: msg.getIndexValuesList_asB64(), - voterIdentifier: msg.getVoterIdentifier_asB64() + startIdentifier: msg.getStartIdentifier_asB64(), + startIdentifierIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -17386,48 +35555,36 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.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.setContractId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentTypeName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setIndexName(value); + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { break; - case 4: + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIndexValues(value); + msg.setStartIdentifier(value); break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setVoterIdentifier(value); + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStartIdentifierIncluded(value); break; default: reader.skipField(); @@ -17442,9 +35599,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -17452,47 +35609,86 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); + f = message.getStartIdentifier_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getDocumentTypeName(); - if (f.length > 0) { - writer.writeString( + f = message.getStartIdentifierIncluded(); + if (f) { + writer.writeBool( 2, f ); } - f = message.getIndexName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getIndexValuesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 4, - f - ); - } - f = message.getVoterIdentifier_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } +}; + + +/** + * optional bytes start_identifier = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes start_identifier = 1; + * This is a type-conversion wrapper around `getStartIdentifier()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartIdentifier())); +}; + + +/** + * optional bytes start_identifier = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartIdentifier()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartIdentifier())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifier = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool start_identifier_included = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifierIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifierIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -17500,7 +35696,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * optional bytes contract_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getContractId = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getContractId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -17510,7 +35706,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * This is a type-conversion wrapper around `getContractId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getContractId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getContractId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getContractId())); }; @@ -17523,7 +35719,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * This is a type-conversion wrapper around `getContractId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getContractId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getContractId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getContractId())); }; @@ -17531,9 +35727,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setContractId = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setContractId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -17542,16 +35738,16 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * optional string document_type_name = 2; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getDocumentTypeName = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getDocumentTypeName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setDocumentTypeName = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setDocumentTypeName = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -17560,16 +35756,16 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * optional string index_name = 3; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexName = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setIndexName = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setIndexName = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; @@ -17578,7 +35774,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * repeated bytes index_values = 4; * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexValuesList = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexValuesList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); }; @@ -17588,7 +35784,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * This is a type-conversion wrapper around `getIndexValuesList()` * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexValuesList_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexValuesList_asB64 = function() { return /** @type {!Array} */ (jspb.Message.bytesListAsB64( this.getIndexValuesList())); }; @@ -17601,7 +35797,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * This is a type-conversion wrapper around `getIndexValuesList()` * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexValuesList_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexValuesList_asU8 = function() { return /** @type {!Array} */ (jspb.Message.bytesListAsU8( this.getIndexValuesList())); }; @@ -17609,9 +35805,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setIndexValuesList = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setIndexValuesList = function(value) { return jspb.Message.setField(this, 4, value || []); }; @@ -17619,89 +35815,83 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.addIndexValues = function(value, opt_index) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.addIndexValues = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.clearIndexValuesList = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.clearIndexValuesList = function() { return this.setIndexValuesList([]); }; /** - * optional bytes voter_identifier = 5; - * @return {string} + * optional ResultType result_type = 5; + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getVoterIdentifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getResultType = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * optional bytes voter_identifier = 5; - * This is a type-conversion wrapper around `getVoterIdentifier()` - * @return {string} + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getVoterIdentifier_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getVoterIdentifier())); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setResultType = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); }; /** - * optional bytes voter_identifier = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getVoterIdentifier()` - * @return {!Uint8Array} + * optional bool allow_include_locked_and_abstaining_vote_tally = 6; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getVoterIdentifier_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getVoterIdentifier())); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getAllowIncludeLockedAndAbstainingVoteTally = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setVoterIdentifier = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setAllowIncludeLockedAndAbstainingVoteTally = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); }; /** - * optional ContestedResourceVoteStatusRequest contested_resource_vote_status_request = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} + * optional StartAtIdentifierInfo start_at_identifier_info = 7; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.getContestedResourceVoteStatusRequest = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getStartAtIdentifierInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo, 7)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.setContestedResourceVoteStatusRequest = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setStartAtIdentifierInfo = function(value) { + return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.clearContestedResourceVoteStatusRequest = function() { - return this.setContestedResourceVoteStatusRequest(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.clearStartAtIdentifierInfo = function() { + return this.setStartAtIdentifierInfo(undefined); }; @@ -17709,188 +35899,35 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.hasContestedResourceVoteStatusRequest = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated IdentityRequest identities = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getIdentitiesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setIdentitiesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addIdentities = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearIdentitiesList = function() { - return this.setIdentitiesList([]); -}; - - -/** - * repeated ContractRequest contracts = 2; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getContractsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setContractsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addContracts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearContractsList = function() { - return this.setContractsList([]); -}; - - -/** - * repeated DocumentRequest documents = 3; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getDocumentsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setDocumentsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addDocuments = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearDocumentsList = function() { - return this.setDocumentsList([]); -}; - - -/** - * repeated VoteStatusRequest votes = 4; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, opt_index); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.hasStartAtIdentifierInfo = function() { + return jspb.Message.getField(this, 7) != null; }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + * optional uint32 count = 8; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearVotesList = function() { - return this.setVotesList([]); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** - * optional GetProofsRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setCount = function(value) { + return jspb.Message.setField(this, 8, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.clearCount = function() { + return jspb.Message.setField(this, 8, undefined); }; @@ -17898,147 +35935,63 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.clearV0 = function() * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsResponse.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetProofsResponse.VersionCase} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProofsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.hasCount = function() { + return jspb.Message.getField(this, 8) != null; }; - -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 = 9; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, 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.GetProofsResponse} 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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} + * optional GetContestedResourceVoteStateRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsResponse; - return proto.org.dash.platform.dapi.v0.GetProofsResponse.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0, 1)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetProofsResponse.GetProofsResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializeBinaryFromReader); - msg.setV0(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.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.GetContestedResourceVoteStateRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.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.GetProofsResponse} 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.GetProofsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -18051,21 +36004,21 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.serializeBinaryToWriter = func * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - PROOF: 1 +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_[0])); }; @@ -18083,8 +36036,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.toObject(opt_includeInstance, this); }; @@ -18093,14 +36046,13 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.GetProofsResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.toObject = function(includeInstance, msg) { var f, obj = { - 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -18114,23 +36066,23 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0; - return proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.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.GetProofsResponse.GetProofsResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18138,14 +36090,9 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - 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 2: - 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 proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -18160,9 +36107,9 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18170,142 +36117,23 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProof(); + f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter - ); - } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.serializeBinaryToWriter ); } }; -/** - * optional Proof proof = 1; - * @return {?proto.org.dash.platform.dapi.v0.Proof} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.getProof = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ResponseMetadata metadata = 2; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.getMetadata = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 2)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional GetProofsResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; -}; - - /** * Oneof group definitions for this message. Each group defines the field @@ -18315,21 +36143,22 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.hasV0 = function() { * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + CONTESTED_RESOURCE_CONTENDERS: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_[0])); }; @@ -18347,8 +36176,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.toObject(opt_includeInstance, this); }; @@ -18357,13 +36186,15 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.toObject(includeInstance, f) + contestedResourceContenders: (f = msg.getContestedResourceContenders()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.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) { @@ -18377,23 +36208,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractRequest; - return proto.org.dash.platform.dapi.v0.GetDataContractRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.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.GetDataContractRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18401,9 +36232,19 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinaryFromReader); + msg.setContestedResourceContenders(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(); @@ -18418,9 +36259,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18428,18 +36269,34 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getContestedResourceContenders(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.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 ); } }; @@ -18461,8 +36318,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.toObject(opt_includeInstance, this); }; @@ -18471,14 +36328,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0. * @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.GetDataContractRequest.GetDataContractRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + finishedVoteOutcome: jspb.Message.getFieldWithDefault(msg, 1, 0), + wonByIdentityId: msg.getWonByIdentityId_asB64(), + finishedAtBlockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + finishedAtCoreBlockHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + finishedAtBlockTimeMs: jspb.Message.getFieldWithDefault(msg, 5, 0), + finishedAtEpoch: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -18492,23 +36353,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0. /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0; - return proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.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.GetDataContractRequest.GetDataContractRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18516,12 +36377,28 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0. var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} */ (reader.readEnum()); + msg.setFinishedVoteOutcome(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWonByIdentityId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFinishedAtBlockHeight(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFinishedAtCoreBlockHeight(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFinishedAtBlockTimeMs(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFinishedAtEpoch(value); break; default: reader.skipField(); @@ -18536,9 +36413,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0. * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18546,151 +36423,223 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getFinishedVoteOutcome(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( 2, f ); } + f = message.getFinishedAtBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getFinishedAtCoreBlockHeight(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getFinishedAtBlockTimeMs(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getFinishedAtEpoch(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } }; /** - * optional bytes id = 1; + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome = { + TOWARDS_IDENTITY: 0, + LOCKED: 1, + NO_PREVIOUS_WINNER: 2 +}; + +/** + * optional FinishedVoteOutcome finished_vote_outcome = 1; + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedVoteOutcome = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedVoteOutcome = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bytes won_by_identity_id = 2; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getWonByIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` + * optional bytes won_by_identity_id = 2; + * This is a type-conversion wrapper around `getWonByIdentityId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.getId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getWonByIdentityId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + this.getWonByIdentityId())); }; /** - * optional bytes id = 1; + * optional bytes won_by_identity_id = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` + * This is a type-conversion wrapper around `getWonByIdentityId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.getId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getWonByIdentityId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); + this.getWonByIdentityId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setWonByIdentityId = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * optional bool prove = 2; + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.clearWonByIdentityId = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.hasWonByIdentityId = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} returns this + * optional uint64 finished_at_block_height = 3; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * optional GetDataContractRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractRequest.oneofGroups_[0], value); + * optional uint32 finished_at_core_block_height = 4; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtCoreBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtCoreBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional uint64 finished_at_block_time_ms = 5; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtBlockTimeMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtBlockTimeMs = function(value) { + return jspb.Message.setProto3IntField(this, 5, 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 uint32 finished_at_epoch = 6; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + /** - * @enum {number} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; + + /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractResponse.VersionCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractResponse.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.repeatedFields_ = [1]; @@ -18707,8 +36656,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.toObject(opt_includeInstance, this); }; @@ -18717,13 +36666,17 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.toObject(includeInstance, f) + contendersList: jspb.Message.toObjectList(msg.getContendersList(), + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.toObject, includeInstance), + abstainVoteTally: jspb.Message.getFieldWithDefault(msg, 2, 0), + lockVoteTally: jspb.Message.getFieldWithDefault(msg, 3, 0), + finishedVoteInfo: (f = msg.getFinishedVoteInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.toObject(includeInstance, f) }; if (includeInstance) { @@ -18737,23 +36690,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractResponse; - return proto.org.dash.platform.dapi.v0.GetDataContractResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.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.GetDataContractResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18761,9 +36714,22 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.deserializeBinaryFromRea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinaryFromReader); + msg.addContenders(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setAbstainVoteTally(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLockVoteTally(value); + break; + case 4: + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinaryFromReader); + msg.setFinishedVoteInfo(value); break; default: reader.skipField(); @@ -18778,9 +36744,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18788,52 +36754,195 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getContendersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = message.getFinishedVoteInfo(); if (f != null) { writer.writeMessage( - 1, + 4, f, - proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.serializeBinaryToWriter ); } }; +/** + * repeated Contender contenders = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getContendersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender, 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setContendersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.addContenders = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender, opt_index); +}; + /** - * @enum {number} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - DATA_CONTRACT: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearContendersList = function() { + return this.setContendersList([]); +}; + + +/** + * optional uint32 abstain_vote_tally = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getAbstainVoteTally = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.ResultCase} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setAbstainVoteTally = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearAbstainVoteTally = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.hasAbstainVoteTally = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 lock_vote_tally = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getLockVoteTally = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setLockVoteTally = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearLockVoteTally = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.hasLockVoteTally = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional FinishedVoteInfo finished_vote_info = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getFinishedVoteInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo, 4)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setFinishedVoteInfo = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearFinishedVoteInfo = function() { + return this.setFinishedVoteInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.hasFinishedVoteInfo = function() { + return jspb.Message.getField(this, 4) != null; }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -18847,8 +36956,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.toObject(opt_includeInstance, this); }; @@ -18857,15 +36966,15 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * @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.GetDataContractResponse.GetDataContractResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.toObject = function(includeInstance, msg) { var f, obj = { - dataContract: msg.getDataContract_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) + identifier: msg.getIdentifier_asB64(), + voteCount: jspb.Message.getFieldWithDefault(msg, 2, 0), + document: msg.getDocument_asB64() }; if (includeInstance) { @@ -18879,23 +36988,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0; - return proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.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.GetDataContractResponse.GetDataContractResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18904,17 +37013,15 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDataContract(value); + msg.setIdentifier(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 {number} */ (reader.readUint32()); + msg.setVoteCount(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.setDocument(value); break; default: reader.skipField(); @@ -18929,9 +37036,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18939,86 +37046,102 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); - if (f != null) { + f = message.getIdentifier_asU8(); + if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getProof(); + f = /** @type {number} */ (jspb.Message.getField(message, 2)); if (f != null) { - writer.writeMessage( + writer.writeUint32( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); if (f != null) { - writer.writeMessage( + writer.writeBytes( 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + f ); } }; /** - * optional bytes data_contract = 1; + * optional bytes identifier = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getDataContract = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getIdentifier = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes data_contract = 1; - * This is a type-conversion wrapper around `getDataContract()` + * optional bytes identifier = 1; + * This is a type-conversion wrapper around `getIdentifier()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getDataContract_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getIdentifier_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDataContract())); + this.getIdentifier())); }; /** - * optional bytes data_contract = 1; + * optional bytes identifier = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDataContract()` + * This is a type-conversion wrapper around `getIdentifier()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getDataContract_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getIdentifier_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDataContract())); + this.getIdentifier())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.setDataContract = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.setIdentifier = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 vote_count = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getVoteCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.setVoteCount = function(value) { + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.clearDataContract = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0], undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.clearVoteCount = function() { + return jspb.Message.setField(this, 2, undefined); }; @@ -19026,7 +37149,104 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.hasDataContract = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.hasVoteCount = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes document = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getDocument = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes document = 3; + * This is a type-conversion wrapper around `getDocument()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getDocument_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDocument())); +}; + + +/** + * optional bytes document = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDocument()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getDocument_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDocument())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.setDocument = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.clearDocument = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.hasDocument = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ContestedResourceContenders contested_resource_contenders = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.getContestedResourceContenders = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.setContestedResourceContenders = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.clearContestedResourceContenders = function() { + return this.setContestedResourceContenders(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.hasContestedResourceContenders = function() { return jspb.Message.getField(this, 1) != null; }; @@ -19035,7 +37255,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -19043,18 +37263,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -19063,7 +37283,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -19072,7 +37292,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -19080,18 +37300,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -19100,35 +37320,35 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetDataContractResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} + * optional GetContestedResourceVoteStateResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -19137,7 +37357,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.clearV0 = func * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -19151,21 +37371,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.hasV0 = functi * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractsRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.oneofGroups_[0])); }; @@ -19183,8 +37403,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.toObject(opt_includeInstance, this); }; @@ -19193,13 +37413,13 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -19213,23 +37433,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsRequest; - return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.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.GetDataContractsRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19237,8 +37457,8 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.deserializeBinaryFromRea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -19254,9 +37474,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractsRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19264,18 +37484,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.serializeBinaryToWriter ); } }; @@ -19287,7 +37507,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.serializeBinaryToWriter * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.repeatedFields_ = [4]; @@ -19304,8 +37524,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.toObject(opt_includeInstance, this); }; @@ -19314,14 +37534,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV * @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.GetDataContractsRequest.GetDataContractsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - idsList: msg.getIdsList_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + contractId: msg.getContractId_asB64(), + documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), + indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), + indexValuesList: msg.getIndexValuesList_asB64(), + contestantId: msg.getContestantId_asB64(), + startAtIdentifierInfo: (f = msg.getStartAtIdentifierInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.toObject(includeInstance, f), + count: jspb.Message.getFieldWithDefault(msg, 7, 0), + orderAscending: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) }; if (includeInstance) { @@ -19335,23 +37562,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0; - return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.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.GetDataContractsRequest.GetDataContractsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19360,9 +37587,38 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIds(value); + msg.setContractId(value); break; case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentTypeName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setIndexName(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIndexValues(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContestantId(value); + break; + case 6: + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader); + msg.setStartAtIdentifierInfo(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCount(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOrderAscending(value); + break; + case 9: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -19379,9 +37635,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19389,20 +37645,194 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdsList_asU8(); + f = message.getContractId_asU8(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeBytes( 1, f ); } + f = message.getDocumentTypeName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIndexName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getIndexValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } + f = message.getContestantId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getStartAtIdentifierInfo(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeUint32( + 7, + f + ); + } + f = message.getOrderAscending(); + if (f) { + writer.writeBool( + 8, + f + ); + } f = message.getProve(); + if (f) { + writer.writeBool( + 9, + f + ); + } +}; + + + + + +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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.toObject = function(includeInstance, msg) { + var f, obj = { + startIdentifier: msg.getStartIdentifier_asB64(), + startIdentifierIncluded: 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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.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.setStartIdentifier(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStartIdentifierIncluded(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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartIdentifier_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getStartIdentifierIncluded(); if (f) { writer.writeBool( 2, @@ -19413,109 +37843,307 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV /** - * repeated bytes ids = 1; - * @return {!Array} + * optional bytes start_identifier = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes start_identifier = 1; + * This is a type-conversion wrapper around `getStartIdentifier()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartIdentifier())); +}; + + +/** + * optional bytes start_identifier = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartIdentifier()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartIdentifier())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifier = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool start_identifier_included = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifierIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifierIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string document_type_name = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getDocumentTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setDocumentTypeName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string index_name = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setIndexName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated bytes index_values = 4; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * repeated bytes index_values = 4; + * This is a type-conversion wrapper around `getIndexValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexValuesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIndexValuesList())); +}; + + +/** + * repeated bytes index_values = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIndexValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexValuesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIndexValuesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setIndexValuesList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.addIndexValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.clearIndexValuesList = function() { + return this.setIndexValuesList([]); }; /** - * repeated bytes ids = 1; - * This is a type-conversion wrapper around `getIdsList()` - * @return {!Array} + * optional bytes contestant_id = 5; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getIdsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIdsList())); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContestantId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * repeated bytes ids = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdsList()` - * @return {!Array} + * optional bytes contestant_id = 5; + * This is a type-conversion wrapper around `getContestantId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getIdsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIdsList())); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContestantId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContestantId())); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + * optional bytes contestant_id = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContestantId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.setIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContestantId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContestantId())); }; /** * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.addIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setContestantId = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + * optional StartAtIdentifierInfo start_at_identifier_info = 6; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.clearIdsList = function() { - return this.setIdsList([]); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getStartAtIdentifierInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo, 6)); }; /** - * optional bool prove = 2; - * @return {boolean} + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setStartAtIdentifierInfo = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.clearStartAtIdentifierInfo = function() { + return this.setStartAtIdentifierInfo(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.hasStartAtIdentifierInfo = function() { + return jspb.Message.getField(this, 6) != null; }; /** - * optional GetDataContractsRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} + * optional uint32 count = 7; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.oneofGroups_[0], value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setCount = function(value) { + return jspb.Message.setField(this, 7, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.clearCount = function() { + return jspb.Message.setField(this, 7, undefined); }; @@ -19523,150 +38151,109 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.clearV0 = func * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.hasCount = function() { + return jspb.Message.getField(this, 7) != 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 bool order_ascending = 8; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getOrderAscending = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + /** - * @enum {number} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setOrderAscending = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase} + * optional bool prove = 9; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); }; - -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} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, 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.GetDataContractsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional GetContestedResourceVotersForIdentityRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0, 1)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse; - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.deserializeBinaryFromReader(msg, reader); + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.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.GetDataContractsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractsResponse.GetDataContractsResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.deserializeBinaryFromReader); - msg.setV0(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.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.GetDataContractsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.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.GetDataContractsResponse} 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.GetDataContractsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.serializeBinaryToWriter - ); - } -}; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_ = [[1]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; +/** + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_[0])); +}; @@ -19683,8 +38270,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.toObject(opt_includeInstance, this); }; @@ -19693,14 +38280,13 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.proto * @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.GetDataContractsResponse.DataContractEntry} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.toObject = function(includeInstance, msg) { var f, obj = { - identifier: msg.getIdentifier_asB64(), - dataContract: (f = msg.getDataContract()) && google_protobuf_wrappers_pb.BytesValue.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -19714,23 +38300,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.toObj /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry; - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.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.GetDataContractsResponse.DataContractEntry} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19738,13 +38324,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deser var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentifier(value); - break; - case 2: - var value = new google_protobuf_wrappers_pb.BytesValue; - reader.readMessage(value,google_protobuf_wrappers_pb.BytesValue.deserializeBinaryFromReader); - msg.setDataContract(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -19759,9 +38341,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deser * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19769,119 +38351,52 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.proto /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentifier_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getDataContract(); + f = message.getV0(); if (f != null) { writer.writeMessage( - 2, + 1, f, - google_protobuf_wrappers_pb.BytesValue.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.serializeBinaryToWriter ); } }; -/** - * optional bytes identifier = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getIdentifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes identifier = 1; - * This is a type-conversion wrapper around `getIdentifier()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getIdentifier_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentifier())); -}; - - -/** - * optional bytes identifier = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentifier()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getIdentifier_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentifier())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} returns this - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.setIdentifier = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - /** - * optional google.protobuf.BytesValue data_contract = 2; - * @return {?proto.google.protobuf.BytesValue} + * 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.GetDataContractsResponse.DataContractEntry.prototype.getDataContract = function() { - return /** @type{?proto.google.protobuf.BytesValue} */ ( - jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BytesValue, 2)); -}; - - -/** - * @param {?proto.google.protobuf.BytesValue|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} returns this -*/ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.setDataContract = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_ = [[1,2]]; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.clearDataContract = function() { - return this.setDataContract(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + CONTESTED_RESOURCE_VOTERS: 1, + PROOF: 2 }; - /** - * Returns whether this field is set. - * @return {boolean} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.hasDataContract = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_[0])); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.repeatedFields_ = [1]; - - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -19895,8 +38410,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.toObject(opt_includeInstance, this); }; @@ -19905,14 +38420,15 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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.GetDataContractsResponse.DataContracts} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - dataContractEntriesList: jspb.Message.toObjectList(msg.getDataContractEntriesList(), - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.toObject, includeInstance) + contestedResourceVoters: (f = msg.getContestedResourceVoters()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.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) { @@ -19926,23 +38442,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.toObject /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts; - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.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.GetDataContractsResponse.DataContracts} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19950,114 +38466,83 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deseriali var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deserializeBinaryFromReader); - msg.addDataContractEntries(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinaryFromReader); + msg.setContestedResourceVoters(value); break; - default: - reader.skipField(); + 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; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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.GetDataContractsResponse.DataContracts} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDataContractEntriesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated DataContractEntry data_contract_entries = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.getDataContractEntriesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} returns this -*/ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.setDataContractEntriesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + 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; }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.addDataContractEntries = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry, opt_index); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.clearDataContractEntriesList = function() { - return this.setDataContractEntriesList([]); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContestedResourceVoters(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.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 + ); + } }; /** - * 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.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - DATA_CONTRACTS: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.repeatedFields_ = [1]; @@ -20074,8 +38559,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.toObject(opt_includeInstance, this); }; @@ -20084,15 +38569,14 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * @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.GetDataContractsResponse.GetDataContractsResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.toObject = function(includeInstance, msg) { var f, obj = { - dataContracts: (f = msg.getDataContracts()) && proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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) + votersList: msg.getVotersList_asB64(), + finishedResults: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -20106,23 +38590,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0; - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.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.GetDataContractsResponse.GetDataContractsResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20130,19 +38614,12 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deserializeBinaryFromReader); - msg.setDataContracts(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addVoters(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 {boolean} */ (reader.readBool()); + msg.setFinishedResults(value); break; default: reader.skipField(); @@ -20157,9 +38634,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20167,64 +38644,133 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDataContracts(); - if (f != null) { - writer.writeMessage( + f = message.getVotersList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.serializeBinaryToWriter + f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getFinishedResults(); + if (f) { + writer.writeBool( 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 + f ); } }; /** - * optional DataContracts data_contracts = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} + * repeated bytes voters = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.getDataContracts = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getVotersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + * repeated bytes voters = 1; + * This is a type-conversion wrapper around `getVotersList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getVotersList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getVotersList())); +}; + + +/** + * repeated bytes voters = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getVotersList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getVotersList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getVotersList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.setVotersList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.addVoters = 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.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.clearVotersList = function() { + return this.setVotersList([]); +}; + + +/** + * optional bool finished_results = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getFinishedResults = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.setFinishedResults = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional ContestedResourceVoters contested_resource_voters = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getContestedResourceVoters = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.setDataContracts = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.setContestedResourceVoters = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.clearDataContracts = function() { - return this.setDataContracts(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.clearContestedResourceVoters = function() { + return this.setContestedResourceVoters(undefined); }; @@ -20232,7 +38778,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.hasDataContracts = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.hasContestedResourceVoters = function() { return jspb.Message.getField(this, 1) != null; }; @@ -20241,7 +38787,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -20249,18 +38795,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -20269,7 +38815,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -20278,7 +38824,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -20286,18 +38832,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -20306,35 +38852,35 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetDataContractsResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} + * optional GetContestedResourceVotersForIdentityResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -20343,7 +38889,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.clearV0 = fun * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -20357,21 +38903,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.hasV0 = funct * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_[0])); }; @@ -20389,8 +38935,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.toObject(opt_includeInstance, this); }; @@ -20399,13 +38945,13 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -20419,23 +38965,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest; - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.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.GetDataContractHistoryRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20443,8 +38989,8 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -20460,9 +39006,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20470,18 +39016,196 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( - 1, + 1, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + limit: (f = msg.getLimit()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + offset: (f = msg.getOffset()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + orderAscending: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + startAtVotePollIdInfo: (f = msg.getStartAtVotePollIdInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.toObject(includeInstance, f), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 6, 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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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 google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setLimit(value); + break; + case 3: + var value = new google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setOffset(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOrderAscending(value); + break; + case 5: + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.deserializeBinaryFromReader); + msg.setStartAtVotePollIdInfo(value); + break; + case 6: + 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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getLimit(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter + ); + } + f = message.getOffset(); + if (f != null) { + writer.writeMessage( + 3, f, - proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.serializeBinaryToWriter + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter + ); + } + f = message.getOrderAscending(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getStartAtVotePollIdInfo(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.serializeBinaryToWriter + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 6, + f ); } }; @@ -20503,8 +39227,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.toObject(opt_includeInstance, this); }; @@ -20513,17 +39237,14 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis * @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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - limit: (f = msg.getLimit()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - offset: (f = msg.getOffset()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - startAtMs: jspb.Message.getFieldWithDefault(msg, 4, 0), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + startAtPollIdentifier: msg.getStartAtPollIdentifier_asB64(), + startPollIdentifierIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -20537,23 +39258,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0; - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20562,25 +39283,11 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + msg.setStartAtPollIdentifier(value); break; case 2: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setLimit(value); - break; - case 3: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setOffset(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartAtMs(value); - break; - case 5: var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + msg.setStartPollIdentifierIncluded(value); break; default: reader.skipField(); @@ -20595,9 +39302,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20605,46 +39312,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); + f = message.getStartAtPollIdentifier_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getLimit(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getOffset(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getStartAtMs(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getProve(); + f = message.getStartPollIdentifierIncluded(); if (f) { writer.writeBool( - 5, + 2, f ); } @@ -20652,43 +39336,103 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis /** - * optional bytes id = 1; + * optional bytes start_at_poll_identifier = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getId = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartAtPollIdentifier = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` + * optional bytes start_at_poll_identifier = 1; + * This is a type-conversion wrapper around `getStartAtPollIdentifier()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartAtPollIdentifier_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + this.getStartAtPollIdentifier())); }; /** - * optional bytes id = 1; + * optional bytes start_at_poll_identifier = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` + * This is a type-conversion wrapper around `getStartAtPollIdentifier()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartAtPollIdentifier_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); + this.getStartAtPollIdentifier())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setId = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.setStartAtPollIdentifier = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool start_poll_identifier_included = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartPollIdentifierIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.setStartPollIdentifierIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setIdentityId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -20697,7 +39441,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis * optional google.protobuf.UInt32Value limit = 2; * @return {?proto.google.protobuf.UInt32Value} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getLimit = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getLimit = function() { return /** @type{?proto.google.protobuf.UInt32Value} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 2)); }; @@ -20705,18 +39449,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis /** * @param {?proto.google.protobuf.UInt32Value|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setLimit = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setLimit = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.clearLimit = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.clearLimit = function() { return this.setLimit(undefined); }; @@ -20725,7 +39469,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.hasLimit = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.hasLimit = function() { return jspb.Message.getField(this, 2) != null; }; @@ -20734,7 +39478,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis * optional google.protobuf.UInt32Value offset = 3; * @return {?proto.google.protobuf.UInt32Value} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getOffset = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getOffset = function() { return /** @type{?proto.google.protobuf.UInt32Value} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 3)); }; @@ -20742,18 +39486,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis /** * @param {?proto.google.protobuf.UInt32Value|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setOffset = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setOffset = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.clearOffset = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.clearOffset = function() { return this.setOffset(undefined); }; @@ -20762,71 +39506,108 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.hasOffset = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.hasOffset = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional uint64 start_at_ms = 4; - * @return {number} + * optional bool order_ascending = 4; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getStartAtMs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getOrderAscending = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setStartAtMs = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setOrderAscending = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * optional bool prove = 5; + * optional StartAtVotePollIdInfo start_at_vote_poll_id_info = 5; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getStartAtVotePollIdInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo, 5)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setStartAtVotePollIdInfo = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.clearStartAtVotePollIdInfo = function() { + return this.setStartAtVotePollIdInfo(undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.hasStartAtVotePollIdInfo = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool prove = 6; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); }; /** - * optional GetDataContractHistoryRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} + * optional GetContestedResourceIdentityVotesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -20835,7 +39616,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.clearV0 * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -20849,21 +39630,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.hasV0 = * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_[0])); }; @@ -20881,8 +39662,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.toObject(opt_includeInstance, this); }; @@ -20891,13 +39672,13 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.toObjec * @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.GetDataContractHistoryResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -20911,23 +39692,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.toObject = functi /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse; - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.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.GetDataContractHistoryResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20935,8 +39716,8 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.deserializeBinary var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -20952,9 +39733,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.deserializeBinary * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20962,18 +39743,186 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.seriali /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( - 1, + 1, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + VOTES: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + votes: (f = msg.getVotes()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.toObject(includeInstance, f), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinaryFromReader); + msg.setVotes(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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVotes(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, f, - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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 ); } }; @@ -20981,30 +39930,11 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.serializeBinaryTo /** - * 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - DATA_CONTRACT_HISTORY: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.repeatedFields_ = [1]; @@ -21021,8 +39951,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.toObject(opt_includeInstance, this); }; @@ -21031,15 +39961,15 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * @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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.toObject = function(includeInstance, msg) { var f, obj = { - dataContractHistory: (f = msg.getDataContractHistory()) && proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.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) + contestedResourceIdentityVotesList: jspb.Message.toObjectList(msg.getContestedResourceIdentityVotesList(), + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.toObject, includeInstance), + finishedResults: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -21053,23 +39983,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0; - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21077,19 +40007,13 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.deserializeBinaryFromReader); - msg.setDataContractHistory(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinaryFromReader); + msg.addContestedResourceIdentityVotes(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 {boolean} */ (reader.readBool()); + msg.setFinishedResults(value); break; default: reader.skipField(); @@ -21104,9 +40028,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21114,39 +40038,86 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDataContractHistory(); - if (f != null) { - writer.writeMessage( + f = message.getContestedResourceIdentityVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.serializeBinaryToWriter ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getFinishedResults(); + if (f) { + writer.writeBool( 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 + f ); } }; +/** + * repeated ContestedResourceIdentityVote contested_resource_identity_votes = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.getContestedResourceIdentityVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.setContestedResourceIdentityVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.addContestedResourceIdentityVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.clearContestedResourceIdentityVotesList = function() { + return this.setContestedResourceIdentityVotesList([]); +}; + + +/** + * optional bool finished_results = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.getFinishedResults = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.setFinishedResults = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + @@ -21163,8 +40134,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.toObject(opt_includeInstance, this); }; @@ -21173,14 +40144,14 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * @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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.toObject = function(includeInstance, msg) { var f, obj = { - date: jspb.Message.getFieldWithDefault(msg, 1, 0), - value: msg.getValue_asB64() + voteChoiceType: jspb.Message.getFieldWithDefault(msg, 1, 0), + identityId: msg.getIdentityId_asB64() }; if (includeInstance) { @@ -21194,23 +40165,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry; - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21218,12 +40189,12 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setDate(value); + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} */ (reader.readEnum()); + msg.setVoteChoiceType(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValue(value); + msg.setIdentityId(value); break; default: reader.skipField(); @@ -21238,9 +40209,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21248,21 +40219,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDate(); - if (f !== 0) { - writer.writeUint64( + f = message.getVoteChoiceType(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getValue_asU8(); - if (f.length > 0) { + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { writer.writeBytes( 2, f @@ -21272,62 +40243,89 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** - * optional uint64 date = 1; - * @return {number} + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType = { + TOWARDS_IDENTITY: 0, + ABSTAIN: 1, + LOCK: 2 +}; + +/** + * optional VoteChoiceType vote_choice_type = 1; + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getVoteChoiceType = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} returns this + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.setDate = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.setVoteChoiceType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional bytes value = 2; + * optional bytes identity_id = 2; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getValue = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getIdentityId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes value = 2; - * This is a type-conversion wrapper around `getValue()` + * optional bytes identity_id = 2; + * This is a type-conversion wrapper around `getIdentityId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getValue_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getIdentityId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValue())); + this.getIdentityId())); }; /** - * optional bytes value = 2; + * optional bytes identity_id = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValue()` + * This is a type-conversion wrapper around `getIdentityId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getValue_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getIdentityId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValue())); + this.getIdentityId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.setValue = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.setIdentityId = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.clearIdentityId = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.hasIdentityId = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -21337,7 +40335,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.repeatedFields_ = [3]; @@ -21354,8 +40352,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.toObject(opt_includeInstance, this); }; @@ -21364,14 +40362,16 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * @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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.toObject = function(includeInstance, msg) { var f, obj = { - dataContractEntriesList: jspb.Message.toObjectList(msg.getDataContractEntriesList(), - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.toObject, includeInstance) + contractId: msg.getContractId_asB64(), + documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), + serializedIndexStorageValuesList: msg.getSerializedIndexStorageValuesList_asB64(), + voteChoice: (f = msg.getVoteChoice()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.toObject(includeInstance, f) }; if (includeInstance) { @@ -21385,23 +40385,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory; - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21409,9 +40409,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinaryFromReader); - msg.addDataContractEntries(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentTypeName(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSerializedIndexStorageValues(value); + break; + case 4: + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.deserializeBinaryFromReader); + msg.setVoteChoice(value); break; default: reader.skipField(); @@ -21426,9 +40438,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21436,86 +40448,227 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDataContractEntriesList(); + f = message.getContractId_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeBytes( 1, + f + ); + } + f = message.getDocumentTypeName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSerializedIndexStorageValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } + f = message.getVoteChoice(); + if (f != null) { + writer.writeMessage( + 4, f, - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.serializeBinaryToWriter ); } }; /** - * repeated DataContractHistoryEntry data_contract_entries = 1; - * @return {!Array} + * optional bytes contract_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.getDataContractEntriesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} returns this + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string document_type_name = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getDocumentTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setDocumentTypeName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated bytes serialized_index_storage_values = 3; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getSerializedIndexStorageValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes serialized_index_storage_values = 3; + * This is a type-conversion wrapper around `getSerializedIndexStorageValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getSerializedIndexStorageValuesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSerializedIndexStorageValuesList())); +}; + + +/** + * repeated bytes serialized_index_storage_values = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSerializedIndexStorageValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getSerializedIndexStorageValuesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSerializedIndexStorageValuesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setSerializedIndexStorageValuesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.addSerializedIndexStorageValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.clearSerializedIndexStorageValuesList = function() { + return this.setSerializedIndexStorageValuesList([]); +}; + + +/** + * optional ResourceVoteChoice vote_choice = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getVoteChoice = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice, 4)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.setDataContractEntriesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setVoteChoice = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.addDataContractEntries = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry, opt_index); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.clearVoteChoice = function() { + return this.setVoteChoice(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.clearDataContractEntriesList = function() { - return this.setDataContractEntriesList([]); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.hasVoteChoice = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional DataContractHistory data_contract_history = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} + * optional ContestedResourceIdentityVotes votes = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.getDataContractHistory = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.getVotes = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.setDataContractHistory = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.setVotes = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.clearDataContractHistory = function() { - return this.setDataContractHistory(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.clearVotes = function() { + return this.setVotes(undefined); }; @@ -21523,7 +40676,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.hasDataContractHistory = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.hasVotes = function() { return jspb.Message.getField(this, 1) != null; }; @@ -21532,7 +40685,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -21540,18 +40693,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -21560,7 +40713,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -21569,7 +40722,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -21577,18 +40730,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -21597,35 +40750,35 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetDataContractHistoryResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} + * optional GetContestedResourceIdentityVotesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -21634,7 +40787,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.clearV0 * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -21648,21 +40801,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.hasV0 = * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_[0])); }; @@ -21680,8 +40833,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.toObject(opt_includeInstance, this); }; @@ -21690,13 +40843,13 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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.GetDocumentsRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -21710,23 +40863,23 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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.GetDocumentsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest; - return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest; + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.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.GetDocumentsRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21734,8 +40887,8 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.deserializeBinaryFromReader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -21751,9 +40904,9 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.deserializeBinaryFromReader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDocumentsRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21761,50 +40914,24 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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.GetDocumentsRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.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.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_ = [[6,7]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase = { - START_NOT_SET: 0, - START_AFTER: 6, - START_AT: 7 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0])); -}; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -21820,8 +40947,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.toObject(opt_includeInstance, this); }; @@ -21830,20 +40957,14 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.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.GetDocumentsRequest.GetDocumentsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - dataContractId: msg.getDataContractId_asB64(), - documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), - where: msg.getWhere_asB64(), - orderBy: msg.getOrderBy_asB64(), - limit: jspb.Message.getFieldWithDefault(msg, 5, 0), - startAfter: msg.getStartAfter_asB64(), - startAt: msg.getStartAt_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) + id: msg.getId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -21857,23 +40978,23 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObje /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0; - return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0; + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.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.GetDocumentsRequest.GetDocumentsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21882,33 +41003,9 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deseri switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDataContractId(value); + msg.setId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentType(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWhere(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderBy(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLimit(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStartAfter(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStartAt(value); - break; - case 8: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -21925,9 +41022,9 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deseri * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21935,395 +41032,113 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.protot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDataContractId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getDocumentType(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getWhere_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getOrderBy_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getLimit(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); - if (f != null) { - writer.writeBytes( - 6, - f - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); - if (f != null) { - writer.writeBytes( - 7, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 8, - f - ); - } -}; - - -/** - * optional bytes data_contract_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes data_contract_id = 1; - * This is a type-conversion wrapper around `getDataContractId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDataContractId())); -}; - - -/** - * optional bytes data_contract_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDataContractId()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDataContractId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setDataContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string document_type = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDocumentType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setDocumentType = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bytes where = 3; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getWhere = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes where = 3; - * This is a type-conversion wrapper around `getWhere()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getWhere_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWhere())); -}; - - -/** - * optional bytes where = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWhere()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getWhere_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWhere())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setWhere = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes order_by = 4; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getOrderBy = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes order_by = 4; - * This is a type-conversion wrapper around `getOrderBy()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getOrderBy_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderBy())); -}; - - -/** - * optional bytes order_by = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderBy()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getOrderBy_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderBy())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setOrderBy = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional uint32 limit = 5; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setLimit = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional bytes start_after = 6; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAfter = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes start_after = 6; - * This is a type-conversion wrapper around `getStartAfter()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAfter_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartAfter())); -}; - - -/** - * optional bytes start_after = 6; - * 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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAfter_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartAfter())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setStartAfter = function(value) { - return jspb.Message.setOneofField(this, 6, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.clearStartAfter = function() { - return jspb.Message.setOneofField(this, 6, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.hasStartAfter = function() { - return jspb.Message.getField(this, 6) != null; +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.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 start_at = 7; + * optional bytes id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAt = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes start_at = 7; - * This is a type-conversion wrapper around `getStartAt()` + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAt_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartAt())); + this.getId())); }; /** - * optional bytes start_at = 7; + * 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 `getStartAt()` + * This is a type-conversion wrapper around `getId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAt_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartAt())); + this.getId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setStartAt = function(value) { - return jspb.Message.setOneofField(this, 7, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.clearStartAt = function() { - return jspb.Message.setOneofField(this, 7, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.hasStartAt = function() { - return jspb.Message.getField(this, 7) != null; +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional bool prove = 8; + * optional bool prove = 2; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetDocumentsRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + * optional GetPrefundedSpecializedBalanceRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -22332,7 +41147,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.clearV0 = function * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -22346,21 +41161,21 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.hasV0 = function() * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_[0])); }; @@ -22378,8 +41193,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.toObject(opt_includeInstance, this); }; @@ -22388,13 +41203,13 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.toObject = functi * @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.GetDocumentsResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -22408,23 +41223,23 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.toObject = function(include /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse; - return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse; + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.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.GetDocumentsResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -22432,8 +41247,8 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.deserializeBinaryFromReader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -22449,9 +41264,9 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.deserializeBinaryFromReader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -22459,18 +41274,18 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.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.GetDocumentsResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.serializeBinaryToWriter ); } }; @@ -22485,22 +41300,22 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.serializeBinaryToWriter = f * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.ResultCase = { RESULT_NOT_SET: 0, - DOCUMENTS: 1, + BALANCE: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0])); }; @@ -22518,8 +41333,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.toObject(opt_includeInstance, this); }; @@ -22528,13 +41343,13 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot * @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.GetDocumentsResponse.GetDocumentsResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - documents: (f = msg.getDocuments()) && proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.toObject(includeInstance, f), + 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) }; @@ -22550,23 +41365,23 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.toOb /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0; - return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0; + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.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.GetDocumentsResponse.GetDocumentsResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -22574,9 +41389,8 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.dese var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.deserializeBinaryFromReader); - msg.setDocuments(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -22601,9 +41415,9 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.dese * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -22611,18 +41425,17 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDocuments(); + f = /** @type {number} */ (jspb.Message.getField(message, 1)); if (f != null) { - writer.writeMessage( + writer.writeUint64( 1, - f, - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.serializeBinaryToWriter + f ); } f = message.getProof(); @@ -22644,211 +41457,30 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.seri }; - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.toObject = function(includeInstance, msg) { - var f, obj = { - documentsList: msg.getDocumentsList_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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents; - return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.addDocuments(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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDocumentsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } -}; - - -/** - * repeated bytes documents = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.getDocumentsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes documents = 1; - * This is a type-conversion wrapper around `getDocumentsList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.getDocumentsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getDocumentsList())); -}; - - -/** - * repeated bytes documents = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDocumentsList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.getDocumentsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getDocumentsList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.setDocumentsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.addDocuments = 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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} returns this + * optional uint64 balance = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.clearDocumentsList = function() { - return this.setDocumentsList([]); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * optional Documents documents = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.getDocuments = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.setDocuments = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.setBalance = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0], value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.clearDocuments = function() { - return this.setDocuments(undefined); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.clearBalance = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0], undefined); }; @@ -22856,7 +41488,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.hasDocuments = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.hasBalance = function() { return jspb.Message.getField(this, 1) != null; }; @@ -22865,7 +41497,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -22873,18 +41505,18 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -22893,7 +41525,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -22902,7 +41534,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -22910,18 +41542,18 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.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.GetDocumentsResponse.GetDocumentsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -22930,35 +41562,35 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetDocumentsResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} + * optional GetPrefundedSpecializedBalanceResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -22967,7 +41599,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.clearV0 = functio * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -22981,21 +41613,21 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.hasV0 = function( * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_[0])); }; @@ -23013,8 +41645,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.toObject(opt_includeInstance, this); }; @@ -23023,13 +41655,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.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.GetIdentityByPublicKeyHashRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -23043,23 +41675,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.toObject = fun /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest; + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.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.GetIdentityByPublicKeyHashRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23067,8 +41699,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.deserializeBin var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -23084,9 +41716,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.deserializeBin * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23094,18 +41726,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.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.GetIdentityByPublicKeyHashRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.serializeBinaryToWriter ); } }; @@ -23127,8 +41759,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.toObject(opt_includeInstance, this); }; @@ -23137,14 +41769,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByP * @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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - publicKeyHash: msg.getPublicKeyHash_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + prove: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -23158,23 +41789,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByP /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0; + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23182,10 +41813,6 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByP var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPublicKeyHash(value); - break; - case 2: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -23202,9 +41829,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByP * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23212,23 +41839,16 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByP /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPublicKeyHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } f = message.getProve(); if (f) { writer.writeBool( - 2, + 1, f ); } @@ -23236,89 +41856,47 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByP /** - * optional bytes public_key_hash = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getPublicKeyHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes public_key_hash = 1; - * This is a type-conversion wrapper around `getPublicKeyHash()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getPublicKeyHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPublicKeyHash())); -}; - - -/** - * optional bytes public_key_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPublicKeyHash()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getPublicKeyHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPublicKeyHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.setPublicKeyHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bool prove = 2; + * optional bool prove = 1; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional GetIdentityByPublicKeyHashRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} + * optional GetTotalCreditsInPlatformRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -23327,7 +41905,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.clea * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -23341,21 +41919,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.hasV * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_[0])); }; @@ -23373,8 +41951,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.toObject(opt_includeInstance, this); }; @@ -23383,13 +41961,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.toO * @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.GetIdentityByPublicKeyHashResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -23403,23 +41981,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.toObject = fu /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse; + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.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.GetIdentityByPublicKeyHashResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23427,8 +42005,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.deserializeBi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -23444,9 +42022,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.deserializeBi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23454,18 +42032,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.ser /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.serializeBinaryToWriter ); } }; @@ -23480,22 +42058,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.serializeBina * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.ResultCase = { RESULT_NOT_SET: 0, - IDENTITY: 1, + CREDITS: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0])); }; @@ -23513,8 +42091,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.toObject(opt_includeInstance, this); }; @@ -23523,13 +42101,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * @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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - identity: msg.getIdentity_asB64(), + credits: 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) }; @@ -23545,23 +42123,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0; + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23569,8 +42147,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentity(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setCredits(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -23595,9 +42173,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23605,15 +42183,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + f = /** @type {number} */ (jspb.Message.getField(message, 1)); if (f != null) { - writer.writeBytes( + writer.writeUint64( 1, f ); @@ -23638,53 +42216,29 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy /** - * optional bytes identity = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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} + * optional uint64 credits = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getIdentity_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentity())); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.getCredits = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.setIdentity = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.setCredits = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0], value); }; /** * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.clearIdentity = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0], undefined); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.clearCredits = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0], undefined); }; @@ -23692,7 +42246,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.hasIdentity = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.hasCredits = function() { return jspb.Message.getField(this, 1) != null; }; @@ -23701,7 +42255,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -23709,18 +42263,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -23729,7 +42283,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -23738,7 +42292,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -23746,18 +42300,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -23766,35 +42320,35 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetIdentityByPublicKeyHashResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} + * optional GetTotalCreditsInPlatformResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -23803,7 +42357,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.cle * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -23817,21 +42371,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.has * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_[0])); }; @@ -23849,8 +42403,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.toObject(opt_includeInstance, this); }; @@ -23859,13 +42413,13 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.to * @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.WaitForStateTransitionResultRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -23879,23 +42433,23 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.toObject = f /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest; - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsRequest; + return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.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.WaitForStateTransitionResultRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23903,8 +42457,8 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.deserializeB var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -23920,9 +42474,9 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.deserializeB * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPathElementsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23930,24 +42484,31 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.se /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.serializeBinaryToWriter ); } }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.repeatedFields_ = [1,2]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -23963,8 +42524,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.toObject(opt_includeInstance, this); }; @@ -23973,14 +42534,15 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForState * @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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - stateTransitionHash: msg.getStateTransitionHash_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + pathList: msg.getPathList_asB64(), + keysList: msg.getKeysList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -23994,23 +42556,23 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForState /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0; - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0; + return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24019,9 +42581,13 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForState switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStateTransitionHash(value); + msg.addPath(value); break; case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addKeys(value); + break; + case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -24038,9 +42604,9 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForState * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24048,23 +42614,30 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForState /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStateTransitionHash_asU8(); + f = message.getPathList_asU8(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedBytes( 1, f ); } + f = message.getKeysList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } f = message.getProve(); if (f) { writer.writeBool( - 2, + 3, f ); } @@ -24072,89 +42645,169 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForState /** - * optional bytes state_transition_hash = 1; - * @return {string} + * repeated bytes path = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getStateTransitionHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getPathList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * optional bytes state_transition_hash = 1; - * This is a type-conversion wrapper around `getStateTransitionHash()` - * @return {string} + * repeated bytes path = 1; + * This is a type-conversion wrapper around `getPathList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getStateTransitionHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStateTransitionHash())); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getPathList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getPathList())); }; /** - * optional bytes state_transition_hash = 1; + * repeated bytes path = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStateTransitionHash()` - * @return {!Uint8Array} + * This is a type-conversion wrapper around `getPathList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getStateTransitionHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStateTransitionHash())); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getPathList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getPathList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.setPathList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} returns this + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.setStateTransitionHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.addPath = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * optional bool prove = 2; + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.clearPathList = function() { + return this.setPathList([]); +}; + + +/** + * repeated bytes keys = 2; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getKeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes keys = 2; + * This is a type-conversion wrapper around `getKeysList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getKeysList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getKeysList())); +}; + + +/** + * repeated bytes keys = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKeysList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getKeysList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getKeysList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.setKeysList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.addKeys = 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.GetPathElementsRequest.GetPathElementsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.clearKeysList = function() { + return this.setKeysList([]); +}; + + +/** + * optional bool prove = 3; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional WaitForStateTransitionResultRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} + * optional GetPathElementsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -24163,7 +42816,7 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.cl * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -24177,21 +42830,21 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.ha * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_[0])); }; @@ -24209,8 +42862,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.toObject(opt_includeInstance, this); }; @@ -24219,13 +42872,13 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.t * @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.WaitForStateTransitionResultResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -24239,23 +42892,23 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse; - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse; + return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.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.WaitForStateTransitionResultResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24263,8 +42916,8 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.deserialize var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -24280,9 +42933,9 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.deserialize * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24290,18 +42943,18 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.s /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.serializeBinaryToWriter ); } }; @@ -24316,22 +42969,22 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.serializeBi * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ResultCase = { RESULT_NOT_SET: 0, - ERROR: 1, + ELEMENTS: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_[0])); }; @@ -24349,8 +43002,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.toObject(opt_includeInstance, this); }; @@ -24359,13 +43012,13 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * @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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - error: (f = msg.getError()) && proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.toObject(includeInstance, f), + elements: (f = msg.getElements()) && proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.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) }; @@ -24381,23 +43034,23 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0; - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0; + return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24405,9 +43058,9 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryFromReader); - msg.setError(value); + var value = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.deserializeBinaryFromReader); + msg.setElements(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -24432,9 +43085,9 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24442,18 +43095,18 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getError(); + f = message.getElements(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.serializeBinaryToWriter ); } f = message.getProof(); @@ -24475,31 +43128,211 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat }; + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.toObject = function(includeInstance, msg) { + var f, obj = { + elementsList: msg.getElementsList_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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements; + return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.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.addElements(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.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getElementsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes elements = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.getElementsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes elements = 1; + * This is a type-conversion wrapper around `getElementsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.getElementsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getElementsList())); +}; + + +/** + * repeated bytes elements = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getElementsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.getElementsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getElementsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.setElementsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.addElements = 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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.clearElementsList = function() { + return this.setElementsList([]); +}; + + /** - * optional StateTransitionBroadcastError error = 1; - * @return {?proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} + * optional Elements elements = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getError = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError, 1)); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.getElements = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.setError = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.setElements = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.clearError = function() { - return this.setError(undefined); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.clearElements = function() { + return this.setElements(undefined); }; @@ -24507,7 +43340,7 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.hasError = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.hasElements = function() { return jspb.Message.getField(this, 1) != null; }; @@ -24516,7 +43349,7 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -24524,18 +43357,18 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -24544,7 +43377,7 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -24553,7 +43386,7 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -24561,18 +43394,18 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -24581,35 +43414,35 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional WaitForStateTransitionResultResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} + * optional GetPathElementsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -24618,7 +43451,7 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.c * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -24632,21 +43465,21 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.h * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_[0])); }; @@ -24664,8 +43497,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusRequest.toObject(opt_includeInstance, this); }; @@ -24674,13 +43507,13 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.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.GetConsensusParamsRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -24694,23 +43527,23 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.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.GetConsensusParamsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest; - return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusRequest; + return proto.org.dash.platform.dapi.v0.GetStatusRequest.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.GetConsensusParamsRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24718,8 +43551,8 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.deserializeBinaryFromR var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -24735,9 +43568,9 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.deserializeBinaryFromR * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24745,18 +43578,18 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.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.GetConsensusParamsRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.serializeBinaryToWriter ); } }; @@ -24778,8 +43611,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject(opt_includeInstance, this); }; @@ -24788,14 +43621,13 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequ * @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.GetConsensusParamsRequest.GetConsensusParamsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; if (includeInstance) { @@ -24809,37 +43641,29 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0; - return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0; + return proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.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.GetConsensusParamsRequest.GetConsensusParamsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setHeight(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); - break; default: reader.skipField(); break; @@ -24853,9 +43677,9 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24863,89 +43687,39 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional int32 height = 1; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bool prove = 2; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetConsensusParamsRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} + * optional GetStatusRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -24954,7 +43728,7 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.clearV0 = fu * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -24968,21 +43742,21 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.hasV0 = func * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_[0])); }; @@ -25000,8 +43774,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.toObject(opt_includeInstance, this); }; @@ -25010,13 +43784,13 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetConsensusParamsResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -25030,23 +43804,23 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetConsensusParamsResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse; - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.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.GetConsensusParamsResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25054,8 +43828,8 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.deserializeBinaryFrom var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -25071,9 +43845,9 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.deserializeBinaryFrom * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25081,18 +43855,18 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetConsensusParamsResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.serializeBinaryToWriter ); } }; @@ -25114,8 +43888,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject(opt_includeInstance, this); }; @@ -25124,15 +43898,18 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock. * @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.GetConsensusParamsResponse.ConsensusParamsBlock} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - maxBytes: jspb.Message.getFieldWithDefault(msg, 1, ""), - maxGas: jspb.Message.getFieldWithDefault(msg, 2, ""), - timeIotaMs: jspb.Message.getFieldWithDefault(msg, 3, "") + version: (f = msg.getVersion()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.toObject(includeInstance, f), + node: (f = msg.getNode()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject(includeInstance, f), + chain: (f = msg.getChain()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject(includeInstance, f), + network: (f = msg.getNetwork()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject(includeInstance, f), + stateSync: (f = msg.getStateSync()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject(includeInstance, f), + time: (f = msg.getTime()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject(includeInstance, f) }; if (includeInstance) { @@ -25146,23 +43923,23 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock. /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock; - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.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.GetConsensusParamsResponse.ConsensusParamsBlock} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25170,16 +43947,194 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock. var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMaxBytes(value); + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.deserializeBinaryFromReader); + msg.setVersion(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMaxGas(value); + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinaryFromReader); + msg.setNode(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setTimeIotaMs(value); + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinaryFromReader); + msg.setChain(value); + break; + case 4: + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinaryFromReader); + msg.setNetwork(value); + break; + case 5: + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinaryFromReader); + msg.setStateSync(value); + break; + case 6: + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinaryFromReader); + msg.setTime(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.GetStatusResponse.GetStatusResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.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.GetStatusResponse.GetStatusResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.serializeBinaryToWriter + ); + } + f = message.getNode(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.serializeBinaryToWriter + ); + } + f = message.getChain(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.serializeBinaryToWriter + ); + } + f = message.getNetwork(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.serializeBinaryToWriter + ); + } + f = message.getStateSync(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.serializeBinaryToWriter + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.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.GetStatusResponse.GetStatusResponseV0.Version.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.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.GetStatusResponse.GetStatusResponseV0.Version} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.toObject = function(includeInstance, msg) { + var f, obj = { + software: (f = msg.getSoftware()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject(includeInstance, f), + protocol: (f = msg.getProtocol()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.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.GetStatusResponse.GetStatusResponseV0.Version} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.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.GetStatusResponse.GetStatusResponseV0.Version} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.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.GetStatusResponse.GetStatusResponseV0.Version.Software; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinaryFromReader); + msg.setSoftware(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinaryFromReader); + msg.setProtocol(value); break; default: reader.skipField(); @@ -25194,9 +44149,9 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock. * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25204,90 +44159,31 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMaxBytes(); - if (f.length > 0) { - writer.writeString( + f = message.getSoftware(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.serializeBinaryToWriter ); } - f = message.getMaxGas(); - if (f.length > 0) { - writer.writeString( + f = message.getProtocol(); + if (f != null) { + writer.writeMessage( 2, - f - ); - } - f = message.getTimeIotaMs(); - if (f.length > 0) { - writer.writeString( - 3, - f + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.serializeBinaryToWriter ); } }; -/** - * optional string max_bytes = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.getMaxBytes = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.setMaxBytes = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string max_gas = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.getMaxGas = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.setMaxGas = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string time_iota_ms = 3; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.getTimeIotaMs = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.setTimeIotaMs = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - @@ -25304,8 +44200,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject(opt_includeInstance, this); }; @@ -25314,15 +44210,15 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEviden * @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.GetConsensusParamsResponse.ConsensusParamsEvidence} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject = function(includeInstance, msg) { var f, obj = { - maxAgeNumBlocks: jspb.Message.getFieldWithDefault(msg, 1, ""), - maxAgeDuration: jspb.Message.getFieldWithDefault(msg, 2, ""), - maxBytes: jspb.Message.getFieldWithDefault(msg, 3, "") + dapi: jspb.Message.getFieldWithDefault(msg, 1, ""), + drive: jspb.Message.getFieldWithDefault(msg, 2, ""), + tenderdash: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -25336,23 +44232,23 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEviden /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence; - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.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.GetConsensusParamsResponse.ConsensusParamsEvidence} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25361,15 +44257,15 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEviden switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setMaxAgeNumBlocks(value); + msg.setDapi(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setMaxAgeDuration(value); + msg.setDrive(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setMaxBytes(value); + msg.setTenderdash(value); break; default: reader.skipField(); @@ -25384,9 +44280,9 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEviden * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25394,28 +44290,28 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEviden /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMaxAgeNumBlocks(); + f = message.getDapi(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getMaxAgeDuration(); - if (f.length > 0) { + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { writer.writeString( 2, f ); } - f = message.getMaxBytes(); - if (f.length > 0) { + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { writer.writeString( 3, f @@ -25425,56 +44321,92 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEviden /** - * optional string max_age_num_blocks = 1; + * optional string dapi = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.getMaxAgeNumBlocks = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.getDapi = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.setMaxAgeNumBlocks = function(value) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.setDapi = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string max_age_duration = 2; + * optional string drive = 2; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.getMaxAgeDuration = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.getDrive = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.setMaxAgeDuration = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.setDrive = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * optional string max_bytes = 3; + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.clearDrive = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.hasDrive = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string tenderdash = 3; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.getMaxBytes = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.getTenderdash = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.setMaxBytes = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.setTenderdash = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.clearTenderdash = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.hasTenderdash = function() { + return jspb.Message.getField(this, 3) != null; }; @@ -25494,8 +44426,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.toObject(opt_includeInstance, this); }; @@ -25504,14 +44436,14 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsRes * @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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.toObject = function(includeInstance, msg) { var f, obj = { - block: (f = msg.getBlock()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.toObject(includeInstance, f), - evidence: (f = msg.getEvidence()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.toObject(includeInstance, f) + tenderdash: (f = msg.getTenderdash()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject(includeInstance, f), + drive: (f = msg.getDrive()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject(includeInstance, f) }; if (includeInstance) { @@ -25525,23 +44457,23 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsRes /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0; - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25549,14 +44481,14 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsRes var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.deserializeBinaryFromReader); - msg.setBlock(value); + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinaryFromReader); + msg.setTenderdash(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinaryFromReader); - msg.setEvidence(value); + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinaryFromReader); + msg.setDrive(value); break; default: reader.skipField(); @@ -25571,9 +44503,9 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsRes * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25581,167 +44513,31 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsRes /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBlock(); + f = message.getTenderdash(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.serializeBinaryToWriter ); } - f = message.getEvidence(); + f = message.getDrive(); if (f != null) { writer.writeMessage( 2, f, - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.serializeBinaryToWriter ); } }; -/** - * optional ConsensusParamsBlock block = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.getBlock = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.setBlock = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.clearBlock = function() { - return this.setBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.hasBlock = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ConsensusParamsEvidence evidence = 2; - * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.getEvidence = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence, 2)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.setEvidence = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.clearEvidence = function() { - return this.setEvidence(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.hasEvidence = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional GetConsensusParamsResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetProtocolVersionUpgradeStateRequest.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.VersionCase} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.oneofGroups_[0])); -}; @@ -25758,8 +44554,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject(opt_includeInstance, this); }; @@ -25768,13 +44564,14 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.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.GetProtocolVersionUpgradeStateRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.toObject(includeInstance, f) + p2p: jspb.Message.getFieldWithDefault(msg, 1, 0), + block: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -25788,23 +44585,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.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.GetProtocolVersionUpgradeStateRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25812,9 +44609,12 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setP2p(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBlock(value); break; default: reader.skipField(); @@ -25829,9 +44629,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.deserializ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25839,23 +44639,65 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getP2p(); + if (f !== 0) { + writer.writeUint32( 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.serializeBinaryToWriter + f + ); + } + f = message.getBlock(); + if (f !== 0) { + writer.writeUint32( + 2, + f ); } }; +/** + * optional uint32 p2p = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.getP2p = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.setP2p = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 block = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.getBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.setBlock = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + @@ -25872,8 +44714,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject(opt_includeInstance, this); }; @@ -25882,13 +44724,14 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtoco * @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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject = function(includeInstance, msg) { var f, obj = { - prove: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + latest: jspb.Message.getFieldWithDefault(msg, 3, 0), + current: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -25902,32 +44745,36 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtoco /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLatest(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCurrent(value); break; default: reader.skipField(); @@ -25942,9 +44789,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtoco * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25952,16 +44799,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtoco /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProve(); - if (f) { - writer.writeBool( - 1, + f = message.getLatest(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getCurrent(); + if (f !== 0) { + writer.writeUint32( + 4, f ); } @@ -25969,48 +44823,66 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtoco /** - * optional bool prove = 1; - * @return {boolean} + * optional uint32 latest = 3; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.getLatest = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.setLatest = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional GetProtocolVersionUpgradeStateRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} + * optional uint32 current = 4; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.getCurrent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.setCurrent = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional Tenderdash tenderdash = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.getTenderdash = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.setTenderdash = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.clearTenderdash = function() { + return this.setTenderdash(undefined); }; @@ -26018,179 +44890,125 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype. * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.hasTenderdash = 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 + * optional Drive drive = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.getDrive = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive, 2)); +}; + /** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this +*/ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.setDrive = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.VersionCase} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.clearDrive = function() { + return this.setDrive(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.GetProtocolVersionUpgradeStateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.hasDrive = 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.GetProtocolVersionUpgradeStateResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional Software software = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.toObject = function(includeInstance, msg) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.getSoftware = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software, 1)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.deserializeBinaryFromReader(msg, reader); + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this +*/ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.setSoftware = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.deserializeBinaryFromReader); - msg.setV0(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.clearSoftware = function() { + return this.setSoftware(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.GetProtocolVersionUpgradeStateResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.hasSoftware = 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.GetProtocolVersionUpgradeStateResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional Protocol protocol = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.getProtocol = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol, 2)); }; - /** - * 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_ = [[1,2]]; + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this +*/ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.setProtocol = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + /** - * @enum {number} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - VERSIONS: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.clearProtocol = function() { + return this.setProtocol(undefined); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.ResultCase} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.hasProtocol = function() { + return jspb.Message.getField(this, 2) != null; }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -26204,8 +45022,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject(opt_includeInstance, this); }; @@ -26214,15 +45032,16 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc * @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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject = function(includeInstance, msg) { var f, obj = { - versions: (f = msg.getVersions()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.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) + local: jspb.Message.getFieldWithDefault(msg, 1, 0), + block: jspb.Message.getFieldWithDefault(msg, 2, 0), + genesis: jspb.Message.getFieldWithDefault(msg, 3, 0), + epoch: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -26236,23 +45055,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -26260,19 +45079,20 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.deserializeBinaryFromReader); - msg.setVersions(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setLocal(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 {number} */ (reader.readUint64()); + msg.setBlock(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 {number} */ (reader.readUint64()); + msg.setGenesis(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setEpoch(value); break; default: reader.skipField(); @@ -26287,9 +45107,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -26297,196 +45117,166 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVersions(); - if (f != null) { - writer.writeMessage( + f = message.getLocal(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.serializeBinaryToWriter + f ); } - f = message.getProof(); + f = /** @type {number} */ (jspb.Message.getField(message, 2)); if (f != null) { - writer.writeMessage( + writer.writeUint64( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); + f = /** @type {number} */ (jspb.Message.getField(message, 3)); if (f != null) { - writer.writeMessage( + writer.writeUint64( 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f ); } }; +/** + * optional uint64 local = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getLocal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setLocal = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + +/** + * optional uint64 block = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 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} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setBlock = function(value) { + return jspb.Message.setField(this, 2, 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.toObject = function(includeInstance, msg) { - var f, obj = { - versionsList: jspb.Message.toObjectList(msg.getVersionsList(), - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.toObject, includeInstance) - }; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.clearBlock = function() { + return jspb.Message.setField(this, 2, undefined); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.hasBlock = function() { + return jspb.Message.getField(this, 2) != null; }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} + * optional uint64 genesis = 3; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getGenesis = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.deserializeBinaryFromReader); - msg.addVersions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setGenesis = function(value) { + return jspb.Message.setField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.clearGenesis = function() { + return jspb.Message.setField(this, 3, undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.hasGenesis = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * repeated VersionEntry versions = 1; - * @return {!Array} + * optional uint32 epoch = 4; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.getVersionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry, 1)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.setVersionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setEpoch = function(value) { + return jspb.Message.setField(this, 4, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.addVersions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry, opt_index); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.clearEpoch = function() { + return jspb.Message.setField(this, 4, undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.clearVersionsList = function() { - return this.setVersionsList([]); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.hasEpoch = function() { + return jspb.Message.getField(this, 4) != null; }; @@ -26506,8 +45296,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject(opt_includeInstance, this); }; @@ -26516,14 +45306,14 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc * @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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject = function(includeInstance, msg) { var f, obj = { - versionNumber: jspb.Message.getFieldWithDefault(msg, 1, 0), - voteCount: jspb.Message.getFieldWithDefault(msg, 2, 0) + id: msg.getId_asB64(), + proTxHash: msg.getProTxHash_asB64() }; if (includeInstance) { @@ -26537,23 +45327,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -26561,12 +45351,12 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVersionNumber(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setId(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVoteCount(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProTxHash(value); break; default: reader.skipField(); @@ -26581,9 +45371,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -26591,22 +45381,22 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVersionNumber(); - if (f !== 0) { - writer.writeUint32( + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getVoteCount(); - if (f !== 0) { - writer.writeUint32( + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( 2, f ); @@ -26615,103 +45405,95 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc /** - * optional uint32 version_number = 1; - * @return {number} + * optional bytes id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.getVersionNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} returns this + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.setVersionNumber = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); }; /** - * optional uint32 vote_count = 2; - * @return {number} + * 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.getVoteCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.setVoteCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional Versions versions = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} + * optional bytes pro_tx_hash = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.getVersions = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.setVersions = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getProTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this + * optional bytes pro_tx_hash = 2; + * This is a type-conversion wrapper around `getProTxHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.clearVersions = function() { - return this.setVersions(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getProTxHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProTxHash())); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes pro_tx_hash = 2; + * 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.hasVersions = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getProTxHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProTxHash())); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.setProTxHash = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.clearProTxHash = function() { + return jspb.Message.setField(this, 2, undefined); }; @@ -26719,110 +45501,11 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.hasProTxHash = 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional GetProtocolVersionUpgradeStateResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} returns this - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.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.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.VersionCase} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_[0])); -}; @@ -26839,8 +45522,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject(opt_includeInstance, this); }; @@ -26849,13 +45532,21 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.proto * @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.GetProtocolVersionUpgradeVoteStatusRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.toObject(includeInstance, f) + catchingUp: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + latestBlockHash: msg.getLatestBlockHash_asB64(), + latestAppHash: msg.getLatestAppHash_asB64(), + latestBlockHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + earliestBlockHash: msg.getEarliestBlockHash_asB64(), + earliestAppHash: msg.getEarliestAppHash_asB64(), + earliestBlockHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), + maxPeerBlockHeight: jspb.Message.getFieldWithDefault(msg, 9, 0), + coreChainLockedHeight: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -26869,23 +45560,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.toObj /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.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.GetProtocolVersionUpgradeVoteStatusRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -26893,9 +45584,40 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.deser var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCatchingUp(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLatestBlockHash(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLatestAppHash(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLatestBlockHeight(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEarliestBlockHash(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEarliestAppHash(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setEarliestBlockHeight(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxPeerBlockHeight(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCoreChainLockedHeight(value); break; default: reader.skipField(); @@ -26910,9 +45632,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.deser * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -26920,442 +45642,357 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.proto /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getCatchingUp(); + if (f) { + writer.writeBool( 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.serializeBinaryToWriter + f + ); + } + f = message.getLatestBlockHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getLatestAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getLatestBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getEarliestBlockHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getEarliestAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getEarliestBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getMaxPeerBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeUint32( + 10, + f ); } }; - - - -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 catching_up = 1; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getCatchingUp = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, 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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} 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.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.toObject = function(includeInstance, msg) { - var f, obj = { - startProTxHash: msg.getStartProTxHash_asB64(), - count: jspb.Message.getFieldWithDefault(msg, 2, 0), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setCatchingUp = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} + * optional bytes latest_block_hash = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} + * optional bytes latest_block_hash = 2; + * This is a type-conversion wrapper around `getLatestBlockHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.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.setStartProTxHash(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCount(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLatestBlockHash())); }; /** - * Serializes the message to binary data (in protobuf wire format). + * optional bytes latest_block_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLatestBlockHash()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLatestBlockHash())); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} 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.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartProTxHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getCount(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 3, - f - ); - } +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setLatestBlockHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * optional bytes start_pro_tx_hash = 1; + * optional bytes latest_app_hash = 3; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getStartProTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestAppHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * optional bytes start_pro_tx_hash = 1; - * This is a type-conversion wrapper around `getStartProTxHash()` + * optional bytes latest_app_hash = 3; + * This is a type-conversion wrapper around `getLatestAppHash()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getStartProTxHash_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestAppHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartProTxHash())); + this.getLatestAppHash())); }; /** - * optional bytes start_pro_tx_hash = 1; + * optional bytes latest_app_hash = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartProTxHash()` + * This is a type-conversion wrapper around `getLatestAppHash()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getStartProTxHash_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestAppHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartProTxHash())); + this.getLatestAppHash())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.setStartProTxHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setLatestAppHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); }; /** - * optional uint32 count = 2; + * optional uint64 latest_block_height = 4; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.setCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setLatestBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional bool prove = 3; - * @return {boolean} + * optional bytes earliest_block_hash = 5; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} returns this + * optional bytes earliest_block_hash = 5; + * This is a type-conversion wrapper around `getEarliestBlockHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEarliestBlockHash())); }; /** - * optional GetProtocolVersionUpgradeVoteStatusRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} + * optional bytes earliest_block_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEarliestBlockHash()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEarliestBlockHash())); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_[0], value); + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setEarliestBlockHash = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} returns this + * optional bytes earliest_app_hash = 6; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestAppHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes earliest_app_hash = 6; + * This is a type-conversion wrapper around `getEarliestAppHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEarliestAppHash())); }; - -/** - * 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.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_ = [[1]]; - /** - * @enum {number} + * optional bytes earliest_app_hash = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEarliestAppHash()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEarliestAppHash())); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.VersionCase} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setEarliestAppHash = function(value) { + return jspb.Message.setProto3BytesField(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} + * optional uint64 earliest_block_height = 7; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * 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.GetProtocolVersionUpgradeVoteStatusResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.toObject = function(includeInstance, msg) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setEarliestBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} + * optional uint64 max_peer_block_height = 9; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getMaxPeerBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.deserializeBinaryFromReader); - msg.setV0(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setMaxPeerBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint32 core_chain_locked_height = 10; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getCoreChainLockedHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setCoreChainLockedHeight = function(value) { + return jspb.Message.setField(this, 10, 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 - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_ = [[1,2]]; - /** - * @enum {number} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - VERSIONS: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.clearCoreChainLockedHeight = function() { + return jspb.Message.setField(this, 10, undefined); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.ResultCase} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.hasCoreChainLockedHeight = function() { + return jspb.Message.getField(this, 10) != null; }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -27369,8 +46006,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject(opt_includeInstance, this); }; @@ -27379,15 +46016,15 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * @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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject = function(includeInstance, msg) { var f, obj = { - versions: (f = msg.getVersions()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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) + chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + peersCount: jspb.Message.getFieldWithDefault(msg, 2, 0), + listening: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -27401,23 +46038,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -27425,19 +46062,16 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.deserializeBinaryFromReader); - msg.setVersions(value); + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(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 {number} */ (reader.readUint32()); + msg.setPeersCount(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 {boolean} */ (reader.readBool()); + msg.setListening(value); break; default: reader.skipField(); @@ -27452,9 +46086,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -27462,196 +46096,87 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVersions(); - if (f != null) { - writer.writeMessage( + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.serializeBinaryToWriter + f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getPeersCount(); + if (f !== 0) { + writer.writeUint32( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( + f = message.getListening(); + if (f) { + writer.writeBool( 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + f ); } }; - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.toObject = function(includeInstance, msg) { - var f, obj = { - versionSignalsList: jspb.Message.toObjectList(msg.getVersionSignalsList(), - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.deserializeBinaryFromReader); - msg.addVersionSignals(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional string chain_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersionSignalsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * repeated VersionSignal version_signals = 1; - * @return {!Array} + * optional uint32 peers_count = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.getVersionSignalsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal, 1)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.getPeersCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.setVersionSignalsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.setPeersCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} + * optional bool listening = 3; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.addVersionSignals = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal, opt_index); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.getListening = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.clearVersionSignalsList = function() { - return this.setVersionSignalsList([]); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.setListening = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; @@ -27671,8 +46196,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject(opt_includeInstance, this); }; @@ -27681,14 +46206,20 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * @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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject = function(includeInstance, msg) { var f, obj = { - proTxHash: msg.getProTxHash_asB64(), - version: jspb.Message.getFieldWithDefault(msg, 2, 0) + totalSyncedTime: jspb.Message.getFieldWithDefault(msg, 1, 0), + remainingTime: jspb.Message.getFieldWithDefault(msg, 2, 0), + totalSnapshots: jspb.Message.getFieldWithDefault(msg, 3, 0), + chunkProcessAvgTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + snapshotHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), + snapshotChunksCount: jspb.Message.getFieldWithDefault(msg, 6, 0), + backfilledBlocks: jspb.Message.getFieldWithDefault(msg, 7, 0), + backfillBlocksTotal: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -27702,23 +46233,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -27726,12 +46257,36 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProTxHash(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalSyncedTime(value); break; case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRemainingTime(value); + break; + case 3: var value = /** @type {number} */ (reader.readUint32()); - msg.setVersion(value); + msg.setTotalSnapshots(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setChunkProcessAvgTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSnapshotHeight(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSnapshotChunksCount(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBackfilledBlocks(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBackfillBlocksTotal(value); break; default: reader.skipField(); @@ -27746,9 +46301,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -27756,114 +46311,240 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProTxHash_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getTotalSyncedTime(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = message.getVersion(); + f = message.getRemainingTime(); if (f !== 0) { - writer.writeUint32( + writer.writeUint64( 2, f ); } + f = message.getTotalSnapshots(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getChunkProcessAvgTime(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getSnapshotHeight(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getSnapshotChunksCount(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getBackfilledBlocks(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getBackfillBlocksTotal(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } }; /** - * optional bytes pro_tx_hash = 1; - * @return {string} + * optional uint64 total_synced_time = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getProTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getTotalSyncedTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * optional bytes pro_tx_hash = 1; - * This is a type-conversion wrapper around `getProTxHash()` - * @return {string} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getProTxHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProTxHash())); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setTotalSyncedTime = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * 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} + * optional uint64 remaining_time = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getProTxHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProTxHash())); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getRemainingTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.setProTxHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setRemainingTime = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional uint32 version = 2; + * optional uint32 total_snapshots = 3; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getTotalSnapshots = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setTotalSnapshots = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional VersionSignals versions = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} + * optional uint64 chunk_process_avg_time = 4; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.getVersions = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals, 1)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getChunkProcessAvgTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setChunkProcessAvgTime = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 snapshot_height = 5; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getSnapshotHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setSnapshotHeight = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 snapshot_chunks_count = 6; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getSnapshotChunksCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setSnapshotChunksCount = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 backfilled_blocks = 7; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getBackfilledBlocks = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setBackfilledBlocks = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint64 backfill_blocks_total = 8; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getBackfillBlocksTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setBackfillBlocksTotal = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional Version version = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getVersion = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.setVersions = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.clearVersions = function() { - return this.setVersions(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearVersion = function() { + return this.setVersion(undefined); }; @@ -27871,36 +46552,36 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.hasVersions = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasVersion = function() { return jspb.Message.getField(this, 1) != null; }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * optional Node node = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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.GetStatusResponse.GetStatusResponseV0.prototype.getNode = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node, 2)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setNode = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearNode = function() { + return this.setNode(undefined); }; @@ -27908,36 +46589,36 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasNode = function() { return jspb.Message.getField(this, 2) != null; }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * optional Chain chain = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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.GetStatusResponse.GetStatusResponseV0.prototype.getChain = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain, 3)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setChain = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearChain = function() { + return this.setChain(undefined); }; @@ -27945,35 +46626,146 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasChain = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetProtocolVersionUpgradeVoteStatusResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} + * optional Network network = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getNetwork = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network, 4)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setNetwork = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearNetwork = function() { + return this.setNetwork(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasNetwork = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional StateSync state_sync = 5; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getStateSync = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync, 5)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setStateSync = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearStateSync = function() { + return this.setStateSync(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasStateSync = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional Time time = 6; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getTime = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time, 6)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasTime = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional GetStatusResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -27982,7 +46774,7 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prot * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -27996,21 +46788,21 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prot * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.oneofGroups_[0])); }; @@ -28028,8 +46820,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.toObject(opt_includeInstance, this); }; @@ -28038,13 +46830,13 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.toObject = functi * @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.GetEpochsInfoRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -28058,23 +46850,23 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.toObject = function(include /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest; - return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest; + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.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.GetEpochsInfoRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -28082,8 +46874,8 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.deserializeBinaryFromReader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -28099,9 +46891,9 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.deserializeBinaryFromReader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28109,18 +46901,18 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.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.GetEpochsInfoRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.serializeBinaryToWriter ); } }; @@ -28142,8 +46934,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.toObject(opt_includeInstance, this); }; @@ -28152,16 +46944,13 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prot * @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.GetEpochsInfoRequest.GetEpochsInfoRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - startEpoch: (f = msg.getStartEpoch()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - count: jspb.Message.getFieldWithDefault(msg, 2, 0), - ascending: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; if (includeInstance) { @@ -28175,46 +46964,29 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toOb /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0; - return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0; + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.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.GetEpochsInfoRequest.GetEpochsInfoRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setStartEpoch(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCount(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAscending(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); - break; default: reader.skipField(); break; @@ -28228,9 +47000,9 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.dese * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28238,159 +47010,39 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStartEpoch(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getCount(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getAscending(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional google.protobuf.UInt32Value start_epoch = 1; - * @return {?proto.google.protobuf.UInt32Value} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getStartEpoch = function() { - return /** @type{?proto.google.protobuf.UInt32Value} */ ( - jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 1)); -}; - - -/** - * @param {?proto.google.protobuf.UInt32Value|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setStartEpoch = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.clearStartEpoch = function() { - return this.setStartEpoch(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.hasStartEpoch = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 count = 2; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bool ascending = 3; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getAscending = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setAscending = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional bool prove = 4; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * optional GetEpochsInfoRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} + * optional GetCurrentQuorumsInfoRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -28399,7 +47051,7 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.clearV0 = functio * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -28413,21 +47065,21 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.hasV0 = function( * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.oneofGroups_[0])); }; @@ -28445,8 +47097,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.toObject(opt_includeInstance, this); }; @@ -28455,13 +47107,13 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.toObject = funct * @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.GetEpochsInfoResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -28475,23 +47127,23 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.toObject = function(includ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse; - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse; + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.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.GetEpochsInfoResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -28499,8 +47151,8 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.deserializeBinaryFromReade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -28516,9 +47168,9 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.deserializeBinaryFromReade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28526,50 +47178,24 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.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.GetEpochsInfoResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - EPOCHS: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_[0])); -}; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -28585,8 +47211,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObject(opt_includeInstance, this); }; @@ -28595,15 +47221,15 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.pr * @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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObject = function(includeInstance, msg) { var f, obj = { - epochs: (f = msg.getEpochs()) && proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.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) + proTxHash: msg.getProTxHash_asB64(), + nodeIp: jspb.Message.getFieldWithDefault(msg, 2, ""), + isBanned: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -28617,23 +47243,23 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.to /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0; - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0; + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -28641,19 +47267,16 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.de var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.deserializeBinaryFromReader); - msg.setEpochs(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProTxHash(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 {string} */ (reader.readString()); + msg.setNodeIp(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 {boolean} */ (reader.readBool()); + msg.setIsBanned(value); break; default: reader.skipField(); @@ -28668,9 +47291,9 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.de * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28678,200 +47301,122 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEpochs(); - if (f != null) { - writer.writeMessage( + f = message.getProTxHash_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.serializeBinaryToWriter + f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getNodeIp(); + if (f.length > 0) { + writer.writeString( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( + f = message.getIsBanned(); + if (f) { + writer.writeBool( 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + f ); } }; - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.toObject = function(includeInstance, msg) { - var f, obj = { - epochInfosList: jspb.Message.toObjectList(msg.getEpochInfosList(), - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} + * optional bytes pro_tx_hash = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos; - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getProTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} + * optional bytes pro_tx_hash = 1; + * This is a type-conversion wrapper around `getProTxHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinaryFromReader); - msg.addEpochInfos(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getProTxHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProTxHash())); }; /** - * Serializes the message to binary data (in protobuf wire format). + * 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getProTxHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProTxHash())); }; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEpochInfosList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.serializeBinaryToWriter - ); - } + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.setProTxHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * repeated EpochInfo epoch_infos = 1; - * @return {!Array} + * optional string node_ip = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.getEpochInfosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo, 1)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getNodeIp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} returns this -*/ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.setEpochInfosList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.setNodeIp = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} + * optional bool is_banned = 3; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.addEpochInfos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo, opt_index); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getIsBanned = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.clearEpochInfosList = function() { - return this.setEpochInfosList([]); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.setIsBanned = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.repeatedFields_ = [3]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -28887,8 +47432,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toObject(opt_includeInstance, this); }; @@ -28897,18 +47442,17 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.Ep * @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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toObject = function(includeInstance, msg) { var f, obj = { - number: jspb.Message.getFieldWithDefault(msg, 1, 0), - firstBlockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - firstCoreBlockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), - startTime: jspb.Message.getFieldWithDefault(msg, 4, 0), - feeMultiplier: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), - protocolVersion: jspb.Message.getFieldWithDefault(msg, 6, 0) + quorumHash: msg.getQuorumHash_asB64(), + coreHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + membersList: jspb.Message.toObjectList(msg.getMembersList(), + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObject, includeInstance), + thresholdPublicKey: msg.getThresholdPublicKey_asB64() }; if (includeInstance) { @@ -28922,23 +47466,23 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.Ep /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo; - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0; + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -28946,28 +47490,21 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.Ep var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumber(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setQuorumHash(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFirstBlockHeight(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setCoreHeight(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFirstCoreBlockHeight(value); + var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinaryFromReader); + msg.addMembers(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartTime(value); - break; - case 5: - var value = /** @type {number} */ (reader.readDouble()); - msg.setFeeMultiplier(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setProtocolVersion(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setThresholdPublicKey(value); break; default: reader.skipField(); @@ -28982,9 +47519,9 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.Ep * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28992,449 +47529,181 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.Ep /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} message + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNumber(); - if (f !== 0) { - writer.writeUint32( + f = message.getQuorumHash_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getFirstBlockHeight(); + f = message.getCoreHeight(); if (f !== 0) { - writer.writeUint64( + writer.writeUint32( 2, f ); } - f = message.getFirstCoreBlockHeight(); - if (f !== 0) { - writer.writeUint32( + f = message.getMembersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 3, - f + f, + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.serializeBinaryToWriter ); } - f = message.getStartTime(); - if (f !== 0) { - writer.writeUint64( + f = message.getThresholdPublicKey_asU8(); + if (f.length > 0) { + writer.writeBytes( 4, f ); } - f = message.getFeeMultiplier(); - if (f !== 0.0) { - writer.writeDouble( - 5, - f - ); - } - f = message.getProtocolVersion(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } -}; - - -/** - * optional uint32 number = 1; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setNumber = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 first_block_height = 2; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getFirstBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setFirstBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional uint32 first_core_block_height = 3; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getFirstCoreBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setFirstCoreBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 start_time = 4; - * @return {number} + * optional bytes quorum_hash = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getStartTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getQuorumHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this + * optional bytes quorum_hash = 1; + * This is a type-conversion wrapper around `getQuorumHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setStartTime = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getQuorumHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getQuorumHash())); }; /** - * optional double fee_multiplier = 5; - * @return {number} + * optional bytes quorum_hash = 1; + * 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getFeeMultiplier = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getQuorumHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getQuorumHash())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setFeeMultiplier = function(value) { - return jspb.Message.setProto3FloatField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setQuorumHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 protocol_version = 6; + * optional uint32 core_height = 2; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getProtocolVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getCoreHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setProtocolVersion = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional EpochInfos epochs = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.getEpochs = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.setEpochs = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.clearEpochs = function() { - return this.setEpochs(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.hasEpochs = 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setCoreHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional GetEpochsInfoResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} + * repeated ValidatorV0 members = 3; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getMembersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0, 3)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.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.GetContestedResourcesRequest.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.VersionCase} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setMembersList = function(value) { + return jspb.Message.setRepeatedWrapperField(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} + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.addMembers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0, opt_index); }; /** - * 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.GetContestedResourcesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.clearMembersList = function() { + return this.setMembersList([]); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} + * optional bytes threshold_public_key = 4; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest; - return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getThresholdPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} + * optional bytes threshold_public_key = 4; + * This is a type-conversion wrapper around `getThresholdPublicKey()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.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.GetContestedResourcesRequest.GetContestedResourcesRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinaryFromReader); - msg.setV0(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getThresholdPublicKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getThresholdPublicKey())); }; /** - * Serializes the message to binary data (in protobuf wire format). + * optional bytes threshold_public_key = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getThresholdPublicKey()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getThresholdPublicKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getThresholdPublicKey())); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} 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.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setThresholdPublicKey = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -29444,7 +47713,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.serializeBinaryToWr * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.repeatedFields_ = [4,5]; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.repeatedFields_ = [1,3]; @@ -29461,8 +47730,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.toObject(opt_includeInstance, this); }; @@ -29471,21 +47740,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourc * @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.GetContestedResourcesRequest.GetContestedResourcesRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64(), - documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), - indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), - startIndexValuesList: msg.getStartIndexValuesList_asB64(), - endIndexValuesList: msg.getEndIndexValuesList_asB64(), - startAtValueInfo: (f = msg.getStartAtValueInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.toObject(includeInstance, f), - count: jspb.Message.getFieldWithDefault(msg, 7, 0), - orderAscending: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) + quorumHashesList: msg.getQuorumHashesList_asB64(), + currentQuorumHash: msg.getCurrentQuorumHash_asB64(), + validatorSetsList: jspb.Message.toObjectList(msg.getValidatorSetsList(), + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toObject, includeInstance), + lastBlockProposer: msg.getLastBlockProposer_asB64(), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) }; if (includeInstance) { @@ -29499,23 +47765,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0; + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.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.GetContestedResourcesRequest.GetContestedResourcesRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -29524,40 +47790,25 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourc switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); + msg.addQuorumHashes(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentTypeName(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCurrentQuorumHash(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setIndexName(value); + var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinaryFromReader); + msg.addValidatorSets(value); break; case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addStartIndexValues(value); + msg.setLastBlockProposer(value); break; case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addEndIndexValues(value); - break; - case 6: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.deserializeBinaryFromReader); - msg.setStartAtValueInfo(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCount(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOrderAscending(value); - break; - case 9: - 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(); @@ -29572,9 +47823,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourc * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -29582,596 +47833,736 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourc /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); + f = message.getQuorumHashesList_asU8(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedBytes( 1, f ); } - f = message.getDocumentTypeName(); + f = message.getCurrentQuorumHash_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 2, f ); } - f = message.getIndexName(); + f = message.getValidatorSetsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 3, - f + f, + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.serializeBinaryToWriter ); } - f = message.getStartIndexValuesList_asU8(); + f = message.getLastBlockProposer_asU8(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeBytes( 4, f ); } - f = message.getEndIndexValuesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 5, - f - ); - } - f = message.getStartAtValueInfo(); + f = message.getMetadata(); if (f != null) { writer.writeMessage( - 6, + 5, f, - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.serializeBinaryToWriter - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 7)); - if (f != null) { - writer.writeUint32( - 7, - f - ); - } - f = message.getOrderAscending(); - if (f) { - writer.writeBool( - 8, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 9, - 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} + * repeated bytes quorum_hashes = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getQuorumHashesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * 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.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated bytes quorum_hashes = 1; + * This is a type-conversion wrapper around `getQuorumHashesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.toObject = function(includeInstance, msg) { - var f, obj = { - startValue: msg.getStartValue_asB64(), - startValueIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getQuorumHashesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getQuorumHashesList())); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} + * repeated bytes quorum_hashes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getQuorumHashesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo; - return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getQuorumHashesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getQuorumHashesList())); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.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.setStartValue(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStartValueIncluded(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setQuorumHashesList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.addQuorumHashes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartValue_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getStartValueIncluded(); - if (f) { - writer.writeBool( - 2, - f - ); - } +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.clearQuorumHashesList = function() { + return this.setQuorumHashesList([]); }; /** - * optional bytes start_value = 1; + * optional bytes current_quorum_hash = 2; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValue = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getCurrentQuorumHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes start_value = 1; - * This is a type-conversion wrapper around `getStartValue()` + * optional bytes current_quorum_hash = 2; + * This is a type-conversion wrapper around `getCurrentQuorumHash()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValue_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getCurrentQuorumHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartValue())); + this.getCurrentQuorumHash())); }; /** - * optional bytes start_value = 1; + * optional bytes current_quorum_hash = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartValue()` + * This is a type-conversion wrapper around `getCurrentQuorumHash()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValue_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getCurrentQuorumHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartValue())); + this.getCurrentQuorumHash())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.setStartValue = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setCurrentQuorumHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * optional bool start_value_included = 2; - * @return {boolean} + * repeated ValidatorSetV0 validator_sets = 3; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValueIncluded = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getValidatorSetsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0, 3)); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setValidatorSetsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.setStartValueIncluded = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.addValidatorSets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0, opt_index); }; /** - * optional bytes contract_id = 1; + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.clearValidatorSetsList = function() { + return this.setValidatorSetsList([]); +}; + + +/** + * optional bytes last_block_proposer = 4; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getLastBlockProposer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * optional bytes contract_id = 1; - * This is a type-conversion wrapper around `getContractId()` + * optional bytes last_block_proposer = 4; + * This is a type-conversion wrapper around `getLastBlockProposer()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getContractId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getLastBlockProposer_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); + this.getLastBlockProposer())); }; /** - * optional bytes contract_id = 1; + * optional bytes last_block_proposer = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractId()` + * This is a type-conversion wrapper around `getLastBlockProposer()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getContractId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getLastBlockProposer_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); + this.getLastBlockProposer())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setLastBlockProposer = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); }; /** - * optional string document_type_name = 2; - * @return {string} + * optional ResponseMetadata metadata = 5; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getDocumentTypeName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 5)); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setDocumentTypeName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * optional string index_name = 3; - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getIndexName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * optional GetCurrentQuorumsInfoResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setIndexName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.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.GetIdentityTokenBalancesRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.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.GetIdentityTokenBalancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.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.GetIdentityTokenBalancesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * repeated bytes start_index_values = 4; - * @return {!Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartIndexValuesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.deserializeBinaryFromReader(msg, reader); }; /** - * repeated bytes start_index_values = 4; - * This is a type-conversion wrapper around `getStartIndexValuesList()` - * @return {!Array} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartIndexValuesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getStartIndexValuesList())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * repeated bytes start_index_values = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartIndexValuesList()` - * @return {!Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartIndexValuesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getStartIndexValuesList())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setStartIndexValuesList = function(value) { - return jspb.Message.setField(this, 4, value || []); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.serializeBinaryToWriter + ); + } }; -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.addStartIndexValues = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); -}; - /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearStartIndexValuesList = function() { - return this.setStartIndexValuesList([]); -}; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.repeatedFields_ = [2]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * repeated bytes end_index_values = 5; - * @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.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getEndIndexValuesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.toObject(opt_includeInstance, this); }; /** - * repeated bytes end_index_values = 5; - * This is a type-conversion wrapper around `getEndIndexValuesList()` - * @return {!Array} + * 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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getEndIndexValuesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getEndIndexValuesList())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + tokenIdsList: msg.getTokenIdsList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * repeated bytes end_index_values = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEndIndexValuesList()` - * @return {!Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getEndIndexValuesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getEndIndexValuesList())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} 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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setEndIndexValuesList = function(value) { - return jspb.Message.setField(this, 5, value || []); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.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.addTokenIds(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.addEndIndexValues = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearEndIndexValuesList = function() { - return this.setEndIndexValuesList([]); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTokenIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 3, + f + ); + } }; /** - * optional StartAtValueInfo start_at_value_info = 6; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} + * optional bytes identity_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartAtValueInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo, 6)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setStartAtValueInfo = function(value) { - return jspb.Message.setWrapperField(this, 6, value); + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.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.GetContestedResourcesRequest.GetContestedResourcesRequestV0} 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.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearStartAtValueInfo = function() { - return this.setStartAtValueInfo(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.hasStartAtValueInfo = function() { - return jspb.Message.getField(this, 6) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 count = 7; - * @return {number} + * repeated bytes token_ids = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.getTokenIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * repeated bytes token_ids = 2; + * This is a type-conversion wrapper around `getTokenIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setCount = function(value) { - return jspb.Message.setField(this, 7, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.getTokenIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTokenIdsList())); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * repeated bytes token_ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearCount = function() { - return jspb.Message.setField(this, 7, undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.getTokenIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTokenIdsList())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.hasCount = function() { - return jspb.Message.getField(this, 7) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.setTokenIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** - * optional bool order_ascending = 8; - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getOrderAscending = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.addTokenIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setOrderAscending = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.clearTokenIdsList = function() { + return this.setTokenIdsList([]); }; /** - * optional bool prove = 9; + * optional bool prove = 3; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional GetContestedResourcesRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} + * optional GetIdentityTokenBalancesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -30180,7 +48571,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.clearV0 = * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -30194,21 +48585,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.hasV0 = f * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.oneofGroups_[0])); }; @@ -30226,8 +48617,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.toObject(opt_includeInstance, this); }; @@ -30236,13 +48627,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.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.GetContestedResourcesResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -30256,23 +48647,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse; - return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.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.GetContestedResourcesResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30280,8 +48671,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -30297,9 +48688,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30307,18 +48698,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.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.GetContestedResourcesResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.serializeBinaryToWriter ); } }; @@ -30333,22 +48724,22 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.serializeBinaryToW * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ResultCase = { RESULT_NOT_SET: 0, - CONTESTED_RESOURCE_VALUES: 1, + TOKEN_BALANCES: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.oneofGroups_[0])); }; @@ -30366,8 +48757,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.toObject(opt_includeInstance, this); }; @@ -30376,13 +48767,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * @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.GetContestedResourcesResponse.GetContestedResourcesResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - contestedResourceValues: (f = msg.getContestedResourceValues()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.toObject(includeInstance, f), + tokenBalances: (f = msg.getTokenBalances()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.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) }; @@ -30398,23 +48789,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.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.GetContestedResourcesResponse.GetContestedResourcesResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30422,9 +48813,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinaryFromReader); - msg.setContestedResourceValues(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.deserializeBinaryFromReader); + msg.setTokenBalances(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -30446,49 +48837,251 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenBalances(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.toObject = function(includeInstance, msg) { + var f, obj = { + tokenId: msg.getTokenId_asB64(), + balance: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.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.setTokenId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes token_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 balance = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.setBalance = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContestedResourceValues(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.clearBalance = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.hasBalance = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -30498,7 +49091,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.repeatedFields_ = [1]; @@ -30515,8 +49108,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.toObject(opt_includeInstance, this); }; @@ -30525,13 +49118,14 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * @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.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.toObject = function(includeInstance, msg) { var f, obj = { - contestedResourceValuesList: msg.getContestedResourceValuesList_asB64() + tokenBalancesList: jspb.Message.toObjectList(msg.getTokenBalancesList(), + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.toObject, includeInstance) }; if (includeInstance) { @@ -30545,23 +49139,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues; - return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.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.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30569,8 +49163,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addContestedResourceValues(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.deserializeBinaryFromReader); + msg.addTokenBalances(value); break; default: reader.skipField(); @@ -30585,9 +49180,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30595,108 +49190,86 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContestedResourceValuesList_asU8(); + f = message.getTokenBalancesList(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeRepeatedMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.serializeBinaryToWriter ); } }; /** - * repeated bytes contested_resource_values = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.getContestedResourceValuesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes contested_resource_values = 1; - * This is a type-conversion wrapper around `getContestedResourceValuesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.getContestedResourceValuesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getContestedResourceValuesList())); -}; - - -/** - * repeated bytes contested_resource_values = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContestedResourceValuesList()` - * @return {!Array} + * repeated TokenBalanceEntry token_balances = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.getContestedResourceValuesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getContestedResourceValuesList())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.prototype.getTokenBalancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry, 1)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.setContestedResourceValuesList = function(value) { - return jspb.Message.setField(this, 1, value || []); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.prototype.setTokenBalancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry=} opt_value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.addContestedResourceValues = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.prototype.addTokenBalances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.clearContestedResourceValuesList = function() { - return this.setContestedResourceValuesList([]); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.prototype.clearTokenBalancesList = function() { + return this.setTokenBalancesList([]); }; /** - * optional ContestedResourceValues contested_resource_values = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} + * optional TokenBalances token_balances = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getContestedResourceValues = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.getTokenBalances = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.setContestedResourceValues = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.setTokenBalances = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.clearContestedResourceValues = function() { - return this.setContestedResourceValues(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.clearTokenBalances = function() { + return this.setTokenBalances(undefined); }; @@ -30704,7 +49277,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.hasContestedResourceValues = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.hasTokenBalances = function() { return jspb.Message.getField(this, 1) != null; }; @@ -30713,7 +49286,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -30721,18 +49294,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -30741,7 +49314,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -30750,7 +49323,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -30758,18 +49331,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.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.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -30778,35 +49351,35 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetContestedResourcesResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} + * optional GetIdentityTokenBalancesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -30815,7 +49388,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.clearV0 * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -30829,21 +49402,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.hasV0 = * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.oneofGroups_[0])); }; @@ -30861,8 +49434,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.toObject(opt_includeInstance, this); }; @@ -30871,13 +49444,13 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.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.GetVotePollsByEndDateRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -30891,23 +49464,23 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.toObject = function /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.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.GetVotePollsByEndDateRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30915,386 +49488,57 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.deserializeBinaryFr var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.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.GetVotePollsByEndDateRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.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.GetVotePollsByEndDateRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.toObject = function(includeInstance, msg) { - var f, obj = { - startTimeInfo: (f = msg.getStartTimeInfo()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.toObject(includeInstance, f), - endTimeInfo: (f = msg.getEndTimeInfo()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.toObject(includeInstance, f), - limit: jspb.Message.getFieldWithDefault(msg, 3, 0), - offset: jspb.Message.getFieldWithDefault(msg, 4, 0), - ascending: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 6, 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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.deserializeBinaryFromReader); - msg.setStartTimeInfo(value); - break; - case 2: - var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinaryFromReader); - msg.setEndTimeInfo(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLimit(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOffset(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAscending(value); - break; - case 6: - 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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartTimeInfo(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.serializeBinaryToWriter - ); - } - f = message.getEndTimeInfo(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.serializeBinaryToWriter - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint32( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint32( - 4, - f - ); - } - f = message.getAscending(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 6, - f - ); - } -}; - - - - - -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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.toObject = function(includeInstance, msg) { - var f, obj = { - startTimeMs: jspb.Message.getFieldWithDefault(msg, 1, 0), - startTimeIncluded: 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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.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.setStartTimeMs(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStartTimeIncluded(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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartTimeMs(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getStartTimeIncluded(); - if (f) { - writer.writeBool( - 2, - f - ); + } } + return msg; }; /** - * optional uint64 start_time_ms = 1; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.getStartTimeMs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.setStartTimeMs = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.serializeBinaryToWriter + ); + } }; -/** - * optional bool start_time_included = 2; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.getStartTimeIncluded = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.setStartTimeIncluded = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.repeatedFields_ = [2]; @@ -31311,8 +49555,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.toObject(opt_includeInstance, this); }; @@ -31321,14 +49565,15 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDa * @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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - endTimeMs: jspb.Message.getFieldWithDefault(msg, 1, 0), - endTimeIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + tokenId: msg.getTokenId_asB64(), + identityIdsList: msg.getIdentityIdsList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -31342,23 +49587,23 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDa /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -31366,12 +49611,16 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDa var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setEndTimeMs(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTokenId(value); break; case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIdentityIds(value); + break; + case 3: var value = /** @type {boolean} */ (reader.readBool()); - msg.setEndTimeIncluded(value); + msg.setProve(value); break; default: reader.skipField(); @@ -31386,9 +49635,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDa * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -31396,23 +49645,30 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDa /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEndTimeMs(); - if (f !== 0) { - writer.writeUint64( + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getEndTimeIncluded(); + f = message.getIdentityIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } + f = message.getProve(); if (f) { writer.writeBool( - 2, + 3, f ); } @@ -31420,247 +49676,150 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDa /** - * optional uint64 end_time_ms = 1; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.getEndTimeMs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.setEndTimeMs = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bool end_time_included = 2; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.getEndTimeIncluded = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.setEndTimeIncluded = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional StartAtTimeInfo start_time_info = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getStartTimeInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setStartTimeInfo = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearStartTimeInfo = function() { - return this.setStartTimeInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasStartTimeInfo = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional EndAtTimeInfo end_time_info = 2; - * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getEndTimeInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo, 2)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setEndTimeInfo = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearEndTimeInfo = function() { - return this.setEndTimeInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasEndTimeInfo = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint32 limit = 3; - * @return {number} + * optional bytes token_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setLimit = function(value) { - return jspb.Message.setField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearLimit = function() { - return jspb.Message.setField(this, 3, undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasLimit = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 offset = 4; - * @return {number} + * repeated bytes identity_ids = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getIdentityIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + * repeated bytes identity_ids = 2; + * This is a type-conversion wrapper around `getIdentityIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setOffset = function(value) { - return jspb.Message.setField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getIdentityIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdentityIdsList())); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + * repeated bytes identity_ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentityIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearOffset = function() { - return jspb.Message.setField(this, 4, undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getIdentityIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdentityIdsList())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasOffset = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.setIdentityIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** - * optional bool ascending = 5; - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getAscending = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.addIdentityIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setAscending = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.clearIdentityIdsList = function() { + return this.setIdentityIdsList([]); }; /** - * optional bool prove = 6; + * optional bool prove = 3; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional GetVotePollsByEndDateRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} + * optional GetIdentitiesTokenBalancesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -31669,7 +49828,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.clearV0 = * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -31683,21 +49842,21 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.hasV0 = f * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.oneofGroups_[0])); }; @@ -31715,8 +49874,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.toObject(opt_includeInstance, this); }; @@ -31725,13 +49884,13 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.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.GetVotePollsByEndDateResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -31745,23 +49904,23 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.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.GetVotePollsByEndDateResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -31769,8 +49928,8 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -31786,9 +49945,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -31796,18 +49955,18 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.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.GetVotePollsByEndDateResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.serializeBinaryToWriter ); } }; @@ -31822,22 +49981,22 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.serializeBinaryToW * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.ResultCase = { RESULT_NOT_SET: 0, - VOTE_POLLS_BY_TIMESTAMPS: 1, + IDENTITY_TOKEN_BALANCES: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.oneofGroups_[0])); }; @@ -31855,8 +50014,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.toObject(opt_includeInstance, this); }; @@ -31865,13 +50024,13 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * @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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - votePollsByTimestamps: (f = msg.getVotePollsByTimestamps()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.toObject(includeInstance, f), + identityTokenBalances: (f = msg.getIdentityTokenBalances()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.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) }; @@ -31887,23 +50046,23 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -31911,9 +50070,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinaryFromReader); - msg.setVotePollsByTimestamps(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.deserializeBinaryFromReader); + msg.setIdentityTokenBalances(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -31938,9 +50097,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -31948,18 +50107,18 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVotePollsByTimestamps(); + f = message.getIdentityTokenBalances(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.serializeBinaryToWriter ); } f = message.getProof(); @@ -31982,13 +50141,6 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -32004,8 +50156,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.toObject(opt_includeInstance, this); }; @@ -32014,14 +50166,14 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * @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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.toObject = function(includeInstance, msg) { var f, obj = { - timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), - serializedVotePollsList: msg.getSerializedVotePollsList_asB64() + identityId: msg.getIdentityId_asB64(), + balance: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -32035,23 +50187,23 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -32059,12 +50211,12 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setIdentityId(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addSerializedVotePolls(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(value); break; default: reader.skipField(); @@ -32079,9 +50231,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -32089,22 +50241,22 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getSerializedVotePollsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( 2, f ); @@ -32113,81 +50265,80 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** - * optional uint64 timestamp = 1; - * @return {number} + * optional bytes identity_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); }; /** - * repeated bytes serialized_vote_polls = 2; - * @return {!Array} + * 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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getSerializedVotePollsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); }; /** - * repeated bytes serialized_vote_polls = 2; - * This is a type-conversion wrapper around `getSerializedVotePollsList()` - * @return {!Array} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getSerializedVotePollsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getSerializedVotePollsList())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * repeated bytes serialized_vote_polls = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSerializedVotePollsList()` - * @return {!Array} + * optional uint64 balance = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getSerializedVotePollsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getSerializedVotePollsList())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.setSerializedVotePollsList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.setBalance = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.addSerializedVotePolls = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.clearSerializedVotePollsList = function() { - return this.setSerializedVotePollsList([]); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.hasBalance = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -32197,7 +50348,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.repeatedFields_ = [1]; @@ -32214,8 +50365,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.toObject(opt_includeInstance, this); }; @@ -32224,15 +50375,14 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * @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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.toObject = function(includeInstance, msg) { var f, obj = { - votePollsByTimestampsList: jspb.Message.toObjectList(msg.getVotePollsByTimestampsList(), - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.toObject, includeInstance), - finishedResults: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + identityTokenBalancesList: jspb.Message.toObjectList(msg.getIdentityTokenBalancesList(), + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.toObject, includeInstance) }; if (includeInstance) { @@ -32246,23 +50396,23 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -32270,13 +50420,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinaryFromReader); - msg.addVotePollsByTimestamps(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFinishedResults(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.deserializeBinaryFromReader); + msg.addIdentityTokenBalances(value); break; default: reader.skipField(); @@ -32291,9 +50437,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -32301,111 +50447,86 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVotePollsByTimestampsList(); + f = message.getIdentityTokenBalancesList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.serializeBinaryToWriter - ); - } - f = message.getFinishedResults(); - if (f) { - writer.writeBool( - 2, - f + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.serializeBinaryToWriter ); } }; /** - * repeated SerializedVotePollsByTimestamp vote_polls_by_timestamps = 1; - * @return {!Array} + * repeated IdentityTokenBalanceEntry identity_token_balances = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.getVotePollsByTimestampsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.prototype.getIdentityTokenBalancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry, 1)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.setVotePollsByTimestampsList = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.prototype.setIdentityTokenBalancesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp=} opt_value + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry=} opt_value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.addVotePollsByTimestamps = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.prototype.addIdentityTokenBalances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} returns this - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.clearVotePollsByTimestampsList = function() { - return this.setVotePollsByTimestampsList([]); -}; - - -/** - * optional bool finished_results = 2; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.getFinishedResults = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} returns this - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.setFinishedResults = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.prototype.clearIdentityTokenBalancesList = function() { + return this.setIdentityTokenBalancesList([]); }; /** - * optional SerializedVotePollsByTimestamps vote_polls_by_timestamps = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} + * optional IdentityTokenBalances identity_token_balances = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getVotePollsByTimestamps = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.getIdentityTokenBalances = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.setVotePollsByTimestamps = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.setIdentityTokenBalances = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.clearVotePollsByTimestamps = function() { - return this.setVotePollsByTimestamps(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.clearIdentityTokenBalances = function() { + return this.setIdentityTokenBalances(undefined); }; @@ -32413,7 +50534,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.hasVotePollsByTimestamps = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.hasIdentityTokenBalances = function() { return jspb.Message.getField(this, 1) != null; }; @@ -32422,7 +50543,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -32430,18 +50551,18 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -32450,7 +50571,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -32459,7 +50580,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -32467,18 +50588,18 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -32487,35 +50608,35 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetVotePollsByEndDateResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} + * optional GetIdentitiesTokenBalancesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -32524,7 +50645,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.clearV0 * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -32538,21 +50659,21 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.hasV0 = * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.oneofGroups_[0])); }; @@ -32570,8 +50691,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.toObject(opt_includeInstance, this); }; @@ -32580,13 +50701,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.t * @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.GetContestedResourceVoteStateRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -32600,23 +50721,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.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.GetContestedResourceVoteStateRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -32624,8 +50745,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserialize var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -32641,9 +50762,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserialize * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -32651,18 +50772,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.s /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.serializeBinaryToWriter ); } }; @@ -32674,7 +50795,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.serializeBi * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.repeatedFields_ = [4]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.repeatedFields_ = [2]; @@ -32691,8 +50812,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.toObject(opt_includeInstance, this); }; @@ -32701,21 +50822,15 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetConteste * @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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64(), - documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), - indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), - indexValuesList: msg.getIndexValuesList_asB64(), - resultType: jspb.Message.getFieldWithDefault(msg, 5, 0), - allowIncludeLockedAndAbstainingVoteTally: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), - startAtIdentifierInfo: (f = msg.getStartAtIdentifierInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.toObject(includeInstance, f), - count: jspb.Message.getFieldWithDefault(msg, 8, 0), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) + identityId: msg.getIdentityId_asB64(), + tokenIdsList: msg.getTokenIdsList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -32729,23 +50844,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetConteste /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -32754,38 +50869,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetConteste switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); + msg.setIdentityId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentTypeName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setIndexName(value); - break; - case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIndexValues(value); - break; - case 5: - var value = /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} */ (reader.readEnum()); - msg.setResultType(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAllowIncludeLockedAndAbstainingVoteTally(value); - break; - case 7: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader); - msg.setStartAtIdentifierInfo(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCount(value); + msg.addTokenIds(value); break; - case 9: + case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -32802,9 +50892,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetConteste * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -32812,562 +50902,181 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetConteste /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); + f = message.getIdentityId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getDocumentTypeName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIndexName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getIndexValuesList_asU8(); + f = message.getTokenIdsList_asU8(); if (f.length > 0) { writer.writeRepeatedBytes( - 4, - f - ); - } - f = message.getResultType(); - if (f !== 0.0) { - writer.writeEnum( - 5, - f - ); - } - f = message.getAllowIncludeLockedAndAbstainingVoteTally(); - if (f) { - writer.writeBool( - 6, - f - ); - } - f = message.getStartAtIdentifierInfo(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 8)); - if (f != null) { - writer.writeUint32( - 8, + 2, f ); } f = message.getProve(); if (f) { writer.writeBool( - 9, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType = { - DOCUMENTS: 0, - VOTE_TALLY: 1, - DOCUMENTS_AND_VOTE_TALLY: 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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.toObject = function(includeInstance, msg) { - var f, obj = { - startIdentifier: msg.getStartIdentifier_asB64(), - startIdentifierIncluded: 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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.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.setStartIdentifier(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStartIdentifierIncluded(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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartIdentifier_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getStartIdentifierIncluded(); - if (f) { - writer.writeBool( - 2, + 3, f ); - } -}; - - -/** - * optional bytes start_identifier = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes start_identifier = 1; - * This is a type-conversion wrapper around `getStartIdentifier()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartIdentifier())); -}; - - -/** - * optional bytes start_identifier = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartIdentifier()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartIdentifier())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifier = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bool start_identifier_included = 2; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifierIncluded = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifierIncluded = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional bytes contract_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes contract_id = 1; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); -}; - - -/** - * optional bytes contract_id = 1; - * 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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string document_type_name = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getDocumentTypeName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setDocumentTypeName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string index_name = 3; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setIndexName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * repeated bytes index_values = 4; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexValuesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); -}; - - -/** - * repeated bytes index_values = 4; - * This is a type-conversion wrapper around `getIndexValuesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexValuesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIndexValuesList())); -}; - - -/** - * repeated bytes index_values = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIndexValuesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexValuesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIndexValuesList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setIndexValuesList = function(value) { - return jspb.Message.setField(this, 4, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.addIndexValues = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.clearIndexValuesList = function() { - return this.setIndexValuesList([]); -}; - - -/** - * optional ResultType result_type = 5; - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getResultType = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + } }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this + * optional bytes identity_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setResultType = function(value) { - return jspb.Message.setProto3EnumField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bool allow_include_locked_and_abstaining_vote_tally = 6; - * @return {boolean} + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getAllowIncludeLockedAndAbstainingVoteTally = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} 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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setAllowIncludeLockedAndAbstainingVoteTally = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); }; /** - * optional StartAtIdentifierInfo start_at_identifier_info = 7; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getStartAtIdentifierInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo, 7)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setStartAtIdentifierInfo = function(value) { - return jspb.Message.setWrapperField(this, 7, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this + * repeated bytes token_ids = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.clearStartAtIdentifierInfo = function() { - return this.setStartAtIdentifierInfo(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getTokenIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * Returns whether this field is set. - * @return {boolean} + * repeated bytes token_ids = 2; + * This is a type-conversion wrapper around `getTokenIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.hasStartAtIdentifierInfo = function() { - return jspb.Message.getField(this, 7) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getTokenIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTokenIdsList())); }; /** - * optional uint32 count = 8; - * @return {number} + * repeated bytes token_ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getTokenIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTokenIdsList())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setCount = function(value) { - return jspb.Message.setField(this, 8, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.setTokenIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.clearCount = function() { - return jspb.Message.setField(this, 8, undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.addTokenIds = 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.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.hasCount = function() { - return jspb.Message.getField(this, 8) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.clearTokenIdsList = function() { + return this.setTokenIdsList([]); }; /** - * optional bool prove = 9; + * optional bool prove = 3; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional GetContestedResourceVoteStateRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} + * optional GetIdentityTokenInfosRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -33376,7 +51085,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.c * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -33390,21 +51099,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.h * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.oneofGroups_[0])); }; @@ -33422,8 +51131,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.toObject(opt_includeInstance, this); }; @@ -33432,13 +51141,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.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.GetContestedResourceVoteStateResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -33452,23 +51161,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.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.GetContestedResourceVoteStateResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -33476,8 +51185,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -33493,9 +51202,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -33503,18 +51212,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.serializeBinaryToWriter ); } }; @@ -33529,22 +51238,22 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.serializeB * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ResultCase = { RESULT_NOT_SET: 0, - CONTESTED_RESOURCE_CONTENDERS: 1, + TOKEN_INFOS: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.oneofGroups_[0])); }; @@ -33562,8 +51271,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.toObject(opt_includeInstance, this); }; @@ -33572,13 +51281,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * @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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - contestedResourceContenders: (f = msg.getContestedResourceContenders()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.toObject(includeInstance, f), + tokenInfos: (f = msg.getTokenInfos()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.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) }; @@ -33594,23 +51303,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -33618,9 +51327,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinaryFromReader); - msg.setContestedResourceContenders(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.deserializeBinaryFromReader); + msg.setTokenInfos(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -33645,9 +51354,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -33655,18 +51364,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContestedResourceContenders(); + f = message.getTokenInfos(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.serializeBinaryToWriter ); } f = message.getProof(); @@ -33704,8 +51413,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.toObject(opt_includeInstance, this); }; @@ -33714,18 +51423,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * @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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.toObject = function(includeInstance, msg) { var f, obj = { - finishedVoteOutcome: jspb.Message.getFieldWithDefault(msg, 1, 0), - wonByIdentityId: msg.getWonByIdentityId_asB64(), - finishedAtBlockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), - finishedAtCoreBlockHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - finishedAtBlockTimeMs: jspb.Message.getFieldWithDefault(msg, 5, 0), - finishedAtEpoch: jspb.Message.getFieldWithDefault(msg, 6, 0) + frozen: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -33739,23 +51443,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -33763,28 +51467,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} */ (reader.readEnum()); - msg.setFinishedVoteOutcome(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWonByIdentityId(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFinishedAtBlockHeight(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFinishedAtCoreBlockHeight(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFinishedAtBlockTimeMs(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFinishedAtEpoch(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFrozen(value); break; default: reader.skipField(); @@ -33799,9 +51483,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -33809,213 +51493,242 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFinishedVoteOutcome(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getFrozen(); + if (f) { + writer.writeBool( 1, f ); } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBytes( - 2, - f - ); - } - f = message.getFinishedAtBlockHeight(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getFinishedAtCoreBlockHeight(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getFinishedAtBlockTimeMs(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getFinishedAtEpoch(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } }; /** - * @enum {number} + * optional bool frozen = 1; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome = { - TOWARDS_IDENTITY: 0, - LOCKED: 1, - NO_PREVIOUS_WINNER: 2 +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.getFrozen = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; + /** - * optional FinishedVoteOutcome finished_vote_outcome = 1; - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedVoteOutcome = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.setFrozen = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; -/** - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedVoteOutcome = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes won_by_identity_id = 2; - * @return {string} + * 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getWonByIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.toObject(opt_includeInstance, this); }; /** - * optional bytes won_by_identity_id = 2; - * This is a type-conversion wrapper around `getWonByIdentityId()` - * @return {string} + * 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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getWonByIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWonByIdentityId())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.toObject = function(includeInstance, msg) { + var f, obj = { + tokenId: msg.getTokenId_asB64(), + info: (f = msg.getInfo()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes won_by_identity_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWonByIdentityId()` - * @return {!Uint8Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getWonByIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWonByIdentityId())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} 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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setWonByIdentityId = function(value) { - return jspb.Message.setField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.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.setTokenId(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.deserializeBinaryFromReader); + msg.setInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.clearWonByIdentityId = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.hasWonByIdentityId = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.serializeBinaryToWriter + ); + } }; /** - * optional uint64 finished_at_block_height = 3; - * @return {number} + * optional bytes token_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); }; /** - * optional uint32 finished_at_core_block_height = 4; - * @return {number} + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtCoreBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtCoreBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint64 finished_at_block_time_ms = 5; - * @return {number} + * optional TokenIdentityInfoEntry info = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtBlockTimeMs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.getInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry, 2)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtBlockTimeMs = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.setInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * optional uint32 finished_at_epoch = 6; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtEpoch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.clearInfo = function() { + return this.setInfo(undefined); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtEpoch = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.hasInfo = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -34025,7 +51738,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.repeatedFields_ = [1]; @@ -34042,8 +51755,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.toObject(opt_includeInstance, this); }; @@ -34052,17 +51765,14 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * @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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.toObject = function(includeInstance, msg) { var f, obj = { - contendersList: jspb.Message.toObjectList(msg.getContendersList(), - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.toObject, includeInstance), - abstainVoteTally: jspb.Message.getFieldWithDefault(msg, 2, 0), - lockVoteTally: jspb.Message.getFieldWithDefault(msg, 3, 0), - finishedVoteInfo: (f = msg.getFinishedVoteInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.toObject(includeInstance, f) + tokenInfosList: jspb.Message.toObjectList(msg.getTokenInfosList(), + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.toObject, includeInstance) }; if (includeInstance) { @@ -34076,23 +51786,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -34100,22 +51810,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinaryFromReader); - msg.addContenders(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAbstainVoteTally(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLockVoteTally(value); - break; - case 4: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinaryFromReader); - msg.setFinishedVoteInfo(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.deserializeBinaryFromReader); + msg.addTokenInfos(value); break; default: reader.skipField(); @@ -34130,9 +51827,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -34140,107 +51837,160 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContendersList(); + f = message.getTokenInfosList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.serializeBinaryToWriter - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint32( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint32( - 3, - f - ); - } - f = message.getFinishedVoteInfo(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.serializeBinaryToWriter ); } }; /** - * repeated Contender contenders = 1; - * @return {!Array} + * repeated TokenInfoEntry token_infos = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.prototype.getTokenInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.prototype.setTokenInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.prototype.addTokenInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.prototype.clearTokenInfosList = function() { + return this.setTokenInfosList([]); +}; + + +/** + * optional TokenInfos token_infos = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.getTokenInfos = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.setTokenInfos = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.clearTokenInfos = function() { + return this.setTokenInfos(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.hasTokenInfos = 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getContendersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.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 {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setContendersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.oneofGroups_[0], value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.addContenders = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearContendersList = function() { - return this.setContendersList([]); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional uint32 abstain_vote_tally = 2; - * @return {number} + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getAbstainVoteTally = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.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 {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setAbstainVoteTally = function(value) { - return jspb.Message.setField(this, 2, value); + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearAbstainVoteTally = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; @@ -34248,35 +51998,36 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.hasAbstainVoteTally = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional uint32 lock_vote_tally = 3; - * @return {number} + * optional GetIdentityTokenInfosResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getLockVoteTally = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0, 1)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setLockVoteTally = function(value) { - return jspb.Message.setField(this, 3, value); + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.oneofGroups_[0], value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearLockVoteTally = function() { - return jspb.Message.setField(this, 3, undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; @@ -34284,49 +52035,158 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.hasLockVoteTally = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional FinishedVoteInfo finished_vote_info = 4; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} + * 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getFinishedVoteInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo, 4)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setFinishedVoteInfo = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + * 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.GetIdentitiesTokenInfosRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.toObject(opt_includeInstance, this); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} 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.GetIdentitiesTokenInfosRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearFinishedVoteInfo = function() { - return this.setFinishedVoteInfo(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.hasFinishedVoteInfo = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.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.GetIdentitiesTokenInfosRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.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.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.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.GetIdentitiesTokenInfosRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.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.GetIdentitiesTokenInfosRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.serializeBinaryToWriter + ); + } }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.repeatedFields_ = [2]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -34342,8 +52202,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.toObject(opt_includeInstance, this); }; @@ -34352,15 +52212,15 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * @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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - identifier: msg.getIdentifier_asB64(), - voteCount: jspb.Message.getFieldWithDefault(msg, 2, 0), - document: msg.getDocument_asB64() + tokenId: msg.getTokenId_asB64(), + identityIdsList: msg.getIdentityIdsList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -34374,23 +52234,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -34399,15 +52259,15 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentifier(value); + msg.setTokenId(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVoteCount(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIdentityIds(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDocument(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -34422,9 +52282,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -34432,29 +52292,29 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentifier_asU8(); + f = message.getTokenId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint32( + f = message.getIdentityIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 2, f ); } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeBytes( + f = message.getProve(); + if (f) { + writer.writeBool( 3, f ); @@ -34463,319 +52323,473 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** - * optional bytes identifier = 1; + * optional bytes token_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getIdentifier = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getTokenId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes identifier = 1; - * This is a type-conversion wrapper around `getIdentifier()` + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getIdentifier_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getTokenId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentifier())); + this.getTokenId())); }; /** - * optional bytes identifier = 1; + * optional bytes token_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentifier()` + * This is a type-conversion wrapper around `getTokenId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getIdentifier_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getTokenId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentifier())); + this.getTokenId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.setIdentifier = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.setTokenId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 vote_count = 2; - * @return {number} + * repeated bytes identity_ids = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getVoteCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getIdentityIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + * repeated bytes identity_ids = 2; + * This is a type-conversion wrapper around `getIdentityIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.setVoteCount = function(value) { - return jspb.Message.setField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getIdentityIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdentityIdsList())); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + * repeated bytes identity_ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentityIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.clearVoteCount = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getIdentityIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdentityIdsList())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.hasVoteCount = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.setIdentityIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** - * optional bytes document = 3; - * @return {string} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getDocument = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.addIdentityIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** - * optional bytes document = 3; - * This is a type-conversion wrapper around `getDocument()` - * @return {string} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getDocument_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDocument())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.clearIdentityIdsList = function() { + return this.setIdentityIdsList([]); }; /** - * optional bytes document = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDocument()` - * @return {!Uint8Array} + * optional bool prove = 3; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getDocument_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDocument())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.setDocument = function(value) { - return jspb.Message.setField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + * optional GetIdentitiesTokenInfosRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.clearDocument = function() { - return jspb.Message.setField(this, 3, undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0, 1)); }; /** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.hasDocument = function() { - return jspb.Message.getField(this, 3) != null; + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.oneofGroups_[0], value); }; /** - * optional ContestedResourceContenders contested_resource_contenders = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.getContestedResourceContenders = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.setContestedResourceContenders = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_[0], value); + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.clearContestedResourceContenders = function() { - return this.setContestedResourceContenders(undefined); -}; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.oneofGroups_ = [[1]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; /** - * Returns whether this field is set. - * @return {boolean} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.hasContestedResourceContenders = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.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.GetIdentitiesTokenInfosResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.toObject(opt_includeInstance, this); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.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.GetIdentitiesTokenInfosResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.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.GetIdentitiesTokenInfosResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.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.GetIdentitiesTokenInfosResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.serializeBinaryToWriter + ); + } }; + /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); -}; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.oneofGroups_ = [[1,2]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITY_TOKEN_INFOS: 1, + PROOF: 2 +}; /** - * Returns whether this field is set. - * @return {boolean} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional GetContestedResourceVoteStateResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} + * 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.GetContestedResourceVoteStateResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.toObject(opt_includeInstance, this); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + identityTokenInfos: (f = msg.getIdentityTokenInfos()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.toObject(includeInstance, f), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.deserializeBinaryFromReader); + msg.setIdentityTokenInfos(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; }; - -/** - * 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.GetContestedResourceVotersForIdentityRequest.oneofGroups_ = [[1]]; - /** - * @enum {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.VersionCase} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityTokenInfos(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -34789,8 +52803,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.toObject(opt_includeInstance, this); }; @@ -34799,13 +52813,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.pro * @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.GetContestedResourceVotersForIdentityRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.toObject(includeInstance, f) + frozen: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -34819,23 +52833,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.toO /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.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.GetContestedResourceVotersForIdentityRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -34843,9 +52857,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.des var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFrozen(value); break; default: reader.skipField(); @@ -34860,9 +52873,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.des * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -34870,30 +52883,40 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.pro /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getFrozen(); + if (f) { + writer.writeBool( 1, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.serializeBinaryToWriter + f ); } }; +/** + * optional bool frozen = 1; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.getFrozen = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.repeatedFields_ = [4]; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.setFrozen = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + @@ -34910,8 +52933,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.toObject(opt_includeInstance, this); }; @@ -34920,21 +52943,14 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get * @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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64(), - documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), - indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), - indexValuesList: msg.getIndexValuesList_asB64(), - contestantId: msg.getContestantId_asB64(), - startAtIdentifierInfo: (f = msg.getStartAtIdentifierInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.toObject(includeInstance, f), - count: jspb.Message.getFieldWithDefault(msg, 7, 0), - orderAscending: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) + identityId: msg.getIdentityId_asB64(), + info: (f = msg.getInfo()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.toObject(includeInstance, f) }; if (includeInstance) { @@ -34948,23 +52964,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -34973,40 +52989,12 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); + msg.setIdentityId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentTypeName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setIndexName(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIndexValues(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContestantId(value); - break; - case 6: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader); - msg.setStartAtIdentifierInfo(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCount(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOrderAscending(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.deserializeBinaryFromReader); + msg.setInfo(value); break; default: reader.skipField(); @@ -35021,9 +53009,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -35031,79 +53019,116 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); + f = message.getIdentityId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getDocumentTypeName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIndexName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getIndexValuesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 4, - f - ); - } - f = message.getContestantId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getStartAtIdentifierInfo(); + f = message.getInfo(); if (f != null) { writer.writeMessage( - 6, + 2, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 7)); - if (f != null) { - writer.writeUint32( - 7, - f - ); - } - f = message.getOrderAscending(); - if (f) { - writer.writeBool( - 8, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 9, - f + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.serializeBinaryToWriter ); } }; +/** + * optional bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional TokenIdentityInfoEntry info = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.getInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.setInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.clearInfo = function() { + return this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.hasInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.repeatedFields_ = [1]; @@ -35120,8 +53145,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.toObject(opt_includeInstance, this); }; @@ -35130,14 +53155,14 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get * @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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.toObject = function(includeInstance, msg) { var f, obj = { - startIdentifier: msg.getStartIdentifier_asB64(), - startIdentifierIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + tokenInfosList: jspb.Message.toObjectList(msg.getTokenInfosList(), + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.toObject, includeInstance) }; if (includeInstance) { @@ -35151,23 +53176,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -35175,12 +53200,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStartIdentifier(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStartIdentifierIncluded(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.deserializeBinaryFromReader); + msg.addTokenInfos(value); break; default: reader.skipField(); @@ -35195,9 +53217,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -35205,403 +53227,582 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStartIdentifier_asU8(); + f = message.getTokenInfosList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getStartIdentifierIncluded(); - if (f) { - writer.writeBool( - 2, - f + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.serializeBinaryToWriter ); } }; /** - * optional bytes start_identifier = 1; - * @return {string} + * repeated TokenInfoEntry token_infos = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.prototype.getTokenInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry, 1)); }; /** - * optional bytes start_identifier = 1; - * This is a type-conversion wrapper around `getStartIdentifier()` - * @return {string} + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.prototype.setTokenInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartIdentifier())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.prototype.addTokenInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry, opt_index); }; /** - * optional bytes start_identifier = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartIdentifier()` - * @return {!Uint8Array} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartIdentifier())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.prototype.clearTokenInfosList = function() { + return this.setTokenInfosList([]); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} returns this + * optional IdentityTokenInfos identity_token_infos = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifier = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.getIdentityTokenInfos = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos, 1)); }; /** - * optional bool start_identifier_included = 2; - * @return {boolean} + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.setIdentityTokenInfos = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifierIncluded = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.clearIdentityTokenInfos = function() { + return this.setIdentityTokenInfos(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifierIncluded = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.hasIdentityTokenInfos = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes contract_id = 1; - * @return {string} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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 = 1; - * 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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * optional bytes contract_id = 1; - * 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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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 string document_type_name = 2; - * @return {string} + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getDocumentTypeName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setDocumentTypeName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional string index_name = 3; - * @return {string} + * optional GetIdentitiesTokenInfosResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0, 1)); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setIndexName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * repeated bytes index_values = 4; - * @return {!Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexValuesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * repeated bytes index_values = 4; - * This is a type-conversion wrapper around `getIndexValuesList()` - * @return {!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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexValuesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIndexValuesList())); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.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.GetTokenStatusesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.toObject(opt_includeInstance, this); }; /** - * repeated bytes index_values = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIndexValuesList()` - * @return {!Array} + * 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.GetTokenStatusesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexValuesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIndexValuesList())); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setIndexValuesList = function(value) { - return jspb.Message.setField(this, 4, value || []); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest; + return proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} 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.GetTokenStatusesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.addIndexValues = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.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.GetTokenStatusesRequest.GetTokenStatusesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.clearIndexValuesList = function() { - return this.setIndexValuesList([]); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional bytes contestant_id = 5; - * @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.GetTokenStatusesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContestantId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.serializeBinaryToWriter + ); + } }; + /** - * optional bytes contestant_id = 5; - * This is a type-conversion wrapper around `getContestantId()` - * @return {string} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContestantId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContestantId())); -}; +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes contestant_id = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContestantId()` - * @return {!Uint8Array} + * 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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContestantId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContestantId())); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.toObject(opt_includeInstance, this); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} 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.GetTokenStatusesRequest.GetTokenStatusesRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setContestantId = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + tokenIdsList: msg.getTokenIdsList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional StartAtIdentifierInfo start_at_identifier_info = 6; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getStartAtIdentifierInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo, 6)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0; + return proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.deserializeBinaryFromReader(msg, reader); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setStartAtIdentifierInfo = function(value) { - return jspb.Message.setWrapperField(this, 6, value); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.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.addTokenIds(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.clearStartAtIdentifierInfo = function() { - return this.setStartAtIdentifierInfo(undefined); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.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.GetTokenStatusesRequest.GetTokenStatusesRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.hasStartAtIdentifierInfo = function() { - return jspb.Message.getField(this, 6) != null; +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; /** - * optional uint32 count = 7; - * @return {number} + * repeated bytes token_ids = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.getTokenIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * repeated bytes token_ids = 1; + * This is a type-conversion wrapper around `getTokenIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setCount = function(value) { - return jspb.Message.setField(this, 7, value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.getTokenIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTokenIdsList())); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * repeated bytes token_ids = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.clearCount = function() { - return jspb.Message.setField(this, 7, undefined); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.getTokenIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTokenIdsList())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.hasCount = function() { - return jspb.Message.getField(this, 7) != null; +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.setTokenIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** - * optional bool order_ascending = 8; - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getOrderAscending = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.addTokenIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setOrderAscending = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.clearTokenIdsList = function() { + return this.setTokenIdsList([]); }; /** - * optional bool prove = 9; + * optional bool prove = 2; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetContestedResourceVotersForIdentityRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} + * optional GetTokenStatusesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -35610,7 +53811,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.pro * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -35624,21 +53825,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.pro * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.oneofGroups_[0])); }; @@ -35656,8 +53857,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.toObject(opt_includeInstance, this); }; @@ -35666,13 +53867,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.pr * @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.GetContestedResourceVotersForIdentityResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -35686,23 +53887,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.to /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse; + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.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.GetContestedResourceVotersForIdentityResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -35710,8 +53911,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.de var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -35727,9 +53928,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.de * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -35737,18 +53938,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.serializeBinaryToWriter ); } }; @@ -35763,22 +53964,22 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.se * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ResultCase = { RESULT_NOT_SET: 0, - CONTESTED_RESOURCE_VOTERS: 1, + TOKEN_STATUSES: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.oneofGroups_[0])); }; @@ -35796,8 +53997,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.toObject(opt_includeInstance, this); }; @@ -35806,13 +54007,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * @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.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - contestedResourceVoters: (f = msg.getContestedResourceVoters()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.toObject(includeInstance, f), + tokenStatuses: (f = msg.getTokenStatuses()) && proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.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) }; @@ -35828,23 +54029,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0; + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.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.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -35852,9 +54053,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinaryFromReader); - msg.setContestedResourceVoters(value); + var value = new proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.deserializeBinaryFromReader); + msg.setTokenStatuses(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -35879,9 +54080,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -35889,18 +54090,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContestedResourceVoters(); + f = message.getTokenStatuses(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.serializeBinaryToWriter ); } f = message.getProof(); @@ -35923,13 +54124,6 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -35945,8 +54139,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.toObject(opt_includeInstance, this); }; @@ -35955,14 +54149,14 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * @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.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.toObject = function(includeInstance, msg) { var f, obj = { - votersList: msg.getVotersList_asB64(), - finishedResults: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + tokenId: msg.getTokenId_asB64(), + paused: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -35976,23 +54170,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry; + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.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.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -36001,11 +54195,11 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addVoters(value); + msg.setTokenId(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); - msg.setFinishedResults(value); + msg.setPaused(value); break; default: reader.skipField(); @@ -36020,9 +54214,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -36030,21 +54224,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVotersList_asU8(); + f = message.getTokenId_asU8(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeBytes( 1, f ); } - f = message.getFinishedResults(); - if (f) { + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { writer.writeBool( 2, f @@ -36054,109 +54248,268 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** - * repeated bytes voters = 1; - * @return {!Array} + * optional bytes token_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getVotersList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * repeated bytes voters = 1; - * This is a type-conversion wrapper around `getVotersList()` - * @return {!Array} + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getVotersList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getVotersList())); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); }; /** - * repeated bytes voters = 1; + * optional bytes token_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getVotersList()` - * @return {!Array} + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getVotersList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getVotersList())); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.setVotersList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + * optional bool paused = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.addVoters = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.getPaused = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.clearVotersList = function() { - return this.setVotersList([]); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.setPaused = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * optional bool finished_results = 2; + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.clearPaused = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getFinishedResults = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.hasPaused = function() { + return jspb.Message.getField(this, 2) != null; }; + /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.setFinishedResults = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.toObject(opt_includeInstance, this); }; /** - * optional ContestedResourceVoters contested_resource_voters = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} + * 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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getContestedResourceVoters = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters, 1)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.toObject = function(includeInstance, msg) { + var f, obj = { + tokenStatusesList: jspb.Message.toObjectList(msg.getTokenStatusesList(), + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses; + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.deserializeBinaryFromReader); + msg.addTokenStatuses(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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenStatusesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TokenStatusEntry token_statuses = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.prototype.getTokenStatusesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.prototype.setTokenStatusesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.prototype.addTokenStatuses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.prototype.clearTokenStatusesList = function() { + return this.setTokenStatusesList([]); +}; + + +/** + * optional TokenStatuses token_statuses = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.getTokenStatuses = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.setContestedResourceVoters = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.setTokenStatuses = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.clearContestedResourceVoters = function() { - return this.setContestedResourceVoters(undefined); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.clearTokenStatuses = function() { + return this.setTokenStatuses(undefined); }; @@ -36164,7 +54517,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.hasContestedResourceVoters = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.hasTokenStatuses = function() { return jspb.Message.getField(this, 1) != null; }; @@ -36173,7 +54526,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -36181,18 +54534,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -36201,7 +54554,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -36210,7 +54563,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -36218,18 +54571,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.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.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -36238,35 +54591,35 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetContestedResourceVotersForIdentityResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} + * optional GetTokenStatusesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -36275,7 +54628,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.pr * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -36289,21 +54642,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.pr * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.oneofGroups_[0])); }; @@ -36321,8 +54674,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.toObject(opt_includeInstance, this); }; @@ -36331,13 +54684,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototy * @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.GetContestedResourceIdentityVotesRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -36351,23 +54704,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.toObjec /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest; + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.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.GetContestedResourceIdentityVotesRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -36375,8 +54728,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deseria var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -36392,9 +54745,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deseria * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -36402,18 +54755,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototy /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.serializeBinaryToWriter ); } }; @@ -36435,8 +54788,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.toObject(opt_includeInstance, this); }; @@ -36445,18 +54798,14 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetCont * @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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - limit: (f = msg.getLimit()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - offset: (f = msg.getOffset()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - orderAscending: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - startAtVotePollIdInfo: (f = msg.getStartAtVotePollIdInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.toObject(includeInstance, f), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + tokenId: msg.getTokenId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -36470,23 +54819,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetCont /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0; + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -36495,28 +54844,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetCont switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); + msg.setTokenId(value); break; case 2: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setLimit(value); - break; - case 3: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setOffset(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOrderAscending(value); - break; - case 5: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.deserializeBinaryFromReader); - msg.setStartAtVotePollIdInfo(value); - break; - case 6: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -36533,9 +54863,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetCont * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -36543,175 +54873,20 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetCont /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); + f = message.getTokenId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getLimit(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getOffset(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getOrderAscending(); - if (f) { - writer.writeBool( - 4, - f - ); - } - f = message.getStartAtVotePollIdInfo(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.serializeBinaryToWriter - ); - } f = message.getProve(); - if (f) { - writer.writeBool( - 6, - f - ); - } -}; - - - - - -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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.toObject = function(includeInstance, msg) { - var f, obj = { - startAtPollIdentifier: msg.getStartAtPollIdentifier_asB64(), - startPollIdentifierIncluded: 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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.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.setStartAtPollIdentifier(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStartPollIdentifierIncluded(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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartAtPollIdentifier_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getStartPollIdentifierIncluded(); if (f) { writer.writeBool( 2, @@ -36722,278 +54897,89 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetCont /** - * optional bytes start_at_poll_identifier = 1; + * optional bytes token_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartAtPollIdentifier = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.getTokenId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes start_at_poll_identifier = 1; - * This is a type-conversion wrapper around `getStartAtPollIdentifier()` + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartAtPollIdentifier_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.getTokenId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartAtPollIdentifier())); + this.getTokenId())); }; /** - * optional bytes start_at_poll_identifier = 1; + * optional bytes token_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartAtPollIdentifier()` + * This is a type-conversion wrapper around `getTokenId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartAtPollIdentifier_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.getTokenId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartAtPollIdentifier())); + this.getTokenId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.setStartAtPollIdentifier = function(value) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.setTokenId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional bool start_poll_identifier_included = 2; + * optional bool prove = 2; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartPollIdentifierIncluded = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.getProve = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.setStartPollIdentifierIncluded = function(value) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.setProve = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional bytes identity_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional google.protobuf.UInt32Value limit = 2; - * @return {?proto.google.protobuf.UInt32Value} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getLimit = function() { - return /** @type{?proto.google.protobuf.UInt32Value} */ ( - jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 2)); -}; - - -/** - * @param {?proto.google.protobuf.UInt32Value|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setLimit = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.clearLimit = function() { - return this.setLimit(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.hasLimit = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional google.protobuf.UInt32Value offset = 3; - * @return {?proto.google.protobuf.UInt32Value} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getOffset = 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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setOffset = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.clearOffset = function() { - return this.setOffset(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.hasOffset = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional bool order_ascending = 4; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getOrderAscending = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setOrderAscending = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - -/** - * optional StartAtVotePollIdInfo start_at_vote_poll_id_info = 5; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getStartAtVotePollIdInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo, 5)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setStartAtVotePollIdInfo = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.clearStartAtVotePollIdInfo = function() { - return this.setStartAtVotePollIdInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.hasStartAtVotePollIdInfo = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional bool prove = 6; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); -}; - - -/** - * optional GetContestedResourceIdentityVotesRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} + * optional GetTokenTotalSupplyRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -37002,7 +54988,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototy * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -37016,21 +55002,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototy * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.oneofGroups_[0])); }; @@ -37048,8 +55034,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.toObject(opt_includeInstance, this); }; @@ -37058,13 +55044,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.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.GetContestedResourceIdentityVotesResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -37078,23 +55064,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.toObje /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse; + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.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.GetContestedResourceIdentityVotesResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -37102,8 +55088,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deseri var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -37119,9 +55105,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deseri * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -37129,18 +55115,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.protot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.serializeBinaryToWriter ); } }; @@ -37155,22 +55141,22 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.serial * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ResultCase = { RESULT_NOT_SET: 0, - VOTES: 1, + TOKEN_TOTAL_SUPPLY: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.oneofGroups_[0])); }; @@ -37188,8 +55174,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.toObject(opt_includeInstance, this); }; @@ -37198,13 +55184,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * @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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - votes: (f = msg.getVotes()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.toObject(includeInstance, f), + tokenTotalSupply: (f = msg.getTokenTotalSupply()) && proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.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) }; @@ -37220,23 +55206,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0; + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -37244,9 +55230,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinaryFromReader); - msg.setVotes(value); + var value = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.deserializeBinaryFromReader); + msg.setTokenTotalSupply(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -37271,9 +55257,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -37281,18 +55267,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVotes(); + f = message.getTokenTotalSupply(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.serializeBinaryToWriter ); } f = message.getProof(); @@ -37315,13 +55301,6 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -37337,8 +55316,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.toObject(opt_includeInstance, this); }; @@ -37347,15 +55326,15 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * @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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.toObject = function(includeInstance, msg) { var f, obj = { - contestedResourceIdentityVotesList: jspb.Message.toObjectList(msg.getContestedResourceIdentityVotesList(), - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.toObject, includeInstance), - finishedResults: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + tokenId: msg.getTokenId_asB64(), + totalAggregatedAmountInUserAccounts: jspb.Message.getFieldWithDefault(msg, 2, 0), + totalSystemAmount: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -37369,23 +55348,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry; + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -37393,13 +55372,16 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinaryFromReader); - msg.addContestedResourceIdentityVotes(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTokenId(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFinishedResults(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalAggregatedAmountInUserAccounts(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalSystemAmount(value); break; default: reader.skipField(); @@ -37414,9 +55396,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -37424,285 +55406,250 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContestedResourceIdentityVotesList(); + f = message.getTokenId_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.serializeBinaryToWriter + f ); } - f = message.getFinishedResults(); - if (f) { - writer.writeBool( + f = message.getTotalAggregatedAmountInUserAccounts(); + if (f !== 0) { + writer.writeUint64( 2, f ); } + f = message.getTotalSystemAmount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } }; /** - * repeated ContestedResourceIdentityVote contested_resource_identity_votes = 1; - * @return {!Array} + * optional bytes token_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.getContestedResourceIdentityVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote, 1)); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.setContestedResourceIdentityVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.addContestedResourceIdentityVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote, opt_index); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.clearContestedResourceIdentityVotesList = function() { - return this.setContestedResourceIdentityVotesList([]); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional bool finished_results = 2; - * @return {boolean} + * optional uint64 total_aggregated_amount_in_user_accounts = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.getFinishedResults = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.getTotalAggregatedAmountInUserAccounts = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.setFinishedResults = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.setTotalAggregatedAmountInUserAccounts = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; +/** + * optional uint64 total_system_amount = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.getTotalSystemAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 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} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.setTotalSystemAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional TokenTotalSupplyEntry token_total_supply = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.toObject = function(includeInstance, msg) { - var f, obj = { - voteChoiceType: jspb.Message.getFieldWithDefault(msg, 1, 0), - identityId: msg.getIdentityId_asB64() - }; +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.getTokenTotalSupply = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry, 1)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.setTokenTotalSupply = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.oneofGroups_[0], value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.clearTokenTotalSupply = function() { + return this.setTokenTotalSupply(undefined); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} */ (reader.readEnum()); - msg.setVoteChoiceType(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.hasTokenTotalSupply = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVoteChoiceType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBytes( - 2, - f - ); - } + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.oneofGroups_[0], value); }; /** - * @enum {number} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType = { - TOWARDS_IDENTITY: 0, - ABSTAIN: 1, - LOCK: 2 +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; + /** - * optional VoteChoiceType vote_choice_type = 1; - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getVoteChoiceType = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} returns this + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.setVoteChoiceType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.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 bytes identity_id = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * optional bytes identity_id = 2; - * This is a type-conversion wrapper around `getIdentityId()` - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * optional bytes identity_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentityId()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} returns this + * optional GetTokenTotalSupplyResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.setIdentityId = function(value) { - return jspb.Message.setField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0, 1)); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.clearIdentityId = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; @@ -37710,18 +55657,36 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.hasIdentityId = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.repeatedFields_ = [3]; +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.oneofGroups_[0])); +}; @@ -37738,8 +55703,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.toObject(opt_includeInstance, this); }; @@ -37748,16 +55713,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * @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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64(), - documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), - serializedIndexStorageValuesList: msg.getSerializedIndexStorageValuesList_asB64(), - voteChoice: (f = msg.getVoteChoice()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -37771,23 +55733,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoRequest; + return proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -37795,21 +55757,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentTypeName(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addSerializedIndexStorageValues(value); - break; - case 4: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.deserializeBinaryFromReader); - msg.setVoteChoice(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -37824,9 +55774,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -37834,227 +55784,262 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getDocumentTypeName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSerializedIndexStorageValuesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 3, - f - ); - } - f = message.getVoteChoice(); + f = message.getV0(); if (f != null) { writer.writeMessage( - 4, + 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.serializeBinaryToWriter ); } }; -/** - * optional bytes contract_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - -/** - * optional bytes contract_id = 1; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes contract_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractId()` - * @return {!Uint8Array} + * 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.toObject(opt_includeInstance, this); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} 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.GetGroupInfoRequest.GetGroupInfoRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + contractId: msg.getContractId_asB64(), + groupContractPosition: jspb.Message.getFieldWithDefault(msg, 2, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional string document_type_name = 2; - * @return {string} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getDocumentTypeName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0; + return proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.deserializeBinaryFromReader(msg, reader); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} 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.GetGroupInfoRequest.GetGroupInfoRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setDocumentTypeName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.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.setContractId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGroupContractPosition(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * repeated bytes serialized_index_storage_values = 3; - * @return {!Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getSerializedIndexStorageValuesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * repeated bytes serialized_index_storage_values = 3; - * This is a type-conversion wrapper around `getSerializedIndexStorageValuesList()` - * @return {!Array} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getSerializedIndexStorageValuesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getSerializedIndexStorageValuesList())); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getGroupContractPosition(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 3, + f + ); + } }; /** - * repeated bytes serialized_index_storage_values = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSerializedIndexStorageValuesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getSerializedIndexStorageValuesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getSerializedIndexStorageValuesList())); + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setSerializedIndexStorageValuesList = function(value) { - return jspb.Message.setField(this, 3, value || []); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + * optional bytes contract_id = 1; + * 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.addSerializedIndexStorageValues = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.clearSerializedIndexStorageValuesList = function() { - return this.setSerializedIndexStorageValuesList([]); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional ResourceVoteChoice vote_choice = 4; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} + * optional uint32 group_contract_position = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getVoteChoice = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice, 4)); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.getGroupContractPosition = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setVoteChoice = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.setGroupContractPosition = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + * optional bool prove = 3; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.clearVoteChoice = function() { - return this.setVoteChoice(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.hasVoteChoice = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional ContestedResourceIdentityVotes votes = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} + * optional GetGroupInfoRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.getVotes = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.setVotes = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.clearVotes = function() { - return this.setVotes(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; @@ -38062,119 +56047,147 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.hasVotes = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.hasV0 = 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_[0], value); -}; - /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); -}; - +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.oneofGroups_ = [[1]]; /** - * Returns whether this field is set. - * @return {boolean} + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; - /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * @return {proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetGroupInfoResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.oneofGroups_[0])); }; -/** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.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.GetGroupInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional GetContestedResourceIdentityVotesResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse; + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.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.GetGroupInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.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.GetGroupInfoResponse.GetGroupInfoResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.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.GetContestedResourceIdentityVotesResponse} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.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.GetGroupInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.serializeBinaryToWriter + ); + } }; @@ -38187,21 +56200,22 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.protot * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + GROUP_INFO: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.oneofGroups_[0])); }; @@ -38219,8 +56233,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.toObject(opt_includeInstance, this); }; @@ -38229,13 +56243,15 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.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.GetPrefundedSpecializedBalanceRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.toObject(includeInstance, f) + groupInfo: (f = msg.getGroupInfo()) && proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.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) { @@ -38249,23 +56265,23 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest; - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0; + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.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.GetPrefundedSpecializedBalanceRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -38273,9 +56289,19 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.deserializeBinaryFromReader); + msg.setGroupInfo(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 4: + 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(); @@ -38290,9 +56316,9 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -38300,18 +56326,34 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getGroupInfo(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.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( + 4, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter ); } }; @@ -38333,8 +56375,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.toObject(opt_includeInstance, this); }; @@ -38343,14 +56385,14 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefund * @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.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + memberId: msg.getMemberId_asB64(), + power: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -38364,23 +56406,23 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefund /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0; - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry; + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.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.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -38389,11 +56431,11 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefund switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + msg.setMemberId(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setPower(value); break; default: reader.skipField(); @@ -38408,9 +56450,9 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefund * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -38418,22 +56460,22 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefund /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); + f = message.getMemberId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = message.getPower(); + if (f !== 0) { + writer.writeUint32( 2, f ); @@ -38442,127 +56484,72 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefund /** - * optional bytes id = 1; + * optional bytes member_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getId = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.getMemberId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` + * optional bytes member_id = 1; + * This is a type-conversion wrapper around `getMemberId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.getMemberId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + this.getMemberId())); }; /** - * optional bytes id = 1; + * optional bytes member_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` + * This is a type-conversion wrapper around `getMemberId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.getMemberId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); + this.getMemberId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.setId = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.setMemberId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional bool prove = 2; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional GetPrefundedSpecializedBalanceRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} - */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} returns this + * optional uint32 power = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.setPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, 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>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.VersionCase} - */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.repeatedFields_ = [1]; @@ -38579,8 +56566,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.toObject(opt_includeInstance, this); }; @@ -38589,13 +56576,15 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.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.GetPrefundedSpecializedBalanceResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.toObject(includeInstance, f) + membersList: jspb.Message.toObjectList(msg.getMembersList(), + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.toObject, includeInstance), + groupRequiredPower: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -38609,23 +56598,23 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.toObject /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse; - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry; + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.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.GetPrefundedSpecializedBalanceResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -38633,9 +56622,13 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deseriali var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.deserializeBinaryFromReader); + msg.addMembers(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGroupRequiredPower(value); break; default: reader.skipField(); @@ -38650,9 +56643,9 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deseriali * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -38660,52 +56653,89 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getMembersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.serializeBinaryToWriter + ); + } + f = message.getGroupRequiredPower(); + if (f !== 0) { + writer.writeUint32( + 2, + f ); } }; +/** + * repeated GroupMemberEntry members = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.getMembersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry, 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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.setMembersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.addMembers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry, opt_index); +}; + /** - * @enum {number} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - BALANCE: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.clearMembersList = function() { + return this.setMembersList([]); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.ResultCase} + * optional uint32 group_required_power = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.getGroupRequiredPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.setGroupRequiredPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -38719,8 +56749,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.toObject(opt_includeInstance, this); }; @@ -38729,15 +56759,13 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun * @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.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.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) + groupInfo: (f = msg.getGroupInfo()) && proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.toObject(includeInstance, f) }; if (includeInstance) { @@ -38751,23 +56779,23 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0; - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo; + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.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.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -38775,18 +56803,9 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBalance(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 = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.deserializeBinaryFromReader); + msg.setGroupInfo(value); break; default: reader.skipField(); @@ -38801,9 +56820,9 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -38811,62 +56830,85 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.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(); + f = message.getGroupInfo(); if (f != null) { writer.writeMessage( - 3, + 1, f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.serializeBinaryToWriter ); } }; /** - * optional uint64 balance = 1; - * @return {number} + * optional GroupInfoEntry group_info = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.prototype.getGroupInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.prototype.setGroupInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.prototype.clearGroupInfo = function() { + return this.setGroupInfo(undefined); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.setBalance = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.prototype.hasGroupInfo = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this + * optional GroupInfo group_info = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.clearBalance = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0], undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.getGroupInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.setGroupInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.clearGroupInfo = function() { + return this.setGroupInfo(undefined); }; @@ -38874,7 +56916,7 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.hasBalance = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.hasGroupInfo = function() { return jspb.Message.getField(this, 1) != null; }; @@ -38883,7 +56925,7 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -38891,18 +56933,18 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -38911,35 +56953,35 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; /** - * optional ResponseMetadata metadata = 3; + * optional ResponseMetadata metadata = 4; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 4)); }; /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -38948,35 +56990,35 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional GetPrefundedSpecializedBalanceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} + * optional GetGroupInfoResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -38985,7 +57027,7 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -38999,21 +57041,21 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.oneofGroups_[0])); }; @@ -39031,8 +57073,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.toObject(opt_includeInstance, this); }; @@ -39041,13 +57083,13 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.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.GetTotalCreditsInPlatformRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -39061,23 +57103,23 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.toObject = func /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest; - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosRequest; + return proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.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.GetTotalCreditsInPlatformRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39085,8 +57127,8 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBina var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -39102,9 +57144,9 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBina * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39112,18 +57154,18 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.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.GetTotalCreditsInPlatformRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.serializeBinaryToWriter ); } }; @@ -39145,8 +57187,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.toObject(opt_includeInstance, this); }; @@ -39155,13 +57197,14 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCredits * @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.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.toObject = function(includeInstance, msg) { var f, obj = { - prove: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + startGroupContractPosition: jspb.Message.getFieldWithDefault(msg, 1, 0), + startGroupContractPositionIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -39175,23 +57218,185 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCredits /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0; - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition; + return proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.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.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.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.setStartGroupContractPosition(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStartGroupContractPositionIncluded(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.GetGroupInfosRequest.StartAtGroupContractPosition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.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.GetGroupInfosRequest.StartAtGroupContractPosition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartGroupContractPosition(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getStartGroupContractPositionIncluded(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional uint32 start_group_contract_position = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.prototype.getStartGroupContractPosition = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.prototype.setStartGroupContractPosition = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool start_group_contract_position_included = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.prototype.getStartGroupContractPositionIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.prototype.setStartGroupContractPositionIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, 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.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.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.GetGroupInfosRequest.GetGroupInfosRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + contractId: msg.getContractId_asB64(), + startAtGroupContractPosition: (f = msg.getStartAtGroupContractPosition()) && proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.toObject(includeInstance, f), + count: jspb.Message.getFieldWithDefault(msg, 3, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0; + return proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.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.GetGroupInfosRequest.GetGroupInfosRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39199,6 +57404,19 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCredits var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractId(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.deserializeBinaryFromReader); + msg.setStartAtGroupContractPosition(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCount(value); + break; + case 4: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -39215,9 +57433,9 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCredits * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39225,16 +57443,38 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCredits /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getStartAtGroupContractPosition(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } f = message.getProve(); if (f) { writer.writeBool( - 1, + 4, f ); } @@ -39242,47 +57482,162 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCredits /** - * optional bool prove = 1; + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional StartAtGroupContractPosition start_at_group_contract_position = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.getStartAtGroupContractPosition = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.setStartAtGroupContractPosition = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.clearStartAtGroupContractPosition = function() { + return this.setStartAtGroupContractPosition(undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.hasStartAtGroupContractPosition = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 count = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.setCount = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.clearCount = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.hasCount = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool prove = 4; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * optional GetTotalCreditsInPlatformRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} + * optional GetGroupInfosRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -39291,7 +57646,7 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.clear * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -39305,21 +57660,21 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.hasV0 * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.oneofGroups_[0])); }; @@ -39337,8 +57692,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.toObject(opt_includeInstance, this); }; @@ -39347,13 +57702,13 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.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.GetTotalCreditsInPlatformResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -39367,23 +57722,23 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.toObject = fun /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse; - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse; + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.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.GetTotalCreditsInPlatformResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39391,8 +57746,8 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBin var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -39408,9 +57763,9 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBin * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39418,18 +57773,18 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.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.GetTotalCreditsInPlatformResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.serializeBinaryToWriter ); } }; @@ -39444,22 +57799,22 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.serializeBinar * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.ResultCase = { RESULT_NOT_SET: 0, - CREDITS: 1, + GROUP_INFOS: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.oneofGroups_[0])); }; @@ -39477,8 +57832,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.toObject(opt_includeInstance, this); }; @@ -39487,13 +57842,13 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit * @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.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - credits: jspb.Message.getFieldWithDefault(msg, 1, 0), + groupInfos: (f = msg.getGroupInfos()) && proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.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) }; @@ -39509,23 +57864,23 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0; - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0; + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.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.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39533,15 +57888,16 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCredits(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.deserializeBinaryFromReader); + msg.setGroupInfos(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: + case 4: var value = new proto.org.dash.platform.dapi.v0.ResponseMetadata; reader.readMessage(value,proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader); msg.setMetadata(value); @@ -39559,9 +57915,9 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39569,17 +57925,18 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); + f = message.getGroupInfos(); if (f != null) { - writer.writeUint64( + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.serializeBinaryToWriter ); } f = message.getProof(); @@ -39593,7 +57950,7 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit f = message.getMetadata(); if (f != null) { writer.writeMessage( - 3, + 4, f, proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter ); @@ -39601,178 +57958,197 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit }; -/** - * optional uint64 credits = 1; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.getCredits = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.setCredits = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0], value); -}; - -/** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.clearCredits = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0], undefined); -}; +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.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.hasCredits = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.toObject(opt_includeInstance, this); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * 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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.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.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0], value); -}; - +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.toObject = function(includeInstance, msg) { + var f, obj = { + memberId: msg.getMemberId_asB64(), + power: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry; + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.deserializeBinaryFromReader(msg, reader); }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.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.setMemberId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMemberId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes member_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.getMemberId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional GetTotalCreditsInPlatformResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} + * optional bytes member_id = 1; + * This is a type-conversion wrapper around `getMemberId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.getMemberId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMemberId())); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_[0], value); + * optional bytes member_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMemberId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.getMemberId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMemberId())); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.setMemberId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional uint32 power = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; - -/** - * 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.GetPathElementsRequest.oneofGroups_ = [[1]]; - /** - * @enum {number} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.setPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + + /** - * @return {proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.repeatedFields_ = [2]; @@ -39789,8 +58165,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.toObject(opt_includeInstance, this); }; @@ -39799,13 +58175,16 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.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.GetPathElementsRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.toObject(includeInstance, f) + groupContractPosition: jspb.Message.getFieldWithDefault(msg, 1, 0), + membersList: jspb.Message.toObjectList(msg.getMembersList(), + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.toObject, includeInstance), + groupRequiredPower: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -39819,23 +58198,23 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.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.GetPathElementsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsRequest; - return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry; + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.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.GetPathElementsRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39843,9 +58222,17 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setGroupContractPosition(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.deserializeBinaryFromReader); + msg.addMembers(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGroupRequiredPower(value); break; default: reader.skipField(); @@ -39860,9 +58247,9 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPathElementsRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39870,30 +58257,118 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.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.GetPathElementsRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getGroupContractPosition(); + if (f !== 0) { + writer.writeUint32( 1, + f + ); + } + f = message.getMembersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, f, - proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.serializeBinaryToWriter + ); + } + f = message.getGroupRequiredPower(); + if (f !== 0) { + writer.writeUint32( + 3, + f ); } }; +/** + * optional uint32 group_contract_position = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.getGroupContractPosition = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.setGroupContractPosition = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated GroupMemberEntry members = 2; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.getMembersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.setMembersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.addMembers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.clearMembersList = function() { + return this.setMembersList([]); +}; + + +/** + * optional uint32 group_required_power = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.getGroupRequiredPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.setGroupRequiredPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.repeatedFields_ = [1,2]; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.repeatedFields_ = [1]; @@ -39910,8 +58385,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.toObject(opt_includeInstance, this); }; @@ -39920,15 +58395,14 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0. * @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.GetPathElementsRequest.GetPathElementsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.toObject = function(includeInstance, msg) { var f, obj = { - pathList: msg.getPathList_asB64(), - keysList: msg.getKeysList_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + groupInfosList: jspb.Message.toObjectList(msg.getGroupInfosList(), + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.toObject, includeInstance) }; if (includeInstance) { @@ -39942,23 +58416,23 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0. /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0; - return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos; + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.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.GetPathElementsRequest.GetPathElementsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39966,16 +58440,9 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0. var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addPath(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addKeys(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.deserializeBinaryFromReader); + msg.addGroupInfos(value); break; default: reader.skipField(); @@ -39990,9 +58457,9 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0. * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40000,200 +58467,196 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPathList_asU8(); + f = message.getGroupInfosList(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getKeysList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 3, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.serializeBinaryToWriter ); } }; /** - * repeated bytes path = 1; - * @return {!Array} + * repeated GroupPositionInfoEntry group_infos = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getPathList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.prototype.getGroupInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry, 1)); }; /** - * repeated bytes path = 1; - * This is a type-conversion wrapper around `getPathList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getPathList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getPathList())); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.prototype.setGroupInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * repeated bytes path = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPathList()` - * @return {!Array} + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getPathList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getPathList())); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.prototype.addGroupInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry, opt_index); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.setPathList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.prototype.clearGroupInfosList = function() { + return this.setGroupInfosList([]); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + * optional GroupInfos group_infos = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.addPath = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.getGroupInfos = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos, 1)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.clearPathList = function() { - return this.setPathList([]); + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.setGroupInfos = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.oneofGroups_[0], value); }; /** - * repeated bytes keys = 2; - * @return {!Array} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getKeysList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.clearGroupInfos = function() { + return this.setGroupInfos(undefined); }; /** - * repeated bytes keys = 2; - * This is a type-conversion wrapper around `getKeysList()` - * @return {!Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getKeysList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getKeysList())); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.hasGroupInfos = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * repeated bytes keys = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKeysList()` - * @return {!Array} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getKeysList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getKeysList())); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.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 {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.setKeysList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.addKeys = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + * optional ResponseMetadata metadata = 4; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.clearKeysList = function() { - return this.setKeysList([]); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 4)); }; /** - * optional bool prove = 3; - * @return {boolean} + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional GetPathElementsRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} + * optional GetGroupInfosResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -40202,7 +58665,7 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.clearV0 = funct * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -40216,21 +58679,21 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.hasV0 = functio * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.oneofGroups_[0])); }; @@ -40248,8 +58711,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.toObject(opt_includeInstance, this); }; @@ -40258,13 +58721,13 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.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.GetPathElementsResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -40278,23 +58741,23 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.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.GetPathElementsResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse; - return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsRequest; + return proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.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.GetPathElementsResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -40302,8 +58765,8 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinaryFromRea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -40319,9 +58782,9 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40329,49 +58792,31 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.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.GetPathElementsResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.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.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_ = [[1,2]]; - /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - ELEMENTS: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus = { + ACTIVE: 0, + CLOSED: 1 }; -/** - * @return {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_[0])); -}; @@ -40388,8 +58833,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.toObject(opt_includeInstance, this); }; @@ -40398,15 +58843,14 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV * @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.GetPathElementsResponse.GetPathElementsResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.toObject = function(includeInstance, msg) { var f, obj = { - elements: (f = msg.getElements()) && proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.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) + startActionId: msg.getStartActionId_asB64(), + startActionIdIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -40420,23 +58864,23 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0; - return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId; + return proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.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.GetPathElementsResponse.GetPathElementsResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -40444,19 +58888,12 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.deserializeBinaryFromReader); - msg.setElements(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartActionId(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 {boolean} */ (reader.readBool()); + msg.setStartActionIdIncluded(value); break; default: reader.skipField(); @@ -40471,9 +58908,9 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40481,46 +58918,89 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getElements(); - if (f != null) { - writer.writeMessage( + f = message.getStartActionId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.serializeBinaryToWriter + f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getStartActionIdIncluded(); + if (f) { + writer.writeBool( 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 + f ); } }; +/** + * optional bytes start_action_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.getStartActionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes start_action_id = 1; + * This is a type-conversion wrapper around `getStartActionId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.getStartActionId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartActionId())); +}; + + +/** + * optional bytes start_action_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartActionId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.getStartActionId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartActionId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.setStartActionId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * optional bool start_action_id_included = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.getStartActionIdIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.setStartActionIdIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + @@ -40537,8 +59017,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.toObject(opt_includeInstance, this); }; @@ -40547,13 +59027,18 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV * @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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - elementsList: msg.getElementsList_asB64() + contractId: msg.getContractId_asB64(), + groupContractPosition: jspb.Message.getFieldWithDefault(msg, 2, 0), + status: jspb.Message.getFieldWithDefault(msg, 3, 0), + startAtActionId: (f = msg.getStartAtActionId()) && proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.toObject(includeInstance, f), + count: jspb.Message.getFieldWithDefault(msg, 5, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -40567,23 +59052,23 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements; - return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0; + return proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -40592,7 +59077,28 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addElements(value); + msg.setContractId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGroupContractPosition(value); + break; + case 3: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 4: + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.deserializeBinaryFromReader); + msg.setStartAtActionId(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCount(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -40607,9 +59113,9 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40617,218 +59123,251 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getElementsList_asU8(); + f = message.getContractId_asU8(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeBytes( 1, f ); } + f = message.getGroupContractPosition(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getStartAtActionId(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 6, + f + ); + } }; /** - * repeated bytes elements = 1; - * @return {!Array} + * optional bytes contract_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.getElementsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * repeated bytes elements = 1; - * This is a type-conversion wrapper around `getElementsList()` - * @return {!Array} + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.getElementsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getElementsList())); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); }; /** - * repeated bytes elements = 1; + * optional bytes contract_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getElementsList()` - * @return {!Array} + * This is a type-conversion wrapper around `getContractId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.getElementsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getElementsList())); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.setElementsList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} returns this + * optional uint32 group_contract_position = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.addElements = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getGroupContractPosition = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.clearElementsList = function() { - return this.setElementsList([]); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.setGroupContractPosition = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional Elements elements = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} + * optional ActionStatus status = 3; + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.getElements = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getStatus = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.setElements = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_[0], value); + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this + * optional StartAtActionId start_at_action_id = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.clearElements = function() { - return this.setElements(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getStartAtActionId = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId, 4)); }; /** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.hasElements = function() { - return jspb.Message.getField(this, 1) != null; + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.setStartAtActionId = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.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.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.clearStartAtActionId = function() { + return this.setStartAtActionId(undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_[0], value); + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.hasStartAtActionId = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this + * optional uint32 count = 5; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.setCount = function(value) { + return jspb.Message.setField(this, 5, value); }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.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.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.clearCount = function() { + return jspb.Message.setField(this, 5, undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.hasCount = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this + * optional bool prove = 6; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); }; /** - * optional GetPathElementsResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} + * optional GetGroupActionsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -40837,7 +59376,7 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.clearV0 = func * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -40851,21 +59390,21 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.hasV0 = functi * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.oneofGroups_[0])); }; @@ -40883,8 +59422,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.toObject(opt_includeInstance, this); }; @@ -40893,13 +59432,13 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.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.GetStatusRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -40913,23 +59452,23 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.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.GetStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusRequest; - return proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.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.GetStatusRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -40937,8 +59476,8 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinaryFromReader = f var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -40954,9 +59493,9 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40964,24 +59503,50 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.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.GetStatusRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetGroupActionsResponse.GetGroupActionsResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + GROUP_ACTIONS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -40997,8 +59562,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.toObject(opt_includeInstance, this); }; @@ -41007,13 +59572,157 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.prototype.to * @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.GetStatusRequest.GetStatusRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.toObject = function(includeInstance, msg) { var f, obj = { + groupActions: (f = msg.getGroupActions()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.toObject(includeInstance, f), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetGroupActionsResponse.GetGroupActionsResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.deserializeBinaryFromReader); + msg.setGroupActions(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.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetGroupActionsResponse.GetGroupActionsResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupActions(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.toObject = function(includeInstance, msg) { + var f, obj = { + amount: jspb.Message.getFieldWithDefault(msg, 1, 0), + recipientId: msg.getRecipientId_asB64(), + publicNote: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -41027,29 +59736,41 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject = f /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0; - return proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.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.GetStatusRequest.GetStatusRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.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.setAmount(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRecipientId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); + break; default: reader.skipField(); break; @@ -41063,9 +59784,9 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeB * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41073,80 +59794,135 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.prototype.se /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getRecipientId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } }; /** - * optional GetStatusRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} + * optional uint64 amount = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_[0], value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} returns this + * optional bytes recipient_id = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.getRecipientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes recipient_id = 2; + * This is a type-conversion wrapper around `getRecipientId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.getRecipientId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRecipientId())); }; +/** + * optional bytes recipient_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRecipientId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.getRecipientId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRecipientId())); +}; + /** - * 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 {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.setRecipientId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + /** - * @enum {number} + * optional string public_note = 3; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase} + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.setPublicNote = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.clearPublicNote = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.hasPublicNote = function() { + return jspb.Message.getField(this, 3) != null; }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -41160,8 +59936,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.toObject(opt_includeInstance, this); }; @@ -41170,13 +59946,14 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.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.GetStatusResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject(includeInstance, f) + amount: jspb.Message.getFieldWithDefault(msg, 1, 0), + publicNote: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -41190,23 +59967,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.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.GetStatusResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41214,9 +59991,12 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); break; default: reader.skipField(); @@ -41231,9 +60011,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41241,23 +60021,83 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.serializeBinaryToWriter + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f ); } }; +/** + * optional uint64 amount = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string public_note = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.setPublicNote = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.clearPublicNote = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.hasPublicNote = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -41274,8 +60114,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.toObject(opt_includeInstance, this); }; @@ -41284,18 +60124,14 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.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.GetStatusResponse.GetStatusResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.toObject = function(includeInstance, msg) { var f, obj = { - version: (f = msg.getVersion()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.toObject(includeInstance, f), - node: (f = msg.getNode()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject(includeInstance, f), - chain: (f = msg.getChain()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject(includeInstance, f), - network: (f = msg.getNetwork()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject(includeInstance, f), - stateSync: (f = msg.getStateSync()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject(includeInstance, f), - time: (f = msg.getTime()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject(includeInstance, f) + frozenId: msg.getFrozenId_asB64(), + publicNote: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -41309,23 +60145,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.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.GetStatusResponse.GetStatusResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41333,34 +60169,12 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.deserializeBinaryFromReader); - msg.setVersion(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFrozenId(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinaryFromReader); - msg.setNode(value); - break; - case 3: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinaryFromReader); - msg.setChain(value); - break; - case 4: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinaryFromReader); - msg.setNetwork(value); - break; - case 5: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinaryFromReader); - msg.setStateSync(value); - break; - case 6: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinaryFromReader); - msg.setTime(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); break; default: reader.skipField(); @@ -41375,9 +60189,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41385,63 +60199,107 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVersion(); - if (f != null) { - writer.writeMessage( + f = message.getFrozenId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.serializeBinaryToWriter + f ); } - f = message.getNode(); + f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { - writer.writeMessage( + writer.writeString( 2, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.serializeBinaryToWriter - ); - } - f = message.getChain(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.serializeBinaryToWriter - ); - } - f = message.getNetwork(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.serializeBinaryToWriter - ); - } - f = message.getStateSync(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.serializeBinaryToWriter - ); - } - f = message.getTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.serializeBinaryToWriter + f ); } }; +/** + * optional bytes frozen_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.getFrozenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes frozen_id = 1; + * This is a type-conversion wrapper around `getFrozenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.getFrozenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFrozenId())); +}; + + +/** + * optional bytes frozen_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFrozenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.getFrozenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFrozenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.setFrozenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string public_note = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.setPublicNote = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.clearPublicNote = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.hasPublicNote = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -41458,8 +60316,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.toObject(opt_includeInstance, this); }; @@ -41468,14 +60326,14 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.pr * @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.GetStatusResponse.GetStatusResponseV0.Version} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.toObject = function(includeInstance, msg) { var f, obj = { - software: (f = msg.getSoftware()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject(includeInstance, f), - protocol: (f = msg.getProtocol()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.toObject(includeInstance, f) + frozenId: msg.getFrozenId_asB64(), + publicNote: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -41489,23 +60347,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.to /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.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.GetStatusResponse.GetStatusResponseV0.Version} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41513,14 +60371,12 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.de var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinaryFromReader); - msg.setSoftware(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFrozenId(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinaryFromReader); - msg.setProtocol(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); break; default: reader.skipField(); @@ -41535,9 +60391,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.de * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41545,31 +60401,107 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSoftware(); - if (f != null) { - writer.writeMessage( + f = message.getFrozenId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.serializeBinaryToWriter + f ); } - f = message.getProtocol(); + f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { - writer.writeMessage( + writer.writeString( 2, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.serializeBinaryToWriter + f ); } }; +/** + * optional bytes frozen_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.getFrozenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes frozen_id = 1; + * This is a type-conversion wrapper around `getFrozenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.getFrozenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFrozenId())); +}; + + +/** + * optional bytes frozen_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFrozenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.getFrozenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFrozenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.setFrozenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string public_note = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.setPublicNote = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.clearPublicNote = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.hasPublicNote = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -41586,8 +60518,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.toObject(opt_includeInstance, this); }; @@ -41596,15 +60528,15 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So * @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.GetStatusResponse.GetStatusResponseV0.Version.Software} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.toObject = function(includeInstance, msg) { var f, obj = { - dapi: jspb.Message.getFieldWithDefault(msg, 1, ""), - drive: jspb.Message.getFieldWithDefault(msg, 2, ""), - tenderdash: jspb.Message.getFieldWithDefault(msg, 3, "") + frozenId: msg.getFrozenId_asB64(), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + publicNote: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -41618,23 +60550,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.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.GetStatusResponse.GetStatusResponseV0.Version.Software} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41642,16 +60574,16 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setDapi(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFrozenId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDrive(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setTenderdash(value); + msg.setPublicNote(value); break; default: reader.skipField(); @@ -41666,9 +60598,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41676,22 +60608,22 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDapi(); + f = message.getFrozenId_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeString( + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( 2, f ); @@ -41707,82 +60639,88 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So /** - * optional string dapi = 1; + * optional bytes frozen_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.getDapi = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.getFrozenId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + * optional bytes frozen_id = 1; + * This is a type-conversion wrapper around `getFrozenId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.setDapi = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.getFrozenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFrozenId())); }; /** - * optional string drive = 2; - * @return {string} + * optional bytes frozen_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFrozenId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.getDrive = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.getFrozenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFrozenId())); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.setDrive = function(value) { - return jspb.Message.setField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.setFrozenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + * optional uint64 amount = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.clearDrive = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.hasDrive = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional string tenderdash = 3; + * optional string public_note = 3; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.getTenderdash = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.getPublicNote = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.setTenderdash = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.setPublicNote = function(value) { return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.clearTenderdash = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.clearPublicNote = function() { return jspb.Message.setField(this, 3, undefined); }; @@ -41791,7 +60729,7 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.hasTenderdash = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.hasPublicNote = function() { return jspb.Message.getField(this, 3) != null; }; @@ -41812,8 +60750,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.toObject(opt_includeInstance, this); }; @@ -41822,14 +60760,15 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * @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.GetStatusResponse.GetStatusResponseV0.Version.Protocol} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.toObject = function(includeInstance, msg) { var f, obj = { - tenderdash: (f = msg.getTenderdash()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject(includeInstance, f), - drive: (f = msg.getDrive()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject(includeInstance, f) + senderKeyIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), + recipientKeyIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), + encryptedData: msg.getEncryptedData_asB64() }; if (includeInstance) { @@ -41843,23 +60782,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.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.GetStatusResponse.GetStatusResponseV0.Version.Protocol} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41867,14 +60806,16 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinaryFromReader); - msg.setTenderdash(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setSenderKeyIndex(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinaryFromReader); - msg.setDrive(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setRecipientKeyIndex(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEncryptedData(value); break; default: reader.skipField(); @@ -41889,9 +60830,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41899,28 +60840,111 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTenderdash(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.serializeBinaryToWriter - ); - } - f = message.getDrive(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSenderKeyIndex(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getRecipientKeyIndex(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getEncryptedData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional uint32 sender_key_index = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.getSenderKeyIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.setSenderKeyIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 recipient_key_index = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.getRecipientKeyIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.setRecipientKeyIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes encrypted_data = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.getEncryptedData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes encrypted_data = 3; + * This is a type-conversion wrapper around `getEncryptedData()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.getEncryptedData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEncryptedData())); +}; + + +/** + * optional bytes encrypted_data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEncryptedData()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.getEncryptedData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEncryptedData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.setEncryptedData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -41940,8 +60964,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.toObject(opt_includeInstance, this); }; @@ -41950,14 +60974,15 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * @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.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.toObject = function(includeInstance, msg) { var f, obj = { - p2p: jspb.Message.getFieldWithDefault(msg, 1, 0), - block: jspb.Message.getFieldWithDefault(msg, 2, 0) + rootEncryptionKeyIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), + derivationEncryptionKeyIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), + encryptedData: msg.getEncryptedData_asB64() }; if (includeInstance) { @@ -41971,23 +60996,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.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.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41996,11 +61021,15 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); - msg.setP2p(value); + msg.setRootEncryptionKeyIndex(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); - msg.setBlock(value); + msg.setDerivationEncryptionKeyIndex(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEncryptedData(value); break; default: reader.skipField(); @@ -42015,9 +61044,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -42025,65 +61054,114 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getP2p(); + f = message.getRootEncryptionKeyIndex(); if (f !== 0) { writer.writeUint32( 1, f ); } - f = message.getBlock(); + f = message.getDerivationEncryptionKeyIndex(); if (f !== 0) { writer.writeUint32( 2, f ); } + f = message.getEncryptedData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } }; /** - * optional uint32 p2p = 1; + * optional uint32 root_encryption_key_index = 1; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.getP2p = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.getRootEncryptionKeyIndex = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.setP2p = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.setRootEncryptionKeyIndex = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional uint32 block = 2; + * optional uint32 derivation_encryption_key_index = 2; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.getBlock = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.getDerivationEncryptionKeyIndex = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.setBlock = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.setDerivationEncryptionKeyIndex = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; +/** + * optional bytes encrypted_data = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.getEncryptedData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes encrypted_data = 3; + * This is a type-conversion wrapper around `getEncryptedData()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.getEncryptedData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEncryptedData())); +}; + + +/** + * optional bytes encrypted_data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEncryptedData()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.getEncryptedData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEncryptedData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.setEncryptedData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + @@ -42100,8 +61178,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.toObject(opt_includeInstance, this); }; @@ -42110,14 +61188,17 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * @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.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.toObject = function(includeInstance, msg) { var f, obj = { - latest: jspb.Message.getFieldWithDefault(msg, 3, 0), - current: jspb.Message.getFieldWithDefault(msg, 4, 0) + recipientId: msg.getRecipientId_asB64(), + publicNote: jspb.Message.getFieldWithDefault(msg, 2, ""), + sharedEncryptedNote: (f = msg.getSharedEncryptedNote()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.toObject(includeInstance, f), + personalEncryptedNote: (f = msg.getPersonalEncryptedNote()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.toObject(includeInstance, f), + amount: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -42131,36 +61212,50 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.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.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.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.setRecipientId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); + break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLatest(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.deserializeBinaryFromReader); + msg.setSharedEncryptedNote(value); break; case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCurrent(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.deserializeBinaryFromReader); + msg.setPersonalEncryptedNote(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); break; default: reader.skipField(); @@ -42175,9 +61270,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -42185,23 +61280,46 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getLatest(); - if (f !== 0) { - writer.writeUint32( - 3, + f = message.getRecipientId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, f ); } - f = message.getCurrent(); - if (f !== 0) { - writer.writeUint32( + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getSharedEncryptedNote(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.serializeBinaryToWriter + ); + } + f = message.getPersonalEncryptedNote(); + if (f != null) { + writer.writeMessage( 4, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.serializeBinaryToWriter + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 5, f ); } @@ -42209,66 +61327,71 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** - * optional uint32 latest = 3; - * @return {number} + * optional bytes recipient_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.getLatest = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getRecipientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} returns this + * optional bytes recipient_id = 1; + * This is a type-conversion wrapper around `getRecipientId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.setLatest = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getRecipientId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRecipientId())); }; /** - * optional uint32 current = 4; - * @return {number} + * optional bytes recipient_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRecipientId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.getCurrent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getRecipientId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRecipientId())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.setCurrent = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.setRecipientId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional Tenderdash tenderdash = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} + * optional string public_note = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.getTenderdash = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this -*/ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.setTenderdash = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.setPublicNote = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.clearTenderdash = function() { - return this.setTenderdash(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.clearPublicNote = function() { + return jspb.Message.setField(this, 2, undefined); }; @@ -42276,36 +61399,36 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.hasTenderdash = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.hasPublicNote = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional Drive drive = 2; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} + * optional SharedEncryptedNote shared_encrypted_note = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.getDrive = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive, 2)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getSharedEncryptedNote = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote, 3)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.setDrive = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.setSharedEncryptedNote = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.clearDrive = function() { - return this.setDrive(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.clearSharedEncryptedNote = function() { + return this.setSharedEncryptedNote(undefined); }; @@ -42313,36 +61436,36 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.hasDrive = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.hasSharedEncryptedNote = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional Software software = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} + * optional PersonalEncryptedNote personal_encrypted_note = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.getSoftware = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getPersonalEncryptedNote = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote, 4)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.setSoftware = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.setPersonalEncryptedNote = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.clearSoftware = function() { - return this.setSoftware(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.clearPersonalEncryptedNote = function() { + return this.setPersonalEncryptedNote(undefined); }; @@ -42350,45 +61473,26 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.pr * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.hasSoftware = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Protocol protocol = 2; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.getProtocol = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol, 2)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this -*/ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.setProtocol = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.hasPersonalEncryptedNote = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this + * optional uint64 amount = 5; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.clearProtocol = function() { - return this.setProtocol(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.hasProtocol = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -42408,8 +61512,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.toObject(opt_includeInstance, this); }; @@ -42418,16 +61522,14 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.proto * @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.GetStatusResponse.GetStatusResponseV0.Time} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.toObject = function(includeInstance, msg) { var f, obj = { - local: jspb.Message.getFieldWithDefault(msg, 1, 0), - block: jspb.Message.getFieldWithDefault(msg, 2, 0), - genesis: jspb.Message.getFieldWithDefault(msg, 3, 0), - epoch: jspb.Message.getFieldWithDefault(msg, 4, 0) + actionType: jspb.Message.getFieldWithDefault(msg, 1, 0), + publicNote: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -42441,23 +61543,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObj /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.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.GetStatusResponse.GetStatusResponseV0.Time} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -42465,20 +61567,12 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deser var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLocal(value); + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType} */ (reader.readEnum()); + msg.setActionType(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBlock(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setGenesis(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setEpoch(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); break; default: reader.skipField(); @@ -42493,9 +61587,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deser * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -42503,84 +61597,78 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.proto /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getLocal(); - if (f !== 0) { - writer.writeUint64( + f = message.getActionType(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); + f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { - writer.writeUint64( + writer.writeString( 2, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint32( - 4, - f - ); - } }; /** - * optional uint64 local = 1; - * @return {number} + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getLocal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType = { + PAUSE: 0, + RESUME: 1 +}; + +/** + * optional ActionType action_type = 1; + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.getActionType = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setLocal = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.setActionType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional uint64 block = 2; - * @return {number} + * optional string public_note = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getBlock = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setBlock = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.setPublicNote = function(value) { return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.clearBlock = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.clearPublicNote = function() { return jspb.Message.setField(this, 2, undefined); }; @@ -42589,71 +61677,201 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.proto * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.hasBlock = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.hasPublicNote = function() { return jspb.Message.getField(this, 2) != null; }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional uint64 genesis = 3; - * @return {number} + * 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.GetStatusResponse.GetStatusResponseV0.Time.prototype.getGenesis = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.toObject(opt_includeInstance, this); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} 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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setGenesis = function(value) { - return jspb.Message.setField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.toObject = function(includeInstance, msg) { + var f, obj = { + tokenConfigUpdateItem: msg.getTokenConfigUpdateItem_asB64(), + publicNote: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.clearGenesis = function() { - return jspb.Message.setField(this, 3, undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.hasGenesis = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.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.setTokenConfigUpdateItem(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint32 epoch = 4; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getEpoch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setEpoch = function(value) { - return jspb.Message.setField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenConfigUpdateItem_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional bytes token_config_update_item = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.getTokenConfigUpdateItem = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes token_config_update_item = 1; + * This is a type-conversion wrapper around `getTokenConfigUpdateItem()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.getTokenConfigUpdateItem_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenConfigUpdateItem())); +}; + + +/** + * optional bytes token_config_update_item = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenConfigUpdateItem()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.getTokenConfigUpdateItem_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenConfigUpdateItem())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.setTokenConfigUpdateItem = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string public_note = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.setPublicNote = function(value) { + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.clearEpoch = function() { - return jspb.Message.setField(this, 4, undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.clearPublicNote = function() { + return jspb.Message.setField(this, 2, undefined); }; @@ -42661,11 +61879,38 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.proto * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.hasEpoch = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.hasPublicNote = 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 + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.oneofGroups_ = [[1,2,3]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.EventTypeCase = { + EVENT_TYPE_NOT_SET: 0, + TOKEN_EVENT: 1, + DOCUMENT_EVENT: 2, + CONTRACT_EVENT: 3 }; - +/** + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.EventTypeCase} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.getEventTypeCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.EventTypeCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.oneofGroups_[0])); +}; @@ -42682,8 +61927,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.toObject(opt_includeInstance, this); }; @@ -42692,14 +61937,15 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.proto * @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.GetStatusResponse.GetStatusResponseV0.Node} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - proTxHash: msg.getProTxHash_asB64() + tokenEvent: (f = msg.getTokenEvent()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.toObject(includeInstance, f), + documentEvent: (f = msg.getDocumentEvent()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.toObject(includeInstance, f), + contractEvent: (f = msg.getContractEvent()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.toObject(includeInstance, f) }; if (includeInstance) { @@ -42713,23 +61959,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObj /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.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.GetStatusResponse.GetStatusResponseV0.Node} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -42737,12 +61983,19 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deser 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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.deserializeBinaryFromReader); + msg.setTokenEvent(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProTxHash(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.deserializeBinaryFromReader); + msg.setDocumentEvent(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.deserializeBinaryFromReader); + msg.setContractEvent(value); break; default: reader.skipField(); @@ -42757,9 +62010,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deser * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -42767,119 +62020,138 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.proto /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getTokenEvent(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.serializeBinaryToWriter ); } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + f = message.getDocumentEvent(); if (f != null) { - writer.writeBytes( + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.serializeBinaryToWriter + ); + } + f = message.getContractEvent(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.serializeBinaryToWriter ); } }; /** - * optional bytes id = 1; - * @return {string} + * optional TokenEvent token_event = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.getTokenEvent = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent, 1)); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.setTokenEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.oneofGroups_[0], value); }; /** - * 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} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.clearTokenEvent = function() { + return this.setTokenEvent(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.hasTokenEvent = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes pro_tx_hash = 2; - * @return {string} + * optional DocumentEvent document_event = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getProTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.getDocumentEvent = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent, 2)); }; /** - * optional bytes pro_tx_hash = 2; - * This is a type-conversion wrapper around `getProTxHash()` - * @return {string} + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.setDocumentEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getProTxHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProTxHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.clearDocumentEvent = function() { + return this.setDocumentEvent(undefined); }; /** - * optional bytes pro_tx_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProTxHash()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getProTxHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProTxHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.hasDocumentEvent = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} returns this + * optional ContractEvent contract_event = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.setProTxHash = function(value) { - return jspb.Message.setField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.getContractEvent = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent, 3)); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.setContractEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.clearProTxHash = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.clearContractEvent = function() { + return this.setContractEvent(undefined); }; @@ -42887,12 +62159,37 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.proto * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.hasProTxHash = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.hasContractEvent = function() { + return jspb.Message.getField(this, 3) != 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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.TypeCase = { + TYPE_NOT_SET: 0, + CREATE: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.TypeCase} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.getTypeCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.TypeCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -42908,8 +62205,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.toObject(opt_includeInstance, this); }; @@ -42918,21 +62215,13 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prot * @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.GetStatusResponse.GetStatusResponseV0.Chain} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.toObject = function(includeInstance, msg) { var f, obj = { - catchingUp: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - latestBlockHash: msg.getLatestBlockHash_asB64(), - latestAppHash: msg.getLatestAppHash_asB64(), - latestBlockHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - earliestBlockHash: msg.getEarliestBlockHash_asB64(), - earliestAppHash: msg.getEarliestAppHash_asB64(), - earliestBlockHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), - maxPeerBlockHeight: jspb.Message.getFieldWithDefault(msg, 9, 0), - coreChainLockedHeight: jspb.Message.getFieldWithDefault(msg, 10, 0) + create: (f = msg.getCreate()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.toObject(includeInstance, f) }; if (includeInstance) { @@ -42946,23 +62235,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toOb /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.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.GetStatusResponse.GetStatusResponseV0.Chain} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -42970,40 +62259,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.dese var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCatchingUp(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLatestBlockHash(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLatestAppHash(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLatestBlockHeight(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEarliestBlockHash(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEarliestAppHash(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setEarliestBlockHeight(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxPeerBlockHeight(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCoreChainLockedHeight(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.deserializeBinaryFromReader); + msg.setCreate(value); break; default: reader.skipField(); @@ -43018,9 +62276,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.dese * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -43028,357 +62286,396 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCatchingUp(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getLatestBlockHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getLatestAppHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getLatestBlockHeight(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getEarliestBlockHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getEarliestAppHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 6, - f - ); - } - f = message.getEarliestBlockHeight(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getMaxPeerBlockHeight(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 10)); + f = message.getCreate(); if (f != null) { - writer.writeUint32( - 10, - f + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.serializeBinaryToWriter ); } }; /** - * optional bool catching_up = 1; - * @return {boolean} + * optional DocumentCreateEvent create = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getCatchingUp = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.getCreate = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent, 1)); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setCatchingUp = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.setCreate = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.oneofGroups_[0], value); }; /** - * optional bytes latest_block_hash = 2; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.clearCreate = function() { + return this.setCreate(undefined); }; /** - * optional bytes latest_block_hash = 2; - * This is a type-conversion wrapper around `getLatestBlockHash()` - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLatestBlockHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.hasCreate = function() { + return jspb.Message.getField(this, 1) != null; }; -/** - * optional bytes latest_block_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLatestBlockHash()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLatestBlockHash())); -}; - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setLatestBlockHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes latest_app_hash = 3; - * @return {string} + * 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.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestAppHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.toObject(opt_includeInstance, this); }; /** - * optional bytes latest_app_hash = 3; - * This is a type-conversion wrapper around `getLatestAppHash()` - * @return {string} + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestAppHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLatestAppHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.toObject = function(includeInstance, msg) { + var f, obj = { + createdDocument: msg.getCreatedDocument_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes latest_app_hash = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLatestAppHash()` - * @return {!Uint8Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestAppHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLatestAppHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} 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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setLatestAppHash = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.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.setCreatedDocument(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint64 latest_block_height = 4; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setLatestBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCreatedDocument_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } }; /** - * optional bytes earliest_block_hash = 5; + * optional bytes created_document = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.prototype.getCreatedDocument = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes earliest_block_hash = 5; - * This is a type-conversion wrapper around `getEarliestBlockHash()` + * optional bytes created_document = 1; + * This is a type-conversion wrapper around `getCreatedDocument()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHash_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.prototype.getCreatedDocument_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEarliestBlockHash())); + this.getCreatedDocument())); }; /** - * optional bytes earliest_block_hash = 5; + * optional bytes created_document = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEarliestBlockHash()` + * This is a type-conversion wrapper around `getCreatedDocument()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHash_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.prototype.getCreatedDocument_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEarliestBlockHash())); + this.getCreatedDocument())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setEarliestBlockHash = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.prototype.setCreatedDocument = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes earliest_app_hash = 6; - * @return {string} + * 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.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestAppHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.toObject(opt_includeInstance, this); }; /** - * optional bytes earliest_app_hash = 6; - * This is a type-conversion wrapper around `getEarliestAppHash()` - * @return {string} + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestAppHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEarliestAppHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.toObject = function(includeInstance, msg) { + var f, obj = { + updatedContract: msg.getUpdatedContract_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes earliest_app_hash = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEarliestAppHash()` - * @return {!Uint8Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestAppHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEarliestAppHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} 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.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setEarliestAppHash = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.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.setUpdatedContract(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint64 earliest_block_height = 7; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setEarliestBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpdatedContract_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } }; /** - * optional uint64 max_peer_block_height = 9; - * @return {number} + * optional bytes updated_contract = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getMaxPeerBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.prototype.getUpdatedContract = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes updated_contract = 1; + * This is a type-conversion wrapper around `getUpdatedContract()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.prototype.getUpdatedContract_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getUpdatedContract())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this + * optional bytes updated_contract = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getUpdatedContract()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setMaxPeerBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.prototype.getUpdatedContract_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getUpdatedContract())); }; /** - * optional uint32 core_chain_locked_height = 10; - * @return {number} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getCoreChainLockedHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.prototype.setUpdatedContract = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; + /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} 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.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setCoreChainLockedHeight = function(value) { - return jspb.Message.setField(this, 10, value); -}; - +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.oneofGroups_ = [[1]]; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.clearCoreChainLockedHeight = function() { - return jspb.Message.setField(this, 10, undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.TypeCase = { + TYPE_NOT_SET: 0, + UPDATE: 1 }; - /** - * Returns whether this field is set. - * @return {boolean} + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.TypeCase} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.hasCoreChainLockedHeight = function() { - return jspb.Message.getField(this, 10) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.getTypeCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.TypeCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -43392,8 +62689,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.toObject(opt_includeInstance, this); }; @@ -43402,15 +62699,13 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.pr * @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.GetStatusResponse.GetStatusResponseV0.Network} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.toObject = function(includeInstance, msg) { var f, obj = { - chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), - peersCount: jspb.Message.getFieldWithDefault(msg, 2, 0), - listening: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + update: (f = msg.getUpdate()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.toObject(includeInstance, f) }; if (includeInstance) { @@ -43424,23 +62719,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.to /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.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.GetStatusResponse.GetStatusResponseV0.Network} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -43448,16 +62743,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.de var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChainId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setPeersCount(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setListening(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.deserializeBinaryFromReader); + msg.setUpdate(value); break; default: reader.skipField(); @@ -43472,9 +62760,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.de * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -43482,90 +62770,92 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChainId(); - if (f.length > 0) { - writer.writeString( + f = message.getUpdate(); + if (f != null) { + writer.writeMessage( 1, - f - ); - } - f = message.getPeersCount(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getListening(); - if (f) { - writer.writeBool( - 3, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.serializeBinaryToWriter ); } }; /** - * optional string chain_id = 1; - * @return {string} + * optional ContractUpdateEvent update = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.getChainId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.getUpdate = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent, 1)); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} returns this - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.setChainId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.setUpdate = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.oneofGroups_[0], value); }; /** - * optional uint32 peers_count = 2; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.getPeersCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.clearUpdate = function() { + return this.setUpdate(undefined); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.setPeersCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.hasUpdate = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional bool listening = 3; - * @return {boolean} + * 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.GetStatusResponse.GetStatusResponseV0.Network.prototype.getListening = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_ = [[1,2,3,4,5,6,7,8]]; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.setListening = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.TypeCase = { + TYPE_NOT_SET: 0, + MINT: 1, + BURN: 2, + FREEZE: 3, + UNFREEZE: 4, + DESTROY_FROZEN_FUNDS: 5, + TRANSFER: 6, + EMERGENCY_ACTION: 7, + TOKEN_CONFIG_UPDATE: 8 }; - +/** + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.TypeCase} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getTypeCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.TypeCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0])); +}; @@ -43582,8 +62872,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.toObject(opt_includeInstance, this); }; @@ -43592,20 +62882,20 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync. * @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.GetStatusResponse.GetStatusResponseV0.StateSync} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.toObject = function(includeInstance, msg) { var f, obj = { - totalSyncedTime: jspb.Message.getFieldWithDefault(msg, 1, 0), - remainingTime: jspb.Message.getFieldWithDefault(msg, 2, 0), - totalSnapshots: jspb.Message.getFieldWithDefault(msg, 3, 0), - chunkProcessAvgTime: jspb.Message.getFieldWithDefault(msg, 4, 0), - snapshotHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), - snapshotChunksCount: jspb.Message.getFieldWithDefault(msg, 6, 0), - backfilledBlocks: jspb.Message.getFieldWithDefault(msg, 7, 0), - backfillBlocksTotal: jspb.Message.getFieldWithDefault(msg, 8, 0) + mint: (f = msg.getMint()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.toObject(includeInstance, f), + burn: (f = msg.getBurn()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.toObject(includeInstance, f), + freeze: (f = msg.getFreeze()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.toObject(includeInstance, f), + unfreeze: (f = msg.getUnfreeze()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.toObject(includeInstance, f), + destroyFrozenFunds: (f = msg.getDestroyFrozenFunds()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.toObject(includeInstance, f), + transfer: (f = msg.getTransfer()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.toObject(includeInstance, f), + emergencyAction: (f = msg.getEmergencyAction()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.toObject(includeInstance, f), + tokenConfigUpdate: (f = msg.getTokenConfigUpdate()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.toObject(includeInstance, f) }; if (includeInstance) { @@ -43619,23 +62909,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync. /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.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.GetStatusResponse.GetStatusResponseV0.StateSync} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -43643,36 +62933,44 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync. var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTotalSyncedTime(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.deserializeBinaryFromReader); + msg.setMint(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRemainingTime(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.deserializeBinaryFromReader); + msg.setBurn(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTotalSnapshots(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.deserializeBinaryFromReader); + msg.setFreeze(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChunkProcessAvgTime(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.deserializeBinaryFromReader); + msg.setUnfreeze(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSnapshotHeight(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.deserializeBinaryFromReader); + msg.setDestroyFrozenFunds(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSnapshotChunksCount(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.deserializeBinaryFromReader); + msg.setTransfer(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBackfilledBlocks(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.deserializeBinaryFromReader); + msg.setEmergencyAction(value); break; case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBackfillBlocksTotal(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.deserializeBinaryFromReader); + msg.setTokenConfigUpdate(value); break; default: reader.skipField(); @@ -43687,9 +62985,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync. * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -43697,351 +62995,765 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTotalSyncedTime(); - if (f !== 0) { - writer.writeUint64( + f = message.getMint(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.serializeBinaryToWriter ); } - f = message.getRemainingTime(); - if (f !== 0) { - writer.writeUint64( + f = message.getBurn(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.serializeBinaryToWriter ); } - f = message.getTotalSnapshots(); - if (f !== 0) { - writer.writeUint32( + f = message.getFreeze(); + if (f != null) { + writer.writeMessage( 3, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.serializeBinaryToWriter ); } - f = message.getChunkProcessAvgTime(); - if (f !== 0) { - writer.writeUint64( + f = message.getUnfreeze(); + if (f != null) { + writer.writeMessage( 4, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.serializeBinaryToWriter ); } - f = message.getSnapshotHeight(); - if (f !== 0) { - writer.writeUint64( + f = message.getDestroyFrozenFunds(); + if (f != null) { + writer.writeMessage( 5, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.serializeBinaryToWriter ); } - f = message.getSnapshotChunksCount(); - if (f !== 0) { - writer.writeUint64( + f = message.getTransfer(); + if (f != null) { + writer.writeMessage( 6, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.serializeBinaryToWriter ); } - f = message.getBackfilledBlocks(); - if (f !== 0) { - writer.writeUint64( + f = message.getEmergencyAction(); + if (f != null) { + writer.writeMessage( 7, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.serializeBinaryToWriter ); } - f = message.getBackfillBlocksTotal(); - if (f !== 0) { - writer.writeUint64( + f = message.getTokenConfigUpdate(); + if (f != null) { + writer.writeMessage( 8, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.serializeBinaryToWriter ); } }; /** - * optional uint64 total_synced_time = 1; - * @return {number} + * optional MintEvent mint = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getTotalSyncedTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getMint = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent, 1)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setMint = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setTotalSyncedTime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearMint = function() { + return this.setMint(undefined); }; /** - * optional uint64 remaining_time = 2; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getRemainingTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasMint = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * optional BurnEvent burn = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setRemainingTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getBurn = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent, 2)); }; /** - * optional uint32 total_snapshots = 3; - * @return {number} + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setBurn = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getTotalSnapshots = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearBurn = function() { + return this.setBurn(undefined); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setTotalSnapshots = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasBurn = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional uint64 chunk_process_avg_time = 4; - * @return {number} + * optional FreezeEvent freeze = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getChunkProcessAvgTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getFreeze = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent, 3)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setFreeze = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setChunkProcessAvgTime = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearFreeze = function() { + return this.setFreeze(undefined); }; /** - * optional uint64 snapshot_height = 5; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getSnapshotHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasFreeze = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional UnfreezeEvent unfreeze = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getUnfreeze = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent, 4)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setUnfreeze = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearUnfreeze = function() { + return this.setUnfreeze(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasUnfreeze = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional DestroyFrozenFundsEvent destroy_frozen_funds = 5; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getDestroyFrozenFunds = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent, 5)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setDestroyFrozenFunds = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearDestroyFrozenFunds = function() { + return this.setDestroyFrozenFunds(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasDestroyFrozenFunds = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional TransferEvent transfer = 6; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getTransfer = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent, 6)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearTransfer = function() { + return this.setTransfer(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasTransfer = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional EmergencyActionEvent emergency_action = 7; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getEmergencyAction = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent, 7)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setEmergencyAction = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearEmergencyAction = function() { + return this.setEmergencyAction(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasEmergencyAction = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional TokenConfigUpdateEvent token_config_update = 8; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getTokenConfigUpdate = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent, 8)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setTokenConfigUpdate = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearTokenConfigUpdate = function() { + return this.setTokenConfigUpdate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasTokenConfigUpdate = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.toObject = function(includeInstance, msg) { + var f, obj = { + actionId: msg.getActionId_asB64(), + event: (f = msg.getEvent()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.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.setActionId(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.deserializeBinaryFromReader); + msg.setEvent(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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getActionId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.serializeBinaryToWriter + ); + } }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * optional bytes action_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setSnapshotHeight = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.getActionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional uint64 snapshot_chunks_count = 6; - * @return {number} + * optional bytes action_id = 1; + * This is a type-conversion wrapper around `getActionId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getSnapshotChunksCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.getActionId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getActionId())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * optional bytes action_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getActionId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setSnapshotChunksCount = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.getActionId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getActionId())); }; /** - * optional uint64 backfilled_blocks = 7; - * @return {number} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getBackfilledBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.setActionId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * optional GroupActionEvent event = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setBackfilledBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.getEvent = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent, 2)); }; /** - * optional uint64 backfill_blocks_total = 8; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getBackfillBlocksTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.setEvent = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setBackfillBlocksTotal = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.clearEvent = function() { + return this.setEvent(undefined); }; /** - * optional Version version = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getVersion = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.hasEvent = function() { + return jspb.Message.getField(this, 2) != null; }; + /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setVersion = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} 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.GetStatusResponse.GetStatusResponseV0.prototype.clearVersion = function() { - return this.setVersion(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasVersion = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.toObject = function(includeInstance, msg) { + var f, obj = { + groupActionsList: jspb.Message.toObjectList(msg.getGroupActionsList(), + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional Node node = 2; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getNode = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node, 2)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.deserializeBinaryFromReader(msg, reader); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.deserializeBinaryFromReader); + msg.addGroupActions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearNode = function() { - return this.setNode(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasNode = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupActionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.serializeBinaryToWriter + ); + } }; /** - * optional Chain chain = 3; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} + * repeated GroupActionEntry group_actions = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getChain = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain, 3)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.prototype.getGroupActionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setChain = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.prototype.setGroupActionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearChain = function() { - return this.setChain(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.prototype.addGroupActions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry, 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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasChain = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.prototype.clearGroupActionsList = function() { + return this.setGroupActionsList([]); }; /** - * optional Network network = 4; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} + * optional GroupActions group_actions = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getNetwork = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network, 4)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.getGroupActions = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setNetwork = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.setGroupActions = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearNetwork = function() { - return this.setNetwork(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.clearGroupActions = function() { + return this.setGroupActions(undefined); }; @@ -44049,36 +63761,36 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype. * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasNetwork = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.hasGroupActions = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional StateSync state_sync = 5; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getStateSync = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync, 5)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetStatusResponse.GetStatusResponseV0.StateSync|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setStateSync = function(value) { - return jspb.Message.setWrapperField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearStateSync = function() { - return this.setStateSync(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; @@ -44086,36 +63798,36 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype. * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasStateSync = function() { - return jspb.Message.getField(this, 5) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional Time time = 6; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getTime = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time, 6)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetStatusResponse.GetStatusResponseV0.Time|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetStatusResponse.GetStatusResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearTime = function() { - return this.setTime(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; @@ -44123,35 +63835,35 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype. * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasTime = function() { - return jspb.Message.getField(this, 6) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional GetStatusResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} + * optional GetGroupActionsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -44160,7 +63872,7 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.clearV0 = function() * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -44174,21 +63886,21 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.hasV0 = function() { * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.oneofGroups_[0])); }; @@ -44206,8 +63918,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.toObject(opt_includeInstance, this); }; @@ -44216,13 +63928,13 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.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.GetCurrentQuorumsInfoRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -44236,23 +63948,23 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.toObject = function /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest; - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest; + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.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.GetCurrentQuorumsInfoRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -44260,8 +63972,8 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinaryFr var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -44277,9 +63989,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinaryFr * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -44287,23 +63999,31 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.serialize /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.serializeBinaryToWriter ); } }; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus = { + ACTIVE: 0, + CLOSED: 1 +}; + @@ -44320,8 +64040,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.toObject(opt_includeInstance, this); }; @@ -44330,13 +64050,17 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsIn * @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.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - + contractId: msg.getContractId_asB64(), + groupContractPosition: jspb.Message.getFieldWithDefault(msg, 2, 0), + status: jspb.Message.getFieldWithDefault(msg, 3, 0), + actionId: msg.getActionId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) }; if (includeInstance) { @@ -44350,29 +64074,49 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0; - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0; + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.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.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.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.setContractId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGroupContractPosition(value); + break; + case 3: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setActionId(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; default: reader.skipField(); break; @@ -44386,9 +64130,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsIn * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -44396,39 +64140,212 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsIn /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getGroupContractPosition(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getActionId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 5, + f + ); + } }; /** - * optional GetCurrentQuorumsInfoRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} + * optional bytes contract_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} returns this + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 group_contract_position = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getGroupContractPosition = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.setGroupContractPosition = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional ActionStatus status = 3; + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getStatus = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional bytes action_id = 4; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getActionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes action_id = 4; + * This is a type-conversion wrapper around `getActionId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getActionId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getActionId())); +}; + + +/** + * optional bytes action_id = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getActionId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getActionId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getActionId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.setActionId = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bool prove = 5; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional GetGroupActionSignersRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -44437,7 +64354,7 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.clearV0 = * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -44451,21 +64368,21 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.hasV0 = f * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.oneofGroups_[0])); }; @@ -44483,8 +64400,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.toObject(opt_includeInstance, this); }; @@ -44493,13 +64410,13 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.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.GetCurrentQuorumsInfoResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -44513,23 +64430,23 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse; - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse; + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.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.GetCurrentQuorumsInfoResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -44537,8 +64454,8 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -44554,9 +64471,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -44564,24 +64481,50 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.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.GetCurrentQuorumsInfoResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + GROUP_ACTION_SIGNERS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -44597,8 +64540,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.toObject(opt_includeInstance, this); }; @@ -44607,15 +64550,15 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.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.GetCurrentQuorumsInfoResponse.ValidatorV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - proTxHash: msg.getProTxHash_asB64(), - nodeIp: jspb.Message.getFieldWithDefault(msg, 2, ""), - isBanned: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + groupActionSigners: (f = msg.getGroupActionSigners()) && proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.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) { @@ -44629,23 +64572,23 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObje /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0; - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0; + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.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.GetCurrentQuorumsInfoResponse.ValidatorV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -44653,16 +64596,19 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deseri var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProTxHash(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.deserializeBinaryFromReader); + msg.setGroupActionSigners(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNodeIp(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.setIsBanned(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(); @@ -44677,9 +64623,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deseri * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -44687,121 +64633,39 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.protot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProTxHash_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getGroupActionSigners(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.serializeBinaryToWriter ); } - f = message.getNodeIp(); - 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.getIsBanned(); - 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 pro_tx_hash = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getProTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes pro_tx_hash = 1; - * This is a type-conversion wrapper around `getProTxHash()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getProTxHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProTxHash())); -}; - - -/** - * 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.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getProTxHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProTxHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.setProTxHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string node_ip = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getNodeIp = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.setNodeIp = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool is_banned = 3; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getIsBanned = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.setIsBanned = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.repeatedFields_ = [3]; @@ -44818,8 +64682,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.toObject(opt_includeInstance, this); }; @@ -44828,17 +64692,14 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.pro * @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.GetCurrentQuorumsInfoResponse.ValidatorSetV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.toObject = function(includeInstance, msg) { var f, obj = { - quorumHash: msg.getQuorumHash_asB64(), - coreHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - membersList: jspb.Message.toObjectList(msg.getMembersList(), - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObject, includeInstance), - thresholdPublicKey: msg.getThresholdPublicKey_asB64() + signerId: msg.getSignerId_asB64(), + power: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -44852,23 +64713,23 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toO /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0; - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner; + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.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.GetCurrentQuorumsInfoResponse.ValidatorSetV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -44877,20 +64738,11 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.des switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setQuorumHash(value); + msg.setSignerId(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); - msg.setCoreHeight(value); - break; - case 3: - var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinaryFromReader); - msg.addMembers(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setThresholdPublicKey(value); + msg.setPower(value); break; default: reader.skipField(); @@ -44905,9 +64757,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.des * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -44915,191 +64767,96 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.pro /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getQuorumHash_asU8(); + f = message.getSignerId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getCoreHeight(); + f = message.getPower(); if (f !== 0) { writer.writeUint32( 2, f ); } - f = message.getMembersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.serializeBinaryToWriter - ); - } - f = message.getThresholdPublicKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } }; /** - * optional bytes quorum_hash = 1; + * optional bytes signer_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getQuorumHash = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.getSignerId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes quorum_hash = 1; - * This is a type-conversion wrapper around `getQuorumHash()` + * optional bytes signer_id = 1; + * This is a type-conversion wrapper around `getSignerId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getQuorumHash_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.getSignerId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getQuorumHash())); + this.getSignerId())); }; /** - * optional bytes quorum_hash = 1; + * optional bytes signer_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getQuorumHash()` + * This is a type-conversion wrapper around `getSignerId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getQuorumHash_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.getSignerId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getQuorumHash())); + this.getSignerId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setQuorumHash = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.setSignerId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 core_height = 2; + * optional uint32 power = 2; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getCoreHeight = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.getPower = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setCoreHeight = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.setPower = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * repeated ValidatorV0 members = 3; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getMembersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setMembersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.addMembers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.clearMembersList = function() { - return this.setMembersList([]); -}; - - -/** - * optional bytes threshold_public_key = 4; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getThresholdPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes threshold_public_key = 4; - * This is a type-conversion wrapper around `getThresholdPublicKey()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getThresholdPublicKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getThresholdPublicKey())); -}; - - -/** - * optional bytes threshold_public_key = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getThresholdPublicKey()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getThresholdPublicKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getThresholdPublicKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setThresholdPublicKey = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.repeatedFields_ = [1,3]; +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.repeatedFields_ = [1]; @@ -45116,8 +64873,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.toObject(opt_includeInstance, this); }; @@ -45126,18 +64883,14 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsI * @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.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.toObject = function(includeInstance, msg) { var f, obj = { - quorumHashesList: msg.getQuorumHashesList_asB64(), - currentQuorumHash: msg.getCurrentQuorumHash_asB64(), - validatorSetsList: jspb.Message.toObjectList(msg.getValidatorSetsList(), - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toObject, includeInstance), - lastBlockProposer: msg.getLastBlockProposer_asB64(), - metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + signersList: jspb.Message.toObjectList(msg.getSignersList(), + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.toObject, includeInstance) }; if (includeInstance) { @@ -45151,23 +64904,23 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsI /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0; - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners; + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.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.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -45175,26 +64928,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsI var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addQuorumHashes(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCurrentQuorumHash(value); - break; - case 3: - var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinaryFromReader); - msg.addValidatorSets(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastBlockProposer(value); - break; - case 5: - 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 proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.deserializeBinaryFromReader); + msg.addSigners(value); break; default: reader.skipField(); @@ -45209,9 +64945,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsI * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -45219,259 +64955,159 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsI /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getQuorumHashesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } - f = message.getCurrentQuorumHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getValidatorSetsList(); + f = message.getSignersList(); if (f.length > 0) { writer.writeRepeatedMessage( - 3, - f, - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.serializeBinaryToWriter - ); - } - f = message.getLastBlockProposer_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( - 5, + 1, f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.serializeBinaryToWriter ); } }; /** - * repeated bytes quorum_hashes = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getQuorumHashesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes quorum_hashes = 1; - * This is a type-conversion wrapper around `getQuorumHashesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getQuorumHashesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getQuorumHashesList())); -}; - - -/** - * repeated bytes quorum_hashes = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getQuorumHashesList()` - * @return {!Array} + * repeated GroupActionSigner signers = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getQuorumHashesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getQuorumHashesList())); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.prototype.getSignersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner, 1)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setQuorumHashesList = function(value) { - return jspb.Message.setField(this, 1, value || []); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.prototype.setSignersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner=} opt_value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.addQuorumHashes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.prototype.addSigners = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.clearQuorumHashesList = function() { - return this.setQuorumHashesList([]); -}; - - -/** - * optional bytes current_quorum_hash = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getCurrentQuorumHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes current_quorum_hash = 2; - * This is a type-conversion wrapper around `getCurrentQuorumHash()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getCurrentQuorumHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCurrentQuorumHash())); -}; - - -/** - * optional bytes current_quorum_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCurrentQuorumHash()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getCurrentQuorumHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCurrentQuorumHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setCurrentQuorumHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.prototype.clearSignersList = function() { + return this.setSignersList([]); }; /** - * repeated ValidatorSetV0 validator_sets = 3; - * @return {!Array} + * optional GroupActionSigners group_action_signers = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getValidatorSetsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0, 3)); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.getGroupActionSigners = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners, 1)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setValidatorSetsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.setGroupActionSigners = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.oneofGroups_[0], value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.addValidatorSets = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0, opt_index); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.clearGroupActionSigners = function() { + return this.setGroupActionSigners(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.clearValidatorSetsList = function() { - return this.setValidatorSetsList([]); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.hasGroupActionSigners = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes last_block_proposer = 4; - * @return {string} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getLastBlockProposer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.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 last_block_proposer = 4; - * This is a type-conversion wrapper around `getLastBlockProposer()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getLastBlockProposer_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastBlockProposer())); + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.oneofGroups_[0], value); }; /** - * optional bytes last_block_proposer = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastBlockProposer()` - * @return {!Uint8Array} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getLastBlockProposer_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastBlockProposer())); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setLastBlockProposer = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional ResponseMetadata metadata = 5; + * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 5)); + 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.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.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.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -45480,35 +65116,35 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsI * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 5) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional GetCurrentQuorumsInfoResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} + * optional GetGroupActionSignersResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -45517,7 +65153,7 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.clearV0 * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.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 bafa69fcb7..bc016d93d6 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 @@ -80,6 +80,42 @@ CF_EXTERN_C_BEGIN @class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0; @class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks; @class GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks; +@class GetGroupActionSignersRequest_GetGroupActionSignersRequestV0; +@class GetGroupActionSignersResponse_GetGroupActionSignersResponseV0; +@class GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner; +@class GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners; +@class GetGroupActionsRequest_GetGroupActionsRequestV0; +@class GetGroupActionsRequest_StartAtActionId; +@class GetGroupActionsResponse_GetGroupActionsResponseV0; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent; +@class GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent; +@class GetGroupInfoRequest_GetGroupInfoRequestV0; +@class GetGroupInfoResponse_GetGroupInfoResponseV0; +@class GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo; +@class GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry; +@class GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry; +@class GetGroupInfosRequest_GetGroupInfosRequestV0; +@class GetGroupInfosRequest_StartAtGroupContractPosition; +@class GetGroupInfosResponse_GetGroupInfosResponseV0; +@class GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos; +@class GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry; +@class GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry; @class GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0; @class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0; @class GetIdentitiesBalancesResponse_GetIdentitiesBalancesResponseV0_IdentitiesBalances; @@ -89,6 +125,15 @@ CF_EXTERN_C_BEGIN @class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys; @class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys; @class GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys; +@class GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0; +@class GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0; +@class GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry; +@class GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances; +@class GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0; +@class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0; +@class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos; +@class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry; +@class GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry; @class GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0; @class GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0; @class GetIdentityBalanceAndRevisionResponse_GetIdentityBalanceAndRevisionResponseV0_BalanceAndRevision; @@ -105,6 +150,15 @@ CF_EXTERN_C_BEGIN @class GetIdentityNonceResponse_GetIdentityNonceResponseV0; @class GetIdentityRequest_GetIdentityRequestV0; @class GetIdentityResponse_GetIdentityResponseV0; +@class GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0; +@class GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0; +@class GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry; +@class GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances; +@class GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0; +@class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0; +@class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry; +@class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry; +@class GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos; @class GetPathElementsRequest_GetPathElementsRequestV0; @class GetPathElementsResponse_GetPathElementsResponseV0; @class GetPathElementsResponse_GetPathElementsResponseV0_Elements; @@ -114,6 +168,9 @@ CF_EXTERN_C_BEGIN @class GetProofsRequest_GetProofsRequestV0_ContractRequest; @class GetProofsRequest_GetProofsRequestV0_DocumentRequest; @class GetProofsRequest_GetProofsRequestV0_IdentityRequest; +@class GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest; +@class GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest; +@class GetProofsRequest_GetProofsRequestV0_TokenStatusRequest; @class GetProofsRequest_GetProofsRequestV0_VoteStatusRequest; @class GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest; @class GetProofsResponse_GetProofsResponseV0; @@ -137,6 +194,13 @@ CF_EXTERN_C_BEGIN @class GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive; @class GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash; @class GetStatusResponse_GetStatusResponseV0_Version_Software; +@class GetTokenStatusesRequest_GetTokenStatusesRequestV0; +@class GetTokenStatusesResponse_GetTokenStatusesResponseV0; +@class GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry; +@class GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses; +@class GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0; +@class GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0; +@class GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry; @class GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0; @class GetTotalCreditsInPlatformResponse_GetTotalCreditsInPlatformResponseV0; @class GetVotePollsByEndDateRequest_GetVotePollsByEndDateRequestV0; @@ -323,6 +387,79 @@ GPBEnumDescriptor *GetContestedResourceIdentityVotesResponse_GetContestedResourc **/ BOOL GetContestedResourceIdentityVotesResponse_GetContestedResourceIdentityVotesResponseV0_ResourceVoteChoice_VoteChoiceType_IsValidValue(int32_t value); +#pragma mark - Enum GetGroupActionsRequest_ActionStatus + +typedef GPB_ENUM(GetGroupActionsRequest_ActionStatus) { + /** + * Value used if any message's field encounters a value that is not defined + * by this enum. The message will also have C functions to get/set the rawValue + * of the field. + **/ + GetGroupActionsRequest_ActionStatus_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + /** Request the active actions */ + GetGroupActionsRequest_ActionStatus_Active = 0, + + /** Request the closed actions */ + GetGroupActionsRequest_ActionStatus_Closed = 1, +}; + +GPBEnumDescriptor *GetGroupActionsRequest_ActionStatus_EnumDescriptor(void); + +/** + * Checks to see if the given value is defined by the enum or was not known at + * the time this source was generated. + **/ +BOOL GetGroupActionsRequest_ActionStatus_IsValidValue(int32_t value); + +#pragma mark - Enum GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType + +/** Enum for emergency action types */ +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType) { + /** + * Value used if any message's field encounters a value that is not defined + * by this enum. The message will also have C functions to get/set the rawValue + * of the field. + **/ + GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + /** Pause action */ + GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_Pause = 0, + + /** Resume action */ + GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_Resume = 1, +}; + +GPBEnumDescriptor *GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_EnumDescriptor(void); + +/** + * Checks to see if the given value is defined by the enum or was not known at + * the time this source was generated. + **/ +BOOL GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_IsValidValue(int32_t value); + +#pragma mark - Enum GetGroupActionSignersRequest_ActionStatus + +typedef GPB_ENUM(GetGroupActionSignersRequest_ActionStatus) { + /** + * Value used if any message's field encounters a value that is not defined + * by this enum. The message will also have C functions to get/set the rawValue + * of the field. + **/ + GetGroupActionSignersRequest_ActionStatus_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + /** Request the active actions */ + GetGroupActionSignersRequest_ActionStatus_Active = 0, + + /** Request the closed actions */ + GetGroupActionSignersRequest_ActionStatus_Closed = 1, +}; + +GPBEnumDescriptor *GetGroupActionSignersRequest_ActionStatus_EnumDescriptor(void); + +/** + * Checks to see if the given value is defined by the enum or was not known at + * the time this source was generated. + **/ +BOOL GetGroupActionSignersRequest_ActionStatus_IsValidValue(int32_t value); + #pragma mark - PlatformRoot /** @@ -1729,6 +1866,9 @@ typedef GPB_ENUM(GetProofsRequest_GetProofsRequestV0_FieldNumber) { GetProofsRequest_GetProofsRequestV0_FieldNumber_ContractsArray = 2, GetProofsRequest_GetProofsRequestV0_FieldNumber_DocumentsArray = 3, GetProofsRequest_GetProofsRequestV0_FieldNumber_VotesArray = 4, + GetProofsRequest_GetProofsRequestV0_FieldNumber_IdentityTokenBalancesArray = 5, + GetProofsRequest_GetProofsRequestV0_FieldNumber_IdentityTokenInfosArray = 6, + GetProofsRequest_GetProofsRequestV0_FieldNumber_TokenStatusesArray = 7, }; GPB_FINAL @interface GetProofsRequest_GetProofsRequestV0 : GPBMessage @@ -1752,6 +1892,18 @@ GPB_FINAL @interface GetProofsRequest_GetProofsRequestV0 : GPBMessage /** The number of items in @c votesArray without causing the array to be created. */ @property(nonatomic, readonly) NSUInteger votesArray_Count; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *identityTokenBalancesArray; +/** The number of items in @c identityTokenBalancesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger identityTokenBalancesArray_Count; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *identityTokenInfosArray; +/** The number of items in @c identityTokenInfosArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger identityTokenInfosArray_Count; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *tokenStatusesArray; +/** The number of items in @c tokenStatusesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger tokenStatusesArray_Count; + @end #pragma mark - GetProofsRequest_GetProofsRequestV0_DocumentRequest @@ -1894,6 +2046,48 @@ GPB_FINAL @interface GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_Conte @end +#pragma mark - GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest + +typedef GPB_ENUM(GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest_FieldNumber) { + GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest_FieldNumber_TokenId = 1, + GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest_FieldNumber_IdentityId = 2, +}; + +GPB_FINAL @interface GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *tokenId; + +@property(nonatomic, readwrite, copy, null_resettable) NSData *identityId; + +@end + +#pragma mark - GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest + +typedef GPB_ENUM(GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest_FieldNumber) { + GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest_FieldNumber_TokenId = 1, + GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest_FieldNumber_IdentityId = 2, +}; + +GPB_FINAL @interface GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *tokenId; + +@property(nonatomic, readwrite, copy, null_resettable) NSData *identityId; + +@end + +#pragma mark - GetProofsRequest_GetProofsRequestV0_TokenStatusRequest + +typedef GPB_ENUM(GetProofsRequest_GetProofsRequestV0_TokenStatusRequest_FieldNumber) { + GetProofsRequest_GetProofsRequestV0_TokenStatusRequest_FieldNumber_TokenId = 1, +}; + +GPB_FINAL @interface GetProofsRequest_GetProofsRequestV0_TokenStatusRequest : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *tokenId; + +@end + #pragma mark - GetProofsResponse typedef GPB_ENUM(GetProofsResponse_FieldNumber) { @@ -4962,6 +5156,1880 @@ GPB_FINAL @interface GetCurrentQuorumsInfoResponse_GetCurrentQuorumsInfoResponse @end +#pragma mark - GetIdentityTokenBalancesRequest + +typedef GPB_ENUM(GetIdentityTokenBalancesRequest_FieldNumber) { + GetIdentityTokenBalancesRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetIdentityTokenBalancesRequest_Version_OneOfCase) { + GetIdentityTokenBalancesRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentityTokenBalancesRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetIdentityTokenBalancesRequest : GPBMessage + +@property(nonatomic, readonly) GetIdentityTokenBalancesRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetIdentityTokenBalancesRequest_ClearVersionOneOfCase(GetIdentityTokenBalancesRequest *message); + +#pragma mark - GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 + +typedef GPB_ENUM(GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0_FieldNumber) { + GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0_FieldNumber_IdentityId = 1, + GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0_FieldNumber_TokenIdsArray = 2, + GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0_FieldNumber_Prove = 3, +}; + +GPB_FINAL @interface GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 : GPBMessage + +/** ID of the identity */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *identityId; + +/** List of token IDs */ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *tokenIdsArray; +/** The number of items in @c tokenIdsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger tokenIdsArray_Count; + +/** Flag to request a proof as the response */ +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetIdentityTokenBalancesResponse + +typedef GPB_ENUM(GetIdentityTokenBalancesResponse_FieldNumber) { + GetIdentityTokenBalancesResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetIdentityTokenBalancesResponse_Version_OneOfCase) { + GetIdentityTokenBalancesResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentityTokenBalancesResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetIdentityTokenBalancesResponse : GPBMessage + +@property(nonatomic, readonly) GetIdentityTokenBalancesResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetIdentityTokenBalancesResponse_ClearVersionOneOfCase(GetIdentityTokenBalancesResponse *message); + +#pragma mark - GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 + +typedef GPB_ENUM(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_FieldNumber) { + GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_FieldNumber_TokenBalances = 1, + GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_FieldNumber_Proof = 2, + GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_Result_OneOfCase) { + GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_Result_OneOfCase_TokenBalances = 1, + GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_Result_OneOfCase resultOneOfCase; + +/** Actual token balances */ +@property(nonatomic, readwrite, strong, null_resettable) GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances *tokenBalances; + +/** Proof of the token balances, 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 GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_ClearResultOneOfCase(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 *message); + +#pragma mark - GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry + +typedef GPB_ENUM(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry_FieldNumber) { + GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry_FieldNumber_TokenId = 1, + GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry_FieldNumber_Balance = 2, +}; + +GPB_FINAL @interface GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry : GPBMessage + +/** Token ID */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *tokenId; + +/** Token balance for the contract */ +@property(nonatomic, readwrite) uint64_t balance; + +@property(nonatomic, readwrite) BOOL hasBalance; +@end + +#pragma mark - GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances + +typedef GPB_ENUM(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances_FieldNumber) { + GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances_FieldNumber_TokenBalancesArray = 1, +}; + +GPB_FINAL @interface GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances : GPBMessage + +/** List of token balances */ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *tokenBalancesArray; +/** The number of items in @c tokenBalancesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger tokenBalancesArray_Count; + +@end + +#pragma mark - GetIdentitiesTokenBalancesRequest + +typedef GPB_ENUM(GetIdentitiesTokenBalancesRequest_FieldNumber) { + GetIdentitiesTokenBalancesRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetIdentitiesTokenBalancesRequest_Version_OneOfCase) { + GetIdentitiesTokenBalancesRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentitiesTokenBalancesRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetIdentitiesTokenBalancesRequest : GPBMessage + +@property(nonatomic, readonly) GetIdentitiesTokenBalancesRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetIdentitiesTokenBalancesRequest_ClearVersionOneOfCase(GetIdentitiesTokenBalancesRequest *message); + +#pragma mark - GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 + +typedef GPB_ENUM(GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0_FieldNumber) { + GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0_FieldNumber_TokenId = 1, + GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0_FieldNumber_IdentityIdsArray = 2, + GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0_FieldNumber_Prove = 3, +}; + +GPB_FINAL @interface GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 : GPBMessage + +/** Token ID */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *tokenId; + +/** List of identity IDs */ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *identityIdsArray; +/** The number of items in @c identityIdsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger identityIdsArray_Count; + +/** Flag to request a proof as the response */ +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetIdentitiesTokenBalancesResponse + +typedef GPB_ENUM(GetIdentitiesTokenBalancesResponse_FieldNumber) { + GetIdentitiesTokenBalancesResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetIdentitiesTokenBalancesResponse_Version_OneOfCase) { + GetIdentitiesTokenBalancesResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentitiesTokenBalancesResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetIdentitiesTokenBalancesResponse : GPBMessage + +@property(nonatomic, readonly) GetIdentitiesTokenBalancesResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetIdentitiesTokenBalancesResponse_ClearVersionOneOfCase(GetIdentitiesTokenBalancesResponse *message); + +#pragma mark - GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 + +typedef GPB_ENUM(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_FieldNumber) { + GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_FieldNumber_IdentityTokenBalances = 1, + GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_FieldNumber_Proof = 2, + GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_Result_OneOfCase) { + GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_Result_OneOfCase_IdentityTokenBalances = 1, + GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_Result_OneOfCase resultOneOfCase; + +/** Actual identity token balances */ +@property(nonatomic, readwrite, strong, null_resettable) GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances *identityTokenBalances; + +/** Proof of the balances, 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 GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_ClearResultOneOfCase(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 *message); + +#pragma mark - GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry + +typedef GPB_ENUM(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry_FieldNumber) { + GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry_FieldNumber_IdentityId = 1, + GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry_FieldNumber_Balance = 2, +}; + +GPB_FINAL @interface GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry : GPBMessage + +/** Identity ID */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *identityId; + +/** Token balance for the identity */ +@property(nonatomic, readwrite) uint64_t balance; + +@property(nonatomic, readwrite) BOOL hasBalance; +@end + +#pragma mark - GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances + +typedef GPB_ENUM(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances_FieldNumber) { + GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances_FieldNumber_IdentityTokenBalancesArray = 1, +}; + +GPB_FINAL @interface GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances : GPBMessage + +/** List of identity token balances */ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *identityTokenBalancesArray; +/** The number of items in @c identityTokenBalancesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger identityTokenBalancesArray_Count; + +@end + +#pragma mark - GetIdentityTokenInfosRequest + +typedef GPB_ENUM(GetIdentityTokenInfosRequest_FieldNumber) { + GetIdentityTokenInfosRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetIdentityTokenInfosRequest_Version_OneOfCase) { + GetIdentityTokenInfosRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentityTokenInfosRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetIdentityTokenInfosRequest : GPBMessage + +@property(nonatomic, readonly) GetIdentityTokenInfosRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetIdentityTokenInfosRequest_ClearVersionOneOfCase(GetIdentityTokenInfosRequest *message); + +#pragma mark - GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 + +typedef GPB_ENUM(GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0_FieldNumber) { + GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0_FieldNumber_IdentityId = 1, + GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0_FieldNumber_TokenIdsArray = 2, + GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0_FieldNumber_Prove = 3, +}; + +GPB_FINAL @interface GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *identityId; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *tokenIdsArray; +/** The number of items in @c tokenIdsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger tokenIdsArray_Count; + +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetIdentityTokenInfosResponse + +typedef GPB_ENUM(GetIdentityTokenInfosResponse_FieldNumber) { + GetIdentityTokenInfosResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetIdentityTokenInfosResponse_Version_OneOfCase) { + GetIdentityTokenInfosResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentityTokenInfosResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetIdentityTokenInfosResponse : GPBMessage + +@property(nonatomic, readonly) GetIdentityTokenInfosResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetIdentityTokenInfosResponse_ClearVersionOneOfCase(GetIdentityTokenInfosResponse *message); + +#pragma mark - GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 + +typedef GPB_ENUM(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_FieldNumber) { + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_FieldNumber_TokenInfos = 1, + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_FieldNumber_Proof = 2, + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_Result_OneOfCase) { + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_Result_OneOfCase_TokenInfos = 1, + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_Result_OneOfCase resultOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos *tokenInfos; + +@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 GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_ClearResultOneOfCase(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 *message); + +#pragma mark - GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry + +typedef GPB_ENUM(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry_FieldNumber) { + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry_FieldNumber_Frozen = 1, +}; + +GPB_FINAL @interface GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry : GPBMessage + +@property(nonatomic, readwrite) BOOL frozen; + +@end + +#pragma mark - GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry + +typedef GPB_ENUM(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry_FieldNumber) { + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry_FieldNumber_TokenId = 1, + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry_FieldNumber_Info = 2, +}; + +GPB_FINAL @interface GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *tokenId; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry *info; +/** Test to see if @c info has been set. */ +@property(nonatomic, readwrite) BOOL hasInfo; + +@end + +#pragma mark - GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos + +typedef GPB_ENUM(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos_FieldNumber) { + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos_FieldNumber_TokenInfosArray = 1, +}; + +GPB_FINAL @interface GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *tokenInfosArray; +/** The number of items in @c tokenInfosArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger tokenInfosArray_Count; + +@end + +#pragma mark - GetIdentitiesTokenInfosRequest + +typedef GPB_ENUM(GetIdentitiesTokenInfosRequest_FieldNumber) { + GetIdentitiesTokenInfosRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetIdentitiesTokenInfosRequest_Version_OneOfCase) { + GetIdentitiesTokenInfosRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentitiesTokenInfosRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetIdentitiesTokenInfosRequest : GPBMessage + +@property(nonatomic, readonly) GetIdentitiesTokenInfosRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetIdentitiesTokenInfosRequest_ClearVersionOneOfCase(GetIdentitiesTokenInfosRequest *message); + +#pragma mark - GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 + +typedef GPB_ENUM(GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0_FieldNumber) { + GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0_FieldNumber_TokenId = 1, + GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0_FieldNumber_IdentityIdsArray = 2, + GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0_FieldNumber_Prove = 3, +}; + +GPB_FINAL @interface GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *tokenId; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *identityIdsArray; +/** The number of items in @c identityIdsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger identityIdsArray_Count; + +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetIdentitiesTokenInfosResponse + +typedef GPB_ENUM(GetIdentitiesTokenInfosResponse_FieldNumber) { + GetIdentitiesTokenInfosResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetIdentitiesTokenInfosResponse_Version_OneOfCase) { + GetIdentitiesTokenInfosResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentitiesTokenInfosResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetIdentitiesTokenInfosResponse : GPBMessage + +@property(nonatomic, readonly) GetIdentitiesTokenInfosResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetIdentitiesTokenInfosResponse_ClearVersionOneOfCase(GetIdentitiesTokenInfosResponse *message); + +#pragma mark - GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 + +typedef GPB_ENUM(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_FieldNumber) { + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_FieldNumber_IdentityTokenInfos = 1, + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_FieldNumber_Proof = 2, + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_Result_OneOfCase) { + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_Result_OneOfCase_IdentityTokenInfos = 1, + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_Result_OneOfCase resultOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos *identityTokenInfos; + +@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 GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_ClearResultOneOfCase(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 *message); + +#pragma mark - GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry + +typedef GPB_ENUM(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry_FieldNumber) { + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry_FieldNumber_Frozen = 1, +}; + +GPB_FINAL @interface GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry : GPBMessage + +@property(nonatomic, readwrite) BOOL frozen; + +@end + +#pragma mark - GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry + +typedef GPB_ENUM(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry_FieldNumber) { + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry_FieldNumber_IdentityId = 1, + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry_FieldNumber_Info = 2, +}; + +GPB_FINAL @interface GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *identityId; + +@property(nonatomic, readwrite, strong, null_resettable) GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry *info; +/** Test to see if @c info has been set. */ +@property(nonatomic, readwrite) BOOL hasInfo; + +@end + +#pragma mark - GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos + +typedef GPB_ENUM(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos_FieldNumber) { + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos_FieldNumber_TokenInfosArray = 1, +}; + +GPB_FINAL @interface GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *tokenInfosArray; +/** The number of items in @c tokenInfosArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger tokenInfosArray_Count; + +@end + +#pragma mark - GetTokenStatusesRequest + +typedef GPB_ENUM(GetTokenStatusesRequest_FieldNumber) { + GetTokenStatusesRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetTokenStatusesRequest_Version_OneOfCase) { + GetTokenStatusesRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetTokenStatusesRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetTokenStatusesRequest : GPBMessage + +@property(nonatomic, readonly) GetTokenStatusesRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetTokenStatusesRequest_GetTokenStatusesRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetTokenStatusesRequest_ClearVersionOneOfCase(GetTokenStatusesRequest *message); + +#pragma mark - GetTokenStatusesRequest_GetTokenStatusesRequestV0 + +typedef GPB_ENUM(GetTokenStatusesRequest_GetTokenStatusesRequestV0_FieldNumber) { + GetTokenStatusesRequest_GetTokenStatusesRequestV0_FieldNumber_TokenIdsArray = 1, + GetTokenStatusesRequest_GetTokenStatusesRequestV0_FieldNumber_Prove = 2, +}; + +GPB_FINAL @interface GetTokenStatusesRequest_GetTokenStatusesRequestV0 : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *tokenIdsArray; +/** The number of items in @c tokenIdsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger tokenIdsArray_Count; + +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetTokenStatusesResponse + +typedef GPB_ENUM(GetTokenStatusesResponse_FieldNumber) { + GetTokenStatusesResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetTokenStatusesResponse_Version_OneOfCase) { + GetTokenStatusesResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetTokenStatusesResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetTokenStatusesResponse : GPBMessage + +@property(nonatomic, readonly) GetTokenStatusesResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetTokenStatusesResponse_GetTokenStatusesResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetTokenStatusesResponse_ClearVersionOneOfCase(GetTokenStatusesResponse *message); + +#pragma mark - GetTokenStatusesResponse_GetTokenStatusesResponseV0 + +typedef GPB_ENUM(GetTokenStatusesResponse_GetTokenStatusesResponseV0_FieldNumber) { + GetTokenStatusesResponse_GetTokenStatusesResponseV0_FieldNumber_TokenStatuses = 1, + GetTokenStatusesResponse_GetTokenStatusesResponseV0_FieldNumber_Proof = 2, + GetTokenStatusesResponse_GetTokenStatusesResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetTokenStatusesResponse_GetTokenStatusesResponseV0_Result_OneOfCase) { + GetTokenStatusesResponse_GetTokenStatusesResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetTokenStatusesResponse_GetTokenStatusesResponseV0_Result_OneOfCase_TokenStatuses = 1, + GetTokenStatusesResponse_GetTokenStatusesResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetTokenStatusesResponse_GetTokenStatusesResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetTokenStatusesResponse_GetTokenStatusesResponseV0_Result_OneOfCase resultOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses *tokenStatuses; + +@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 GetTokenStatusesResponse_GetTokenStatusesResponseV0_ClearResultOneOfCase(GetTokenStatusesResponse_GetTokenStatusesResponseV0 *message); + +#pragma mark - GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry + +typedef GPB_ENUM(GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry_FieldNumber) { + GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry_FieldNumber_TokenId = 1, + GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry_FieldNumber_Paused = 2, +}; + +GPB_FINAL @interface GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *tokenId; + +@property(nonatomic, readwrite) BOOL paused; + +@property(nonatomic, readwrite) BOOL hasPaused; +@end + +#pragma mark - GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses + +typedef GPB_ENUM(GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses_FieldNumber) { + GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses_FieldNumber_TokenStatusesArray = 1, +}; + +GPB_FINAL @interface GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *tokenStatusesArray; +/** The number of items in @c tokenStatusesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger tokenStatusesArray_Count; + +@end + +#pragma mark - GetTokenTotalSupplyRequest + +typedef GPB_ENUM(GetTokenTotalSupplyRequest_FieldNumber) { + GetTokenTotalSupplyRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetTokenTotalSupplyRequest_Version_OneOfCase) { + GetTokenTotalSupplyRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetTokenTotalSupplyRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetTokenTotalSupplyRequest : GPBMessage + +@property(nonatomic, readonly) GetTokenTotalSupplyRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetTokenTotalSupplyRequest_ClearVersionOneOfCase(GetTokenTotalSupplyRequest *message); + +#pragma mark - GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 + +typedef GPB_ENUM(GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0_FieldNumber) { + GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0_FieldNumber_TokenId = 1, + GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0_FieldNumber_Prove = 2, +}; + +GPB_FINAL @interface GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *tokenId; + +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetTokenTotalSupplyResponse + +typedef GPB_ENUM(GetTokenTotalSupplyResponse_FieldNumber) { + GetTokenTotalSupplyResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetTokenTotalSupplyResponse_Version_OneOfCase) { + GetTokenTotalSupplyResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetTokenTotalSupplyResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetTokenTotalSupplyResponse : GPBMessage + +@property(nonatomic, readonly) GetTokenTotalSupplyResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetTokenTotalSupplyResponse_ClearVersionOneOfCase(GetTokenTotalSupplyResponse *message); + +#pragma mark - GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 + +typedef GPB_ENUM(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_FieldNumber) { + GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_FieldNumber_TokenTotalSupply = 1, + GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_FieldNumber_Proof = 2, + GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_Result_OneOfCase) { + GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_Result_OneOfCase_TokenTotalSupply = 1, + GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_Result_OneOfCase resultOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry *tokenTotalSupply; + +@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 GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_ClearResultOneOfCase(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 *message); + +#pragma mark - GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry + +typedef GPB_ENUM(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry_FieldNumber) { + GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry_FieldNumber_TokenId = 1, + GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry_FieldNumber_TotalAggregatedAmountInUserAccounts = 2, + GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry_FieldNumber_TotalSystemAmount = 3, +}; + +GPB_FINAL @interface GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *tokenId; + +@property(nonatomic, readwrite) uint64_t totalAggregatedAmountInUserAccounts; + +@property(nonatomic, readwrite) uint64_t totalSystemAmount; + +@end + +#pragma mark - GetGroupInfoRequest + +typedef GPB_ENUM(GetGroupInfoRequest_FieldNumber) { + GetGroupInfoRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetGroupInfoRequest_Version_OneOfCase) { + GetGroupInfoRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupInfoRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetGroupInfoRequest : GPBMessage + +@property(nonatomic, readonly) GetGroupInfoRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupInfoRequest_GetGroupInfoRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetGroupInfoRequest_ClearVersionOneOfCase(GetGroupInfoRequest *message); + +#pragma mark - GetGroupInfoRequest_GetGroupInfoRequestV0 + +typedef GPB_ENUM(GetGroupInfoRequest_GetGroupInfoRequestV0_FieldNumber) { + GetGroupInfoRequest_GetGroupInfoRequestV0_FieldNumber_ContractId = 1, + GetGroupInfoRequest_GetGroupInfoRequestV0_FieldNumber_GroupContractPosition = 2, + GetGroupInfoRequest_GetGroupInfoRequestV0_FieldNumber_Prove = 3, +}; + +GPB_FINAL @interface GetGroupInfoRequest_GetGroupInfoRequestV0 : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *contractId; + +@property(nonatomic, readwrite) uint32_t groupContractPosition; + +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetGroupInfoResponse + +typedef GPB_ENUM(GetGroupInfoResponse_FieldNumber) { + GetGroupInfoResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetGroupInfoResponse_Version_OneOfCase) { + GetGroupInfoResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupInfoResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetGroupInfoResponse : GPBMessage + +@property(nonatomic, readonly) GetGroupInfoResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupInfoResponse_GetGroupInfoResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetGroupInfoResponse_ClearVersionOneOfCase(GetGroupInfoResponse *message); + +#pragma mark - GetGroupInfoResponse_GetGroupInfoResponseV0 + +typedef GPB_ENUM(GetGroupInfoResponse_GetGroupInfoResponseV0_FieldNumber) { + GetGroupInfoResponse_GetGroupInfoResponseV0_FieldNumber_GroupInfo = 1, + GetGroupInfoResponse_GetGroupInfoResponseV0_FieldNumber_Proof = 2, + GetGroupInfoResponse_GetGroupInfoResponseV0_FieldNumber_Metadata = 4, +}; + +typedef GPB_ENUM(GetGroupInfoResponse_GetGroupInfoResponseV0_Result_OneOfCase) { + GetGroupInfoResponse_GetGroupInfoResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupInfoResponse_GetGroupInfoResponseV0_Result_OneOfCase_GroupInfo = 1, + GetGroupInfoResponse_GetGroupInfoResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetGroupInfoResponse_GetGroupInfoResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetGroupInfoResponse_GetGroupInfoResponseV0_Result_OneOfCase resultOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo *groupInfo; + +@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 GetGroupInfoResponse_GetGroupInfoResponseV0_ClearResultOneOfCase(GetGroupInfoResponse_GetGroupInfoResponseV0 *message); + +#pragma mark - GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry + +typedef GPB_ENUM(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry_FieldNumber) { + GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry_FieldNumber_MemberId = 1, + GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry_FieldNumber_Power = 2, +}; + +GPB_FINAL @interface GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *memberId; + +@property(nonatomic, readwrite) uint32_t power; + +@end + +#pragma mark - GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry + +typedef GPB_ENUM(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry_FieldNumber) { + GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry_FieldNumber_MembersArray = 1, + GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry_FieldNumber_GroupRequiredPower = 2, +}; + +GPB_FINAL @interface GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *membersArray; +/** The number of items in @c membersArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger membersArray_Count; + +@property(nonatomic, readwrite) uint32_t groupRequiredPower; + +@end + +#pragma mark - GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo + +typedef GPB_ENUM(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo_FieldNumber) { + GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo_FieldNumber_GroupInfo = 1, +}; + +GPB_FINAL @interface GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry *groupInfo; +/** Test to see if @c groupInfo has been set. */ +@property(nonatomic, readwrite) BOOL hasGroupInfo; + +@end + +#pragma mark - GetGroupInfosRequest + +typedef GPB_ENUM(GetGroupInfosRequest_FieldNumber) { + GetGroupInfosRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetGroupInfosRequest_Version_OneOfCase) { + GetGroupInfosRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupInfosRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetGroupInfosRequest : GPBMessage + +@property(nonatomic, readonly) GetGroupInfosRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupInfosRequest_GetGroupInfosRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetGroupInfosRequest_ClearVersionOneOfCase(GetGroupInfosRequest *message); + +#pragma mark - GetGroupInfosRequest_StartAtGroupContractPosition + +typedef GPB_ENUM(GetGroupInfosRequest_StartAtGroupContractPosition_FieldNumber) { + GetGroupInfosRequest_StartAtGroupContractPosition_FieldNumber_StartGroupContractPosition = 1, + GetGroupInfosRequest_StartAtGroupContractPosition_FieldNumber_StartGroupContractPositionIncluded = 2, +}; + +GPB_FINAL @interface GetGroupInfosRequest_StartAtGroupContractPosition : GPBMessage + +@property(nonatomic, readwrite) uint32_t startGroupContractPosition; + +@property(nonatomic, readwrite) BOOL startGroupContractPositionIncluded; + +@end + +#pragma mark - GetGroupInfosRequest_GetGroupInfosRequestV0 + +typedef GPB_ENUM(GetGroupInfosRequest_GetGroupInfosRequestV0_FieldNumber) { + GetGroupInfosRequest_GetGroupInfosRequestV0_FieldNumber_ContractId = 1, + GetGroupInfosRequest_GetGroupInfosRequestV0_FieldNumber_StartAtGroupContractPosition = 2, + GetGroupInfosRequest_GetGroupInfosRequestV0_FieldNumber_Count = 3, + GetGroupInfosRequest_GetGroupInfosRequestV0_FieldNumber_Prove = 4, +}; + +GPB_FINAL @interface GetGroupInfosRequest_GetGroupInfosRequestV0 : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *contractId; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupInfosRequest_StartAtGroupContractPosition *startAtGroupContractPosition; +/** Test to see if @c startAtGroupContractPosition has been set. */ +@property(nonatomic, readwrite) BOOL hasStartAtGroupContractPosition; + +@property(nonatomic, readwrite) uint32_t count; + +@property(nonatomic, readwrite) BOOL hasCount; +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetGroupInfosResponse + +typedef GPB_ENUM(GetGroupInfosResponse_FieldNumber) { + GetGroupInfosResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetGroupInfosResponse_Version_OneOfCase) { + GetGroupInfosResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupInfosResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetGroupInfosResponse : GPBMessage + +@property(nonatomic, readonly) GetGroupInfosResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupInfosResponse_GetGroupInfosResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetGroupInfosResponse_ClearVersionOneOfCase(GetGroupInfosResponse *message); + +#pragma mark - GetGroupInfosResponse_GetGroupInfosResponseV0 + +typedef GPB_ENUM(GetGroupInfosResponse_GetGroupInfosResponseV0_FieldNumber) { + GetGroupInfosResponse_GetGroupInfosResponseV0_FieldNumber_GroupInfos = 1, + GetGroupInfosResponse_GetGroupInfosResponseV0_FieldNumber_Proof = 2, + GetGroupInfosResponse_GetGroupInfosResponseV0_FieldNumber_Metadata = 4, +}; + +typedef GPB_ENUM(GetGroupInfosResponse_GetGroupInfosResponseV0_Result_OneOfCase) { + GetGroupInfosResponse_GetGroupInfosResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupInfosResponse_GetGroupInfosResponseV0_Result_OneOfCase_GroupInfos = 1, + GetGroupInfosResponse_GetGroupInfosResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetGroupInfosResponse_GetGroupInfosResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetGroupInfosResponse_GetGroupInfosResponseV0_Result_OneOfCase resultOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos *groupInfos; + +@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 GetGroupInfosResponse_GetGroupInfosResponseV0_ClearResultOneOfCase(GetGroupInfosResponse_GetGroupInfosResponseV0 *message); + +#pragma mark - GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry + +typedef GPB_ENUM(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry_FieldNumber) { + GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry_FieldNumber_MemberId = 1, + GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry_FieldNumber_Power = 2, +}; + +GPB_FINAL @interface GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *memberId; + +@property(nonatomic, readwrite) uint32_t power; + +@end + +#pragma mark - GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry + +typedef GPB_ENUM(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry_FieldNumber) { + GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry_FieldNumber_GroupContractPosition = 1, + GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry_FieldNumber_MembersArray = 2, + GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry_FieldNumber_GroupRequiredPower = 3, +}; + +GPB_FINAL @interface GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry : GPBMessage + +@property(nonatomic, readwrite) uint32_t groupContractPosition; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *membersArray; +/** The number of items in @c membersArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger membersArray_Count; + +@property(nonatomic, readwrite) uint32_t groupRequiredPower; + +@end + +#pragma mark - GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos + +typedef GPB_ENUM(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos_FieldNumber) { + GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos_FieldNumber_GroupInfosArray = 1, +}; + +GPB_FINAL @interface GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *groupInfosArray; +/** The number of items in @c groupInfosArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger groupInfosArray_Count; + +@end + +#pragma mark - GetGroupActionsRequest + +typedef GPB_ENUM(GetGroupActionsRequest_FieldNumber) { + GetGroupActionsRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetGroupActionsRequest_Version_OneOfCase) { + GetGroupActionsRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupActionsRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetGroupActionsRequest : GPBMessage + +@property(nonatomic, readonly) GetGroupActionsRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsRequest_GetGroupActionsRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetGroupActionsRequest_ClearVersionOneOfCase(GetGroupActionsRequest *message); + +#pragma mark - GetGroupActionsRequest_StartAtActionId + +typedef GPB_ENUM(GetGroupActionsRequest_StartAtActionId_FieldNumber) { + GetGroupActionsRequest_StartAtActionId_FieldNumber_StartActionId = 1, + GetGroupActionsRequest_StartAtActionId_FieldNumber_StartActionIdIncluded = 2, +}; + +GPB_FINAL @interface GetGroupActionsRequest_StartAtActionId : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *startActionId; + +@property(nonatomic, readwrite) BOOL startActionIdIncluded; + +@end + +#pragma mark - GetGroupActionsRequest_GetGroupActionsRequestV0 + +typedef GPB_ENUM(GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber) { + GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_ContractId = 1, + GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_GroupContractPosition = 2, + GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_Status = 3, + GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_StartAtActionId = 4, + GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_Count = 5, + GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_Prove = 6, +}; + +GPB_FINAL @interface GetGroupActionsRequest_GetGroupActionsRequestV0 : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *contractId; + +@property(nonatomic, readwrite) uint32_t groupContractPosition; + +@property(nonatomic, readwrite) GetGroupActionsRequest_ActionStatus status; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsRequest_StartAtActionId *startAtActionId; +/** Test to see if @c startAtActionId has been set. */ +@property(nonatomic, readwrite) BOOL hasStartAtActionId; + +@property(nonatomic, readwrite) uint32_t count; + +@property(nonatomic, readwrite) BOOL hasCount; +@property(nonatomic, readwrite) BOOL prove; + +@end + +/** + * Fetches the raw value of a @c GetGroupActionsRequest_GetGroupActionsRequestV0's @c status property, even + * if the value was not defined by the enum at the time the code was generated. + **/ +int32_t GetGroupActionsRequest_GetGroupActionsRequestV0_Status_RawValue(GetGroupActionsRequest_GetGroupActionsRequestV0 *message); +/** + * Sets the raw value of an @c GetGroupActionsRequest_GetGroupActionsRequestV0's @c status property, allowing + * it to be set to a value that was not defined by the enum at the time the code + * was generated. + **/ +void SetGetGroupActionsRequest_GetGroupActionsRequestV0_Status_RawValue(GetGroupActionsRequest_GetGroupActionsRequestV0 *message, int32_t value); + +#pragma mark - GetGroupActionsResponse + +typedef GPB_ENUM(GetGroupActionsResponse_FieldNumber) { + GetGroupActionsResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetGroupActionsResponse_Version_OneOfCase) { + GetGroupActionsResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupActionsResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetGroupActionsResponse : GPBMessage + +@property(nonatomic, readonly) GetGroupActionsResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetGroupActionsResponse_ClearVersionOneOfCase(GetGroupActionsResponse *message); + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0 + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_FieldNumber_GroupActions = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_FieldNumber_Proof = 2, + GetGroupActionsResponse_GetGroupActionsResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_Result_OneOfCase) { + GetGroupActionsResponse_GetGroupActionsResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupActionsResponse_GetGroupActionsResponseV0_Result_OneOfCase_GroupActions = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetGroupActionsResponse_GetGroupActionsResponseV0_Result_OneOfCase resultOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions *groupActions; + +@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 GetGroupActionsResponse_GetGroupActionsResponseV0_ClearResultOneOfCase(GetGroupActionsResponse_GetGroupActionsResponseV0 *message); + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent_FieldNumber_Amount = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent_FieldNumber_RecipientId = 2, + GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent_FieldNumber_PublicNote = 3, +}; + +/** + * Mint event + **/ +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent : GPBMessage + +/** Amount to mint */ +@property(nonatomic, readwrite) uint64_t amount; + +/** Recipient identifier */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *recipientId; + +/** Public note */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *publicNote; +/** Test to see if @c publicNote has been set. */ +@property(nonatomic, readwrite) BOOL hasPublicNote; + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent_FieldNumber_Amount = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent_FieldNumber_PublicNote = 2, +}; + +/** + * Burn event + **/ +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent : GPBMessage + +/** Amount to burn */ +@property(nonatomic, readwrite) uint64_t amount; + +/** Public note */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *publicNote; +/** Test to see if @c publicNote has been set. */ +@property(nonatomic, readwrite) BOOL hasPublicNote; + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent_FieldNumber_FrozenId = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent_FieldNumber_PublicNote = 2, +}; + +/** + * Freeze event + **/ +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent : GPBMessage + +/** Identifier of the frozen entity */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *frozenId; + +/** Public note */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *publicNote; +/** Test to see if @c publicNote has been set. */ +@property(nonatomic, readwrite) BOOL hasPublicNote; + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent_FieldNumber_FrozenId = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent_FieldNumber_PublicNote = 2, +}; + +/** + * Unfreeze event + **/ +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent : GPBMessage + +/** Identifier of the unfrozen entity */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *frozenId; + +/** Public note */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *publicNote; +/** Test to see if @c publicNote has been set. */ +@property(nonatomic, readwrite) BOOL hasPublicNote; + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent_FieldNumber_FrozenId = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent_FieldNumber_Amount = 2, + GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent_FieldNumber_PublicNote = 3, +}; + +/** + * Destroy frozen funds event + **/ +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent : GPBMessage + +/** Identifier of the frozen entity */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *frozenId; + +/** Amount to destroy */ +@property(nonatomic, readwrite) uint64_t amount; + +/** Public note */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *publicNote; +/** Test to see if @c publicNote has been set. */ +@property(nonatomic, readwrite) BOOL hasPublicNote; + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote_FieldNumber_SenderKeyIndex = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote_FieldNumber_RecipientKeyIndex = 2, + GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote_FieldNumber_EncryptedData = 3, +}; + +/** + * Shared encrypted note + **/ +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote : GPBMessage + +/** Sender key index */ +@property(nonatomic, readwrite) uint32_t senderKeyIndex; + +/** Recipient key index */ +@property(nonatomic, readwrite) uint32_t recipientKeyIndex; + +/** Encrypted data */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *encryptedData; + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote_FieldNumber_RootEncryptionKeyIndex = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote_FieldNumber_DerivationEncryptionKeyIndex = 2, + GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote_FieldNumber_EncryptedData = 3, +}; + +/** + * Personal encrypted note + **/ +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote : GPBMessage + +/** Root encryption key index */ +@property(nonatomic, readwrite) uint32_t rootEncryptionKeyIndex; + +/** Derivation encryption key index */ +@property(nonatomic, readwrite) uint32_t derivationEncryptionKeyIndex; + +/** Encrypted data */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *encryptedData; + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent_FieldNumber_RecipientId = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent_FieldNumber_PublicNote = 2, + GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent_FieldNumber_SharedEncryptedNote = 3, + GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent_FieldNumber_PersonalEncryptedNote = 4, + GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent_FieldNumber_Amount = 5, +}; + +/** + * Transfer event + **/ +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent : GPBMessage + +/** Recipient identifier */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *recipientId; + +/** Public note */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *publicNote; +/** Test to see if @c publicNote has been set. */ +@property(nonatomic, readwrite) BOOL hasPublicNote; + +/** Shared encrypted note */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote *sharedEncryptedNote; +/** Test to see if @c sharedEncryptedNote has been set. */ +@property(nonatomic, readwrite) BOOL hasSharedEncryptedNote; + +/** Personal encrypted note */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote *personalEncryptedNote; +/** Test to see if @c personalEncryptedNote has been set. */ +@property(nonatomic, readwrite) BOOL hasPersonalEncryptedNote; + +/** Amount transferred */ +@property(nonatomic, readwrite) uint64_t amount; + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_FieldNumber_ActionType = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_FieldNumber_PublicNote = 2, +}; + +/** + * Emergency action event + **/ +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent : GPBMessage + +/** Emergency action type */ +@property(nonatomic, readwrite) GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType actionType; + +/** Public note */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *publicNote; +/** Test to see if @c publicNote has been set. */ +@property(nonatomic, readwrite) BOOL hasPublicNote; + +@end + +/** + * Fetches the raw value of a @c GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent's @c actionType property, even + * if the value was not defined by the enum at the time the code was generated. + **/ +int32_t GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_RawValue(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent *message); +/** + * Sets the raw value of an @c GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent's @c actionType property, allowing + * it to be set to a value that was not defined by the enum at the time the code + * was generated. + **/ +void SetGetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_RawValue(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent *message, int32_t value); + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent_FieldNumber_TokenConfigUpdateItem = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent_FieldNumber_PublicNote = 2, +}; + +/** + * Token config update event + **/ +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent : GPBMessage + +/** Token config update item */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *tokenConfigUpdateItem; + +/** Public note */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *publicNote; +/** Test to see if @c publicNote has been set. */ +@property(nonatomic, readwrite) BOOL hasPublicNote; + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_FieldNumber_TokenEvent = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_FieldNumber_DocumentEvent = 2, + GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_FieldNumber_ContractEvent = 3, +}; + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_EventType_OneOfCase) { + GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_EventType_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_EventType_OneOfCase_TokenEvent = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_EventType_OneOfCase_DocumentEvent = 2, + GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_EventType_OneOfCase_ContractEvent = 3, +}; + +/** + * Event associated with this action + **/ +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent : GPBMessage + +@property(nonatomic, readonly) GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_EventType_OneOfCase eventTypeOneOfCase; + +/** Token event details */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent *tokenEvent; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent *documentEvent; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent *contractEvent; + +@end + +/** + * Clears whatever value was set for the oneof 'eventType'. + **/ +void GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_ClearEventTypeOneOfCase(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent *message); + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent_FieldNumber_Create = 1, +}; + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent_Type_OneOfCase) { + GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent_Type_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent_Type_OneOfCase_Create = 1, +}; + +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent : GPBMessage + +@property(nonatomic, readonly) GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent_Type_OneOfCase typeOneOfCase; + +/** Create event details */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent *create; + +@end + +/** + * Clears whatever value was set for the oneof 'type'. + **/ +void GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent_ClearTypeOneOfCase(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent *message); + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent_FieldNumber_CreatedDocument = 1, +}; + +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *createdDocument; + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent_FieldNumber_UpdatedContract = 1, +}; + +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *updatedContract; + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent_FieldNumber_Update = 1, +}; + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent_Type_OneOfCase) { + GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent_Type_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent_Type_OneOfCase_Update = 1, +}; + +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent : GPBMessage + +@property(nonatomic, readonly) GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent_Type_OneOfCase typeOneOfCase; + +/** Contract update event */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent *update; + +@end + +/** + * Clears whatever value was set for the oneof 'type'. + **/ +void GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent_ClearTypeOneOfCase(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent *message); + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_Mint = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_Burn = 2, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_Freeze = 3, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_Unfreeze = 4, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_DestroyFrozenFunds = 5, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_Transfer = 6, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_EmergencyAction = 7, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_TokenConfigUpdate = 8, +}; + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_Type_OneOfCase) { + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_Type_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_Type_OneOfCase_Mint = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_Type_OneOfCase_Burn = 2, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_Type_OneOfCase_Freeze = 3, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_Type_OneOfCase_Unfreeze = 4, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_Type_OneOfCase_DestroyFrozenFunds = 5, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_Type_OneOfCase_Transfer = 6, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_Type_OneOfCase_EmergencyAction = 7, + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_Type_OneOfCase_TokenConfigUpdate = 8, +}; + +/** + * Details for token events + **/ +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent : GPBMessage + +@property(nonatomic, readonly) GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_Type_OneOfCase typeOneOfCase; + +/** Mint event details */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent *mint; + +/** Burn event details */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent *burn; + +/** Freeze event details */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent *freeze; + +/** Unfreeze event details */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent *unfreeze; + +/** Destroy frozen funds */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent *destroyFrozenFunds; + +/** Transfer event details */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent *transfer; + +/** Emergency action details */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent *emergencyAction; + +/** Token configuration update details */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent *tokenConfigUpdate; + +@end + +/** + * Clears whatever value was set for the oneof 'type'. + **/ +void GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_ClearTypeOneOfCase(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent *message); + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry_FieldNumber_ActionId = 1, + GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry_FieldNumber_Event = 2, +}; + +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry : GPBMessage + +/** Unique identifier for the action */ +@property(nonatomic, readwrite, copy, null_resettable) NSData *actionId; + +/** The event data */ +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent *event; +/** Test to see if @c event has been set. */ +@property(nonatomic, readwrite) BOOL hasEvent; + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions + +typedef GPB_ENUM(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions_FieldNumber) { + GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions_FieldNumber_GroupActionsArray = 1, +}; + +GPB_FINAL @interface GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *groupActionsArray; +/** The number of items in @c groupActionsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger groupActionsArray_Count; + +@end + +#pragma mark - GetGroupActionSignersRequest + +typedef GPB_ENUM(GetGroupActionSignersRequest_FieldNumber) { + GetGroupActionSignersRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetGroupActionSignersRequest_Version_OneOfCase) { + GetGroupActionSignersRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupActionSignersRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetGroupActionSignersRequest : GPBMessage + +@property(nonatomic, readonly) GetGroupActionSignersRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetGroupActionSignersRequest_ClearVersionOneOfCase(GetGroupActionSignersRequest *message); + +#pragma mark - GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 + +typedef GPB_ENUM(GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber) { + GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber_ContractId = 1, + GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber_GroupContractPosition = 2, + GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber_Status = 3, + GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber_ActionId = 4, + GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber_Prove = 5, +}; + +GPB_FINAL @interface GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *contractId; + +@property(nonatomic, readwrite) uint32_t groupContractPosition; + +@property(nonatomic, readwrite) GetGroupActionSignersRequest_ActionStatus status; + +@property(nonatomic, readwrite, copy, null_resettable) NSData *actionId; + +@property(nonatomic, readwrite) BOOL prove; + +@end + +/** + * Fetches the raw value of a @c GetGroupActionSignersRequest_GetGroupActionSignersRequestV0's @c status property, even + * if the value was not defined by the enum at the time the code was generated. + **/ +int32_t GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_Status_RawValue(GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 *message); +/** + * Sets the raw value of an @c GetGroupActionSignersRequest_GetGroupActionSignersRequestV0's @c status property, allowing + * it to be set to a value that was not defined by the enum at the time the code + * was generated. + **/ +void SetGetGroupActionSignersRequest_GetGroupActionSignersRequestV0_Status_RawValue(GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 *message, int32_t value); + +#pragma mark - GetGroupActionSignersResponse + +typedef GPB_ENUM(GetGroupActionSignersResponse_FieldNumber) { + GetGroupActionSignersResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetGroupActionSignersResponse_Version_OneOfCase) { + GetGroupActionSignersResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupActionSignersResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetGroupActionSignersResponse : GPBMessage + +@property(nonatomic, readonly) GetGroupActionSignersResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetGroupActionSignersResponse_ClearVersionOneOfCase(GetGroupActionSignersResponse *message); + +#pragma mark - GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 + +typedef GPB_ENUM(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_FieldNumber) { + GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_FieldNumber_GroupActionSigners = 1, + GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_FieldNumber_Proof = 2, + GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_Result_OneOfCase) { + GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_Result_OneOfCase_GroupActionSigners = 1, + GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_Result_OneOfCase resultOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners *groupActionSigners; + +@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 GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_ClearResultOneOfCase(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 *message); + +#pragma mark - GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner + +typedef GPB_ENUM(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner_FieldNumber) { + GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner_FieldNumber_SignerId = 1, + GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner_FieldNumber_Power = 2, +}; + +GPB_FINAL @interface GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *signerId; + +@property(nonatomic, readwrite) uint32_t power; + +@end + +#pragma mark - GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners + +typedef GPB_ENUM(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners_FieldNumber) { + GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners_FieldNumber_SignersArray = 1, +}; + +GPB_FINAL @interface GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *signersArray; +/** The number of items in @c signersArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger signersArray_Count; + +@end + NS_ASSUME_NONNULL_END CF_EXTERN_C_END 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 e0bff0f273..2847d30bb6 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 @@ -105,6 +105,50 @@ GPBObjCClassDeclaration(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0); GPBObjCClassDeclaration(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodeProposedBlocks); GPBObjCClassDeclaration(GetEvonodesProposedEpochBlocksResponse_GetEvonodesProposedEpochBlocksResponseV0_EvonodesProposedBlocks); +GPBObjCClassDeclaration(GetGroupActionSignersRequest); +GPBObjCClassDeclaration(GetGroupActionSignersRequest_GetGroupActionSignersRequestV0); +GPBObjCClassDeclaration(GetGroupActionSignersResponse); +GPBObjCClassDeclaration(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0); +GPBObjCClassDeclaration(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner); +GPBObjCClassDeclaration(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners); +GPBObjCClassDeclaration(GetGroupActionsRequest); +GPBObjCClassDeclaration(GetGroupActionsRequest_GetGroupActionsRequestV0); +GPBObjCClassDeclaration(GetGroupActionsRequest_StartAtActionId); +GPBObjCClassDeclaration(GetGroupActionsResponse); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent); +GPBObjCClassDeclaration(GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent); +GPBObjCClassDeclaration(GetGroupInfoRequest); +GPBObjCClassDeclaration(GetGroupInfoRequest_GetGroupInfoRequestV0); +GPBObjCClassDeclaration(GetGroupInfoResponse); +GPBObjCClassDeclaration(GetGroupInfoResponse_GetGroupInfoResponseV0); +GPBObjCClassDeclaration(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo); +GPBObjCClassDeclaration(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry); +GPBObjCClassDeclaration(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry); +GPBObjCClassDeclaration(GetGroupInfosRequest); +GPBObjCClassDeclaration(GetGroupInfosRequest_GetGroupInfosRequestV0); +GPBObjCClassDeclaration(GetGroupInfosRequest_StartAtGroupContractPosition); +GPBObjCClassDeclaration(GetGroupInfosResponse); +GPBObjCClassDeclaration(GetGroupInfosResponse_GetGroupInfosResponseV0); +GPBObjCClassDeclaration(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos); +GPBObjCClassDeclaration(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry); +GPBObjCClassDeclaration(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry); GPBObjCClassDeclaration(GetIdentitiesBalancesRequest); GPBObjCClassDeclaration(GetIdentitiesBalancesRequest_GetIdentitiesBalancesRequestV0); GPBObjCClassDeclaration(GetIdentitiesBalancesResponse); @@ -118,6 +162,19 @@ GPBObjCClassDeclaration(GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentitiesKeys); GPBObjCClassDeclaration(GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_IdentityKeys); GPBObjCClassDeclaration(GetIdentitiesContractKeysResponse_GetIdentitiesContractKeysResponseV0_PurposeKeys); +GPBObjCClassDeclaration(GetIdentitiesTokenBalancesRequest); +GPBObjCClassDeclaration(GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0); +GPBObjCClassDeclaration(GetIdentitiesTokenBalancesResponse); +GPBObjCClassDeclaration(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0); +GPBObjCClassDeclaration(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry); +GPBObjCClassDeclaration(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances); +GPBObjCClassDeclaration(GetIdentitiesTokenInfosRequest); +GPBObjCClassDeclaration(GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0); +GPBObjCClassDeclaration(GetIdentitiesTokenInfosResponse); +GPBObjCClassDeclaration(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0); +GPBObjCClassDeclaration(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos); +GPBObjCClassDeclaration(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry); +GPBObjCClassDeclaration(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry); GPBObjCClassDeclaration(GetIdentityBalanceAndRevisionRequest); GPBObjCClassDeclaration(GetIdentityBalanceAndRevisionRequest_GetIdentityBalanceAndRevisionRequestV0); GPBObjCClassDeclaration(GetIdentityBalanceAndRevisionResponse); @@ -148,6 +205,19 @@ GPBObjCClassDeclaration(GetIdentityRequest_GetIdentityRequestV0); GPBObjCClassDeclaration(GetIdentityResponse); GPBObjCClassDeclaration(GetIdentityResponse_GetIdentityResponseV0); +GPBObjCClassDeclaration(GetIdentityTokenBalancesRequest); +GPBObjCClassDeclaration(GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0); +GPBObjCClassDeclaration(GetIdentityTokenBalancesResponse); +GPBObjCClassDeclaration(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0); +GPBObjCClassDeclaration(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry); +GPBObjCClassDeclaration(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances); +GPBObjCClassDeclaration(GetIdentityTokenInfosRequest); +GPBObjCClassDeclaration(GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0); +GPBObjCClassDeclaration(GetIdentityTokenInfosResponse); +GPBObjCClassDeclaration(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0); +GPBObjCClassDeclaration(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry); +GPBObjCClassDeclaration(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry); +GPBObjCClassDeclaration(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos); GPBObjCClassDeclaration(GetPathElementsRequest); GPBObjCClassDeclaration(GetPathElementsRequest_GetPathElementsRequestV0); GPBObjCClassDeclaration(GetPathElementsResponse); @@ -162,6 +232,9 @@ GPBObjCClassDeclaration(GetProofsRequest_GetProofsRequestV0_ContractRequest); GPBObjCClassDeclaration(GetProofsRequest_GetProofsRequestV0_DocumentRequest); GPBObjCClassDeclaration(GetProofsRequest_GetProofsRequestV0_IdentityRequest); +GPBObjCClassDeclaration(GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest); +GPBObjCClassDeclaration(GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest); +GPBObjCClassDeclaration(GetProofsRequest_GetProofsRequestV0_TokenStatusRequest); GPBObjCClassDeclaration(GetProofsRequest_GetProofsRequestV0_VoteStatusRequest); GPBObjCClassDeclaration(GetProofsRequest_GetProofsRequestV0_VoteStatusRequest_ContestedResourceVoteStatusRequest); GPBObjCClassDeclaration(GetProofsResponse); @@ -192,6 +265,17 @@ GPBObjCClassDeclaration(GetStatusResponse_GetStatusResponseV0_Version_Protocol_Drive); GPBObjCClassDeclaration(GetStatusResponse_GetStatusResponseV0_Version_Protocol_Tenderdash); GPBObjCClassDeclaration(GetStatusResponse_GetStatusResponseV0_Version_Software); +GPBObjCClassDeclaration(GetTokenStatusesRequest); +GPBObjCClassDeclaration(GetTokenStatusesRequest_GetTokenStatusesRequestV0); +GPBObjCClassDeclaration(GetTokenStatusesResponse); +GPBObjCClassDeclaration(GetTokenStatusesResponse_GetTokenStatusesResponseV0); +GPBObjCClassDeclaration(GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry); +GPBObjCClassDeclaration(GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses); +GPBObjCClassDeclaration(GetTokenTotalSupplyRequest); +GPBObjCClassDeclaration(GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0); +GPBObjCClassDeclaration(GetTokenTotalSupplyResponse); +GPBObjCClassDeclaration(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0); +GPBObjCClassDeclaration(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry); GPBObjCClassDeclaration(GetTotalCreditsInPlatformRequest); GPBObjCClassDeclaration(GetTotalCreditsInPlatformRequest_GetTotalCreditsInPlatformRequestV0); GPBObjCClassDeclaration(GetTotalCreditsInPlatformResponse); @@ -3949,6 +4033,9 @@ @implementation GetProofsRequest_GetProofsRequestV0 @dynamic contractsArray, contractsArray_Count; @dynamic documentsArray, documentsArray_Count; @dynamic votesArray, votesArray_Count; +@dynamic identityTokenBalancesArray, identityTokenBalancesArray_Count; +@dynamic identityTokenInfosArray, identityTokenInfosArray_Count; +@dynamic tokenStatusesArray, tokenStatusesArray_Count; typedef struct GetProofsRequest_GetProofsRequestV0__storage_ { uint32_t _has_storage_[1]; @@ -3956,6 +4043,9 @@ @implementation GetProofsRequest_GetProofsRequestV0 NSMutableArray *contractsArray; NSMutableArray *documentsArray; NSMutableArray *votesArray; + NSMutableArray *identityTokenBalancesArray; + NSMutableArray *identityTokenInfosArray; + NSMutableArray *tokenStatusesArray; } GetProofsRequest_GetProofsRequestV0__storage_; // This method is threadsafe because it is initially called @@ -4000,6 +4090,33 @@ + (GPBDescriptor *)descriptor { .flags = GPBFieldRepeated, .dataType = GPBDataTypeMessage, }, + { + .name = "identityTokenBalancesArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest), + .number = GetProofsRequest_GetProofsRequestV0_FieldNumber_IdentityTokenBalancesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetProofsRequest_GetProofsRequestV0__storage_, identityTokenBalancesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + { + .name = "identityTokenInfosArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest), + .number = GetProofsRequest_GetProofsRequestV0_FieldNumber_IdentityTokenInfosArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetProofsRequest_GetProofsRequestV0__storage_, identityTokenInfosArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + { + .name = "tokenStatusesArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetProofsRequest_GetProofsRequestV0_TokenStatusRequest), + .number = GetProofsRequest_GetProofsRequestV0_FieldNumber_TokenStatusesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetProofsRequest_GetProofsRequestV0__storage_, tokenStatusesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, }; GPBDescriptor *localDescriptor = [GPBDescriptor allocDescriptorForClass:[GetProofsRequest_GetProofsRequestV0 class] @@ -4460,6 +4577,166 @@ + (GPBDescriptor *)descriptor { @end +#pragma mark - GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest + +@implementation GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest + +@dynamic tokenId; +@dynamic identityId; + +typedef struct GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest__storage_ { + uint32_t _has_storage_[1]; + NSData *tokenId; + NSData *identityId; +} GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest__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 = "tokenId", + .dataTypeSpecific.clazz = Nil, + .number = GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest_FieldNumber_TokenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest__storage_, tokenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "identityId", + .dataTypeSpecific.clazz = Nil, + .number = GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest_FieldNumber_IdentityId, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest__storage_, identityId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetProofsRequest_GetProofsRequestV0_IdentityTokenBalanceRequest__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetProofsRequest_GetProofsRequestV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest + +@implementation GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest + +@dynamic tokenId; +@dynamic identityId; + +typedef struct GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest__storage_ { + uint32_t _has_storage_[1]; + NSData *tokenId; + NSData *identityId; +} GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest__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 = "tokenId", + .dataTypeSpecific.clazz = Nil, + .number = GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest_FieldNumber_TokenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest__storage_, tokenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "identityId", + .dataTypeSpecific.clazz = Nil, + .number = GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest_FieldNumber_IdentityId, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest__storage_, identityId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetProofsRequest_GetProofsRequestV0_IdentityTokenInfoRequest__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetProofsRequest_GetProofsRequestV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetProofsRequest_GetProofsRequestV0_TokenStatusRequest + +@implementation GetProofsRequest_GetProofsRequestV0_TokenStatusRequest + +@dynamic tokenId; + +typedef struct GetProofsRequest_GetProofsRequestV0_TokenStatusRequest__storage_ { + uint32_t _has_storage_[1]; + NSData *tokenId; +} GetProofsRequest_GetProofsRequestV0_TokenStatusRequest__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 = "tokenId", + .dataTypeSpecific.clazz = Nil, + .number = GetProofsRequest_GetProofsRequestV0_TokenStatusRequest_FieldNumber_TokenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetProofsRequest_GetProofsRequestV0_TokenStatusRequest__storage_, tokenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetProofsRequest_GetProofsRequestV0_TokenStatusRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetProofsRequest_GetProofsRequestV0_TokenStatusRequest__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetProofsRequest_GetProofsRequestV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + #pragma mark - GetProofsResponse @implementation GetProofsResponse @@ -12826,6 +13103,5192 @@ + (GPBDescriptor *)descriptor { @end +#pragma mark - GetIdentityTokenBalancesRequest + +@implementation GetIdentityTokenBalancesRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetIdentityTokenBalancesRequest__storage_ { + uint32_t _has_storage_[2]; + GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 *v0; +} GetIdentityTokenBalancesRequest__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(GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0), + .number = GetIdentityTokenBalancesRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentityTokenBalancesRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenBalancesRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenBalancesRequest__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 GetIdentityTokenBalancesRequest_ClearVersionOneOfCase(GetIdentityTokenBalancesRequest *message) { + GPBDescriptor *descriptor = [GetIdentityTokenBalancesRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 + +@implementation GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 + +@dynamic identityId; +@dynamic tokenIdsArray, tokenIdsArray_Count; +@dynamic prove; + +typedef struct GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0__storage_ { + uint32_t _has_storage_[1]; + NSData *identityId; + NSMutableArray *tokenIdsArray; +} GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0__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 = GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0_FieldNumber_IdentityId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0__storage_, identityId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "tokenIdsArray", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0_FieldNumber_TokenIdsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0__storage_, tokenIdsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeBytes, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0_FieldNumber_Prove, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenBalancesRequest_GetIdentityTokenBalancesRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentityTokenBalancesRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentityTokenBalancesResponse + +@implementation GetIdentityTokenBalancesResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetIdentityTokenBalancesResponse__storage_ { + uint32_t _has_storage_[2]; + GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 *v0; +} GetIdentityTokenBalancesResponse__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(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0), + .number = GetIdentityTokenBalancesResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentityTokenBalancesResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenBalancesResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenBalancesResponse__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 GetIdentityTokenBalancesResponse_ClearVersionOneOfCase(GetIdentityTokenBalancesResponse *message) { + GPBDescriptor *descriptor = [GetIdentityTokenBalancesResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 + +@implementation GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 + +@dynamic resultOneOfCase; +@dynamic tokenBalances; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances *tokenBalances; + Proof *proof; + ResponseMetadata *metadata; +} GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0__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 = "tokenBalances", + .dataTypeSpecific.clazz = GPBObjCClass(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances), + .number = GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_FieldNumber_TokenBalances, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0__storage_, tokenBalances), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0__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(GetIdentityTokenBalancesResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_ClearResultOneOfCase(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 *message) { + GPBDescriptor *descriptor = [GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry + +@implementation GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry + +@dynamic tokenId; +@dynamic hasBalance, balance; + +typedef struct GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry__storage_ { + uint32_t _has_storage_[1]; + NSData *tokenId; + uint64_t balance; +} GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry__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 = "tokenId", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry_FieldNumber_TokenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry__storage_, tokenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "balance", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry_FieldNumber_Balance, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry__storage_, balance), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt64, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances + +@implementation GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances + +@dynamic tokenBalancesArray, tokenBalancesArray_Count; + +typedef struct GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *tokenBalancesArray; +} GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances__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 = "tokenBalancesArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalanceEntry), + .number = GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances_FieldNumber_TokenBalancesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances__storage_, tokenBalancesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0_TokenBalances__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentityTokenBalancesResponse_GetIdentityTokenBalancesResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentitiesTokenBalancesRequest + +@implementation GetIdentitiesTokenBalancesRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetIdentitiesTokenBalancesRequest__storage_ { + uint32_t _has_storage_[2]; + GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 *v0; +} GetIdentitiesTokenBalancesRequest__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(GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0), + .number = GetIdentitiesTokenBalancesRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentitiesTokenBalancesRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenBalancesRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenBalancesRequest__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 GetIdentitiesTokenBalancesRequest_ClearVersionOneOfCase(GetIdentitiesTokenBalancesRequest *message) { + GPBDescriptor *descriptor = [GetIdentitiesTokenBalancesRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 + +@implementation GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 + +@dynamic tokenId; +@dynamic identityIdsArray, identityIdsArray_Count; +@dynamic prove; + +typedef struct GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0__storage_ { + uint32_t _has_storage_[1]; + NSData *tokenId; + NSMutableArray *identityIdsArray; +} GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0__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 = "tokenId", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0_FieldNumber_TokenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0__storage_, tokenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "identityIdsArray", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0_FieldNumber_IdentityIdsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0__storage_, identityIdsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeBytes, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0_FieldNumber_Prove, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenBalancesRequest_GetIdentitiesTokenBalancesRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentitiesTokenBalancesRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentitiesTokenBalancesResponse + +@implementation GetIdentitiesTokenBalancesResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetIdentitiesTokenBalancesResponse__storage_ { + uint32_t _has_storage_[2]; + GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 *v0; +} GetIdentitiesTokenBalancesResponse__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(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0), + .number = GetIdentitiesTokenBalancesResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentitiesTokenBalancesResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenBalancesResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenBalancesResponse__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 GetIdentitiesTokenBalancesResponse_ClearVersionOneOfCase(GetIdentitiesTokenBalancesResponse *message) { + GPBDescriptor *descriptor = [GetIdentitiesTokenBalancesResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 + +@implementation GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 + +@dynamic resultOneOfCase; +@dynamic identityTokenBalances; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances *identityTokenBalances; + Proof *proof; + ResponseMetadata *metadata; +} GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0__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 = "identityTokenBalances", + .dataTypeSpecific.clazz = GPBObjCClass(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances), + .number = GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_FieldNumber_IdentityTokenBalances, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0__storage_, identityTokenBalances), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0__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(GetIdentitiesTokenBalancesResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_ClearResultOneOfCase(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 *message) { + GPBDescriptor *descriptor = [GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry + +@implementation GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry + +@dynamic identityId; +@dynamic hasBalance, balance; + +typedef struct GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry__storage_ { + uint32_t _has_storage_[1]; + NSData *identityId; + uint64_t balance; +} GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry__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 = GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry_FieldNumber_IdentityId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry__storage_, identityId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "balance", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry_FieldNumber_Balance, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry__storage_, balance), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt64, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances + +@implementation GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances + +@dynamic identityTokenBalancesArray, identityTokenBalancesArray_Count; + +typedef struct GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *identityTokenBalancesArray; +} GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances__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 = "identityTokenBalancesArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalanceEntry), + .number = GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances_FieldNumber_IdentityTokenBalancesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances__storage_, identityTokenBalancesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0_IdentityTokenBalances__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentitiesTokenBalancesResponse_GetIdentitiesTokenBalancesResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentityTokenInfosRequest + +@implementation GetIdentityTokenInfosRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetIdentityTokenInfosRequest__storage_ { + uint32_t _has_storage_[2]; + GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 *v0; +} GetIdentityTokenInfosRequest__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(GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0), + .number = GetIdentityTokenInfosRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentityTokenInfosRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenInfosRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenInfosRequest__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 GetIdentityTokenInfosRequest_ClearVersionOneOfCase(GetIdentityTokenInfosRequest *message) { + GPBDescriptor *descriptor = [GetIdentityTokenInfosRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 + +@implementation GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 + +@dynamic identityId; +@dynamic tokenIdsArray, tokenIdsArray_Count; +@dynamic prove; + +typedef struct GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0__storage_ { + uint32_t _has_storage_[1]; + NSData *identityId; + NSMutableArray *tokenIdsArray; +} GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0__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 = GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0_FieldNumber_IdentityId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0__storage_, identityId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "tokenIdsArray", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0_FieldNumber_TokenIdsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0__storage_, tokenIdsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeBytes, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0_FieldNumber_Prove, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenInfosRequest_GetIdentityTokenInfosRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentityTokenInfosRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentityTokenInfosResponse + +@implementation GetIdentityTokenInfosResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetIdentityTokenInfosResponse__storage_ { + uint32_t _has_storage_[2]; + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 *v0; +} GetIdentityTokenInfosResponse__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(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0), + .number = GetIdentityTokenInfosResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentityTokenInfosResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenInfosResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenInfosResponse__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 GetIdentityTokenInfosResponse_ClearVersionOneOfCase(GetIdentityTokenInfosResponse *message) { + GPBDescriptor *descriptor = [GetIdentityTokenInfosResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 + +@implementation GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 + +@dynamic resultOneOfCase; +@dynamic tokenInfos; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos *tokenInfos; + Proof *proof; + ResponseMetadata *metadata; +} GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0__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 = "tokenInfos", + .dataTypeSpecific.clazz = GPBObjCClass(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos), + .number = GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_FieldNumber_TokenInfos, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0__storage_, tokenInfos), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0__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(GetIdentityTokenInfosResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_ClearResultOneOfCase(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 *message) { + GPBDescriptor *descriptor = [GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry + +@implementation GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry + +@dynamic frozen; + +typedef struct GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry__storage_ { + uint32_t _has_storage_[1]; +} GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry__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 = "frozen", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry_FieldNumber_Frozen, + .hasIndex = 0, + .offset = 1, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry + +@implementation GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry + +@dynamic tokenId; +@dynamic hasInfo, info; + +typedef struct GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry__storage_ { + uint32_t _has_storage_[1]; + NSData *tokenId; + GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry *info; +} GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry__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 = "tokenId", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry_FieldNumber_TokenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry__storage_, tokenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "info", + .dataTypeSpecific.clazz = GPBObjCClass(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenIdentityInfoEntry), + .number = GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry_FieldNumber_Info, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry__storage_, info), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos + +@implementation GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos + +@dynamic tokenInfosArray, tokenInfosArray_Count; + +typedef struct GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *tokenInfosArray; +} GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos__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 = "tokenInfosArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfoEntry), + .number = GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos_FieldNumber_TokenInfosArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos__storage_, tokenInfosArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0_TokenInfos__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentityTokenInfosResponse_GetIdentityTokenInfosResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentitiesTokenInfosRequest + +@implementation GetIdentitiesTokenInfosRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetIdentitiesTokenInfosRequest__storage_ { + uint32_t _has_storage_[2]; + GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 *v0; +} GetIdentitiesTokenInfosRequest__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(GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0), + .number = GetIdentitiesTokenInfosRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentitiesTokenInfosRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenInfosRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenInfosRequest__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 GetIdentitiesTokenInfosRequest_ClearVersionOneOfCase(GetIdentitiesTokenInfosRequest *message) { + GPBDescriptor *descriptor = [GetIdentitiesTokenInfosRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 + +@implementation GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 + +@dynamic tokenId; +@dynamic identityIdsArray, identityIdsArray_Count; +@dynamic prove; + +typedef struct GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0__storage_ { + uint32_t _has_storage_[1]; + NSData *tokenId; + NSMutableArray *identityIdsArray; +} GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0__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 = "tokenId", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0_FieldNumber_TokenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0__storage_, tokenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "identityIdsArray", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0_FieldNumber_IdentityIdsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0__storage_, identityIdsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeBytes, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0_FieldNumber_Prove, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenInfosRequest_GetIdentitiesTokenInfosRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentitiesTokenInfosRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentitiesTokenInfosResponse + +@implementation GetIdentitiesTokenInfosResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetIdentitiesTokenInfosResponse__storage_ { + uint32_t _has_storage_[2]; + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 *v0; +} GetIdentitiesTokenInfosResponse__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(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0), + .number = GetIdentitiesTokenInfosResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentitiesTokenInfosResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenInfosResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenInfosResponse__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 GetIdentitiesTokenInfosResponse_ClearVersionOneOfCase(GetIdentitiesTokenInfosResponse *message) { + GPBDescriptor *descriptor = [GetIdentitiesTokenInfosResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 + +@implementation GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 + +@dynamic resultOneOfCase; +@dynamic identityTokenInfos; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos *identityTokenInfos; + Proof *proof; + ResponseMetadata *metadata; +} GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0__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 = "identityTokenInfos", + .dataTypeSpecific.clazz = GPBObjCClass(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos), + .number = GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_FieldNumber_IdentityTokenInfos, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0__storage_, identityTokenInfos), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0__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(GetIdentitiesTokenInfosResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_ClearResultOneOfCase(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 *message) { + GPBDescriptor *descriptor = [GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry + +@implementation GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry + +@dynamic frozen; + +typedef struct GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry__storage_ { + uint32_t _has_storage_[1]; +} GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry__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 = "frozen", + .dataTypeSpecific.clazz = Nil, + .number = GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry_FieldNumber_Frozen, + .hasIndex = 0, + .offset = 1, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry + +@implementation GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry + +@dynamic identityId; +@dynamic hasInfo, info; + +typedef struct GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry__storage_ { + uint32_t _has_storage_[1]; + NSData *identityId; + GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry *info; +} GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry__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 = GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry_FieldNumber_IdentityId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry__storage_, identityId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "info", + .dataTypeSpecific.clazz = GPBObjCClass(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenIdentityInfoEntry), + .number = GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry_FieldNumber_Info, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry__storage_, info), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos + +@implementation GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos + +@dynamic tokenInfosArray, tokenInfosArray_Count; + +typedef struct GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *tokenInfosArray; +} GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos__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 = "tokenInfosArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_TokenInfoEntry), + .number = GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos_FieldNumber_TokenInfosArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos__storage_, tokenInfosArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0_IdentityTokenInfos__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetIdentitiesTokenInfosResponse_GetIdentitiesTokenInfosResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetTokenStatusesRequest + +@implementation GetTokenStatusesRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetTokenStatusesRequest__storage_ { + uint32_t _has_storage_[2]; + GetTokenStatusesRequest_GetTokenStatusesRequestV0 *v0; +} GetTokenStatusesRequest__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(GetTokenStatusesRequest_GetTokenStatusesRequestV0), + .number = GetTokenStatusesRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetTokenStatusesRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenStatusesRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenStatusesRequest__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 GetTokenStatusesRequest_ClearVersionOneOfCase(GetTokenStatusesRequest *message) { + GPBDescriptor *descriptor = [GetTokenStatusesRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetTokenStatusesRequest_GetTokenStatusesRequestV0 + +@implementation GetTokenStatusesRequest_GetTokenStatusesRequestV0 + +@dynamic tokenIdsArray, tokenIdsArray_Count; +@dynamic prove; + +typedef struct GetTokenStatusesRequest_GetTokenStatusesRequestV0__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *tokenIdsArray; +} GetTokenStatusesRequest_GetTokenStatusesRequestV0__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 = "tokenIdsArray", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenStatusesRequest_GetTokenStatusesRequestV0_FieldNumber_TokenIdsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetTokenStatusesRequest_GetTokenStatusesRequestV0__storage_, tokenIdsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeBytes, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenStatusesRequest_GetTokenStatusesRequestV0_FieldNumber_Prove, + .hasIndex = 0, + .offset = 1, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenStatusesRequest_GetTokenStatusesRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenStatusesRequest_GetTokenStatusesRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetTokenStatusesRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetTokenStatusesResponse + +@implementation GetTokenStatusesResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetTokenStatusesResponse__storage_ { + uint32_t _has_storage_[2]; + GetTokenStatusesResponse_GetTokenStatusesResponseV0 *v0; +} GetTokenStatusesResponse__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(GetTokenStatusesResponse_GetTokenStatusesResponseV0), + .number = GetTokenStatusesResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetTokenStatusesResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenStatusesResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenStatusesResponse__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 GetTokenStatusesResponse_ClearVersionOneOfCase(GetTokenStatusesResponse *message) { + GPBDescriptor *descriptor = [GetTokenStatusesResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetTokenStatusesResponse_GetTokenStatusesResponseV0 + +@implementation GetTokenStatusesResponse_GetTokenStatusesResponseV0 + +@dynamic resultOneOfCase; +@dynamic tokenStatuses; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetTokenStatusesResponse_GetTokenStatusesResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses *tokenStatuses; + Proof *proof; + ResponseMetadata *metadata; +} GetTokenStatusesResponse_GetTokenStatusesResponseV0__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 = "tokenStatuses", + .dataTypeSpecific.clazz = GPBObjCClass(GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses), + .number = GetTokenStatusesResponse_GetTokenStatusesResponseV0_FieldNumber_TokenStatuses, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetTokenStatusesResponse_GetTokenStatusesResponseV0__storage_, tokenStatuses), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetTokenStatusesResponse_GetTokenStatusesResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetTokenStatusesResponse_GetTokenStatusesResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetTokenStatusesResponse_GetTokenStatusesResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetTokenStatusesResponse_GetTokenStatusesResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenStatusesResponse_GetTokenStatusesResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenStatusesResponse_GetTokenStatusesResponseV0__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(GetTokenStatusesResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetTokenStatusesResponse_GetTokenStatusesResponseV0_ClearResultOneOfCase(GetTokenStatusesResponse_GetTokenStatusesResponseV0 *message) { + GPBDescriptor *descriptor = [GetTokenStatusesResponse_GetTokenStatusesResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry + +@implementation GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry + +@dynamic tokenId; +@dynamic hasPaused, paused; + +typedef struct GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry__storage_ { + uint32_t _has_storage_[1]; + NSData *tokenId; +} GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry__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 = "tokenId", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry_FieldNumber_TokenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry__storage_, tokenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "paused", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry_FieldNumber_Paused, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetTokenStatusesResponse_GetTokenStatusesResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses + +@implementation GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses + +@dynamic tokenStatusesArray, tokenStatusesArray_Count; + +typedef struct GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *tokenStatusesArray; +} GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses__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 = "tokenStatusesArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatusEntry), + .number = GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses_FieldNumber_TokenStatusesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses__storage_, tokenStatusesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenStatusesResponse_GetTokenStatusesResponseV0_TokenStatuses__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetTokenStatusesResponse_GetTokenStatusesResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetTokenTotalSupplyRequest + +@implementation GetTokenTotalSupplyRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetTokenTotalSupplyRequest__storage_ { + uint32_t _has_storage_[2]; + GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 *v0; +} GetTokenTotalSupplyRequest__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(GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0), + .number = GetTokenTotalSupplyRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetTokenTotalSupplyRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenTotalSupplyRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenTotalSupplyRequest__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 GetTokenTotalSupplyRequest_ClearVersionOneOfCase(GetTokenTotalSupplyRequest *message) { + GPBDescriptor *descriptor = [GetTokenTotalSupplyRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 + +@implementation GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 + +@dynamic tokenId; +@dynamic prove; + +typedef struct GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0__storage_ { + uint32_t _has_storage_[1]; + NSData *tokenId; +} GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0__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 = "tokenId", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0_FieldNumber_TokenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0__storage_, tokenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0_FieldNumber_Prove, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenTotalSupplyRequest_GetTokenTotalSupplyRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetTokenTotalSupplyRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetTokenTotalSupplyResponse + +@implementation GetTokenTotalSupplyResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetTokenTotalSupplyResponse__storage_ { + uint32_t _has_storage_[2]; + GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 *v0; +} GetTokenTotalSupplyResponse__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(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0), + .number = GetTokenTotalSupplyResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetTokenTotalSupplyResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenTotalSupplyResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenTotalSupplyResponse__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 GetTokenTotalSupplyResponse_ClearVersionOneOfCase(GetTokenTotalSupplyResponse *message) { + GPBDescriptor *descriptor = [GetTokenTotalSupplyResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 + +@implementation GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 + +@dynamic resultOneOfCase; +@dynamic tokenTotalSupply; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry *tokenTotalSupply; + Proof *proof; + ResponseMetadata *metadata; +} GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0__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 = "tokenTotalSupply", + .dataTypeSpecific.clazz = GPBObjCClass(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry), + .number = GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_FieldNumber_TokenTotalSupply, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0__storage_, tokenTotalSupply), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0__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(GetTokenTotalSupplyResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_ClearResultOneOfCase(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 *message) { + GPBDescriptor *descriptor = [GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry + +@implementation GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry + +@dynamic tokenId; +@dynamic totalAggregatedAmountInUserAccounts; +@dynamic totalSystemAmount; + +typedef struct GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry__storage_ { + uint32_t _has_storage_[1]; + NSData *tokenId; + uint64_t totalAggregatedAmountInUserAccounts; + uint64_t totalSystemAmount; +} GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry__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 = "tokenId", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry_FieldNumber_TokenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry__storage_, tokenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "totalAggregatedAmountInUserAccounts", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry_FieldNumber_TotalAggregatedAmountInUserAccounts, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry__storage_, totalAggregatedAmountInUserAccounts), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + { + .name = "totalSystemAmount", + .dataTypeSpecific.clazz = Nil, + .number = GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry_FieldNumber_TotalSystemAmount, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry__storage_, totalSystemAmount), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0_TokenTotalSupplyEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetTokenTotalSupplyResponse_GetTokenTotalSupplyResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupInfoRequest + +@implementation GetGroupInfoRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetGroupInfoRequest__storage_ { + uint32_t _has_storage_[2]; + GetGroupInfoRequest_GetGroupInfoRequestV0 *v0; +} GetGroupInfoRequest__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(GetGroupInfoRequest_GetGroupInfoRequestV0), + .number = GetGroupInfoRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupInfoRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfoRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfoRequest__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 GetGroupInfoRequest_ClearVersionOneOfCase(GetGroupInfoRequest *message) { + GPBDescriptor *descriptor = [GetGroupInfoRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupInfoRequest_GetGroupInfoRequestV0 + +@implementation GetGroupInfoRequest_GetGroupInfoRequestV0 + +@dynamic contractId; +@dynamic groupContractPosition; +@dynamic prove; + +typedef struct GetGroupInfoRequest_GetGroupInfoRequestV0__storage_ { + uint32_t _has_storage_[1]; + uint32_t groupContractPosition; + NSData *contractId; +} GetGroupInfoRequest_GetGroupInfoRequestV0__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 = "contractId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfoRequest_GetGroupInfoRequestV0_FieldNumber_ContractId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupInfoRequest_GetGroupInfoRequestV0__storage_, contractId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "groupContractPosition", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfoRequest_GetGroupInfoRequestV0_FieldNumber_GroupContractPosition, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupInfoRequest_GetGroupInfoRequestV0__storage_, groupContractPosition), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfoRequest_GetGroupInfoRequestV0_FieldNumber_Prove, + .hasIndex = 2, + .offset = 3, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfoRequest_GetGroupInfoRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfoRequest_GetGroupInfoRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupInfoRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupInfoResponse + +@implementation GetGroupInfoResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetGroupInfoResponse__storage_ { + uint32_t _has_storage_[2]; + GetGroupInfoResponse_GetGroupInfoResponseV0 *v0; +} GetGroupInfoResponse__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(GetGroupInfoResponse_GetGroupInfoResponseV0), + .number = GetGroupInfoResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupInfoResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfoResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfoResponse__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 GetGroupInfoResponse_ClearVersionOneOfCase(GetGroupInfoResponse *message) { + GPBDescriptor *descriptor = [GetGroupInfoResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupInfoResponse_GetGroupInfoResponseV0 + +@implementation GetGroupInfoResponse_GetGroupInfoResponseV0 + +@dynamic resultOneOfCase; +@dynamic groupInfo; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetGroupInfoResponse_GetGroupInfoResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo *groupInfo; + Proof *proof; + ResponseMetadata *metadata; +} GetGroupInfoResponse_GetGroupInfoResponseV0__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 = "groupInfo", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo), + .number = GetGroupInfoResponse_GetGroupInfoResponseV0_FieldNumber_GroupInfo, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupInfoResponse_GetGroupInfoResponseV0__storage_, groupInfo), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetGroupInfoResponse_GetGroupInfoResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupInfoResponse_GetGroupInfoResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetGroupInfoResponse_GetGroupInfoResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupInfoResponse_GetGroupInfoResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfoResponse_GetGroupInfoResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfoResponse_GetGroupInfoResponseV0__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(GetGroupInfoResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetGroupInfoResponse_GetGroupInfoResponseV0_ClearResultOneOfCase(GetGroupInfoResponse_GetGroupInfoResponseV0 *message) { + GPBDescriptor *descriptor = [GetGroupInfoResponse_GetGroupInfoResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry + +@implementation GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry + +@dynamic memberId; +@dynamic power; + +typedef struct GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry__storage_ { + uint32_t _has_storage_[1]; + uint32_t power; + NSData *memberId; +} GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry__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 = "memberId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry_FieldNumber_MemberId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry__storage_, memberId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "power", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry_FieldNumber_Power, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry__storage_, power), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupInfoResponse_GetGroupInfoResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry + +@implementation GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry + +@dynamic membersArray, membersArray_Count; +@dynamic groupRequiredPower; + +typedef struct GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry__storage_ { + uint32_t _has_storage_[1]; + uint32_t groupRequiredPower; + NSMutableArray *membersArray; +} GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry__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 = "membersArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupMemberEntry), + .number = GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry_FieldNumber_MembersArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry__storage_, membersArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + { + .name = "groupRequiredPower", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry_FieldNumber_GroupRequiredPower, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry__storage_, groupRequiredPower), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupInfoResponse_GetGroupInfoResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo + +@implementation GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo + +@dynamic hasGroupInfo, groupInfo; + +typedef struct GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo__storage_ { + uint32_t _has_storage_[1]; + GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry *groupInfo; +} GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo__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 = "groupInfo", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfoEntry), + .number = GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo_FieldNumber_GroupInfo, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo__storage_, groupInfo), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfoResponse_GetGroupInfoResponseV0_GroupInfo__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupInfoResponse_GetGroupInfoResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupInfosRequest + +@implementation GetGroupInfosRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetGroupInfosRequest__storage_ { + uint32_t _has_storage_[2]; + GetGroupInfosRequest_GetGroupInfosRequestV0 *v0; +} GetGroupInfosRequest__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(GetGroupInfosRequest_GetGroupInfosRequestV0), + .number = GetGroupInfosRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupInfosRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfosRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfosRequest__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 GetGroupInfosRequest_ClearVersionOneOfCase(GetGroupInfosRequest *message) { + GPBDescriptor *descriptor = [GetGroupInfosRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupInfosRequest_StartAtGroupContractPosition + +@implementation GetGroupInfosRequest_StartAtGroupContractPosition + +@dynamic startGroupContractPosition; +@dynamic startGroupContractPositionIncluded; + +typedef struct GetGroupInfosRequest_StartAtGroupContractPosition__storage_ { + uint32_t _has_storage_[1]; + uint32_t startGroupContractPosition; +} GetGroupInfosRequest_StartAtGroupContractPosition__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 = "startGroupContractPosition", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfosRequest_StartAtGroupContractPosition_FieldNumber_StartGroupContractPosition, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupInfosRequest_StartAtGroupContractPosition__storage_, startGroupContractPosition), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + { + .name = "startGroupContractPositionIncluded", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfosRequest_StartAtGroupContractPosition_FieldNumber_StartGroupContractPositionIncluded, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfosRequest_StartAtGroupContractPosition class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfosRequest_StartAtGroupContractPosition__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupInfosRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupInfosRequest_GetGroupInfosRequestV0 + +@implementation GetGroupInfosRequest_GetGroupInfosRequestV0 + +@dynamic contractId; +@dynamic hasStartAtGroupContractPosition, startAtGroupContractPosition; +@dynamic hasCount, count; +@dynamic prove; + +typedef struct GetGroupInfosRequest_GetGroupInfosRequestV0__storage_ { + uint32_t _has_storage_[1]; + uint32_t count; + NSData *contractId; + GetGroupInfosRequest_StartAtGroupContractPosition *startAtGroupContractPosition; +} GetGroupInfosRequest_GetGroupInfosRequestV0__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 = "contractId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfosRequest_GetGroupInfosRequestV0_FieldNumber_ContractId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupInfosRequest_GetGroupInfosRequestV0__storage_, contractId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "startAtGroupContractPosition", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupInfosRequest_StartAtGroupContractPosition), + .number = GetGroupInfosRequest_GetGroupInfosRequestV0_FieldNumber_StartAtGroupContractPosition, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupInfosRequest_GetGroupInfosRequestV0__storage_, startAtGroupContractPosition), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "count", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfosRequest_GetGroupInfosRequestV0_FieldNumber_Count, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetGroupInfosRequest_GetGroupInfosRequestV0__storage_, count), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt32, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfosRequest_GetGroupInfosRequestV0_FieldNumber_Prove, + .hasIndex = 3, + .offset = 4, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfosRequest_GetGroupInfosRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfosRequest_GetGroupInfosRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupInfosRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupInfosResponse + +@implementation GetGroupInfosResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetGroupInfosResponse__storage_ { + uint32_t _has_storage_[2]; + GetGroupInfosResponse_GetGroupInfosResponseV0 *v0; +} GetGroupInfosResponse__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(GetGroupInfosResponse_GetGroupInfosResponseV0), + .number = GetGroupInfosResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupInfosResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfosResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfosResponse__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 GetGroupInfosResponse_ClearVersionOneOfCase(GetGroupInfosResponse *message) { + GPBDescriptor *descriptor = [GetGroupInfosResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupInfosResponse_GetGroupInfosResponseV0 + +@implementation GetGroupInfosResponse_GetGroupInfosResponseV0 + +@dynamic resultOneOfCase; +@dynamic groupInfos; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetGroupInfosResponse_GetGroupInfosResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos *groupInfos; + Proof *proof; + ResponseMetadata *metadata; +} GetGroupInfosResponse_GetGroupInfosResponseV0__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 = "groupInfos", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos), + .number = GetGroupInfosResponse_GetGroupInfosResponseV0_FieldNumber_GroupInfos, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupInfosResponse_GetGroupInfosResponseV0__storage_, groupInfos), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetGroupInfosResponse_GetGroupInfosResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupInfosResponse_GetGroupInfosResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetGroupInfosResponse_GetGroupInfosResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupInfosResponse_GetGroupInfosResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfosResponse_GetGroupInfosResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfosResponse_GetGroupInfosResponseV0__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(GetGroupInfosResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetGroupInfosResponse_GetGroupInfosResponseV0_ClearResultOneOfCase(GetGroupInfosResponse_GetGroupInfosResponseV0 *message) { + GPBDescriptor *descriptor = [GetGroupInfosResponse_GetGroupInfosResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry + +@implementation GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry + +@dynamic memberId; +@dynamic power; + +typedef struct GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry__storage_ { + uint32_t _has_storage_[1]; + uint32_t power; + NSData *memberId; +} GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry__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 = "memberId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry_FieldNumber_MemberId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry__storage_, memberId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "power", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry_FieldNumber_Power, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry__storage_, power), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupInfosResponse_GetGroupInfosResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry + +@implementation GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry + +@dynamic groupContractPosition; +@dynamic membersArray, membersArray_Count; +@dynamic groupRequiredPower; + +typedef struct GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry__storage_ { + uint32_t _has_storage_[1]; + uint32_t groupContractPosition; + uint32_t groupRequiredPower; + NSMutableArray *membersArray; +} GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry__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 = "groupContractPosition", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry_FieldNumber_GroupContractPosition, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry__storage_, groupContractPosition), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + { + .name = "membersArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupMemberEntry), + .number = GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry_FieldNumber_MembersArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry__storage_, membersArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + { + .name = "groupRequiredPower", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry_FieldNumber_GroupRequiredPower, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry__storage_, groupRequiredPower), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupInfosResponse_GetGroupInfosResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos + +@implementation GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos + +@dynamic groupInfosArray, groupInfosArray_Count; + +typedef struct GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *groupInfosArray; +} GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos__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 = "groupInfosArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupPositionInfoEntry), + .number = GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos_FieldNumber_GroupInfosArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos__storage_, groupInfosArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupInfosResponse_GetGroupInfosResponseV0_GroupInfos__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupInfosResponse_GetGroupInfosResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsRequest + +@implementation GetGroupActionsRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetGroupActionsRequest__storage_ { + uint32_t _has_storage_[2]; + GetGroupActionsRequest_GetGroupActionsRequestV0 *v0; +} GetGroupActionsRequest__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(GetGroupActionsRequest_GetGroupActionsRequestV0), + .number = GetGroupActionsRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsRequest__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 GetGroupActionsRequest_ClearVersionOneOfCase(GetGroupActionsRequest *message) { + GPBDescriptor *descriptor = [GetGroupActionsRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - Enum GetGroupActionsRequest_ActionStatus + +GPBEnumDescriptor *GetGroupActionsRequest_ActionStatus_EnumDescriptor(void) { + static _Atomic(GPBEnumDescriptor*) descriptor = nil; + if (!descriptor) { + static const char *valueNames = + "Active\000Closed\000"; + static const int32_t values[] = { + GetGroupActionsRequest_ActionStatus_Active, + GetGroupActionsRequest_ActionStatus_Closed, + }; + GPBEnumDescriptor *worker = + [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GetGroupActionsRequest_ActionStatus) + valueNames:valueNames + values:values + count:(uint32_t)(sizeof(values) / sizeof(int32_t)) + enumVerifier:GetGroupActionsRequest_ActionStatus_IsValidValue]; + GPBEnumDescriptor *expected = nil; + if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { + [worker release]; + } + } + return descriptor; +} + +BOOL GetGroupActionsRequest_ActionStatus_IsValidValue(int32_t value__) { + switch (value__) { + case GetGroupActionsRequest_ActionStatus_Active: + case GetGroupActionsRequest_ActionStatus_Closed: + return YES; + default: + return NO; + } +} + +#pragma mark - GetGroupActionsRequest_StartAtActionId + +@implementation GetGroupActionsRequest_StartAtActionId + +@dynamic startActionId; +@dynamic startActionIdIncluded; + +typedef struct GetGroupActionsRequest_StartAtActionId__storage_ { + uint32_t _has_storage_[1]; + NSData *startActionId; +} GetGroupActionsRequest_StartAtActionId__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 = "startActionId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsRequest_StartAtActionId_FieldNumber_StartActionId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsRequest_StartAtActionId__storage_, startActionId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "startActionIdIncluded", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsRequest_StartAtActionId_FieldNumber_StartActionIdIncluded, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsRequest_StartAtActionId class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsRequest_StartAtActionId__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsRequest_GetGroupActionsRequestV0 + +@implementation GetGroupActionsRequest_GetGroupActionsRequestV0 + +@dynamic contractId; +@dynamic groupContractPosition; +@dynamic status; +@dynamic hasStartAtActionId, startAtActionId; +@dynamic hasCount, count; +@dynamic prove; + +typedef struct GetGroupActionsRequest_GetGroupActionsRequestV0__storage_ { + uint32_t _has_storage_[1]; + uint32_t groupContractPosition; + GetGroupActionsRequest_ActionStatus status; + uint32_t count; + NSData *contractId; + GetGroupActionsRequest_StartAtActionId *startAtActionId; +} GetGroupActionsRequest_GetGroupActionsRequestV0__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 = "contractId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_ContractId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsRequest_GetGroupActionsRequestV0__storage_, contractId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "groupContractPosition", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_GroupContractPosition, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionsRequest_GetGroupActionsRequestV0__storage_, groupContractPosition), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + { + .name = "status", + .dataTypeSpecific.enumDescFunc = GetGroupActionsRequest_ActionStatus_EnumDescriptor, + .number = GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_Status, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetGroupActionsRequest_GetGroupActionsRequestV0__storage_, status), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeEnum, + }, + { + .name = "startAtActionId", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsRequest_StartAtActionId), + .number = GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_StartAtActionId, + .hasIndex = 3, + .offset = (uint32_t)offsetof(GetGroupActionsRequest_GetGroupActionsRequestV0__storage_, startAtActionId), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "count", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_Count, + .hasIndex = 4, + .offset = (uint32_t)offsetof(GetGroupActionsRequest_GetGroupActionsRequestV0__storage_, count), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt32, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_Prove, + .hasIndex = 5, + .offset = 6, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsRequest_GetGroupActionsRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsRequest_GetGroupActionsRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +int32_t GetGroupActionsRequest_GetGroupActionsRequestV0_Status_RawValue(GetGroupActionsRequest_GetGroupActionsRequestV0 *message) { + GPBDescriptor *descriptor = [GetGroupActionsRequest_GetGroupActionsRequestV0 descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_Status]; + return GPBGetMessageRawEnumField(message, field); +} + +void SetGetGroupActionsRequest_GetGroupActionsRequestV0_Status_RawValue(GetGroupActionsRequest_GetGroupActionsRequestV0 *message, int32_t value) { + GPBDescriptor *descriptor = [GetGroupActionsRequest_GetGroupActionsRequestV0 descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetGroupActionsRequest_GetGroupActionsRequestV0_FieldNumber_Status]; + GPBSetMessageRawEnumField(message, field, value); +} + +#pragma mark - GetGroupActionsResponse + +@implementation GetGroupActionsResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetGroupActionsResponse__storage_ { + uint32_t _has_storage_[2]; + GetGroupActionsResponse_GetGroupActionsResponseV0 *v0; +} GetGroupActionsResponse__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(GetGroupActionsResponse_GetGroupActionsResponseV0), + .number = GetGroupActionsResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse__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 GetGroupActionsResponse_ClearVersionOneOfCase(GetGroupActionsResponse *message) { + GPBDescriptor *descriptor = [GetGroupActionsResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0 + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0 + +@dynamic resultOneOfCase; +@dynamic groupActions; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions *groupActions; + Proof *proof; + ResponseMetadata *metadata; +} GetGroupActionsResponse_GetGroupActionsResponseV0__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 = "groupActions", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_FieldNumber_GroupActions, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0__storage_, groupActions), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0__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(GetGroupActionsResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetGroupActionsResponse_GetGroupActionsResponseV0_ClearResultOneOfCase(GetGroupActionsResponse_GetGroupActionsResponseV0 *message) { + GPBDescriptor *descriptor = [GetGroupActionsResponse_GetGroupActionsResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent + +@dynamic amount; +@dynamic recipientId; +@dynamic hasPublicNote, publicNote; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent__storage_ { + uint32_t _has_storage_[1]; + NSData *recipientId; + NSString *publicNote; + uint64_t amount; +} GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent__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 = "amount", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent_FieldNumber_Amount, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent__storage_, amount), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + { + .name = "recipientId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent_FieldNumber_RecipientId, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent__storage_, recipientId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "publicNote", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent_FieldNumber_PublicNote, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent__storage_, publicNote), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent + +@dynamic amount; +@dynamic hasPublicNote, publicNote; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent__storage_ { + uint32_t _has_storage_[1]; + NSString *publicNote; + uint64_t amount; +} GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent__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 = "amount", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent_FieldNumber_Amount, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent__storage_, amount), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + { + .name = "publicNote", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent_FieldNumber_PublicNote, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent__storage_, publicNote), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent + +@dynamic frozenId; +@dynamic hasPublicNote, publicNote; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent__storage_ { + uint32_t _has_storage_[1]; + NSData *frozenId; + NSString *publicNote; +} GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent__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 = "frozenId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent_FieldNumber_FrozenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent__storage_, frozenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "publicNote", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent_FieldNumber_PublicNote, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent__storage_, publicNote), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent + +@dynamic frozenId; +@dynamic hasPublicNote, publicNote; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent__storage_ { + uint32_t _has_storage_[1]; + NSData *frozenId; + NSString *publicNote; +} GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent__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 = "frozenId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent_FieldNumber_FrozenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent__storage_, frozenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "publicNote", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent_FieldNumber_PublicNote, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent__storage_, publicNote), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent + +@dynamic frozenId; +@dynamic amount; +@dynamic hasPublicNote, publicNote; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent__storage_ { + uint32_t _has_storage_[1]; + NSData *frozenId; + NSString *publicNote; + uint64_t amount; +} GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent__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 = "frozenId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent_FieldNumber_FrozenId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent__storage_, frozenId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "amount", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent_FieldNumber_Amount, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent__storage_, amount), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + { + .name = "publicNote", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent_FieldNumber_PublicNote, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent__storage_, publicNote), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote + +@dynamic senderKeyIndex; +@dynamic recipientKeyIndex; +@dynamic encryptedData; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote__storage_ { + uint32_t _has_storage_[1]; + uint32_t senderKeyIndex; + uint32_t recipientKeyIndex; + NSData *encryptedData; +} GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote__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 = "senderKeyIndex", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote_FieldNumber_SenderKeyIndex, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote__storage_, senderKeyIndex), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + { + .name = "recipientKeyIndex", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote_FieldNumber_RecipientKeyIndex, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote__storage_, recipientKeyIndex), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + { + .name = "encryptedData", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote_FieldNumber_EncryptedData, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote__storage_, encryptedData), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote + +@dynamic rootEncryptionKeyIndex; +@dynamic derivationEncryptionKeyIndex; +@dynamic encryptedData; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote__storage_ { + uint32_t _has_storage_[1]; + uint32_t rootEncryptionKeyIndex; + uint32_t derivationEncryptionKeyIndex; + NSData *encryptedData; +} GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote__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 = "rootEncryptionKeyIndex", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote_FieldNumber_RootEncryptionKeyIndex, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote__storage_, rootEncryptionKeyIndex), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + { + .name = "derivationEncryptionKeyIndex", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote_FieldNumber_DerivationEncryptionKeyIndex, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote__storage_, derivationEncryptionKeyIndex), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + { + .name = "encryptedData", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote_FieldNumber_EncryptedData, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote__storage_, encryptedData), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent + +@dynamic recipientId; +@dynamic hasPublicNote, publicNote; +@dynamic hasSharedEncryptedNote, sharedEncryptedNote; +@dynamic hasPersonalEncryptedNote, personalEncryptedNote; +@dynamic amount; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent__storage_ { + uint32_t _has_storage_[1]; + NSData *recipientId; + NSString *publicNote; + GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote *sharedEncryptedNote; + GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote *personalEncryptedNote; + uint64_t amount; +} GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent__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 = "recipientId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent_FieldNumber_RecipientId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent__storage_, recipientId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "publicNote", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent_FieldNumber_PublicNote, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent__storage_, publicNote), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "sharedEncryptedNote", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_SharedEncryptedNote), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent_FieldNumber_SharedEncryptedNote, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent__storage_, sharedEncryptedNote), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "personalEncryptedNote", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_PersonalEncryptedNote), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent_FieldNumber_PersonalEncryptedNote, + .hasIndex = 3, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent__storage_, personalEncryptedNote), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "amount", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent_FieldNumber_Amount, + .hasIndex = 4, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent__storage_, amount), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent + +@dynamic actionType; +@dynamic hasPublicNote, publicNote; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent__storage_ { + uint32_t _has_storage_[1]; + GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType actionType; + NSString *publicNote; +} GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent__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 = "actionType", + .dataTypeSpecific.enumDescFunc = GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_EnumDescriptor, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_FieldNumber_ActionType, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent__storage_, actionType), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeEnum, + }, + { + .name = "publicNote", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_FieldNumber_PublicNote, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent__storage_, publicNote), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +int32_t GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_RawValue(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent *message) { + GPBDescriptor *descriptor = [GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_FieldNumber_ActionType]; + return GPBGetMessageRawEnumField(message, field); +} + +void SetGetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_RawValue(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent *message, int32_t value) { + GPBDescriptor *descriptor = [GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_FieldNumber_ActionType]; + GPBSetMessageRawEnumField(message, field, value); +} + +#pragma mark - Enum GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType + +GPBEnumDescriptor *GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_EnumDescriptor(void) { + static _Atomic(GPBEnumDescriptor*) descriptor = nil; + if (!descriptor) { + static const char *valueNames = + "Pause\000Resume\000"; + static const int32_t values[] = { + GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_Pause, + GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_Resume, + }; + GPBEnumDescriptor *worker = + [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType) + valueNames:valueNames + values:values + count:(uint32_t)(sizeof(values) / sizeof(int32_t)) + enumVerifier:GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_IsValidValue]; + GPBEnumDescriptor *expected = nil; + if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { + [worker release]; + } + } + return descriptor; +} + +BOOL GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_IsValidValue(int32_t value__) { + switch (value__) { + case GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_Pause: + case GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent_ActionType_Resume: + return YES; + default: + return NO; + } +} + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent + +@dynamic tokenConfigUpdateItem; +@dynamic hasPublicNote, publicNote; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent__storage_ { + uint32_t _has_storage_[1]; + NSData *tokenConfigUpdateItem; + NSString *publicNote; +} GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent__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 = "tokenConfigUpdateItem", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent_FieldNumber_TokenConfigUpdateItem, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent__storage_, tokenConfigUpdateItem), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "publicNote", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent_FieldNumber_PublicNote, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent__storage_, publicNote), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent + +@dynamic eventTypeOneOfCase; +@dynamic tokenEvent; +@dynamic documentEvent; +@dynamic contractEvent; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent__storage_ { + uint32_t _has_storage_[2]; + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent *tokenEvent; + GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent *documentEvent; + GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent *contractEvent; +} GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent__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 = "tokenEvent", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_FieldNumber_TokenEvent, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent__storage_, tokenEvent), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "documentEvent", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_FieldNumber_DocumentEvent, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent__storage_, documentEvent), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "contractEvent", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_FieldNumber_ContractEvent, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent__storage_, contractEvent), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "eventType", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent_ClearEventTypeOneOfCase(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent *message) { + GPBDescriptor *descriptor = [GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent + +@dynamic typeOneOfCase; +@dynamic create; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent__storage_ { + uint32_t _has_storage_[2]; + GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent *create; +} GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent__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 = "create", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent_FieldNumber_Create, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent__storage_, create), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "type", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent_ClearTypeOneOfCase(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent *message) { + GPBDescriptor *descriptor = [GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentEvent descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent + +@dynamic createdDocument; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent__storage_ { + uint32_t _has_storage_[1]; + NSData *createdDocument; +} GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent__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 = "createdDocument", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent_FieldNumber_CreatedDocument, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent__storage_, createdDocument), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_DocumentCreateEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent + +@dynamic updatedContract; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent__storage_ { + uint32_t _has_storage_[1]; + NSData *updatedContract; +} GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent__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 = "updatedContract", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent_FieldNumber_UpdatedContract, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent__storage_, updatedContract), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent + +@dynamic typeOneOfCase; +@dynamic update; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent__storage_ { + uint32_t _has_storage_[2]; + GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent *update; +} GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent__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 = "update", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractUpdateEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent_FieldNumber_Update, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent__storage_, update), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "type", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent_ClearTypeOneOfCase(GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent *message) { + GPBDescriptor *descriptor = [GetGroupActionsResponse_GetGroupActionsResponseV0_ContractEvent descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent + +@dynamic typeOneOfCase; +@dynamic mint; +@dynamic burn; +@dynamic freeze; +@dynamic unfreeze; +@dynamic destroyFrozenFunds; +@dynamic transfer; +@dynamic emergencyAction; +@dynamic tokenConfigUpdate; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__storage_ { + uint32_t _has_storage_[2]; + GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent *mint; + GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent *burn; + GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent *freeze; + GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent *unfreeze; + GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent *destroyFrozenFunds; + GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent *transfer; + GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent *emergencyAction; + GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent *tokenConfigUpdate; +} GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__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 = "mint", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_MintEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_Mint, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__storage_, mint), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "burn", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_BurnEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_Burn, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__storage_, burn), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "freeze", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_FreezeEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_Freeze, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__storage_, freeze), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "unfreeze", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_UnfreezeEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_Unfreeze, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__storage_, unfreeze), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "destroyFrozenFunds", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_DestroyFrozenFundsEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_DestroyFrozenFunds, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__storage_, destroyFrozenFunds), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "transfer", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_TransferEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_Transfer, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__storage_, transfer), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "emergencyAction", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_EmergencyActionEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_EmergencyAction, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__storage_, emergencyAction), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "tokenConfigUpdate", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenConfigUpdateEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_FieldNumber_TokenConfigUpdate, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__storage_, tokenConfigUpdate), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "type", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent_ClearTypeOneOfCase(GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent *message) { + GPBDescriptor *descriptor = [GetGroupActionsResponse_GetGroupActionsResponseV0_TokenEvent descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry + +@dynamic actionId; +@dynamic hasEvent, event; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry__storage_ { + uint32_t _has_storage_[1]; + NSData *actionId; + GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent *event; +} GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry__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 = "actionId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry_FieldNumber_ActionId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry__storage_, actionId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "event", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEvent), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry_FieldNumber_Event, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry__storage_, event), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions + +@implementation GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions + +@dynamic groupActionsArray, groupActionsArray_Count; + +typedef struct GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *groupActionsArray; +} GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions__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 = "groupActionsArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActionEntry), + .number = GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions_FieldNumber_GroupActionsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions__storage_, groupActionsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionsResponse_GetGroupActionsResponseV0_GroupActions__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionsResponse_GetGroupActionsResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionSignersRequest + +@implementation GetGroupActionSignersRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetGroupActionSignersRequest__storage_ { + uint32_t _has_storage_[2]; + GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 *v0; +} GetGroupActionSignersRequest__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(GetGroupActionSignersRequest_GetGroupActionSignersRequestV0), + .number = GetGroupActionSignersRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionSignersRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionSignersRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionSignersRequest__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 GetGroupActionSignersRequest_ClearVersionOneOfCase(GetGroupActionSignersRequest *message) { + GPBDescriptor *descriptor = [GetGroupActionSignersRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - Enum GetGroupActionSignersRequest_ActionStatus + +GPBEnumDescriptor *GetGroupActionSignersRequest_ActionStatus_EnumDescriptor(void) { + static _Atomic(GPBEnumDescriptor*) descriptor = nil; + if (!descriptor) { + static const char *valueNames = + "Active\000Closed\000"; + static const int32_t values[] = { + GetGroupActionSignersRequest_ActionStatus_Active, + GetGroupActionSignersRequest_ActionStatus_Closed, + }; + GPBEnumDescriptor *worker = + [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GetGroupActionSignersRequest_ActionStatus) + valueNames:valueNames + values:values + count:(uint32_t)(sizeof(values) / sizeof(int32_t)) + enumVerifier:GetGroupActionSignersRequest_ActionStatus_IsValidValue]; + GPBEnumDescriptor *expected = nil; + if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { + [worker release]; + } + } + return descriptor; +} + +BOOL GetGroupActionSignersRequest_ActionStatus_IsValidValue(int32_t value__) { + switch (value__) { + case GetGroupActionSignersRequest_ActionStatus_Active: + case GetGroupActionSignersRequest_ActionStatus_Closed: + return YES; + default: + return NO; + } +} + +#pragma mark - GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 + +@implementation GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 + +@dynamic contractId; +@dynamic groupContractPosition; +@dynamic status; +@dynamic actionId; +@dynamic prove; + +typedef struct GetGroupActionSignersRequest_GetGroupActionSignersRequestV0__storage_ { + uint32_t _has_storage_[1]; + uint32_t groupContractPosition; + GetGroupActionSignersRequest_ActionStatus status; + NSData *contractId; + NSData *actionId; +} GetGroupActionSignersRequest_GetGroupActionSignersRequestV0__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 = "contractId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber_ContractId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionSignersRequest_GetGroupActionSignersRequestV0__storage_, contractId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "groupContractPosition", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber_GroupContractPosition, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionSignersRequest_GetGroupActionSignersRequestV0__storage_, groupContractPosition), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + { + .name = "status", + .dataTypeSpecific.enumDescFunc = GetGroupActionSignersRequest_ActionStatus_EnumDescriptor, + .number = GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber_Status, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetGroupActionSignersRequest_GetGroupActionSignersRequestV0__storage_, status), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeEnum, + }, + { + .name = "actionId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber_ActionId, + .hasIndex = 3, + .offset = (uint32_t)offsetof(GetGroupActionSignersRequest_GetGroupActionSignersRequestV0__storage_, actionId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber_Prove, + .hasIndex = 4, + .offset = 5, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionSignersRequest_GetGroupActionSignersRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionSignersRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +int32_t GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_Status_RawValue(GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 *message) { + GPBDescriptor *descriptor = [GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber_Status]; + return GPBGetMessageRawEnumField(message, field); +} + +void SetGetGroupActionSignersRequest_GetGroupActionSignersRequestV0_Status_RawValue(GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 *message, int32_t value) { + GPBDescriptor *descriptor = [GetGroupActionSignersRequest_GetGroupActionSignersRequestV0 descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetGroupActionSignersRequest_GetGroupActionSignersRequestV0_FieldNumber_Status]; + GPBSetMessageRawEnumField(message, field, value); +} + +#pragma mark - GetGroupActionSignersResponse + +@implementation GetGroupActionSignersResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetGroupActionSignersResponse__storage_ { + uint32_t _has_storage_[2]; + GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 *v0; +} GetGroupActionSignersResponse__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(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0), + .number = GetGroupActionSignersResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionSignersResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionSignersResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionSignersResponse__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 GetGroupActionSignersResponse_ClearVersionOneOfCase(GetGroupActionSignersResponse *message) { + GPBDescriptor *descriptor = [GetGroupActionSignersResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 + +@implementation GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 + +@dynamic resultOneOfCase; +@dynamic groupActionSigners; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetGroupActionSignersResponse_GetGroupActionSignersResponseV0__storage_ { + uint32_t _has_storage_[2]; + GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners *groupActionSigners; + Proof *proof; + ResponseMetadata *metadata; +} GetGroupActionSignersResponse_GetGroupActionSignersResponseV0__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 = "groupActionSigners", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners), + .number = GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_FieldNumber_GroupActionSigners, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0__storage_, groupActionSigners), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0__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(GetGroupActionSignersResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_ClearResultOneOfCase(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 *message) { + GPBDescriptor *descriptor = [GetGroupActionSignersResponse_GetGroupActionSignersResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner + +@implementation GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner + +@dynamic signerId; +@dynamic power; + +typedef struct GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner__storage_ { + uint32_t _has_storage_[1]; + uint32_t power; + NSData *signerId; +} GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner__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 = "signerId", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner_FieldNumber_SignerId, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner__storage_, signerId), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "power", + .dataTypeSpecific.clazz = Nil, + .number = GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner_FieldNumber_Power, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner__storage_, power), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt32, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners + +@implementation GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners + +@dynamic signersArray, signersArray_Count; + +typedef struct GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *signersArray; +} GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners__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 = "signersArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigner), + .number = GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners_FieldNumber_SignersArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners__storage_, signersArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0_GroupActionSigners__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetGroupActionSignersResponse_GetGroupActionSignersResponseV0)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + #pragma clang diagnostic pop 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 9bfcd4ba16..028477d075 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 @@ -41,10 +41,22 @@ @class GetEvonodesProposedEpochBlocksByIdsRequest; @class GetEvonodesProposedEpochBlocksByRangeRequest; @class GetEvonodesProposedEpochBlocksResponse; +@class GetGroupActionSignersRequest; +@class GetGroupActionSignersResponse; +@class GetGroupActionsRequest; +@class GetGroupActionsResponse; +@class GetGroupInfoRequest; +@class GetGroupInfoResponse; +@class GetGroupInfosRequest; +@class GetGroupInfosResponse; @class GetIdentitiesBalancesRequest; @class GetIdentitiesBalancesResponse; @class GetIdentitiesContractKeysRequest; @class GetIdentitiesContractKeysResponse; +@class GetIdentitiesTokenBalancesRequest; +@class GetIdentitiesTokenBalancesResponse; +@class GetIdentitiesTokenInfosRequest; +@class GetIdentitiesTokenInfosResponse; @class GetIdentityBalanceAndRevisionRequest; @class GetIdentityBalanceAndRevisionResponse; @class GetIdentityBalanceRequest; @@ -59,6 +71,10 @@ @class GetIdentityNonceResponse; @class GetIdentityRequest; @class GetIdentityResponse; +@class GetIdentityTokenBalancesRequest; +@class GetIdentityTokenBalancesResponse; +@class GetIdentityTokenInfosRequest; +@class GetIdentityTokenInfosResponse; @class GetPathElementsRequest; @class GetPathElementsResponse; @class GetPrefundedSpecializedBalanceRequest; @@ -71,6 +87,10 @@ @class GetProtocolVersionUpgradeVoteStatusResponse; @class GetStatusRequest; @class GetStatusResponse; +@class GetTokenStatusesRequest; +@class GetTokenStatusesResponse; +@class GetTokenTotalSupplyRequest; +@class GetTokenTotalSupplyResponse; @class GetTotalCreditsInPlatformRequest; @class GetTotalCreditsInPlatformResponse; @class GetVotePollsByEndDateRequest; @@ -250,6 +270,46 @@ NS_ASSUME_NONNULL_BEGIN - (GRPCUnaryProtoCall *)getCurrentQuorumsInfoWithMessage:(GetCurrentQuorumsInfoRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; +#pragma mark getIdentityTokenBalances(GetIdentityTokenBalancesRequest) returns (GetIdentityTokenBalancesResponse) + +- (GRPCUnaryProtoCall *)getIdentityTokenBalancesWithMessage:(GetIdentityTokenBalancesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + +#pragma mark getIdentitiesTokenBalances(GetIdentitiesTokenBalancesRequest) returns (GetIdentitiesTokenBalancesResponse) + +- (GRPCUnaryProtoCall *)getIdentitiesTokenBalancesWithMessage:(GetIdentitiesTokenBalancesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + +#pragma mark getIdentityTokenInfos(GetIdentityTokenInfosRequest) returns (GetIdentityTokenInfosResponse) + +- (GRPCUnaryProtoCall *)getIdentityTokenInfosWithMessage:(GetIdentityTokenInfosRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + +#pragma mark getIdentitiesTokenInfos(GetIdentitiesTokenInfosRequest) returns (GetIdentitiesTokenInfosResponse) + +- (GRPCUnaryProtoCall *)getIdentitiesTokenInfosWithMessage:(GetIdentitiesTokenInfosRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + +#pragma mark getTokenStatuses(GetTokenStatusesRequest) returns (GetTokenStatusesResponse) + +- (GRPCUnaryProtoCall *)getTokenStatusesWithMessage:(GetTokenStatusesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + +#pragma mark getTokenTotalSupply(GetTokenTotalSupplyRequest) returns (GetTokenTotalSupplyResponse) + +- (GRPCUnaryProtoCall *)getTokenTotalSupplyWithMessage:(GetTokenTotalSupplyRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + +#pragma mark getGroupInfo(GetGroupInfoRequest) returns (GetGroupInfoResponse) + +- (GRPCUnaryProtoCall *)getGroupInfoWithMessage:(GetGroupInfoRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + +#pragma mark getGroupInfos(GetGroupInfosRequest) returns (GetGroupInfosResponse) + +- (GRPCUnaryProtoCall *)getGroupInfosWithMessage:(GetGroupInfosRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + +#pragma mark getGroupActions(GetGroupActionsRequest) returns (GetGroupActionsResponse) + +- (GRPCUnaryProtoCall *)getGroupActionsWithMessage:(GetGroupActionsRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + +#pragma mark getGroupActionSigners(GetGroupActionSignersRequest) returns (GetGroupActionSignersResponse) + +- (GRPCUnaryProtoCall *)getGroupActionSignersWithMessage:(GetGroupActionSignersRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + @end /** @@ -532,6 +592,76 @@ NS_ASSUME_NONNULL_BEGIN - (GRPCProtoCall *)RPCTogetCurrentQuorumsInfoWithRequest:(GetCurrentQuorumsInfoRequest *)request handler:(void(^)(GetCurrentQuorumsInfoResponse *_Nullable response, NSError *_Nullable error))handler; +#pragma mark getIdentityTokenBalances(GetIdentityTokenBalancesRequest) returns (GetIdentityTokenBalancesResponse) + +- (void)getIdentityTokenBalancesWithRequest:(GetIdentityTokenBalancesRequest *)request handler:(void(^)(GetIdentityTokenBalancesResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetIdentityTokenBalancesWithRequest:(GetIdentityTokenBalancesRequest *)request handler:(void(^)(GetIdentityTokenBalancesResponse *_Nullable response, NSError *_Nullable error))handler; + + +#pragma mark getIdentitiesTokenBalances(GetIdentitiesTokenBalancesRequest) returns (GetIdentitiesTokenBalancesResponse) + +- (void)getIdentitiesTokenBalancesWithRequest:(GetIdentitiesTokenBalancesRequest *)request handler:(void(^)(GetIdentitiesTokenBalancesResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetIdentitiesTokenBalancesWithRequest:(GetIdentitiesTokenBalancesRequest *)request handler:(void(^)(GetIdentitiesTokenBalancesResponse *_Nullable response, NSError *_Nullable error))handler; + + +#pragma mark getIdentityTokenInfos(GetIdentityTokenInfosRequest) returns (GetIdentityTokenInfosResponse) + +- (void)getIdentityTokenInfosWithRequest:(GetIdentityTokenInfosRequest *)request handler:(void(^)(GetIdentityTokenInfosResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetIdentityTokenInfosWithRequest:(GetIdentityTokenInfosRequest *)request handler:(void(^)(GetIdentityTokenInfosResponse *_Nullable response, NSError *_Nullable error))handler; + + +#pragma mark getIdentitiesTokenInfos(GetIdentitiesTokenInfosRequest) returns (GetIdentitiesTokenInfosResponse) + +- (void)getIdentitiesTokenInfosWithRequest:(GetIdentitiesTokenInfosRequest *)request handler:(void(^)(GetIdentitiesTokenInfosResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetIdentitiesTokenInfosWithRequest:(GetIdentitiesTokenInfosRequest *)request handler:(void(^)(GetIdentitiesTokenInfosResponse *_Nullable response, NSError *_Nullable error))handler; + + +#pragma mark getTokenStatuses(GetTokenStatusesRequest) returns (GetTokenStatusesResponse) + +- (void)getTokenStatusesWithRequest:(GetTokenStatusesRequest *)request handler:(void(^)(GetTokenStatusesResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetTokenStatusesWithRequest:(GetTokenStatusesRequest *)request handler:(void(^)(GetTokenStatusesResponse *_Nullable response, NSError *_Nullable error))handler; + + +#pragma mark getTokenTotalSupply(GetTokenTotalSupplyRequest) returns (GetTokenTotalSupplyResponse) + +- (void)getTokenTotalSupplyWithRequest:(GetTokenTotalSupplyRequest *)request handler:(void(^)(GetTokenTotalSupplyResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetTokenTotalSupplyWithRequest:(GetTokenTotalSupplyRequest *)request handler:(void(^)(GetTokenTotalSupplyResponse *_Nullable response, NSError *_Nullable error))handler; + + +#pragma mark getGroupInfo(GetGroupInfoRequest) returns (GetGroupInfoResponse) + +- (void)getGroupInfoWithRequest:(GetGroupInfoRequest *)request handler:(void(^)(GetGroupInfoResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetGroupInfoWithRequest:(GetGroupInfoRequest *)request handler:(void(^)(GetGroupInfoResponse *_Nullable response, NSError *_Nullable error))handler; + + +#pragma mark getGroupInfos(GetGroupInfosRequest) returns (GetGroupInfosResponse) + +- (void)getGroupInfosWithRequest:(GetGroupInfosRequest *)request handler:(void(^)(GetGroupInfosResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetGroupInfosWithRequest:(GetGroupInfosRequest *)request handler:(void(^)(GetGroupInfosResponse *_Nullable response, NSError *_Nullable error))handler; + + +#pragma mark getGroupActions(GetGroupActionsRequest) returns (GetGroupActionsResponse) + +- (void)getGroupActionsWithRequest:(GetGroupActionsRequest *)request handler:(void(^)(GetGroupActionsResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetGroupActionsWithRequest:(GetGroupActionsRequest *)request handler:(void(^)(GetGroupActionsResponse *_Nullable response, NSError *_Nullable error))handler; + + +#pragma mark getGroupActionSigners(GetGroupActionSignersRequest) returns (GetGroupActionSignersResponse) + +- (void)getGroupActionSignersWithRequest:(GetGroupActionSignersRequest *)request handler:(void(^)(GetGroupActionSignersResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetGroupActionSignersWithRequest:(GetGroupActionSignersRequest *)request handler:(void(^)(GetGroupActionSignersResponse *_Nullable response, NSError *_Nullable error))handler; + + @end 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 b8e6852fe6..c2fa7b1a50 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 @@ -775,5 +775,205 @@ - (GRPCUnaryProtoCall *)getCurrentQuorumsInfoWithMessage:(GetCurrentQuorumsInfoR responseClass:[GetCurrentQuorumsInfoResponse class]]; } +#pragma mark getIdentityTokenBalances(GetIdentityTokenBalancesRequest) returns (GetIdentityTokenBalancesResponse) + +- (void)getIdentityTokenBalancesWithRequest:(GetIdentityTokenBalancesRequest *)request handler:(void(^)(GetIdentityTokenBalancesResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetIdentityTokenBalancesWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetIdentityTokenBalancesWithRequest:(GetIdentityTokenBalancesRequest *)request handler:(void(^)(GetIdentityTokenBalancesResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getIdentityTokenBalances" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetIdentityTokenBalancesResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getIdentityTokenBalancesWithMessage:(GetIdentityTokenBalancesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getIdentityTokenBalances" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetIdentityTokenBalancesResponse class]]; +} + +#pragma mark getIdentitiesTokenBalances(GetIdentitiesTokenBalancesRequest) returns (GetIdentitiesTokenBalancesResponse) + +- (void)getIdentitiesTokenBalancesWithRequest:(GetIdentitiesTokenBalancesRequest *)request handler:(void(^)(GetIdentitiesTokenBalancesResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetIdentitiesTokenBalancesWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetIdentitiesTokenBalancesWithRequest:(GetIdentitiesTokenBalancesRequest *)request handler:(void(^)(GetIdentitiesTokenBalancesResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getIdentitiesTokenBalances" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetIdentitiesTokenBalancesResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getIdentitiesTokenBalancesWithMessage:(GetIdentitiesTokenBalancesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getIdentitiesTokenBalances" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetIdentitiesTokenBalancesResponse class]]; +} + +#pragma mark getIdentityTokenInfos(GetIdentityTokenInfosRequest) returns (GetIdentityTokenInfosResponse) + +- (void)getIdentityTokenInfosWithRequest:(GetIdentityTokenInfosRequest *)request handler:(void(^)(GetIdentityTokenInfosResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetIdentityTokenInfosWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetIdentityTokenInfosWithRequest:(GetIdentityTokenInfosRequest *)request handler:(void(^)(GetIdentityTokenInfosResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getIdentityTokenInfos" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetIdentityTokenInfosResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getIdentityTokenInfosWithMessage:(GetIdentityTokenInfosRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getIdentityTokenInfos" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetIdentityTokenInfosResponse class]]; +} + +#pragma mark getIdentitiesTokenInfos(GetIdentitiesTokenInfosRequest) returns (GetIdentitiesTokenInfosResponse) + +- (void)getIdentitiesTokenInfosWithRequest:(GetIdentitiesTokenInfosRequest *)request handler:(void(^)(GetIdentitiesTokenInfosResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetIdentitiesTokenInfosWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetIdentitiesTokenInfosWithRequest:(GetIdentitiesTokenInfosRequest *)request handler:(void(^)(GetIdentitiesTokenInfosResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getIdentitiesTokenInfos" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetIdentitiesTokenInfosResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getIdentitiesTokenInfosWithMessage:(GetIdentitiesTokenInfosRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getIdentitiesTokenInfos" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetIdentitiesTokenInfosResponse class]]; +} + +#pragma mark getTokenStatuses(GetTokenStatusesRequest) returns (GetTokenStatusesResponse) + +- (void)getTokenStatusesWithRequest:(GetTokenStatusesRequest *)request handler:(void(^)(GetTokenStatusesResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetTokenStatusesWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetTokenStatusesWithRequest:(GetTokenStatusesRequest *)request handler:(void(^)(GetTokenStatusesResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getTokenStatuses" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetTokenStatusesResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getTokenStatusesWithMessage:(GetTokenStatusesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getTokenStatuses" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetTokenStatusesResponse class]]; +} + +#pragma mark getTokenTotalSupply(GetTokenTotalSupplyRequest) returns (GetTokenTotalSupplyResponse) + +- (void)getTokenTotalSupplyWithRequest:(GetTokenTotalSupplyRequest *)request handler:(void(^)(GetTokenTotalSupplyResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetTokenTotalSupplyWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetTokenTotalSupplyWithRequest:(GetTokenTotalSupplyRequest *)request handler:(void(^)(GetTokenTotalSupplyResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getTokenTotalSupply" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetTokenTotalSupplyResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getTokenTotalSupplyWithMessage:(GetTokenTotalSupplyRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getTokenTotalSupply" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetTokenTotalSupplyResponse class]]; +} + +#pragma mark getGroupInfo(GetGroupInfoRequest) returns (GetGroupInfoResponse) + +- (void)getGroupInfoWithRequest:(GetGroupInfoRequest *)request handler:(void(^)(GetGroupInfoResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetGroupInfoWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetGroupInfoWithRequest:(GetGroupInfoRequest *)request handler:(void(^)(GetGroupInfoResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getGroupInfo" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetGroupInfoResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getGroupInfoWithMessage:(GetGroupInfoRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getGroupInfo" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetGroupInfoResponse class]]; +} + +#pragma mark getGroupInfos(GetGroupInfosRequest) returns (GetGroupInfosResponse) + +- (void)getGroupInfosWithRequest:(GetGroupInfosRequest *)request handler:(void(^)(GetGroupInfosResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetGroupInfosWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetGroupInfosWithRequest:(GetGroupInfosRequest *)request handler:(void(^)(GetGroupInfosResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getGroupInfos" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetGroupInfosResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getGroupInfosWithMessage:(GetGroupInfosRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getGroupInfos" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetGroupInfosResponse class]]; +} + +#pragma mark getGroupActions(GetGroupActionsRequest) returns (GetGroupActionsResponse) + +- (void)getGroupActionsWithRequest:(GetGroupActionsRequest *)request handler:(void(^)(GetGroupActionsResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetGroupActionsWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetGroupActionsWithRequest:(GetGroupActionsRequest *)request handler:(void(^)(GetGroupActionsResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getGroupActions" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetGroupActionsResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getGroupActionsWithMessage:(GetGroupActionsRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getGroupActions" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetGroupActionsResponse class]]; +} + +#pragma mark getGroupActionSigners(GetGroupActionSignersRequest) returns (GetGroupActionSignersResponse) + +- (void)getGroupActionSignersWithRequest:(GetGroupActionSignersRequest *)request handler:(void(^)(GetGroupActionSignersResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetGroupActionSignersWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetGroupActionSignersWithRequest:(GetGroupActionSignersRequest *)request handler:(void(^)(GetGroupActionSignersResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getGroupActionSigners" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetGroupActionSignersResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getGroupActionSignersWithMessage:(GetGroupActionSignersRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getGroupActionSigners" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetGroupActionSignersResponse class]]; +} + @end #endif 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 be8a64f309..886406191d 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\"\xa4\x02\n*GetEvonodesProposedEpochBlocksByIdsRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0H\x00\x1ah\n,GetEvonodesProposedEpochBlocksByIdsRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x08\n\x06_epochB\t\n\x07version\"\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\"\xf2\x02\n,GetEvonodesProposedEpochBlocksByRangeRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0H\x00\x1a\xaf\x01\n.GetEvonodesProposedEpochBlocksByRangeRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x02 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x0bstart_after\x18\x03 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x04 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x07\n\x05startB\x08\n\x06_epochB\x08\n\x06_limitB\t\n\x07version\"\xcd\x01\n\x1cGetIdentitiesBalancesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0H\x00\x1a<\n\x1eGetIdentitiesBalancesRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\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\"\xb1\x01\n\x1cGetCurrentQuorumsInfoRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0H\x00\x1a \n\x1eGetCurrentQuorumsInfoRequestV0B\t\n\x07version\"\xa1\x05\n\x1dGetCurrentQuorumsInfoResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0H\x00\x1a\x46\n\x0bValidatorV0\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07node_ip\x18\x02 \x01(\t\x12\x11\n\tis_banned\x18\x03 \x01(\x08\x1a\xaf\x01\n\x0eValidatorSetV0\x12\x13\n\x0bquorum_hash\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ore_height\x18\x02 \x01(\r\x12U\n\x07members\x18\x03 \x03(\x0b\x32\x44.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0\x12\x1c\n\x14threshold_public_key\x18\x04 \x01(\x0c\x1a\x92\x02\n\x1fGetCurrentQuorumsInfoResponseV0\x12\x15\n\rquorum_hashes\x18\x01 \x03(\x0c\x12\x1b\n\x13\x63urrent_quorum_hash\x18\x02 \x01(\x0c\x12_\n\x0evalidator_sets\x18\x03 \x03(\x0b\x32G.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0\x12\x1b\n\x13last_block_proposer\x18\x04 \x01(\x0c\x12=\n\x08metadata\x18\x05 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version*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\xa4$\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.GetStatusResponse\x12\x8a\x01\n\x15getCurrentQuorumsInfo\x12\x37.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest\x1a\x38.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponseb\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\"\xa4\x02\n*GetEvonodesProposedEpochBlocksByIdsRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0H\x00\x1ah\n,GetEvonodesProposedEpochBlocksByIdsRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x08\n\x06_epochB\t\n\x07version\"\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\"\xf2\x02\n,GetEvonodesProposedEpochBlocksByRangeRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0H\x00\x1a\xaf\x01\n.GetEvonodesProposedEpochBlocksByRangeRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x02 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x0bstart_after\x18\x03 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x04 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x07\n\x05startB\x08\n\x06_epochB\x08\n\x06_limitB\t\n\x07version\"\xcd\x01\n\x1cGetIdentitiesBalancesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0H\x00\x1a<\n\x1eGetIdentitiesBalancesRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\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\"\xdb\x0f\n\x10GetProofsRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0H\x00\x1a\xed\x0e\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\x12{\n\x17identity_token_balances\x18\x05 \x03(\x0b\x32Z.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest\x12u\n\x14identity_token_infos\x18\x06 \x03(\x0b\x32W.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest\x12i\n\x0etoken_statuses\x18\x07 \x03(\x0b\x32Q.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest\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_type\x1a\x44\n\x1bIdentityTokenBalanceRequest\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x0bidentity_id\x18\x02 \x01(\x0c\x1a\x41\n\x18IdentityTokenInfoRequest\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x0bidentity_id\x18\x02 \x01(\x0c\x1a&\n\x12TokenStatusRequest\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x42\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\"\xb1\x01\n\x1cGetCurrentQuorumsInfoRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0H\x00\x1a \n\x1eGetCurrentQuorumsInfoRequestV0B\t\n\x07version\"\xa1\x05\n\x1dGetCurrentQuorumsInfoResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0H\x00\x1a\x46\n\x0bValidatorV0\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07node_ip\x18\x02 \x01(\t\x12\x11\n\tis_banned\x18\x03 \x01(\x08\x1a\xaf\x01\n\x0eValidatorSetV0\x12\x13\n\x0bquorum_hash\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ore_height\x18\x02 \x01(\r\x12U\n\x07members\x18\x03 \x03(\x0b\x32\x44.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0\x12\x1c\n\x14threshold_public_key\x18\x04 \x01(\x0c\x1a\x92\x02\n\x1fGetCurrentQuorumsInfoResponseV0\x12\x15\n\rquorum_hashes\x18\x01 \x03(\x0c\x12\x1b\n\x13\x63urrent_quorum_hash\x18\x02 \x01(\x0c\x12_\n\x0evalidator_sets\x18\x03 \x03(\x0b\x32G.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0\x12\x1b\n\x13last_block_proposer\x18\x04 \x01(\x0c\x12=\n\x08metadata\x18\x05 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf4\x01\n\x1fGetIdentityTokenBalancesRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0H\x00\x1aZ\n!GetIdentityTokenBalancesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xad\x05\n GetIdentityTokenBalancesResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0H\x00\x1a\x8f\x04\n\"GetIdentityTokenBalancesResponseV0\x12\x86\x01\n\x0etoken_balances\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\x11TokenBalanceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x9a\x01\n\rTokenBalances\x12\x88\x01\n\x0etoken_balances\x18\x01 \x03(\x0b\x32p.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xfc\x01\n!GetIdentitiesTokenBalancesRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0H\x00\x1a\\\n#GetIdentitiesTokenBalancesRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xf2\x05\n\"GetIdentitiesTokenBalancesResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0H\x00\x1a\xce\x04\n$GetIdentitiesTokenBalancesResponseV0\x12\x9b\x01\n\x17identity_token_balances\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aR\n\x19IdentityTokenBalanceEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\xb7\x01\n\x15IdentityTokenBalances\x12\x9d\x01\n\x17identity_token_balances\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xe8\x01\n\x1cGetIdentityTokenInfosRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0H\x00\x1aW\n\x1eGetIdentityTokenInfosRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\x98\x06\n\x1dGetIdentityTokenInfosResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0H\x00\x1a\x83\x05\n\x1fGetIdentityTokenInfosResponseV0\x12z\n\x0btoken_infos\x18\x01 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb0\x01\n\x0eTokenInfoEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x82\x01\n\x04info\x18\x02 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x8a\x01\n\nTokenInfos\x12|\n\x0btoken_infos\x18\x01 \x03(\x0b\x32g.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n\x1eGetIdentitiesTokenInfosRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0H\x00\x1aY\n GetIdentitiesTokenInfosRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xca\x06\n\x1fGetIdentitiesTokenInfosResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0H\x00\x1a\xaf\x05\n!GetIdentitiesTokenInfosResponseV0\x12\x8f\x01\n\x14identity_token_infos\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb7\x01\n\x0eTokenInfoEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x86\x01\n\x04info\x18\x02 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x97\x01\n\x12IdentityTokenInfos\x12\x80\x01\n\x0btoken_infos\x18\x01 \x03(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbf\x01\n\x17GetTokenStatusesRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0H\x00\x1a=\n\x19GetTokenStatusesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xe7\x04\n\x18GetTokenStatusesResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0H\x00\x1a\xe1\x03\n\x1aGetTokenStatusesResponseV0\x12v\n\x0etoken_statuses\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x44\n\x10TokenStatusEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x06paused\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_paused\x1a\x88\x01\n\rTokenStatuses\x12w\n\x0etoken_statuses\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntryB\x08\n\x06resultB\t\n\x07version\"\xca\x01\n\x1aGetTokenTotalSupplyRequest\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0H\x00\x1a?\n\x1cGetTokenTotalSupplyRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xaf\x04\n\x1bGetTokenTotalSupplyResponse\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0H\x00\x1a\xa0\x03\n\x1dGetTokenTotalSupplyResponseV0\x12\x88\x01\n\x12token_total_supply\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\x15TokenTotalSupplyEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x30\n(total_aggregated_amount_in_user_accounts\x18\x02 \x01(\x04\x12\x1b\n\x13total_system_amount\x18\x03 \x01(\x04\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x01\n\x13GetGroupInfoRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0H\x00\x1a\\\n\x15GetGroupInfoRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xd4\x05\n\x14GetGroupInfoResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0H\x00\x1a\xda\x04\n\x16GetGroupInfoResponseV0\x12\x66\n\ngroup_info\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x98\x01\n\x0eGroupInfoEntry\x12h\n\x07members\x18\x01 \x03(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x02 \x01(\r\x1a\x8a\x01\n\tGroupInfo\x12n\n\ngroup_info\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntryH\x00\x88\x01\x01\x42\r\n\x0b_group_infoB\x08\n\x06resultB\t\n\x07version\"\xed\x03\n\x14GetGroupInfosRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0H\x00\x1au\n\x1cStartAtGroupContractPosition\x12%\n\x1dstart_group_contract_position\x18\x01 \x01(\r\x12.\n&start_group_contract_position_included\x18\x02 \x01(\x08\x1a\xfc\x01\n\x16GetGroupInfosRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12{\n start_at_group_contract_position\x18\x02 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPositionH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x42#\n!_start_at_group_contract_positionB\x08\n\x06_countB\t\n\x07version\"\xff\x05\n\x15GetGroupInfosResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0H\x00\x1a\x82\x05\n\x17GetGroupInfosResponseV0\x12j\n\x0bgroup_infos\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\xc3\x01\n\x16GroupPositionInfoEntry\x12\x1f\n\x17group_contract_position\x18\x01 \x01(\r\x12j\n\x07members\x18\x02 \x03(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x03 \x01(\r\x1a\x82\x01\n\nGroupInfos\x12t\n\x0bgroup_infos\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbe\x04\n\x16GetGroupActionsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0H\x00\x1aL\n\x0fStartAtActionId\x12\x17\n\x0fstart_action_id\x18\x01 \x01(\x0c\x12 \n\x18start_action_id_included\x18\x02 \x01(\x08\x1a\xc8\x02\n\x18GetGroupActionsRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12N\n\x06status\x18\x03 \x01(\x0e\x32>.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus\x12\x62\n\x12start_at_action_id\x18\x04 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionIdH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x42\x15\n\x13_start_at_action_idB\x08\n\x06_count\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\xeb\x1d\n\x17GetGroupActionsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0H\x00\x1a\xe8\x1c\n\x19GetGroupActionsResponseV0\x12r\n\rgroup_actions\x18\x01 \x01(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a[\n\tMintEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0crecipient_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x45\n\tBurnEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aJ\n\x0b\x46reezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aL\n\rUnfreezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x66\n\x17\x44\x65stroyFrozenFundsEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x13SharedEncryptedNote\x12\x18\n\x10sender_key_index\x18\x01 \x01(\r\x12\x1b\n\x13recipient_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a{\n\x15PersonalEncryptedNote\x12!\n\x19root_encryption_key_index\x18\x01 \x01(\r\x12\'\n\x1f\x64\x65rivation_encryption_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a\xa7\x03\n\rTransferEvent\x12\x14\n\x0crecipient_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x84\x01\n\x15shared_encrypted_note\x18\x03 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNoteH\x01\x88\x01\x01\x12\x88\x01\n\x17personal_encrypted_note\x18\x04 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNoteH\x02\x88\x01\x01\x12\x0e\n\x06\x61mount\x18\x05 \x01(\x04\x42\x0e\n\x0c_public_noteB\x18\n\x16_shared_encrypted_noteB\x1a\n\x18_personal_encrypted_note\x1a\xe9\x01\n\x14\x45mergencyActionEvent\x12\x81\x01\n\x0b\x61\x63tion_type\x18\x01 \x01(\x0e\x32l.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\"#\n\nActionType\x12\t\n\x05PAUSE\x10\x00\x12\n\n\x06RESUME\x10\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x16TokenConfigUpdateEvent\x12 \n\x18token_config_update_item\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\xfc\x02\n\x10GroupActionEvent\x12n\n\x0btoken_event\x18\x01 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEventH\x00\x12t\n\x0e\x64ocument_event\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEventH\x00\x12t\n\x0e\x63ontract_event\x18\x03 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEventH\x00\x42\x0c\n\nevent_type\x1a\x8b\x01\n\rDocumentEvent\x12r\n\x06\x63reate\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEventH\x00\x42\x06\n\x04type\x1a/\n\x13\x44ocumentCreateEvent\x12\x18\n\x10\x63reated_document\x18\x01 \x01(\x0c\x1a/\n\x13\x43ontractUpdateEvent\x12\x18\n\x10updated_contract\x18\x01 \x01(\x0c\x1a\x8b\x01\n\rContractEvent\x12r\n\x06update\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEventH\x00\x42\x06\n\x04type\x1a\xbb\x07\n\nTokenEvent\x12\x66\n\x04mint\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEventH\x00\x12\x66\n\x04\x62urn\x18\x02 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEventH\x00\x12j\n\x06\x66reeze\x18\x03 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEventH\x00\x12n\n\x08unfreeze\x18\x04 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEventH\x00\x12\x84\x01\n\x14\x64\x65stroy_frozen_funds\x18\x05 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEventH\x00\x12n\n\x08transfer\x18\x06 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEventH\x00\x12}\n\x10\x65mergency_action\x18\x07 \x01(\x0b\x32\x61.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEventH\x00\x12\x82\x01\n\x13token_config_update\x18\x08 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEventH\x00\x42\x06\n\x04type\x1a\x93\x01\n\x10GroupActionEntry\x12\x11\n\taction_id\x18\x01 \x01(\x0c\x12l\n\x05\x65vent\x18\x02 \x01(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent\x1a\x84\x01\n\x0cGroupActions\x12t\n\rgroup_actions\x18\x01 \x03(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntryB\x08\n\x06resultB\t\n\x07version\"\x88\x03\n\x1cGetGroupActionSignersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0H\x00\x1a\xce\x01\n\x1eGetGroupActionSignersRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12T\n\x06status\x18\x03 \x01(\x0e\x32\x44.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus\x12\x11\n\taction_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\x8b\x05\n\x1dGetGroupActionSignersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0H\x00\x1a\xf6\x03\n\x1fGetGroupActionSignersResponseV0\x12\x8b\x01\n\x14group_action_signers\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x35\n\x11GroupActionSigner\x12\x11\n\tsigner_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x91\x01\n\x12GroupActionSigners\x12{\n\x07signers\x18\x01 \x03(\x0b\x32j.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignerB\x08\n\x06resultB\t\n\x07version*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\xe6.\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.GetStatusResponse\x12\x8a\x01\n\x15getCurrentQuorumsInfo\x12\x37.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest\x1a\x38.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse\x12\x93\x01\n\x18getIdentityTokenBalances\x12:.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse\x12\x99\x01\n\x1agetIdentitiesTokenBalances\x12<.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest\x1a=.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse\x12\x8a\x01\n\x15getIdentityTokenInfos\x12\x37.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse\x12\x90\x01\n\x17getIdentitiesTokenInfos\x12\x39.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest\x1a:.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse\x12{\n\x10getTokenStatuses\x12\x32.org.dash.platform.dapi.v0.GetTokenStatusesRequest\x1a\x33.org.dash.platform.dapi.v0.GetTokenStatusesResponse\x12\x84\x01\n\x13getTokenTotalSupply\x12\x35.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest\x1a\x36.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse\x12o\n\x0cgetGroupInfo\x12..org.dash.platform.dapi.v0.GetGroupInfoRequest\x1a/.org.dash.platform.dapi.v0.GetGroupInfoResponse\x12r\n\rgetGroupInfos\x12/.org.dash.platform.dapi.v0.GetGroupInfosRequest\x1a\x30.org.dash.platform.dapi.v0.GetGroupInfosResponse\x12x\n\x0fgetGroupActions\x12\x31.org.dash.platform.dapi.v0.GetGroupActionsRequest\x1a\x32.org.dash.platform.dapi.v0.GetGroupActionsResponse\x12\x8a\x01\n\x15getGroupActionSigners\x12\x37.org.dash.platform.dapi.v0.GetGroupActionSignersRequest\x1a\x38.org.dash.platform.dapi.v0.GetGroupActionSignersResponseb\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=31512, - serialized_end=31602, + serialized_start=45338, + serialized_end=45428, ) _sym_db.RegisterEnumDescriptor(_KEYPURPOSE) @@ -125,8 +125,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=9342, - serialized_end=9422, + serialized_start=9693, + serialized_end=9773, ) _sym_db.RegisterEnumDescriptor(_GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST_DOCUMENTCONTESTEDSTATUS) @@ -160,8 +160,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=9572, - serialized_end=9634, + serialized_start=9923, + serialized_end=9985, ) _sym_db.RegisterEnumDescriptor(_GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYREQUEST_TYPE) @@ -190,8 +190,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=21587, - serialized_end=21660, + serialized_start=22115, + serialized_end=22188, ) _sym_db.RegisterEnumDescriptor(_GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0_RESULTTYPE) @@ -220,8 +220,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=22574, - serialized_end=22653, + serialized_start=23102, + serialized_end=23181, ) _sym_db.RegisterEnumDescriptor(_GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_FINISHEDVOTEINFO_FINISHEDVOTEOUTCOME) @@ -250,11 +250,86 @@ ], containing_type=None, serialized_options=None, - serialized_start=26282, - serialized_end=26343, + serialized_start=26810, + serialized_end=26871, ) _sym_db.RegisterEnumDescriptor(_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_RESOURCEVOTECHOICE_VOTECHOICETYPE) +_GETGROUPACTIONSREQUEST_ACTIONSTATUS = _descriptor.EnumDescriptor( + name='ActionStatus', + full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='ACTIVE', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='CLOSED', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=40416, + serialized_end=40454, +) +_sym_db.RegisterEnumDescriptor(_GETGROUPACTIONSREQUEST_ACTIONSTATUS) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT_ACTIONTYPE = _descriptor.EnumDescriptor( + name='ActionType', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='PAUSE', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='RESUME', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=42105, + serialized_end=42140, +) +_sym_db.RegisterEnumDescriptor(_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT_ACTIONTYPE) + +_GETGROUPACTIONSIGNERSREQUEST_ACTIONSTATUS = _descriptor.EnumDescriptor( + name='ActionStatus', + full_name='org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='ACTIVE', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='CLOSED', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=40416, + serialized_end=40454, +) +_sym_db.RegisterEnumDescriptor(_GETGROUPACTIONSIGNERSREQUEST_ACTIONSTATUS) + _PROOF = _descriptor.Descriptor( name='Proof', @@ -2752,8 +2827,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9081, - serialized_end=9422, + serialized_start=9432, + serialized_end=9773, ) _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYREQUEST = _descriptor.Descriptor( @@ -2791,8 +2866,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9425, - serialized_end=9634, + serialized_start=9776, + serialized_end=9985, ) _GETPROOFSREQUEST_GETPROOFSREQUESTV0_CONTRACTREQUEST = _descriptor.Descriptor( @@ -2822,8 +2897,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9636, - serialized_end=9674, + serialized_start=9987, + serialized_end=10025, ) _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST_CONTESTEDRESOURCEVOTESTATUSREQUEST = _descriptor.Descriptor( @@ -2881,8 +2956,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9867, - serialized_end=10020, + serialized_start=10218, + serialized_end=10371, ) _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST = _descriptor.Descriptor( @@ -2917,8 +2992,115 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=9677, - serialized_end=10036, + serialized_start=10028, + serialized_end=10387, +) + +_GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYTOKENBALANCEREQUEST = _descriptor.Descriptor( + name='IdentityTokenBalanceRequest', + full_name='org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_id', full_name='org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.token_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='identity_id', full_name='org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.identity_id', index=1, + number=2, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10389, + serialized_end=10457, +) + +_GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYTOKENINFOREQUEST = _descriptor.Descriptor( + name='IdentityTokenInfoRequest', + full_name='org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_id', full_name='org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.token_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='identity_id', full_name='org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.identity_id', index=1, + number=2, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10459, + serialized_end=10524, +) + +_GETPROOFSREQUEST_GETPROOFSREQUESTV0_TOKENSTATUSREQUEST = _descriptor.Descriptor( + name='TokenStatusRequest', + full_name='org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_id', full_name='org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.token_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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10526, + serialized_end=10564, ) _GETPROOFSREQUEST_GETPROOFSREQUESTV0 = _descriptor.Descriptor( @@ -2957,10 +3139,31 @@ 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='identity_token_balances', full_name='org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.identity_token_balances', index=4, + number=5, 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), + _descriptor.FieldDescriptor( + name='identity_token_infos', full_name='org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.identity_token_infos', index=5, + number=6, 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), + _descriptor.FieldDescriptor( + name='token_statuses', full_name='org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.token_statuses', index=6, + number=7, 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=[_GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST, _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYREQUEST, _GETPROOFSREQUEST_GETPROOFSREQUESTV0_CONTRACTREQUEST, _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST, ], + nested_types=[_GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST, _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYREQUEST, _GETPROOFSREQUEST_GETPROOFSREQUESTV0_CONTRACTREQUEST, _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST, _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYTOKENBALANCEREQUEST, _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYTOKENINFOREQUEST, _GETPROOFSREQUEST_GETPROOFSREQUESTV0_TOKENSTATUSREQUEST, ], enum_types=[ ], serialized_options=None, @@ -2970,7 +3173,7 @@ oneofs=[ ], serialized_start=8663, - serialized_end=10036, + serialized_end=10564, ) _GETPROOFSREQUEST = _descriptor.Descriptor( @@ -3006,7 +3209,7 @@ fields=[]), ], serialized_start=8564, - serialized_end=10047, + serialized_end=10575, ) @@ -3049,8 +3252,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10152, - serialized_end=10297, + serialized_start=10680, + serialized_end=10825, ) _GETPROOFSRESPONSE = _descriptor.Descriptor( @@ -3085,8 +3288,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10050, - serialized_end=10308, + serialized_start=10578, + serialized_end=10836, ) @@ -3124,8 +3327,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10427, - serialized_end=10480, + serialized_start=10955, + serialized_end=11008, ) _GETDATACONTRACTREQUEST = _descriptor.Descriptor( @@ -3160,8 +3363,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10311, - serialized_end=10491, + serialized_start=10839, + serialized_end=11019, ) @@ -3211,8 +3414,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10614, - serialized_end=10790, + serialized_start=11142, + serialized_end=11318, ) _GETDATACONTRACTRESPONSE = _descriptor.Descriptor( @@ -3247,8 +3450,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10494, - serialized_end=10801, + serialized_start=11022, + serialized_end=11329, ) @@ -3286,8 +3489,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10923, - serialized_end=10978, + serialized_start=11451, + serialized_end=11506, ) _GETDATACONTRACTSREQUEST = _descriptor.Descriptor( @@ -3322,8 +3525,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10804, - serialized_end=10989, + serialized_start=11332, + serialized_end=11517, ) @@ -3361,8 +3564,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11114, - serialized_end=11205, + serialized_start=11642, + serialized_end=11733, ) _GETDATACONTRACTSRESPONSE_DATACONTRACTS = _descriptor.Descriptor( @@ -3392,8 +3595,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11207, - serialized_end=11324, + serialized_start=11735, + serialized_end=11852, ) _GETDATACONTRACTSRESPONSE_GETDATACONTRACTSRESPONSEV0 = _descriptor.Descriptor( @@ -3442,8 +3645,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11327, - serialized_end=11572, + serialized_start=11855, + serialized_end=12100, ) _GETDATACONTRACTSRESPONSE = _descriptor.Descriptor( @@ -3478,8 +3681,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10992, - serialized_end=11583, + serialized_start=11520, + serialized_end=12111, ) @@ -3538,8 +3741,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11724, - serialized_end=11896, + serialized_start=12252, + serialized_end=12424, ) _GETDATACONTRACTHISTORYREQUEST = _descriptor.Descriptor( @@ -3574,8 +3777,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11586, - serialized_end=11907, + serialized_start=12114, + serialized_end=12435, ) @@ -3613,8 +3816,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12347, - serialized_end=12402, + serialized_start=12875, + serialized_end=12930, ) _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORY = _descriptor.Descriptor( @@ -3644,8 +3847,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12405, - serialized_end=12575, + serialized_start=12933, + serialized_end=13103, ) _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0 = _descriptor.Descriptor( @@ -3694,8 +3897,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12051, - serialized_end=12585, + serialized_start=12579, + serialized_end=13113, ) _GETDATACONTRACTHISTORYRESPONSE = _descriptor.Descriptor( @@ -3730,8 +3933,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11910, - serialized_end=12596, + serialized_start=12438, + serialized_end=13124, ) @@ -3816,8 +4019,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12707, - serialized_end=12894, + serialized_start=13235, + serialized_end=13422, ) _GETDOCUMENTSREQUEST = _descriptor.Descriptor( @@ -3852,8 +4055,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12599, - serialized_end=12905, + serialized_start=13127, + serialized_end=13433, ) @@ -3884,8 +4087,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13262, - serialized_end=13292, + serialized_start=13790, + serialized_end=13820, ) _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV0 = _descriptor.Descriptor( @@ -3934,8 +4137,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13019, - serialized_end=13302, + serialized_start=13547, + serialized_end=13830, ) _GETDOCUMENTSRESPONSE = _descriptor.Descriptor( @@ -3970,8 +4173,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12908, - serialized_end=13313, + serialized_start=13436, + serialized_end=13841, ) @@ -4009,8 +4212,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13465, - serialized_end=13542, + serialized_start=13993, + serialized_end=14070, ) _GETIDENTITYBYPUBLICKEYHASHREQUEST = _descriptor.Descriptor( @@ -4045,8 +4248,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13316, - serialized_end=13553, + serialized_start=13844, + serialized_end=14081, ) @@ -4096,8 +4299,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13709, - serialized_end=13891, + serialized_start=14237, + serialized_end=14419, ) _GETIDENTITYBYPUBLICKEYHASHRESPONSE = _descriptor.Descriptor( @@ -4132,8 +4335,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13556, - serialized_end=13902, + serialized_start=14084, + serialized_end=14430, ) @@ -4171,8 +4374,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14060, - serialized_end=14145, + serialized_start=14588, + serialized_end=14673, ) _WAITFORSTATETRANSITIONRESULTREQUEST = _descriptor.Descriptor( @@ -4207,8 +4410,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13905, - serialized_end=14156, + serialized_start=14433, + serialized_end=14684, ) @@ -4258,8 +4461,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14318, - serialized_end=14557, + serialized_start=14846, + serialized_end=15085, ) _WAITFORSTATETRANSITIONRESULTRESPONSE = _descriptor.Descriptor( @@ -4294,8 +4497,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14159, - serialized_end=14568, + serialized_start=14687, + serialized_end=15096, ) @@ -4333,8 +4536,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14696, - serialized_end=14756, + serialized_start=15224, + serialized_end=15284, ) _GETCONSENSUSPARAMSREQUEST = _descriptor.Descriptor( @@ -4369,8 +4572,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14571, - serialized_end=14767, + serialized_start=15099, + serialized_end=15295, ) @@ -4415,8 +4618,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14898, - serialized_end=14978, + serialized_start=15426, + serialized_end=15506, ) _GETCONSENSUSPARAMSRESPONSE_CONSENSUSPARAMSEVIDENCE = _descriptor.Descriptor( @@ -4460,8 +4663,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14980, - serialized_end=15078, + serialized_start=15508, + serialized_end=15606, ) _GETCONSENSUSPARAMSRESPONSE_GETCONSENSUSPARAMSRESPONSEV0 = _descriptor.Descriptor( @@ -4498,8 +4701,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15081, - serialized_end=15299, + serialized_start=15609, + serialized_end=15827, ) _GETCONSENSUSPARAMSRESPONSE = _descriptor.Descriptor( @@ -4534,8 +4737,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14770, - serialized_end=15310, + serialized_start=15298, + serialized_end=15838, ) @@ -4566,8 +4769,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15474, - serialized_end=15530, + serialized_start=16002, + serialized_end=16058, ) _GETPROTOCOLVERSIONUPGRADESTATEREQUEST = _descriptor.Descriptor( @@ -4602,8 +4805,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15313, - serialized_end=15541, + serialized_start=15841, + serialized_end=16069, ) @@ -4634,8 +4837,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16006, - serialized_end=16156, + serialized_start=16534, + serialized_end=16684, ) _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0_VERSIONENTRY = _descriptor.Descriptor( @@ -4672,8 +4875,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16158, - serialized_end=16216, + serialized_start=16686, + serialized_end=16744, ) _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0 = _descriptor.Descriptor( @@ -4722,8 +4925,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15709, - serialized_end=16226, + serialized_start=16237, + serialized_end=16754, ) _GETPROTOCOLVERSIONUPGRADESTATERESPONSE = _descriptor.Descriptor( @@ -4758,8 +4961,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15544, - serialized_end=16237, + serialized_start=16072, + serialized_end=16765, ) @@ -4804,8 +5007,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16417, - serialized_end=16520, + serialized_start=16945, + serialized_end=17048, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSREQUEST = _descriptor.Descriptor( @@ -4840,8 +5043,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16240, - serialized_end=16531, + serialized_start=16768, + serialized_end=17059, ) @@ -4872,8 +5075,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17034, - serialized_end=17209, + serialized_start=17562, + serialized_end=17737, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0_VERSIONSIGNAL = _descriptor.Descriptor( @@ -4910,8 +5113,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17211, - serialized_end=17264, + serialized_start=17739, + serialized_end=17792, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0 = _descriptor.Descriptor( @@ -4960,8 +5163,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16715, - serialized_end=17274, + serialized_start=17243, + serialized_end=17802, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE = _descriptor.Descriptor( @@ -4996,8 +5199,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16534, - serialized_end=17285, + serialized_start=17062, + serialized_end=17813, ) @@ -5049,8 +5252,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17398, - serialized_end=17522, + serialized_start=17926, + serialized_end=18050, ) _GETEPOCHSINFOREQUEST = _descriptor.Descriptor( @@ -5085,8 +5288,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17288, - serialized_end=17533, + serialized_start=17816, + serialized_end=18061, ) @@ -5117,8 +5320,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17894, - serialized_end=18011, + serialized_start=18422, + serialized_end=18539, ) _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0_EPOCHINFO = _descriptor.Descriptor( @@ -5183,8 +5386,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18014, - serialized_end=18172, + serialized_start=18542, + serialized_end=18700, ) _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0 = _descriptor.Descriptor( @@ -5233,8 +5436,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17650, - serialized_end=18182, + serialized_start=18178, + serialized_end=18710, ) _GETEPOCHSINFORESPONSE = _descriptor.Descriptor( @@ -5269,8 +5472,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17536, - serialized_end=18193, + serialized_start=18064, + serialized_end=18721, ) @@ -5308,8 +5511,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18688, - serialized_end=18757, + serialized_start=19216, + serialized_end=19285, ) _GETCONTESTEDRESOURCESREQUEST_GETCONTESTEDRESOURCESREQUESTV0 = _descriptor.Descriptor( @@ -5405,8 +5608,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=18331, - serialized_end=18791, + serialized_start=18859, + serialized_end=19319, ) _GETCONTESTEDRESOURCESREQUEST = _descriptor.Descriptor( @@ -5441,8 +5644,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=18196, - serialized_end=18802, + serialized_start=18724, + serialized_end=19330, ) @@ -5473,8 +5676,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=19244, - serialized_end=19304, + serialized_start=19772, + serialized_end=19832, ) _GETCONTESTEDRESOURCESRESPONSE_GETCONTESTEDRESOURCESRESPONSEV0 = _descriptor.Descriptor( @@ -5523,8 +5726,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=18943, - serialized_end=19314, + serialized_start=19471, + serialized_end=19842, ) _GETCONTESTEDRESOURCESRESPONSE = _descriptor.Descriptor( @@ -5559,8 +5762,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=18805, - serialized_end=19325, + serialized_start=19333, + serialized_end=19853, ) @@ -5598,8 +5801,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=19838, - serialized_end=19907, + serialized_start=20366, + serialized_end=20435, ) _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0_ENDATTIMEINFO = _descriptor.Descriptor( @@ -5636,8 +5839,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=19909, - serialized_end=19972, + serialized_start=20437, + serialized_end=20500, ) _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0 = _descriptor.Descriptor( @@ -5722,8 +5925,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=19463, - serialized_end=20031, + serialized_start=19991, + serialized_end=20559, ) _GETVOTEPOLLSBYENDDATEREQUEST = _descriptor.Descriptor( @@ -5758,8 +5961,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=19328, - serialized_end=20042, + serialized_start=19856, + serialized_end=20570, ) @@ -5797,8 +6000,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=20491, - serialized_end=20573, + serialized_start=21019, + serialized_end=21101, ) _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0_SERIALIZEDVOTEPOLLSBYTIMESTAMPS = _descriptor.Descriptor( @@ -5835,8 +6038,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=20576, - serialized_end=20791, + serialized_start=21104, + serialized_end=21319, ) _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0 = _descriptor.Descriptor( @@ -5885,8 +6088,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=20183, - serialized_end=20801, + serialized_start=20711, + serialized_end=21329, ) _GETVOTEPOLLSBYENDDATERESPONSE = _descriptor.Descriptor( @@ -5921,8 +6124,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=20045, - serialized_end=20812, + serialized_start=20573, + serialized_end=21340, ) @@ -5960,8 +6163,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=21501, - serialized_end=21585, + serialized_start=22029, + serialized_end=22113, ) _GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0 = _descriptor.Descriptor( @@ -6058,8 +6261,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=20974, - serialized_end=21699, + serialized_start=21502, + serialized_end=22227, ) _GETCONTESTEDRESOURCEVOTESTATEREQUEST = _descriptor.Descriptor( @@ -6094,8 +6297,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=20815, - serialized_end=21710, + serialized_start=21343, + serialized_end=22238, ) @@ -6167,8 +6370,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=22210, - serialized_end=22676, + serialized_start=22738, + serialized_end=23204, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_CONTESTEDRESOURCECONTENDERS = _descriptor.Descriptor( @@ -6234,8 +6437,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=22679, - serialized_end=23131, + serialized_start=23207, + serialized_end=23659, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_CONTENDER = _descriptor.Descriptor( @@ -6289,8 +6492,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=23133, - serialized_end=23240, + serialized_start=23661, + serialized_end=23768, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0 = _descriptor.Descriptor( @@ -6339,8 +6542,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=21875, - serialized_end=23250, + serialized_start=22403, + serialized_end=23778, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE = _descriptor.Descriptor( @@ -6375,8 +6578,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=21713, - serialized_end=23261, + serialized_start=22241, + serialized_end=23789, ) @@ -6414,8 +6617,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=21501, - serialized_end=21585, + serialized_start=22029, + serialized_end=22113, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST_GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUESTV0 = _descriptor.Descriptor( @@ -6511,8 +6714,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=23448, - serialized_end=23978, + serialized_start=23976, + serialized_end=24506, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST = _descriptor.Descriptor( @@ -6547,8 +6750,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=23264, - serialized_end=23989, + serialized_start=23792, + serialized_end=24517, ) @@ -6586,8 +6789,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=24529, - serialized_end=24596, + serialized_start=25057, + serialized_end=25124, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE_GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSEV0 = _descriptor.Descriptor( @@ -6636,8 +6839,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24179, - serialized_end=24606, + serialized_start=24707, + serialized_end=25134, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE = _descriptor.Descriptor( @@ -6672,8 +6875,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=23992, - serialized_end=24617, + serialized_start=24520, + serialized_end=25145, ) @@ -6711,8 +6914,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=25166, - serialized_end=25263, + serialized_start=25694, + serialized_end=25791, ) _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST_GETCONTESTEDRESOURCEIDENTITYVOTESREQUESTV0 = _descriptor.Descriptor( @@ -6782,8 +6985,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24791, - serialized_end=25294, + serialized_start=25319, + serialized_end=25822, ) _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST = _descriptor.Descriptor( @@ -6818,8 +7021,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24620, - serialized_end=25305, + serialized_start=25148, + serialized_end=25833, ) @@ -6857,8 +7060,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=25808, - serialized_end=26055, + serialized_start=26336, + serialized_end=26583, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_RESOURCEVOTECHOICE = _descriptor.Descriptor( @@ -6901,8 +7104,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=26058, - serialized_end=26359, + serialized_start=26586, + serialized_end=26887, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_CONTESTEDRESOURCEIDENTITYVOTE = _descriptor.Descriptor( @@ -6953,8 +7156,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=26362, - serialized_end=26639, + serialized_start=26890, + serialized_end=27167, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0 = _descriptor.Descriptor( @@ -7003,8 +7206,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25482, - serialized_end=26649, + serialized_start=26010, + serialized_end=27177, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE = _descriptor.Descriptor( @@ -7039,8 +7242,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25308, - serialized_end=26660, + serialized_start=25836, + serialized_end=27188, ) @@ -7078,8 +7281,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=26824, - serialized_end=26892, + serialized_start=27352, + serialized_end=27420, ) _GETPREFUNDEDSPECIALIZEDBALANCEREQUEST = _descriptor.Descriptor( @@ -7114,8 +7317,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=26663, - serialized_end=26903, + serialized_start=27191, + serialized_end=27431, ) @@ -7165,8 +7368,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27071, - serialized_end=27256, + serialized_start=27599, + serialized_end=27784, ) _GETPREFUNDEDSPECIALIZEDBALANCERESPONSE = _descriptor.Descriptor( @@ -7201,8 +7404,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=26906, - serialized_end=27267, + serialized_start=27434, + serialized_end=27795, ) @@ -7233,8 +7436,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=27416, - serialized_end=27467, + serialized_start=27944, + serialized_end=27995, ) _GETTOTALCREDITSINPLATFORMREQUEST = _descriptor.Descriptor( @@ -7269,8 +7472,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27270, - serialized_end=27478, + serialized_start=27798, + serialized_end=28006, ) @@ -7320,8 +7523,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27631, - serialized_end=27811, + serialized_start=28159, + serialized_end=28339, ) _GETTOTALCREDITSINPLATFORMRESPONSE = _descriptor.Descriptor( @@ -7356,8 +7559,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27481, - serialized_end=27822, + serialized_start=28009, + serialized_end=28350, ) @@ -7402,8 +7605,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=27941, - serialized_end=28010, + serialized_start=28469, + serialized_end=28538, ) _GETPATHELEMENTSREQUEST = _descriptor.Descriptor( @@ -7438,8 +7641,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27825, - serialized_end=28021, + serialized_start=28353, + serialized_end=28549, ) @@ -7470,8 +7673,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=28394, - serialized_end=28422, + serialized_start=28922, + serialized_end=28950, ) _GETPATHELEMENTSRESPONSE_GETPATHELEMENTSRESPONSEV0 = _descriptor.Descriptor( @@ -7520,8 +7723,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=28144, - serialized_end=28432, + serialized_start=28672, + serialized_end=28960, ) _GETPATHELEMENTSRESPONSE = _descriptor.Descriptor( @@ -7556,8 +7759,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=28024, - serialized_end=28443, + serialized_start=28552, + serialized_end=28971, ) @@ -7581,8 +7784,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=28544, - serialized_end=28564, + serialized_start=29072, + serialized_end=29092, ) _GETSTATUSREQUEST = _descriptor.Descriptor( @@ -7617,8 +7820,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=28446, - serialized_end=28575, + serialized_start=28974, + serialized_end=29103, ) @@ -7673,8 +7876,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=29452, - serialized_end=29546, + serialized_start=29980, + serialized_end=30074, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL_TENDERDASH = _descriptor.Descriptor( @@ -7711,8 +7914,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=29779, - serialized_end=29819, + serialized_start=30307, + serialized_end=30347, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL_DRIVE = _descriptor.Descriptor( @@ -7749,8 +7952,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=29821, - serialized_end=29861, + serialized_start=30349, + serialized_end=30389, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL = _descriptor.Descriptor( @@ -7787,8 +7990,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=29549, - serialized_end=29861, + serialized_start=30077, + serialized_end=30389, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION = _descriptor.Descriptor( @@ -7825,8 +8028,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=29239, - serialized_end=29861, + serialized_start=29767, + serialized_end=30389, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_TIME = _descriptor.Descriptor( @@ -7892,8 +8095,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=29863, - serialized_end=29978, + serialized_start=30391, + serialized_end=30506, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_NODE = _descriptor.Descriptor( @@ -7935,8 +8138,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=29980, - serialized_end=30040, + serialized_start=30508, + serialized_end=30568, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_CHAIN = _descriptor.Descriptor( @@ -8027,8 +8230,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=30043, - serialized_end=30338, + serialized_start=30571, + serialized_end=30866, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_NETWORK = _descriptor.Descriptor( @@ -8072,8 +8275,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=30340, - serialized_end=30407, + serialized_start=30868, + serialized_end=30935, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_STATESYNC = _descriptor.Descriptor( @@ -8152,8 +8355,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=30410, - serialized_end=30643, + serialized_start=30938, + serialized_end=31171, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0 = _descriptor.Descriptor( @@ -8218,8 +8421,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=28680, - serialized_end=30643, + serialized_start=29208, + serialized_end=31171, ) _GETSTATUSRESPONSE = _descriptor.Descriptor( @@ -8254,8 +8457,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=28578, - serialized_end=30654, + serialized_start=29106, + serialized_end=31182, ) @@ -8279,8 +8482,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=30791, - serialized_end=30823, + serialized_start=31319, + serialized_end=31351, ) _GETCURRENTQUORUMSINFOREQUEST = _descriptor.Descriptor( @@ -8315,8 +8518,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=30657, - serialized_end=30834, + serialized_start=31185, + serialized_end=31362, ) @@ -8361,8 +8564,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=30974, - serialized_end=31044, + serialized_start=31502, + serialized_end=31572, ) _GETCURRENTQUORUMSINFORESPONSE_VALIDATORSETV0 = _descriptor.Descriptor( @@ -8413,8 +8616,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=31047, - serialized_end=31222, + serialized_start=31575, + serialized_end=31750, ) _GETCURRENTQUORUMSINFORESPONSE_GETCURRENTQUORUMSINFORESPONSEV0 = _descriptor.Descriptor( @@ -8472,8 +8675,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=31225, - serialized_end=31499, + serialized_start=31753, + serialized_end=32027, ) _GETCURRENTQUORUMSINFORESPONSE = _descriptor.Descriptor( @@ -8508,109 +8711,3515 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=30837, - serialized_end=31510, + serialized_start=31365, + serialized_end=32038, ) -_GETIDENTITYREQUEST_GETIDENTITYREQUESTV0.containing_type = _GETIDENTITYREQUEST -_GETIDENTITYREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYREQUEST_GETIDENTITYREQUESTV0 -_GETIDENTITYREQUEST.oneofs_by_name['version'].fields.append( - _GETIDENTITYREQUEST.fields_by_name['v0']) -_GETIDENTITYREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITYREQUEST.oneofs_by_name['version'] -_GETIDENTITYNONCEREQUEST_GETIDENTITYNONCEREQUESTV0.containing_type = _GETIDENTITYNONCEREQUEST -_GETIDENTITYNONCEREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYNONCEREQUEST_GETIDENTITYNONCEREQUESTV0 -_GETIDENTITYNONCEREQUEST.oneofs_by_name['version'].fields.append( - _GETIDENTITYNONCEREQUEST.fields_by_name['v0']) -_GETIDENTITYNONCEREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITYNONCEREQUEST.oneofs_by_name['version'] -_GETIDENTITYCONTRACTNONCEREQUEST_GETIDENTITYCONTRACTNONCEREQUESTV0.containing_type = _GETIDENTITYCONTRACTNONCEREQUEST -_GETIDENTITYCONTRACTNONCEREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYCONTRACTNONCEREQUEST_GETIDENTITYCONTRACTNONCEREQUESTV0 -_GETIDENTITYCONTRACTNONCEREQUEST.oneofs_by_name['version'].fields.append( - _GETIDENTITYCONTRACTNONCEREQUEST.fields_by_name['v0']) -_GETIDENTITYCONTRACTNONCEREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITYCONTRACTNONCEREQUEST.oneofs_by_name['version'] -_GETIDENTITYBALANCEREQUEST_GETIDENTITYBALANCEREQUESTV0.containing_type = _GETIDENTITYBALANCEREQUEST -_GETIDENTITYBALANCEREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYBALANCEREQUEST_GETIDENTITYBALANCEREQUESTV0 -_GETIDENTITYBALANCEREQUEST.oneofs_by_name['version'].fields.append( - _GETIDENTITYBALANCEREQUEST.fields_by_name['v0']) -_GETIDENTITYBALANCEREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITYBALANCEREQUEST.oneofs_by_name['version'] -_GETIDENTITYBALANCEANDREVISIONREQUEST_GETIDENTITYBALANCEANDREVISIONREQUESTV0.containing_type = _GETIDENTITYBALANCEANDREVISIONREQUEST -_GETIDENTITYBALANCEANDREVISIONREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYBALANCEANDREVISIONREQUEST_GETIDENTITYBALANCEANDREVISIONREQUESTV0 -_GETIDENTITYBALANCEANDREVISIONREQUEST.oneofs_by_name['version'].fields.append( - _GETIDENTITYBALANCEANDREVISIONREQUEST.fields_by_name['v0']) -_GETIDENTITYBALANCEANDREVISIONREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITYBALANCEANDREVISIONREQUEST.oneofs_by_name['version'] -_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.fields_by_name['proof'].message_type = _PROOF -_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA -_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.containing_type = _GETIDENTITYRESPONSE -_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.oneofs_by_name['result'].fields.append( - _GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.fields_by_name['identity']) -_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.fields_by_name['identity'].containing_oneof = _GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.oneofs_by_name['result'] -_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.oneofs_by_name['result'].fields.append( - _GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.fields_by_name['proof']) -_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.oneofs_by_name['result'] -_GETIDENTITYRESPONSE.fields_by_name['v0'].message_type = _GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0 -_GETIDENTITYRESPONSE.oneofs_by_name['version'].fields.append( - _GETIDENTITYRESPONSE.fields_by_name['v0']) -_GETIDENTITYRESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITYRESPONSE.oneofs_by_name['version'] -_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.fields_by_name['proof'].message_type = _PROOF -_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA -_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.containing_type = _GETIDENTITYNONCERESPONSE -_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.oneofs_by_name['result'].fields.append( - _GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.fields_by_name['identity_nonce']) -_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.fields_by_name['identity_nonce'].containing_oneof = _GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.oneofs_by_name['result'] -_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.oneofs_by_name['result'].fields.append( - _GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.fields_by_name['proof']) -_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.oneofs_by_name['result'] -_GETIDENTITYNONCERESPONSE.fields_by_name['v0'].message_type = _GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0 -_GETIDENTITYNONCERESPONSE.oneofs_by_name['version'].fields.append( - _GETIDENTITYNONCERESPONSE.fields_by_name['v0']) -_GETIDENTITYNONCERESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITYNONCERESPONSE.oneofs_by_name['version'] -_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.fields_by_name['proof'].message_type = _PROOF -_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA -_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.containing_type = _GETIDENTITYCONTRACTNONCERESPONSE -_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.oneofs_by_name['result'].fields.append( - _GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.fields_by_name['identity_contract_nonce']) -_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.fields_by_name['identity_contract_nonce'].containing_oneof = _GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.oneofs_by_name['result'] -_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.oneofs_by_name['result'].fields.append( - _GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.fields_by_name['proof']) -_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.oneofs_by_name['result'] -_GETIDENTITYCONTRACTNONCERESPONSE.fields_by_name['v0'].message_type = _GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0 -_GETIDENTITYCONTRACTNONCERESPONSE.oneofs_by_name['version'].fields.append( - _GETIDENTITYCONTRACTNONCERESPONSE.fields_by_name['v0']) -_GETIDENTITYCONTRACTNONCERESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITYCONTRACTNONCERESPONSE.oneofs_by_name['version'] -_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.fields_by_name['proof'].message_type = _PROOF -_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA -_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.containing_type = _GETIDENTITYBALANCERESPONSE -_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.oneofs_by_name['result'].fields.append( - _GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.fields_by_name['balance']) -_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.fields_by_name['balance'].containing_oneof = _GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.oneofs_by_name['result'] -_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.oneofs_by_name['result'].fields.append( - _GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.fields_by_name['proof']) -_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.oneofs_by_name['result'] -_GETIDENTITYBALANCERESPONSE.fields_by_name['v0'].message_type = _GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0 -_GETIDENTITYBALANCERESPONSE.oneofs_by_name['version'].fields.append( - _GETIDENTITYBALANCERESPONSE.fields_by_name['v0']) -_GETIDENTITYBALANCERESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITYBALANCERESPONSE.oneofs_by_name['version'] -_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0_BALANCEANDREVISION.containing_type = _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0 -_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['balance_and_revision'].message_type = _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0_BALANCEANDREVISION -_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['proof'].message_type = _PROOF -_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA -_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.containing_type = _GETIDENTITYBALANCEANDREVISIONRESPONSE -_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.oneofs_by_name['result'].fields.append( - _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['balance_and_revision']) -_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['balance_and_revision'].containing_oneof = _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.oneofs_by_name['result'] -_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.oneofs_by_name['result'].fields.append( - _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['proof']) -_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.oneofs_by_name['result'] -_GETIDENTITYBALANCEANDREVISIONRESPONSE.fields_by_name['v0'].message_type = _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0 -_GETIDENTITYBALANCEANDREVISIONRESPONSE.oneofs_by_name['version'].fields.append( - _GETIDENTITYBALANCEANDREVISIONRESPONSE.fields_by_name['v0']) -_GETIDENTITYBALANCEANDREVISIONRESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITYBALANCEANDREVISIONRESPONSE.oneofs_by_name['version'] -_KEYREQUESTTYPE.fields_by_name['all_keys'].message_type = _ALLKEYS -_KEYREQUESTTYPE.fields_by_name['specific_keys'].message_type = _SPECIFICKEYS -_KEYREQUESTTYPE.fields_by_name['search_key'].message_type = _SEARCHKEY -_KEYREQUESTTYPE.oneofs_by_name['request'].fields.append( - _KEYREQUESTTYPE.fields_by_name['all_keys']) -_KEYREQUESTTYPE.fields_by_name['all_keys'].containing_oneof = _KEYREQUESTTYPE.oneofs_by_name['request'] -_KEYREQUESTTYPE.oneofs_by_name['request'].fields.append( + +_GETIDENTITYTOKENBALANCESREQUEST_GETIDENTITYTOKENBALANCESREQUESTV0 = _descriptor.Descriptor( + name='GetIdentityTokenBalancesRequestV0', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0', + 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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.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='token_ids', full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.token_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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.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=32184, + serialized_end=32274, +) + +_GETIDENTITYTOKENBALANCESREQUEST = _descriptor.Descriptor( + name='GetIdentityTokenBalancesRequest', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest', + 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.GetIdentityTokenBalancesRequest.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=[_GETIDENTITYTOKENBALANCESREQUEST_GETIDENTITYTOKENBALANCESREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=32041, + serialized_end=32285, +) + + +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCEENTRY = _descriptor.Descriptor( + name='TokenBalanceEntry', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_id', full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.token_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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry._balance', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=32724, + serialized_end=32795, +) + +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCES = _descriptor.Descriptor( + name='TokenBalances', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_balances', full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.token_balances', 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=32798, + serialized_end=32952, +) + +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0 = _descriptor.Descriptor( + name='GetIdentityTokenBalancesResponseV0', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_balances', full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.token_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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.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=[_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCEENTRY, _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCES, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=32435, + serialized_end=32962, +) + +_GETIDENTITYTOKENBALANCESRESPONSE = _descriptor.Descriptor( + name='GetIdentityTokenBalancesResponse', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse', + 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.GetIdentityTokenBalancesResponse.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=[_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=32288, + serialized_end=32973, +) + + +_GETIDENTITIESTOKENBALANCESREQUEST_GETIDENTITIESTOKENBALANCESREQUESTV0 = _descriptor.Descriptor( + name='GetIdentitiesTokenBalancesRequestV0', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_id', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.token_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='identity_ids', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.identity_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.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.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=33125, + serialized_end=33217, +) + +_GETIDENTITIESTOKENBALANCESREQUEST = _descriptor.Descriptor( + name='GetIdentitiesTokenBalancesRequest', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest', + 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.GetIdentitiesTokenBalancesRequest.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=[_GETIDENTITIESTOKENBALANCESREQUEST_GETIDENTITIESTOKENBALANCESREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=32976, + serialized_end=33228, +) + + +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCEENTRY = _descriptor.Descriptor( + name='IdentityTokenBalanceEntry', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry', + 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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry._balance', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=33696, + serialized_end=33778, +) + +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCES = _descriptor.Descriptor( + name='IdentityTokenBalances', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='identity_token_balances', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.identity_token_balances', 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=33781, + serialized_end=33964, +) + +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0 = _descriptor.Descriptor( + name='GetIdentitiesTokenBalancesResponseV0', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='identity_token_balances', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.identity_token_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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.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.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.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=[_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCEENTRY, _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCES, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=33384, + serialized_end=33974, +) + +_GETIDENTITIESTOKENBALANCESRESPONSE = _descriptor.Descriptor( + name='GetIdentitiesTokenBalancesResponse', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse', + 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.GetIdentitiesTokenBalancesResponse.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=[_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=33231, + serialized_end=33985, +) + + +_GETIDENTITYTOKENINFOSREQUEST_GETIDENTITYTOKENINFOSREQUESTV0 = _descriptor.Descriptor( + name='GetIdentityTokenInfosRequestV0', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0', + 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.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.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='token_ids', full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.token_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.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.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=34122, + serialized_end=34209, +) + +_GETIDENTITYTOKENINFOSREQUEST = _descriptor.Descriptor( + name='GetIdentityTokenInfosRequest', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest', + 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.GetIdentityTokenInfosRequest.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=[_GETIDENTITYTOKENINFOSREQUEST_GETIDENTITYTOKENINFOSREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=33988, + serialized_end=34220, +) + + +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENIDENTITYINFOENTRY = _descriptor.Descriptor( + name='TokenIdentityInfoEntry', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='frozen', full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.frozen', index=0, + number=1, 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=34634, + serialized_end=34674, +) + +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOENTRY = _descriptor.Descriptor( + name='TokenInfoEntry', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_id', full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.token_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='info', full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.info', 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_info', full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry._info', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=34677, + serialized_end=34853, +) + +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOS = _descriptor.Descriptor( + name='TokenInfos', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_infos', full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.token_infos', 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=34856, + serialized_end=34994, +) + +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0 = _descriptor.Descriptor( + name='GetIdentityTokenInfosResponseV0', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_infos', full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.token_infos', 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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.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=[_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENIDENTITYINFOENTRY, _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOENTRY, _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOS, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=34361, + serialized_end=35004, +) + +_GETIDENTITYTOKENINFOSRESPONSE = _descriptor.Descriptor( + name='GetIdentityTokenInfosResponse', + full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse', + 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.GetIdentityTokenInfosResponse.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=[_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=34223, + serialized_end=35015, +) + + +_GETIDENTITIESTOKENINFOSREQUEST_GETIDENTITIESTOKENINFOSREQUESTV0 = _descriptor.Descriptor( + name='GetIdentitiesTokenInfosRequestV0', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_id', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.token_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='identity_ids', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.identity_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.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.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=35158, + serialized_end=35247, +) + +_GETIDENTITIESTOKENINFOSREQUEST = _descriptor.Descriptor( + name='GetIdentitiesTokenInfosRequest', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest', + 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.GetIdentitiesTokenInfosRequest.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=[_GETIDENTITIESTOKENINFOSREQUEST_GETIDENTITIESTOKENINFOSREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=35018, + serialized_end=35258, +) + + +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENIDENTITYINFOENTRY = _descriptor.Descriptor( + name='TokenIdentityInfoEntry', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='frozen', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.frozen', index=0, + number=1, 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=34634, + serialized_end=34674, +) + +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENINFOENTRY = _descriptor.Descriptor( + name='TokenInfoEntry', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry', + 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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.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='info', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.info', 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_info', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry._info', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=35745, + serialized_end=35928, +) + +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_IDENTITYTOKENINFOS = _descriptor.Descriptor( + name='IdentityTokenInfos', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_infos', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.token_infos', 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=35931, + serialized_end=36082, +) + +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0 = _descriptor.Descriptor( + name='GetIdentitiesTokenInfosResponseV0', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='identity_token_infos', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.identity_token_infos', 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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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=[_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENIDENTITYINFOENTRY, _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENINFOENTRY, _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_IDENTITYTOKENINFOS, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=35405, + serialized_end=36092, +) + +_GETIDENTITIESTOKENINFOSRESPONSE = _descriptor.Descriptor( + name='GetIdentitiesTokenInfosResponse', + full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse', + 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.GetIdentitiesTokenInfosResponse.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=[_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=35261, + serialized_end=36103, +) + + +_GETTOKENSTATUSESREQUEST_GETTOKENSTATUSESREQUESTV0 = _descriptor.Descriptor( + name='GetTokenStatusesRequestV0', + full_name='org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_ids', full_name='org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.token_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), + _descriptor.FieldDescriptor( + name='prove', full_name='org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.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=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=36225, + serialized_end=36286, +) + +_GETTOKENSTATUSESREQUEST = _descriptor.Descriptor( + name='GetTokenStatusesRequest', + full_name='org.dash.platform.dapi.v0.GetTokenStatusesRequest', + 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.GetTokenStatusesRequest.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=[_GETTOKENSTATUSESREQUEST_GETTOKENSTATUSESREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetTokenStatusesRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=36106, + serialized_end=36297, +) + + +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSENTRY = _descriptor.Descriptor( + name='TokenStatusEntry', + full_name='org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_id', full_name='org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.token_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='paused', full_name='org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.paused', 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=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_paused', full_name='org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry._paused', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=36687, + serialized_end=36755, +) + +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSES = _descriptor.Descriptor( + name='TokenStatuses', + full_name='org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_statuses', full_name='org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.token_statuses', 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=36758, + serialized_end=36894, +) + +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0 = _descriptor.Descriptor( + name='GetTokenStatusesResponseV0', + full_name='org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_statuses', full_name='org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.token_statuses', 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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.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=[_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSENTRY, _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSES, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=36423, + serialized_end=36904, +) + +_GETTOKENSTATUSESRESPONSE = _descriptor.Descriptor( + name='GetTokenStatusesResponse', + full_name='org.dash.platform.dapi.v0.GetTokenStatusesResponse', + 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.GetTokenStatusesResponse.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=[_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetTokenStatusesResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=36300, + serialized_end=36915, +) + + +_GETTOKENTOTALSUPPLYREQUEST_GETTOKENTOTALSUPPLYREQUESTV0 = _descriptor.Descriptor( + name='GetTokenTotalSupplyRequestV0', + full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_id', full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.token_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='prove', full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.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=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=37046, + serialized_end=37109, +) + +_GETTOKENTOTALSUPPLYREQUEST = _descriptor.Descriptor( + name='GetTokenTotalSupplyRequest', + full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest', + 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.GetTokenTotalSupplyRequest.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=[_GETTOKENTOTALSUPPLYREQUEST_GETTOKENTOTALSUPPLYREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=36918, + serialized_end=37120, +) + + +_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0_TOKENTOTALSUPPLYENTRY = _descriptor.Descriptor( + name='TokenTotalSupplyEntry', + full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_id', full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.token_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='total_aggregated_amount_in_user_accounts', full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.total_aggregated_amount_in_user_accounts', 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), + _descriptor.FieldDescriptor( + name='total_system_amount', full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.total_system_amount', index=2, + number=3, 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=37541, + serialized_end=37661, +) + +_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0 = _descriptor.Descriptor( + name='GetTokenTotalSupplyResponseV0', + full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_total_supply', full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.token_total_supply', 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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.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=[_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0_TOKENTOTALSUPPLYENTRY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=37255, + serialized_end=37671, +) + +_GETTOKENTOTALSUPPLYRESPONSE = _descriptor.Descriptor( + name='GetTokenTotalSupplyResponse', + full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse', + 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.GetTokenTotalSupplyResponse.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=[_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=37123, + serialized_end=37682, +) + + +_GETGROUPINFOREQUEST_GETGROUPINFOREQUESTV0 = _descriptor.Descriptor( + name='GetGroupInfoRequestV0', + full_name='org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='contract_id', full_name='org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.contract_id', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='group_contract_position', full_name='org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.group_contract_position', 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='prove', full_name='org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.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=37792, + serialized_end=37884, +) + +_GETGROUPINFOREQUEST = _descriptor.Descriptor( + name='GetGroupInfoRequest', + full_name='org.dash.platform.dapi.v0.GetGroupInfoRequest', + 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.GetGroupInfoRequest.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=[_GETGROUPINFOREQUEST_GETGROUPINFOREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetGroupInfoRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=37685, + serialized_end=37895, +) + + +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPMEMBERENTRY = _descriptor.Descriptor( + name='GroupMemberEntry', + full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='member_id', full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.member_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='power', full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.power', 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=38253, + serialized_end=38305, +) + +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFOENTRY = _descriptor.Descriptor( + name='GroupInfoEntry', + full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='members', full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.members', 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), + _descriptor.FieldDescriptor( + name='group_required_power', full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.group_required_power', 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=38308, + serialized_end=38460, +) + +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO = _descriptor.Descriptor( + name='GroupInfo', + full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='group_info', full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.group_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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_group_info', full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo._group_info', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=38463, + serialized_end=38601, +) + +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0 = _descriptor.Descriptor( + name='GetGroupInfoResponseV0', + full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='group_info', full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.group_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.GetGroupInfoResponse.GetGroupInfoResponseV0.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.GetGroupInfoResponse.GetGroupInfoResponseV0.metadata', index=2, + number=4, 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=[_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPMEMBERENTRY, _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFOENTRY, _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=38009, + serialized_end=38611, +) + +_GETGROUPINFORESPONSE = _descriptor.Descriptor( + name='GetGroupInfoResponse', + full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse', + 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.GetGroupInfoResponse.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=[_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetGroupInfoResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=37898, + serialized_end=38622, +) + + +_GETGROUPINFOSREQUEST_STARTATGROUPCONTRACTPOSITION = _descriptor.Descriptor( + name='StartAtGroupContractPosition', + full_name='org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='start_group_contract_position', full_name='org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.start_group_contract_position', 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='start_group_contract_position_included', full_name='org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.start_group_contract_position_included', 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=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=38735, + serialized_end=38852, +) + +_GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0 = _descriptor.Descriptor( + name='GetGroupInfosRequestV0', + full_name='org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='contract_id', full_name='org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.contract_id', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='start_at_group_contract_position', full_name='org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.start_at_group_contract_position', 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='count', full_name='org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.count', index=2, + number=3, 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='prove', full_name='org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prove', index=3, + number=4, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_start_at_group_contract_position', full_name='org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0._start_at_group_contract_position', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_count', full_name='org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0._count', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=38855, + serialized_end=39107, +) + +_GETGROUPINFOSREQUEST = _descriptor.Descriptor( + name='GetGroupInfosRequest', + full_name='org.dash.platform.dapi.v0.GetGroupInfosRequest', + 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.GetGroupInfosRequest.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=[_GETGROUPINFOSREQUEST_STARTATGROUPCONTRACTPOSITION, _GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetGroupInfosRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=38625, + serialized_end=39118, +) + + +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPMEMBERENTRY = _descriptor.Descriptor( + name='GroupMemberEntry', + full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='member_id', full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.member_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='power', full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.power', 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=38253, + serialized_end=38305, +) + +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPPOSITIONINFOENTRY = _descriptor.Descriptor( + name='GroupPositionInfoEntry', + full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='group_contract_position', full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.group_contract_position', 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='members', full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.members', index=1, + number=2, 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), + _descriptor.FieldDescriptor( + name='group_required_power', full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.group_required_power', index=2, + number=3, 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=39539, + serialized_end=39734, +) + +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPINFOS = _descriptor.Descriptor( + name='GroupInfos', + full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='group_infos', full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.group_infos', 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=39737, + serialized_end=39867, +) + +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0 = _descriptor.Descriptor( + name='GetGroupInfosResponseV0', + full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='group_infos', full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.group_infos', 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.GetGroupInfosResponse.GetGroupInfosResponseV0.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.GetGroupInfosResponse.GetGroupInfosResponseV0.metadata', index=2, + number=4, 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=[_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPMEMBERENTRY, _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPPOSITIONINFOENTRY, _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPINFOS, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=39235, + serialized_end=39877, +) + +_GETGROUPINFOSRESPONSE = _descriptor.Descriptor( + name='GetGroupInfosResponse', + full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse', + 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.GetGroupInfosResponse.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=[_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetGroupInfosResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=39121, + serialized_end=39888, +) + + +_GETGROUPACTIONSREQUEST_STARTATACTIONID = _descriptor.Descriptor( + name='StartAtActionId', + full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='start_action_id', full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.start_action_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='start_action_id_included', full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.start_action_id_included', 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=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=40007, + serialized_end=40083, +) + +_GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0 = _descriptor.Descriptor( + name='GetGroupActionsRequestV0', + full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='contract_id', full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.contract_id', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='group_contract_position', full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.group_contract_position', 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='status', full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.status', index=2, + number=3, type=14, cpp_type=8, 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_at_action_id', full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.start_at_action_id', index=3, + number=4, 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='count', full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.count', index=4, + number=5, 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='prove', full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prove', index=5, + number=6, 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_at_action_id', full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0._start_at_action_id', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_count', full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0._count', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=40086, + serialized_end=40414, +) + +_GETGROUPACTIONSREQUEST = _descriptor.Descriptor( + name='GetGroupActionsRequest', + full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest', + 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.GetGroupActionsRequest.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=[_GETGROUPACTIONSREQUEST_STARTATACTIONID, _GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0, ], + enum_types=[ + _GETGROUPACTIONSREQUEST_ACTIONSTATUS, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetGroupActionsRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=39891, + serialized_end=40465, +) + + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_MINTEVENT = _descriptor.Descriptor( + name='MintEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='amount', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.amount', index=0, + number=1, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='recipient_id', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.recipient_id', index=1, + number=2, 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='public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.public_note', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent._public_note', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=40847, + serialized_end=40938, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_BURNEVENT = _descriptor.Descriptor( + name='BurnEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='amount', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.amount', index=0, + number=1, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.public_note', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent._public_note', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=40940, + serialized_end=41009, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_FREEZEEVENT = _descriptor.Descriptor( + name='FreezeEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='frozen_id', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.frozen_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='public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.public_note', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent._public_note', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=41011, + serialized_end=41085, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UNFREEZEEVENT = _descriptor.Descriptor( + name='UnfreezeEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='frozen_id', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.frozen_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='public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.public_note', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent._public_note', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=41087, + serialized_end=41163, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DESTROYFROZENFUNDSEVENT = _descriptor.Descriptor( + name='DestroyFrozenFundsEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='frozen_id', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.frozen_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='amount', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.amount', 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), + _descriptor.FieldDescriptor( + name='public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.public_note', index=2, + number=3, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent._public_note', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=41165, + serialized_end=41267, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_SHAREDENCRYPTEDNOTE = _descriptor.Descriptor( + name='SharedEncryptedNote', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='sender_key_index', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.sender_key_index', 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='recipient_key_index', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.recipient_key_index', 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='encrypted_data', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.encrypted_data', 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=41269, + serialized_end=41369, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_PERSONALENCRYPTEDNOTE = _descriptor.Descriptor( + name='PersonalEncryptedNote', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='root_encryption_key_index', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.root_encryption_key_index', 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='derivation_encryption_key_index', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.derivation_encryption_key_index', 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='encrypted_data', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.encrypted_data', 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=41371, + serialized_end=41494, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT = _descriptor.Descriptor( + name='TransferEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='recipient_id', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.recipient_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='public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.public_note', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='shared_encrypted_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.shared_encrypted_note', 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), + _descriptor.FieldDescriptor( + name='personal_encrypted_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.personal_encrypted_note', index=3, + number=4, 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='amount', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.amount', index=4, + number=5, 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='_public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent._public_note', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_shared_encrypted_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent._shared_encrypted_note', + index=1, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + _descriptor.OneofDescriptor( + name='_personal_encrypted_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent._personal_encrypted_note', + index=2, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=41497, + serialized_end=41920, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT = _descriptor.Descriptor( + name='EmergencyActionEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='action_type', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.action_type', index=0, + number=1, type=14, cpp_type=8, 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='public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.public_note', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT_ACTIONTYPE, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent._public_note', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=41923, + serialized_end=42156, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENCONFIGUPDATEEVENT = _descriptor.Descriptor( + name='TokenConfigUpdateEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_config_update_item', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.token_config_update_item', 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='public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.public_note', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='_public_note', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent._public_note', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=42158, + serialized_end=42258, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT = _descriptor.Descriptor( + name='GroupActionEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='token_event', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.token_event', 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='document_event', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.document_event', 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='contract_event', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.contract_event', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='event_type', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.event_type', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=42261, + serialized_end=42641, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT = _descriptor.Descriptor( + name='DocumentEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='create', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.create', 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=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='type', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.type', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=42644, + serialized_end=42783, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTCREATEEVENT = _descriptor.Descriptor( + name='DocumentCreateEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='created_document', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.created_document', 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=42785, + serialized_end=42832, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTUPDATEEVENT = _descriptor.Descriptor( + name='ContractUpdateEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='updated_contract', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.updated_contract', 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=42834, + serialized_end=42881, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT = _descriptor.Descriptor( + name='ContractEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='update', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.update', 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=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='type', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.type', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=42884, + serialized_end=43023, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT = _descriptor.Descriptor( + name='TokenEvent', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='mint', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.mint', 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='burn', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.burn', 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='freeze', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.freeze', 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), + _descriptor.FieldDescriptor( + name='unfreeze', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.unfreeze', index=3, + number=4, 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='destroy_frozen_funds', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.destroy_frozen_funds', index=4, + number=5, 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='transfer', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.transfer', index=5, + number=6, 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='emergency_action', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.emergency_action', index=6, + number=7, 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='token_config_update', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.token_config_update', index=7, + number=8, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='type', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.type', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=43026, + serialized_end=43981, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONENTRY = _descriptor.Descriptor( + name='GroupActionEntry', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='action_id', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.action_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='event', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.event', 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=43984, + serialized_end=44131, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONS = _descriptor.Descriptor( + name='GroupActions', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='group_actions', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.group_actions', 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=44134, + serialized_end=44266, +) + +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 = _descriptor.Descriptor( + name='GetGroupActionsResponseV0', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='group_actions', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.group_actions', 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.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetGroupActionsResponse.GetGroupActionsResponseV0.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=[_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_MINTEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_BURNEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_FREEZEEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UNFREEZEEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DESTROYFROZENFUNDSEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_SHAREDENCRYPTEDNOTE, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_PERSONALENCRYPTEDNOTE, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENCONFIGUPDATEEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTCREATEEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTUPDATEEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONENTRY, _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONS, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=40588, + serialized_end=44276, +) + +_GETGROUPACTIONSRESPONSE = _descriptor.Descriptor( + name='GetGroupActionsResponse', + full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse', + 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.GetGroupActionsResponse.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=[_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetGroupActionsResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=40468, + serialized_end=44287, +) + + +_GETGROUPACTIONSIGNERSREQUEST_GETGROUPACTIONSIGNERSREQUESTV0 = _descriptor.Descriptor( + name='GetGroupActionSignersRequestV0', + full_name='org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='contract_id', full_name='org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.contract_id', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='group_contract_position', full_name='org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.group_contract_position', 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='status', full_name='org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.status', index=2, + number=3, type=14, cpp_type=8, 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='action_id', full_name='org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.action_id', 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.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prove', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=44425, + serialized_end=44631, +) + +_GETGROUPACTIONSIGNERSREQUEST = _descriptor.Descriptor( + name='GetGroupActionSignersRequest', + full_name='org.dash.platform.dapi.v0.GetGroupActionSignersRequest', + 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.GetGroupActionSignersRequest.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=[_GETGROUPACTIONSIGNERSREQUEST_GETGROUPACTIONSIGNERSREQUESTV0, ], + enum_types=[ + _GETGROUPACTIONSIGNERSREQUEST_ACTIONSTATUS, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetGroupActionSignersRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=44290, + serialized_end=44682, +) + + +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNER = _descriptor.Descriptor( + name='GroupActionSigner', + full_name='org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='signer_id', full_name='org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.signer_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='power', full_name='org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.power', 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=45114, + serialized_end=45167, +) + +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNERS = _descriptor.Descriptor( + name='GroupActionSigners', + full_name='org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='signers', full_name='org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.signers', 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=45170, + serialized_end=45315, +) + +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0 = _descriptor.Descriptor( + name='GetGroupActionSignersResponseV0', + full_name='org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='group_action_signers', full_name='org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.group_action_signers', 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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.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=[_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNER, _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNERS, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=44823, + serialized_end=45325, +) + +_GETGROUPACTIONSIGNERSRESPONSE = _descriptor.Descriptor( + name='GetGroupActionSignersResponse', + full_name='org.dash.platform.dapi.v0.GetGroupActionSignersResponse', + 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.GetGroupActionSignersResponse.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=[_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetGroupActionSignersResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=44685, + serialized_end=45336, +) + +_GETIDENTITYREQUEST_GETIDENTITYREQUESTV0.containing_type = _GETIDENTITYREQUEST +_GETIDENTITYREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYREQUEST_GETIDENTITYREQUESTV0 +_GETIDENTITYREQUEST.oneofs_by_name['version'].fields.append( + _GETIDENTITYREQUEST.fields_by_name['v0']) +_GETIDENTITYREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITYREQUEST.oneofs_by_name['version'] +_GETIDENTITYNONCEREQUEST_GETIDENTITYNONCEREQUESTV0.containing_type = _GETIDENTITYNONCEREQUEST +_GETIDENTITYNONCEREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYNONCEREQUEST_GETIDENTITYNONCEREQUESTV0 +_GETIDENTITYNONCEREQUEST.oneofs_by_name['version'].fields.append( + _GETIDENTITYNONCEREQUEST.fields_by_name['v0']) +_GETIDENTITYNONCEREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITYNONCEREQUEST.oneofs_by_name['version'] +_GETIDENTITYCONTRACTNONCEREQUEST_GETIDENTITYCONTRACTNONCEREQUESTV0.containing_type = _GETIDENTITYCONTRACTNONCEREQUEST +_GETIDENTITYCONTRACTNONCEREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYCONTRACTNONCEREQUEST_GETIDENTITYCONTRACTNONCEREQUESTV0 +_GETIDENTITYCONTRACTNONCEREQUEST.oneofs_by_name['version'].fields.append( + _GETIDENTITYCONTRACTNONCEREQUEST.fields_by_name['v0']) +_GETIDENTITYCONTRACTNONCEREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITYCONTRACTNONCEREQUEST.oneofs_by_name['version'] +_GETIDENTITYBALANCEREQUEST_GETIDENTITYBALANCEREQUESTV0.containing_type = _GETIDENTITYBALANCEREQUEST +_GETIDENTITYBALANCEREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYBALANCEREQUEST_GETIDENTITYBALANCEREQUESTV0 +_GETIDENTITYBALANCEREQUEST.oneofs_by_name['version'].fields.append( + _GETIDENTITYBALANCEREQUEST.fields_by_name['v0']) +_GETIDENTITYBALANCEREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITYBALANCEREQUEST.oneofs_by_name['version'] +_GETIDENTITYBALANCEANDREVISIONREQUEST_GETIDENTITYBALANCEANDREVISIONREQUESTV0.containing_type = _GETIDENTITYBALANCEANDREVISIONREQUEST +_GETIDENTITYBALANCEANDREVISIONREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYBALANCEANDREVISIONREQUEST_GETIDENTITYBALANCEANDREVISIONREQUESTV0 +_GETIDENTITYBALANCEANDREVISIONREQUEST.oneofs_by_name['version'].fields.append( + _GETIDENTITYBALANCEANDREVISIONREQUEST.fields_by_name['v0']) +_GETIDENTITYBALANCEANDREVISIONREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITYBALANCEANDREVISIONREQUEST.oneofs_by_name['version'] +_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.containing_type = _GETIDENTITYRESPONSE +_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.fields_by_name['identity']) +_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.fields_by_name['identity'].containing_oneof = _GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.fields_by_name['proof']) +_GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYRESPONSE.fields_by_name['v0'].message_type = _GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0 +_GETIDENTITYRESPONSE.oneofs_by_name['version'].fields.append( + _GETIDENTITYRESPONSE.fields_by_name['v0']) +_GETIDENTITYRESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITYRESPONSE.oneofs_by_name['version'] +_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.containing_type = _GETIDENTITYNONCERESPONSE +_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.fields_by_name['identity_nonce']) +_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.fields_by_name['identity_nonce'].containing_oneof = _GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.fields_by_name['proof']) +_GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYNONCERESPONSE.fields_by_name['v0'].message_type = _GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0 +_GETIDENTITYNONCERESPONSE.oneofs_by_name['version'].fields.append( + _GETIDENTITYNONCERESPONSE.fields_by_name['v0']) +_GETIDENTITYNONCERESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITYNONCERESPONSE.oneofs_by_name['version'] +_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.containing_type = _GETIDENTITYCONTRACTNONCERESPONSE +_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.fields_by_name['identity_contract_nonce']) +_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.fields_by_name['identity_contract_nonce'].containing_oneof = _GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.fields_by_name['proof']) +_GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYCONTRACTNONCERESPONSE.fields_by_name['v0'].message_type = _GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0 +_GETIDENTITYCONTRACTNONCERESPONSE.oneofs_by_name['version'].fields.append( + _GETIDENTITYCONTRACTNONCERESPONSE.fields_by_name['v0']) +_GETIDENTITYCONTRACTNONCERESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITYCONTRACTNONCERESPONSE.oneofs_by_name['version'] +_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.containing_type = _GETIDENTITYBALANCERESPONSE +_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.fields_by_name['balance']) +_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.fields_by_name['balance'].containing_oneof = _GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.fields_by_name['proof']) +_GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYBALANCERESPONSE.fields_by_name['v0'].message_type = _GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0 +_GETIDENTITYBALANCERESPONSE.oneofs_by_name['version'].fields.append( + _GETIDENTITYBALANCERESPONSE.fields_by_name['v0']) +_GETIDENTITYBALANCERESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITYBALANCERESPONSE.oneofs_by_name['version'] +_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0_BALANCEANDREVISION.containing_type = _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0 +_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['balance_and_revision'].message_type = _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0_BALANCEANDREVISION +_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.containing_type = _GETIDENTITYBALANCEANDREVISIONRESPONSE +_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['balance_and_revision']) +_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['balance_and_revision'].containing_oneof = _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['proof']) +_GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYBALANCEANDREVISIONRESPONSE.fields_by_name['v0'].message_type = _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0 +_GETIDENTITYBALANCEANDREVISIONRESPONSE.oneofs_by_name['version'].fields.append( + _GETIDENTITYBALANCEANDREVISIONRESPONSE.fields_by_name['v0']) +_GETIDENTITYBALANCEANDREVISIONRESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITYBALANCEANDREVISIONRESPONSE.oneofs_by_name['version'] +_KEYREQUESTTYPE.fields_by_name['all_keys'].message_type = _ALLKEYS +_KEYREQUESTTYPE.fields_by_name['specific_keys'].message_type = _SPECIFICKEYS +_KEYREQUESTTYPE.fields_by_name['search_key'].message_type = _SEARCHKEY +_KEYREQUESTTYPE.oneofs_by_name['request'].fields.append( + _KEYREQUESTTYPE.fields_by_name['all_keys']) +_KEYREQUESTTYPE.fields_by_name['all_keys'].containing_oneof = _KEYREQUESTTYPE.oneofs_by_name['request'] +_KEYREQUESTTYPE.oneofs_by_name['request'].fields.append( _KEYREQUESTTYPE.fields_by_name['specific_keys']) _KEYREQUESTTYPE.fields_by_name['specific_keys'].containing_oneof = _KEYREQUESTTYPE.oneofs_by_name['request'] _KEYREQUESTTYPE.oneofs_by_name['request'].fields.append( @@ -8755,10 +12364,16 @@ _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST.oneofs_by_name['request_type'].fields.append( _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST.fields_by_name['contested_resource_vote_status_request']) _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST.fields_by_name['contested_resource_vote_status_request'].containing_oneof = _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST.oneofs_by_name['request_type'] +_GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYTOKENBALANCEREQUEST.containing_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0 +_GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYTOKENINFOREQUEST.containing_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0 +_GETPROOFSREQUEST_GETPROOFSREQUESTV0_TOKENSTATUSREQUEST.containing_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0 _GETPROOFSREQUEST_GETPROOFSREQUESTV0.fields_by_name['identities'].message_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYREQUEST _GETPROOFSREQUEST_GETPROOFSREQUESTV0.fields_by_name['contracts'].message_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0_CONTRACTREQUEST _GETPROOFSREQUEST_GETPROOFSREQUESTV0.fields_by_name['documents'].message_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST _GETPROOFSREQUEST_GETPROOFSREQUESTV0.fields_by_name['votes'].message_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST +_GETPROOFSREQUEST_GETPROOFSREQUESTV0.fields_by_name['identity_token_balances'].message_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYTOKENBALANCEREQUEST +_GETPROOFSREQUEST_GETPROOFSREQUESTV0.fields_by_name['identity_token_infos'].message_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYTOKENINFOREQUEST +_GETPROOFSREQUEST_GETPROOFSREQUESTV0.fields_by_name['token_statuses'].message_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0_TOKENSTATUSREQUEST _GETPROOFSREQUEST_GETPROOFSREQUESTV0.containing_type = _GETPROOFSREQUEST _GETPROOFSREQUEST.fields_by_name['v0'].message_type = _GETPROOFSREQUEST_GETPROOFSREQUESTV0 _GETPROOFSREQUEST.oneofs_by_name['version'].fields.append( @@ -9289,6 +12904,373 @@ _GETCURRENTQUORUMSINFORESPONSE.oneofs_by_name['version'].fields.append( _GETCURRENTQUORUMSINFORESPONSE.fields_by_name['v0']) _GETCURRENTQUORUMSINFORESPONSE.fields_by_name['v0'].containing_oneof = _GETCURRENTQUORUMSINFORESPONSE.oneofs_by_name['version'] +_GETIDENTITYTOKENBALANCESREQUEST_GETIDENTITYTOKENBALANCESREQUESTV0.containing_type = _GETIDENTITYTOKENBALANCESREQUEST +_GETIDENTITYTOKENBALANCESREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYTOKENBALANCESREQUEST_GETIDENTITYTOKENBALANCESREQUESTV0 +_GETIDENTITYTOKENBALANCESREQUEST.oneofs_by_name['version'].fields.append( + _GETIDENTITYTOKENBALANCESREQUEST.fields_by_name['v0']) +_GETIDENTITYTOKENBALANCESREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITYTOKENBALANCESREQUEST.oneofs_by_name['version'] +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCEENTRY.containing_type = _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0 +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCEENTRY.oneofs_by_name['_balance'].fields.append( + _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCEENTRY.fields_by_name['balance']) +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCEENTRY.fields_by_name['balance'].containing_oneof = _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCEENTRY.oneofs_by_name['_balance'] +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCES.fields_by_name['token_balances'].message_type = _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCEENTRY +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCES.containing_type = _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0 +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0.fields_by_name['token_balances'].message_type = _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCES +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0.containing_type = _GETIDENTITYTOKENBALANCESRESPONSE +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0.fields_by_name['token_balances']) +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0.fields_by_name['token_balances'].containing_oneof = _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0.fields_by_name['proof']) +_GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYTOKENBALANCESRESPONSE.fields_by_name['v0'].message_type = _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0 +_GETIDENTITYTOKENBALANCESRESPONSE.oneofs_by_name['version'].fields.append( + _GETIDENTITYTOKENBALANCESRESPONSE.fields_by_name['v0']) +_GETIDENTITYTOKENBALANCESRESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITYTOKENBALANCESRESPONSE.oneofs_by_name['version'] +_GETIDENTITIESTOKENBALANCESREQUEST_GETIDENTITIESTOKENBALANCESREQUESTV0.containing_type = _GETIDENTITIESTOKENBALANCESREQUEST +_GETIDENTITIESTOKENBALANCESREQUEST.fields_by_name['v0'].message_type = _GETIDENTITIESTOKENBALANCESREQUEST_GETIDENTITIESTOKENBALANCESREQUESTV0 +_GETIDENTITIESTOKENBALANCESREQUEST.oneofs_by_name['version'].fields.append( + _GETIDENTITIESTOKENBALANCESREQUEST.fields_by_name['v0']) +_GETIDENTITIESTOKENBALANCESREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITIESTOKENBALANCESREQUEST.oneofs_by_name['version'] +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCEENTRY.containing_type = _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0 +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCEENTRY.oneofs_by_name['_balance'].fields.append( + _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCEENTRY.fields_by_name['balance']) +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCEENTRY.fields_by_name['balance'].containing_oneof = _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCEENTRY.oneofs_by_name['_balance'] +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCES.fields_by_name['identity_token_balances'].message_type = _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCEENTRY +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCES.containing_type = _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0 +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0.fields_by_name['identity_token_balances'].message_type = _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCES +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0.containing_type = _GETIDENTITIESTOKENBALANCESRESPONSE +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0.fields_by_name['identity_token_balances']) +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0.fields_by_name['identity_token_balances'].containing_oneof = _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0.fields_by_name['proof']) +_GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITIESTOKENBALANCESRESPONSE.fields_by_name['v0'].message_type = _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0 +_GETIDENTITIESTOKENBALANCESRESPONSE.oneofs_by_name['version'].fields.append( + _GETIDENTITIESTOKENBALANCESRESPONSE.fields_by_name['v0']) +_GETIDENTITIESTOKENBALANCESRESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITIESTOKENBALANCESRESPONSE.oneofs_by_name['version'] +_GETIDENTITYTOKENINFOSREQUEST_GETIDENTITYTOKENINFOSREQUESTV0.containing_type = _GETIDENTITYTOKENINFOSREQUEST +_GETIDENTITYTOKENINFOSREQUEST.fields_by_name['v0'].message_type = _GETIDENTITYTOKENINFOSREQUEST_GETIDENTITYTOKENINFOSREQUESTV0 +_GETIDENTITYTOKENINFOSREQUEST.oneofs_by_name['version'].fields.append( + _GETIDENTITYTOKENINFOSREQUEST.fields_by_name['v0']) +_GETIDENTITYTOKENINFOSREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITYTOKENINFOSREQUEST.oneofs_by_name['version'] +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENIDENTITYINFOENTRY.containing_type = _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0 +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOENTRY.fields_by_name['info'].message_type = _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENIDENTITYINFOENTRY +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOENTRY.containing_type = _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0 +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOENTRY.oneofs_by_name['_info'].fields.append( + _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOENTRY.fields_by_name['info']) +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOENTRY.fields_by_name['info'].containing_oneof = _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOENTRY.oneofs_by_name['_info'] +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOS.fields_by_name['token_infos'].message_type = _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOENTRY +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOS.containing_type = _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0 +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0.fields_by_name['token_infos'].message_type = _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOS +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0.containing_type = _GETIDENTITYTOKENINFOSRESPONSE +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0.fields_by_name['token_infos']) +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0.fields_by_name['token_infos'].containing_oneof = _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0.fields_by_name['proof']) +_GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITYTOKENINFOSRESPONSE.fields_by_name['v0'].message_type = _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0 +_GETIDENTITYTOKENINFOSRESPONSE.oneofs_by_name['version'].fields.append( + _GETIDENTITYTOKENINFOSRESPONSE.fields_by_name['v0']) +_GETIDENTITYTOKENINFOSRESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITYTOKENINFOSRESPONSE.oneofs_by_name['version'] +_GETIDENTITIESTOKENINFOSREQUEST_GETIDENTITIESTOKENINFOSREQUESTV0.containing_type = _GETIDENTITIESTOKENINFOSREQUEST +_GETIDENTITIESTOKENINFOSREQUEST.fields_by_name['v0'].message_type = _GETIDENTITIESTOKENINFOSREQUEST_GETIDENTITIESTOKENINFOSREQUESTV0 +_GETIDENTITIESTOKENINFOSREQUEST.oneofs_by_name['version'].fields.append( + _GETIDENTITIESTOKENINFOSREQUEST.fields_by_name['v0']) +_GETIDENTITIESTOKENINFOSREQUEST.fields_by_name['v0'].containing_oneof = _GETIDENTITIESTOKENINFOSREQUEST.oneofs_by_name['version'] +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENIDENTITYINFOENTRY.containing_type = _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0 +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENINFOENTRY.fields_by_name['info'].message_type = _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENIDENTITYINFOENTRY +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENINFOENTRY.containing_type = _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0 +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENINFOENTRY.oneofs_by_name['_info'].fields.append( + _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENINFOENTRY.fields_by_name['info']) +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENINFOENTRY.fields_by_name['info'].containing_oneof = _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENINFOENTRY.oneofs_by_name['_info'] +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_IDENTITYTOKENINFOS.fields_by_name['token_infos'].message_type = _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENINFOENTRY +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_IDENTITYTOKENINFOS.containing_type = _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0 +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0.fields_by_name['identity_token_infos'].message_type = _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_IDENTITYTOKENINFOS +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0.containing_type = _GETIDENTITIESTOKENINFOSRESPONSE +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0.fields_by_name['identity_token_infos']) +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0.fields_by_name['identity_token_infos'].containing_oneof = _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0.fields_by_name['proof']) +_GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0.oneofs_by_name['result'] +_GETIDENTITIESTOKENINFOSRESPONSE.fields_by_name['v0'].message_type = _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0 +_GETIDENTITIESTOKENINFOSRESPONSE.oneofs_by_name['version'].fields.append( + _GETIDENTITIESTOKENINFOSRESPONSE.fields_by_name['v0']) +_GETIDENTITIESTOKENINFOSRESPONSE.fields_by_name['v0'].containing_oneof = _GETIDENTITIESTOKENINFOSRESPONSE.oneofs_by_name['version'] +_GETTOKENSTATUSESREQUEST_GETTOKENSTATUSESREQUESTV0.containing_type = _GETTOKENSTATUSESREQUEST +_GETTOKENSTATUSESREQUEST.fields_by_name['v0'].message_type = _GETTOKENSTATUSESREQUEST_GETTOKENSTATUSESREQUESTV0 +_GETTOKENSTATUSESREQUEST.oneofs_by_name['version'].fields.append( + _GETTOKENSTATUSESREQUEST.fields_by_name['v0']) +_GETTOKENSTATUSESREQUEST.fields_by_name['v0'].containing_oneof = _GETTOKENSTATUSESREQUEST.oneofs_by_name['version'] +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSENTRY.containing_type = _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0 +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSENTRY.oneofs_by_name['_paused'].fields.append( + _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSENTRY.fields_by_name['paused']) +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSENTRY.fields_by_name['paused'].containing_oneof = _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSENTRY.oneofs_by_name['_paused'] +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSES.fields_by_name['token_statuses'].message_type = _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSENTRY +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSES.containing_type = _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0 +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0.fields_by_name['token_statuses'].message_type = _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSES +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0.containing_type = _GETTOKENSTATUSESRESPONSE +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0.fields_by_name['token_statuses']) +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0.fields_by_name['token_statuses'].containing_oneof = _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0.oneofs_by_name['result'] +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0.fields_by_name['proof']) +_GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0.oneofs_by_name['result'] +_GETTOKENSTATUSESRESPONSE.fields_by_name['v0'].message_type = _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0 +_GETTOKENSTATUSESRESPONSE.oneofs_by_name['version'].fields.append( + _GETTOKENSTATUSESRESPONSE.fields_by_name['v0']) +_GETTOKENSTATUSESRESPONSE.fields_by_name['v0'].containing_oneof = _GETTOKENSTATUSESRESPONSE.oneofs_by_name['version'] +_GETTOKENTOTALSUPPLYREQUEST_GETTOKENTOTALSUPPLYREQUESTV0.containing_type = _GETTOKENTOTALSUPPLYREQUEST +_GETTOKENTOTALSUPPLYREQUEST.fields_by_name['v0'].message_type = _GETTOKENTOTALSUPPLYREQUEST_GETTOKENTOTALSUPPLYREQUESTV0 +_GETTOKENTOTALSUPPLYREQUEST.oneofs_by_name['version'].fields.append( + _GETTOKENTOTALSUPPLYREQUEST.fields_by_name['v0']) +_GETTOKENTOTALSUPPLYREQUEST.fields_by_name['v0'].containing_oneof = _GETTOKENTOTALSUPPLYREQUEST.oneofs_by_name['version'] +_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0_TOKENTOTALSUPPLYENTRY.containing_type = _GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0 +_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0.fields_by_name['token_total_supply'].message_type = _GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0_TOKENTOTALSUPPLYENTRY +_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0.containing_type = _GETTOKENTOTALSUPPLYRESPONSE +_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0.fields_by_name['token_total_supply']) +_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0.fields_by_name['token_total_supply'].containing_oneof = _GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0.oneofs_by_name['result'] +_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0.fields_by_name['proof']) +_GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0.oneofs_by_name['result'] +_GETTOKENTOTALSUPPLYRESPONSE.fields_by_name['v0'].message_type = _GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0 +_GETTOKENTOTALSUPPLYRESPONSE.oneofs_by_name['version'].fields.append( + _GETTOKENTOTALSUPPLYRESPONSE.fields_by_name['v0']) +_GETTOKENTOTALSUPPLYRESPONSE.fields_by_name['v0'].containing_oneof = _GETTOKENTOTALSUPPLYRESPONSE.oneofs_by_name['version'] +_GETGROUPINFOREQUEST_GETGROUPINFOREQUESTV0.containing_type = _GETGROUPINFOREQUEST +_GETGROUPINFOREQUEST.fields_by_name['v0'].message_type = _GETGROUPINFOREQUEST_GETGROUPINFOREQUESTV0 +_GETGROUPINFOREQUEST.oneofs_by_name['version'].fields.append( + _GETGROUPINFOREQUEST.fields_by_name['v0']) +_GETGROUPINFOREQUEST.fields_by_name['v0'].containing_oneof = _GETGROUPINFOREQUEST.oneofs_by_name['version'] +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPMEMBERENTRY.containing_type = _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0 +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFOENTRY.fields_by_name['members'].message_type = _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPMEMBERENTRY +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFOENTRY.containing_type = _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0 +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO.fields_by_name['group_info'].message_type = _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFOENTRY +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO.containing_type = _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0 +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO.oneofs_by_name['_group_info'].fields.append( + _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO.fields_by_name['group_info']) +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO.fields_by_name['group_info'].containing_oneof = _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO.oneofs_by_name['_group_info'] +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0.fields_by_name['group_info'].message_type = _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0.containing_type = _GETGROUPINFORESPONSE +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0.oneofs_by_name['result'].fields.append( + _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0.fields_by_name['group_info']) +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0.fields_by_name['group_info'].containing_oneof = _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0.oneofs_by_name['result'] +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0.oneofs_by_name['result'].fields.append( + _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0.fields_by_name['proof']) +_GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0.fields_by_name['proof'].containing_oneof = _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0.oneofs_by_name['result'] +_GETGROUPINFORESPONSE.fields_by_name['v0'].message_type = _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0 +_GETGROUPINFORESPONSE.oneofs_by_name['version'].fields.append( + _GETGROUPINFORESPONSE.fields_by_name['v0']) +_GETGROUPINFORESPONSE.fields_by_name['v0'].containing_oneof = _GETGROUPINFORESPONSE.oneofs_by_name['version'] +_GETGROUPINFOSREQUEST_STARTATGROUPCONTRACTPOSITION.containing_type = _GETGROUPINFOSREQUEST +_GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0.fields_by_name['start_at_group_contract_position'].message_type = _GETGROUPINFOSREQUEST_STARTATGROUPCONTRACTPOSITION +_GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0.containing_type = _GETGROUPINFOSREQUEST +_GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0.oneofs_by_name['_start_at_group_contract_position'].fields.append( + _GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0.fields_by_name['start_at_group_contract_position']) +_GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0.fields_by_name['start_at_group_contract_position'].containing_oneof = _GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0.oneofs_by_name['_start_at_group_contract_position'] +_GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0.oneofs_by_name['_count'].fields.append( + _GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0.fields_by_name['count']) +_GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0.fields_by_name['count'].containing_oneof = _GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0.oneofs_by_name['_count'] +_GETGROUPINFOSREQUEST.fields_by_name['v0'].message_type = _GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0 +_GETGROUPINFOSREQUEST.oneofs_by_name['version'].fields.append( + _GETGROUPINFOSREQUEST.fields_by_name['v0']) +_GETGROUPINFOSREQUEST.fields_by_name['v0'].containing_oneof = _GETGROUPINFOSREQUEST.oneofs_by_name['version'] +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPMEMBERENTRY.containing_type = _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0 +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPPOSITIONINFOENTRY.fields_by_name['members'].message_type = _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPMEMBERENTRY +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPPOSITIONINFOENTRY.containing_type = _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0 +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPINFOS.fields_by_name['group_infos'].message_type = _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPPOSITIONINFOENTRY +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPINFOS.containing_type = _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0 +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0.fields_by_name['group_infos'].message_type = _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPINFOS +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0.containing_type = _GETGROUPINFOSRESPONSE +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0.fields_by_name['group_infos']) +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0.fields_by_name['group_infos'].containing_oneof = _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0.oneofs_by_name['result'] +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0.fields_by_name['proof']) +_GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0.oneofs_by_name['result'] +_GETGROUPINFOSRESPONSE.fields_by_name['v0'].message_type = _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0 +_GETGROUPINFOSRESPONSE.oneofs_by_name['version'].fields.append( + _GETGROUPINFOSRESPONSE.fields_by_name['v0']) +_GETGROUPINFOSRESPONSE.fields_by_name['v0'].containing_oneof = _GETGROUPINFOSRESPONSE.oneofs_by_name['version'] +_GETGROUPACTIONSREQUEST_STARTATACTIONID.containing_type = _GETGROUPACTIONSREQUEST +_GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0.fields_by_name['status'].enum_type = _GETGROUPACTIONSREQUEST_ACTIONSTATUS +_GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0.fields_by_name['start_at_action_id'].message_type = _GETGROUPACTIONSREQUEST_STARTATACTIONID +_GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0.containing_type = _GETGROUPACTIONSREQUEST +_GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0.oneofs_by_name['_start_at_action_id'].fields.append( + _GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0.fields_by_name['start_at_action_id']) +_GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0.fields_by_name['start_at_action_id'].containing_oneof = _GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0.oneofs_by_name['_start_at_action_id'] +_GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0.oneofs_by_name['_count'].fields.append( + _GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0.fields_by_name['count']) +_GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0.fields_by_name['count'].containing_oneof = _GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0.oneofs_by_name['_count'] +_GETGROUPACTIONSREQUEST.fields_by_name['v0'].message_type = _GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0 +_GETGROUPACTIONSREQUEST_ACTIONSTATUS.containing_type = _GETGROUPACTIONSREQUEST +_GETGROUPACTIONSREQUEST.oneofs_by_name['version'].fields.append( + _GETGROUPACTIONSREQUEST.fields_by_name['v0']) +_GETGROUPACTIONSREQUEST.fields_by_name['v0'].containing_oneof = _GETGROUPACTIONSREQUEST.oneofs_by_name['version'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_MINTEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_MINTEVENT.oneofs_by_name['_public_note'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_MINTEVENT.fields_by_name['public_note']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_MINTEVENT.fields_by_name['public_note'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_MINTEVENT.oneofs_by_name['_public_note'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_BURNEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_BURNEVENT.oneofs_by_name['_public_note'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_BURNEVENT.fields_by_name['public_note']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_BURNEVENT.fields_by_name['public_note'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_BURNEVENT.oneofs_by_name['_public_note'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_FREEZEEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_FREEZEEVENT.oneofs_by_name['_public_note'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_FREEZEEVENT.fields_by_name['public_note']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_FREEZEEVENT.fields_by_name['public_note'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_FREEZEEVENT.oneofs_by_name['_public_note'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UNFREEZEEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UNFREEZEEVENT.oneofs_by_name['_public_note'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UNFREEZEEVENT.fields_by_name['public_note']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UNFREEZEEVENT.fields_by_name['public_note'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UNFREEZEEVENT.oneofs_by_name['_public_note'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DESTROYFROZENFUNDSEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DESTROYFROZENFUNDSEVENT.oneofs_by_name['_public_note'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DESTROYFROZENFUNDSEVENT.fields_by_name['public_note']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DESTROYFROZENFUNDSEVENT.fields_by_name['public_note'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DESTROYFROZENFUNDSEVENT.oneofs_by_name['_public_note'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_SHAREDENCRYPTEDNOTE.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_PERSONALENCRYPTEDNOTE.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.fields_by_name['shared_encrypted_note'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_SHAREDENCRYPTEDNOTE +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.fields_by_name['personal_encrypted_note'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_PERSONALENCRYPTEDNOTE +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.oneofs_by_name['_public_note'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.fields_by_name['public_note']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.fields_by_name['public_note'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.oneofs_by_name['_public_note'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.oneofs_by_name['_shared_encrypted_note'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.fields_by_name['shared_encrypted_note']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.fields_by_name['shared_encrypted_note'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.oneofs_by_name['_shared_encrypted_note'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.oneofs_by_name['_personal_encrypted_note'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.fields_by_name['personal_encrypted_note']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.fields_by_name['personal_encrypted_note'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT.oneofs_by_name['_personal_encrypted_note'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT.fields_by_name['action_type'].enum_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT_ACTIONTYPE +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT_ACTIONTYPE.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT.oneofs_by_name['_public_note'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT.fields_by_name['public_note']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT.fields_by_name['public_note'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT.oneofs_by_name['_public_note'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENCONFIGUPDATEEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENCONFIGUPDATEEVENT.oneofs_by_name['_public_note'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENCONFIGUPDATEEVENT.fields_by_name['public_note']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENCONFIGUPDATEEVENT.fields_by_name['public_note'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENCONFIGUPDATEEVENT.oneofs_by_name['_public_note'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.fields_by_name['token_event'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.fields_by_name['document_event'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.fields_by_name['contract_event'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.oneofs_by_name['event_type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.fields_by_name['token_event']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.fields_by_name['token_event'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.oneofs_by_name['event_type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.oneofs_by_name['event_type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.fields_by_name['document_event']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.fields_by_name['document_event'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.oneofs_by_name['event_type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.oneofs_by_name['event_type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.fields_by_name['contract_event']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.fields_by_name['contract_event'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT.oneofs_by_name['event_type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT.fields_by_name['create'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTCREATEEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT.oneofs_by_name['type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT.fields_by_name['create']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT.fields_by_name['create'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT.oneofs_by_name['type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTCREATEEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTUPDATEEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT.fields_by_name['update'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTUPDATEEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT.oneofs_by_name['type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT.fields_by_name['update']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT.fields_by_name['update'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT.oneofs_by_name['type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['mint'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_MINTEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['burn'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_BURNEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['freeze'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_FREEZEEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['unfreeze'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UNFREEZEEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['destroy_frozen_funds'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DESTROYFROZENFUNDSEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['transfer'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['emergency_action'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['token_config_update'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENCONFIGUPDATEEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['mint']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['mint'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['burn']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['burn'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['freeze']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['freeze'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['unfreeze']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['unfreeze'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['destroy_frozen_funds']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['destroy_frozen_funds'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['transfer']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['transfer'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['emergency_action']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['emergency_action'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['token_config_update']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.fields_by_name['token_config_update'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT.oneofs_by_name['type'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONENTRY.fields_by_name['event'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONENTRY.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONS.fields_by_name['group_actions'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONENTRY +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONS.containing_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0.fields_by_name['group_actions'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONS +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0.containing_type = _GETGROUPACTIONSRESPONSE +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0.fields_by_name['group_actions']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0.fields_by_name['group_actions'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0.oneofs_by_name['result'] +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0.fields_by_name['proof']) +_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0.oneofs_by_name['result'] +_GETGROUPACTIONSRESPONSE.fields_by_name['v0'].message_type = _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 +_GETGROUPACTIONSRESPONSE.oneofs_by_name['version'].fields.append( + _GETGROUPACTIONSRESPONSE.fields_by_name['v0']) +_GETGROUPACTIONSRESPONSE.fields_by_name['v0'].containing_oneof = _GETGROUPACTIONSRESPONSE.oneofs_by_name['version'] +_GETGROUPACTIONSIGNERSREQUEST_GETGROUPACTIONSIGNERSREQUESTV0.fields_by_name['status'].enum_type = _GETGROUPACTIONSIGNERSREQUEST_ACTIONSTATUS +_GETGROUPACTIONSIGNERSREQUEST_GETGROUPACTIONSIGNERSREQUESTV0.containing_type = _GETGROUPACTIONSIGNERSREQUEST +_GETGROUPACTIONSIGNERSREQUEST.fields_by_name['v0'].message_type = _GETGROUPACTIONSIGNERSREQUEST_GETGROUPACTIONSIGNERSREQUESTV0 +_GETGROUPACTIONSIGNERSREQUEST_ACTIONSTATUS.containing_type = _GETGROUPACTIONSIGNERSREQUEST +_GETGROUPACTIONSIGNERSREQUEST.oneofs_by_name['version'].fields.append( + _GETGROUPACTIONSIGNERSREQUEST.fields_by_name['v0']) +_GETGROUPACTIONSIGNERSREQUEST.fields_by_name['v0'].containing_oneof = _GETGROUPACTIONSIGNERSREQUEST.oneofs_by_name['version'] +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNER.containing_type = _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0 +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNERS.fields_by_name['signers'].message_type = _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNER +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNERS.containing_type = _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0 +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0.fields_by_name['group_action_signers'].message_type = _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNERS +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0.containing_type = _GETGROUPACTIONSIGNERSRESPONSE +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0.fields_by_name['group_action_signers']) +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0.fields_by_name['group_action_signers'].containing_oneof = _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0.oneofs_by_name['result'] +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0.fields_by_name['proof']) +_GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0.oneofs_by_name['result'] +_GETGROUPACTIONSIGNERSRESPONSE.fields_by_name['v0'].message_type = _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0 +_GETGROUPACTIONSIGNERSRESPONSE.oneofs_by_name['version'].fields.append( + _GETGROUPACTIONSIGNERSRESPONSE.fields_by_name['v0']) +_GETGROUPACTIONSIGNERSRESPONSE.fields_by_name['v0'].containing_oneof = _GETGROUPACTIONSIGNERSRESPONSE.oneofs_by_name['version'] DESCRIPTOR.message_types_by_name['Proof'] = _PROOF DESCRIPTOR.message_types_by_name['ResponseMetadata'] = _RESPONSEMETADATA DESCRIPTOR.message_types_by_name['StateTransitionBroadcastError'] = _STATETRANSITIONBROADCASTERROR @@ -9360,1457 +13342,2129 @@ DESCRIPTOR.message_types_by_name['GetStatusResponse'] = _GETSTATUSRESPONSE DESCRIPTOR.message_types_by_name['GetCurrentQuorumsInfoRequest'] = _GETCURRENTQUORUMSINFOREQUEST DESCRIPTOR.message_types_by_name['GetCurrentQuorumsInfoResponse'] = _GETCURRENTQUORUMSINFORESPONSE +DESCRIPTOR.message_types_by_name['GetIdentityTokenBalancesRequest'] = _GETIDENTITYTOKENBALANCESREQUEST +DESCRIPTOR.message_types_by_name['GetIdentityTokenBalancesResponse'] = _GETIDENTITYTOKENBALANCESRESPONSE +DESCRIPTOR.message_types_by_name['GetIdentitiesTokenBalancesRequest'] = _GETIDENTITIESTOKENBALANCESREQUEST +DESCRIPTOR.message_types_by_name['GetIdentitiesTokenBalancesResponse'] = _GETIDENTITIESTOKENBALANCESRESPONSE +DESCRIPTOR.message_types_by_name['GetIdentityTokenInfosRequest'] = _GETIDENTITYTOKENINFOSREQUEST +DESCRIPTOR.message_types_by_name['GetIdentityTokenInfosResponse'] = _GETIDENTITYTOKENINFOSRESPONSE +DESCRIPTOR.message_types_by_name['GetIdentitiesTokenInfosRequest'] = _GETIDENTITIESTOKENINFOSREQUEST +DESCRIPTOR.message_types_by_name['GetIdentitiesTokenInfosResponse'] = _GETIDENTITIESTOKENINFOSRESPONSE +DESCRIPTOR.message_types_by_name['GetTokenStatusesRequest'] = _GETTOKENSTATUSESREQUEST +DESCRIPTOR.message_types_by_name['GetTokenStatusesResponse'] = _GETTOKENSTATUSESRESPONSE +DESCRIPTOR.message_types_by_name['GetTokenTotalSupplyRequest'] = _GETTOKENTOTALSUPPLYREQUEST +DESCRIPTOR.message_types_by_name['GetTokenTotalSupplyResponse'] = _GETTOKENTOTALSUPPLYRESPONSE +DESCRIPTOR.message_types_by_name['GetGroupInfoRequest'] = _GETGROUPINFOREQUEST +DESCRIPTOR.message_types_by_name['GetGroupInfoResponse'] = _GETGROUPINFORESPONSE +DESCRIPTOR.message_types_by_name['GetGroupInfosRequest'] = _GETGROUPINFOSREQUEST +DESCRIPTOR.message_types_by_name['GetGroupInfosResponse'] = _GETGROUPINFOSRESPONSE +DESCRIPTOR.message_types_by_name['GetGroupActionsRequest'] = _GETGROUPACTIONSREQUEST +DESCRIPTOR.message_types_by_name['GetGroupActionsResponse'] = _GETGROUPACTIONSRESPONSE +DESCRIPTOR.message_types_by_name['GetGroupActionSignersRequest'] = _GETGROUPACTIONSIGNERSREQUEST +DESCRIPTOR.message_types_by_name['GetGroupActionSignersResponse'] = _GETGROUPACTIONSIGNERSRESPONSE DESCRIPTOR.enum_types_by_name['KeyPurpose'] = _KEYPURPOSE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -Proof = _reflection.GeneratedProtocolMessageType('Proof', (_message.Message,), { - 'DESCRIPTOR' : _PROOF, +Proof = _reflection.GeneratedProtocolMessageType('Proof', (_message.Message,), { + 'DESCRIPTOR' : _PROOF, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.Proof) + }) +_sym_db.RegisterMessage(Proof) + +ResponseMetadata = _reflection.GeneratedProtocolMessageType('ResponseMetadata', (_message.Message,), { + 'DESCRIPTOR' : _RESPONSEMETADATA, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.ResponseMetadata) + }) +_sym_db.RegisterMessage(ResponseMetadata) + +StateTransitionBroadcastError = _reflection.GeneratedProtocolMessageType('StateTransitionBroadcastError', (_message.Message,), { + 'DESCRIPTOR' : _STATETRANSITIONBROADCASTERROR, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.StateTransitionBroadcastError) + }) +_sym_db.RegisterMessage(StateTransitionBroadcastError) + +BroadcastStateTransitionRequest = _reflection.GeneratedProtocolMessageType('BroadcastStateTransitionRequest', (_message.Message,), { + 'DESCRIPTOR' : _BROADCASTSTATETRANSITIONREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.BroadcastStateTransitionRequest) + }) +_sym_db.RegisterMessage(BroadcastStateTransitionRequest) + +BroadcastStateTransitionResponse = _reflection.GeneratedProtocolMessageType('BroadcastStateTransitionResponse', (_message.Message,), { + 'DESCRIPTOR' : _BROADCASTSTATETRANSITIONRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.BroadcastStateTransitionResponse) + }) +_sym_db.RegisterMessage(BroadcastStateTransitionResponse) + +GetIdentityRequest = _reflection.GeneratedProtocolMessageType('GetIdentityRequest', (_message.Message,), { + + 'GetIdentityRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYREQUEST_GETIDENTITYREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITYREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityRequest) + }) +_sym_db.RegisterMessage(GetIdentityRequest) +_sym_db.RegisterMessage(GetIdentityRequest.GetIdentityRequestV0) + +GetIdentityNonceRequest = _reflection.GeneratedProtocolMessageType('GetIdentityNonceRequest', (_message.Message,), { + + 'GetIdentityNonceRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityNonceRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYNONCEREQUEST_GETIDENTITYNONCEREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITYNONCEREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityNonceRequest) + }) +_sym_db.RegisterMessage(GetIdentityNonceRequest) +_sym_db.RegisterMessage(GetIdentityNonceRequest.GetIdentityNonceRequestV0) + +GetIdentityContractNonceRequest = _reflection.GeneratedProtocolMessageType('GetIdentityContractNonceRequest', (_message.Message,), { + + 'GetIdentityContractNonceRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityContractNonceRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYCONTRACTNONCEREQUEST_GETIDENTITYCONTRACTNONCEREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITYCONTRACTNONCEREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityContractNonceRequest) + }) +_sym_db.RegisterMessage(GetIdentityContractNonceRequest) +_sym_db.RegisterMessage(GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0) + +GetIdentityBalanceRequest = _reflection.GeneratedProtocolMessageType('GetIdentityBalanceRequest', (_message.Message,), { + + 'GetIdentityBalanceRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityBalanceRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYBALANCEREQUEST_GETIDENTITYBALANCEREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITYBALANCEREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceRequest) + }) +_sym_db.RegisterMessage(GetIdentityBalanceRequest) +_sym_db.RegisterMessage(GetIdentityBalanceRequest.GetIdentityBalanceRequestV0) + +GetIdentityBalanceAndRevisionRequest = _reflection.GeneratedProtocolMessageType('GetIdentityBalanceAndRevisionRequest', (_message.Message,), { + + 'GetIdentityBalanceAndRevisionRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityBalanceAndRevisionRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYBALANCEANDREVISIONREQUEST_GETIDENTITYBALANCEANDREVISIONREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITYBALANCEANDREVISIONREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest) + }) +_sym_db.RegisterMessage(GetIdentityBalanceAndRevisionRequest) +_sym_db.RegisterMessage(GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0) + +GetIdentityResponse = _reflection.GeneratedProtocolMessageType('GetIdentityResponse', (_message.Message,), { + + 'GetIdentityResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITYRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityResponse) + }) +_sym_db.RegisterMessage(GetIdentityResponse) +_sym_db.RegisterMessage(GetIdentityResponse.GetIdentityResponseV0) + +GetIdentityNonceResponse = _reflection.GeneratedProtocolMessageType('GetIdentityNonceResponse', (_message.Message,), { + + 'GetIdentityNonceResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityNonceResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITYNONCERESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityNonceResponse) + }) +_sym_db.RegisterMessage(GetIdentityNonceResponse) +_sym_db.RegisterMessage(GetIdentityNonceResponse.GetIdentityNonceResponseV0) + +GetIdentityContractNonceResponse = _reflection.GeneratedProtocolMessageType('GetIdentityContractNonceResponse', (_message.Message,), { + + 'GetIdentityContractNonceResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityContractNonceResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITYCONTRACTNONCERESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityContractNonceResponse) + }) +_sym_db.RegisterMessage(GetIdentityContractNonceResponse) +_sym_db.RegisterMessage(GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0) + +GetIdentityBalanceResponse = _reflection.GeneratedProtocolMessageType('GetIdentityBalanceResponse', (_message.Message,), { + + 'GetIdentityBalanceResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityBalanceResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITYBALANCERESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceResponse) + }) +_sym_db.RegisterMessage(GetIdentityBalanceResponse) +_sym_db.RegisterMessage(GetIdentityBalanceResponse.GetIdentityBalanceResponseV0) + +GetIdentityBalanceAndRevisionResponse = _reflection.GeneratedProtocolMessageType('GetIdentityBalanceAndRevisionResponse', (_message.Message,), { + + 'GetIdentityBalanceAndRevisionResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityBalanceAndRevisionResponseV0', (_message.Message,), { + + 'BalanceAndRevision' : _reflection.GeneratedProtocolMessageType('BalanceAndRevision', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0_BALANCEANDREVISION, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision) + }) + , + 'DESCRIPTOR' : _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITYBALANCEANDREVISIONRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse) + }) +_sym_db.RegisterMessage(GetIdentityBalanceAndRevisionResponse) +_sym_db.RegisterMessage(GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0) +_sym_db.RegisterMessage(GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision) + +KeyRequestType = _reflection.GeneratedProtocolMessageType('KeyRequestType', (_message.Message,), { + 'DESCRIPTOR' : _KEYREQUESTTYPE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.KeyRequestType) + }) +_sym_db.RegisterMessage(KeyRequestType) + +AllKeys = _reflection.GeneratedProtocolMessageType('AllKeys', (_message.Message,), { + 'DESCRIPTOR' : _ALLKEYS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.AllKeys) + }) +_sym_db.RegisterMessage(AllKeys) + +SpecificKeys = _reflection.GeneratedProtocolMessageType('SpecificKeys', (_message.Message,), { + 'DESCRIPTOR' : _SPECIFICKEYS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.SpecificKeys) + }) +_sym_db.RegisterMessage(SpecificKeys) + +SearchKey = _reflection.GeneratedProtocolMessageType('SearchKey', (_message.Message,), { + + 'PurposeMapEntry' : _reflection.GeneratedProtocolMessageType('PurposeMapEntry', (_message.Message,), { + 'DESCRIPTOR' : _SEARCHKEY_PURPOSEMAPENTRY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.SearchKey.PurposeMapEntry) + }) + , + 'DESCRIPTOR' : _SEARCHKEY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.SearchKey) + }) +_sym_db.RegisterMessage(SearchKey) +_sym_db.RegisterMessage(SearchKey.PurposeMapEntry) + +SecurityLevelMap = _reflection.GeneratedProtocolMessageType('SecurityLevelMap', (_message.Message,), { + + 'SecurityLevelMapEntry' : _reflection.GeneratedProtocolMessageType('SecurityLevelMapEntry', (_message.Message,), { + 'DESCRIPTOR' : _SECURITYLEVELMAP_SECURITYLEVELMAPENTRY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.SecurityLevelMap.SecurityLevelMapEntry) + }) + , + 'DESCRIPTOR' : _SECURITYLEVELMAP, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.SecurityLevelMap) + }) +_sym_db.RegisterMessage(SecurityLevelMap) +_sym_db.RegisterMessage(SecurityLevelMap.SecurityLevelMapEntry) + +GetIdentityKeysRequest = _reflection.GeneratedProtocolMessageType('GetIdentityKeysRequest', (_message.Message,), { + + 'GetIdentityKeysRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityKeysRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYKEYSREQUEST_GETIDENTITYKEYSREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITYKEYSREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityKeysRequest) + }) +_sym_db.RegisterMessage(GetIdentityKeysRequest) +_sym_db.RegisterMessage(GetIdentityKeysRequest.GetIdentityKeysRequestV0) + +GetIdentityKeysResponse = _reflection.GeneratedProtocolMessageType('GetIdentityKeysResponse', (_message.Message,), { + + 'GetIdentityKeysResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityKeysResponseV0', (_message.Message,), { + + 'Keys' : _reflection.GeneratedProtocolMessageType('Keys', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYKEYSRESPONSE_GETIDENTITYKEYSRESPONSEV0_KEYS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys) + }) + , + 'DESCRIPTOR' : _GETIDENTITYKEYSRESPONSE_GETIDENTITYKEYSRESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITYKEYSRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityKeysResponse) + }) +_sym_db.RegisterMessage(GetIdentityKeysResponse) +_sym_db.RegisterMessage(GetIdentityKeysResponse.GetIdentityKeysResponseV0) +_sym_db.RegisterMessage(GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys) + +GetIdentitiesContractKeysRequest = _reflection.GeneratedProtocolMessageType('GetIdentitiesContractKeysRequest', (_message.Message,), { + + 'GetIdentitiesContractKeysRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesContractKeysRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSREQUEST_GETIDENTITIESCONTRACTKEYSREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest) + }) +_sym_db.RegisterMessage(GetIdentitiesContractKeysRequest) +_sym_db.RegisterMessage(GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0) + +GetIdentitiesContractKeysResponse = _reflection.GeneratedProtocolMessageType('GetIdentitiesContractKeysResponse', (_message.Message,), { + + 'GetIdentitiesContractKeysResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesContractKeysResponseV0', (_message.Message,), { + + 'PurposeKeys' : _reflection.GeneratedProtocolMessageType('PurposeKeys', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSRESPONSE_GETIDENTITIESCONTRACTKEYSRESPONSEV0_PURPOSEKEYS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys) + }) + , + + 'IdentityKeys' : _reflection.GeneratedProtocolMessageType('IdentityKeys', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSRESPONSE_GETIDENTITIESCONTRACTKEYSRESPONSEV0_IDENTITYKEYS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys) + }) + , + + 'IdentitiesKeys' : _reflection.GeneratedProtocolMessageType('IdentitiesKeys', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSRESPONSE_GETIDENTITIESCONTRACTKEYSRESPONSEV0_IDENTITIESKEYS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys) + }) + , + 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSRESPONSE_GETIDENTITIESCONTRACTKEYSRESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0) + }) + , + 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse) + }) +_sym_db.RegisterMessage(GetIdentitiesContractKeysResponse) +_sym_db.RegisterMessage(GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0) +_sym_db.RegisterMessage(GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys) +_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.Proof) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest) }) -_sym_db.RegisterMessage(Proof) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksByIdsRequest) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0) -ResponseMetadata = _reflection.GeneratedProtocolMessageType('ResponseMetadata', (_message.Message,), { - 'DESCRIPTOR' : _RESPONSEMETADATA, +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.ResponseMetadata) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse) }) -_sym_db.RegisterMessage(ResponseMetadata) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksResponse) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks) -StateTransitionBroadcastError = _reflection.GeneratedProtocolMessageType('StateTransitionBroadcastError', (_message.Message,), { - 'DESCRIPTOR' : _STATETRANSITIONBROADCASTERROR, +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.StateTransitionBroadcastError) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest) }) -_sym_db.RegisterMessage(StateTransitionBroadcastError) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksByRangeRequest) +_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0) -BroadcastStateTransitionRequest = _reflection.GeneratedProtocolMessageType('BroadcastStateTransitionRequest', (_message.Message,), { - 'DESCRIPTOR' : _BROADCASTSTATETRANSITIONREQUEST, +GetIdentitiesBalancesRequest = _reflection.GeneratedProtocolMessageType('GetIdentitiesBalancesRequest', (_message.Message,), { + + 'GetIdentitiesBalancesRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesBalancesRequestV0', (_message.Message,), { + '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.BroadcastStateTransitionRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest) }) -_sym_db.RegisterMessage(BroadcastStateTransitionRequest) +_sym_db.RegisterMessage(GetIdentitiesBalancesRequest) +_sym_db.RegisterMessage(GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0) -BroadcastStateTransitionResponse = _reflection.GeneratedProtocolMessageType('BroadcastStateTransitionResponse', (_message.Message,), { - 'DESCRIPTOR' : _BROADCASTSTATETRANSITIONRESPONSE, +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.BroadcastStateTransitionResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse) }) -_sym_db.RegisterMessage(BroadcastStateTransitionResponse) +_sym_db.RegisterMessage(GetIdentitiesBalancesResponse) +_sym_db.RegisterMessage(GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0) +_sym_db.RegisterMessage(GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance) +_sym_db.RegisterMessage(GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances) -GetIdentityRequest = _reflection.GeneratedProtocolMessageType('GetIdentityRequest', (_message.Message,), { +GetProofsRequest = _reflection.GeneratedProtocolMessageType('GetProofsRequest', (_message.Message,), { - 'GetIdentityRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYREQUEST_GETIDENTITYREQUESTV0, + 'GetProofsRequestV0' : _reflection.GeneratedProtocolMessageType('GetProofsRequestV0', (_message.Message,), { + + 'DocumentRequest' : _reflection.GeneratedProtocolMessageType('DocumentRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest) + }) + , + + 'IdentityRequest' : _reflection.GeneratedProtocolMessageType('IdentityRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest) + }) + , + + 'ContractRequest' : _reflection.GeneratedProtocolMessageType('ContractRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_CONTRACTREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest) + }) + , + + 'VoteStatusRequest' : _reflection.GeneratedProtocolMessageType('VoteStatusRequest', (_message.Message,), { + + 'ContestedResourceVoteStatusRequest' : _reflection.GeneratedProtocolMessageType('ContestedResourceVoteStatusRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST_CONTESTEDRESOURCEVOTESTATUSREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest) + }) + , + 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest) + }) + , + + 'IdentityTokenBalanceRequest' : _reflection.GeneratedProtocolMessageType('IdentityTokenBalanceRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYTOKENBALANCEREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest) + }) + , + + 'IdentityTokenInfoRequest' : _reflection.GeneratedProtocolMessageType('IdentityTokenInfoRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYTOKENINFOREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest) + }) + , + + 'TokenStatusRequest' : _reflection.GeneratedProtocolMessageType('TokenStatusRequest', (_message.Message,), { + 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_TOKENSTATUSREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest) + }) + , + 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0) }) , - 'DESCRIPTOR' : _GETIDENTITYREQUEST, + 'DESCRIPTOR' : _GETPROOFSREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest) }) -_sym_db.RegisterMessage(GetIdentityRequest) -_sym_db.RegisterMessage(GetIdentityRequest.GetIdentityRequestV0) +_sym_db.RegisterMessage(GetProofsRequest) +_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0) +_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.DocumentRequest) +_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.IdentityRequest) +_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.ContractRequest) +_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.VoteStatusRequest) +_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest) +_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest) +_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest) +_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.TokenStatusRequest) -GetIdentityNonceRequest = _reflection.GeneratedProtocolMessageType('GetIdentityNonceRequest', (_message.Message,), { +GetProofsResponse = _reflection.GeneratedProtocolMessageType('GetProofsResponse', (_message.Message,), { - 'GetIdentityNonceRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityNonceRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYNONCEREQUEST_GETIDENTITYNONCEREQUESTV0, + 'GetProofsResponseV0' : _reflection.GeneratedProtocolMessageType('GetProofsResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETPROOFSRESPONSE_GETPROOFSRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0) }) , - 'DESCRIPTOR' : _GETIDENTITYNONCEREQUEST, + 'DESCRIPTOR' : _GETPROOFSRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityNonceRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsResponse) }) -_sym_db.RegisterMessage(GetIdentityNonceRequest) -_sym_db.RegisterMessage(GetIdentityNonceRequest.GetIdentityNonceRequestV0) +_sym_db.RegisterMessage(GetProofsResponse) +_sym_db.RegisterMessage(GetProofsResponse.GetProofsResponseV0) -GetIdentityContractNonceRequest = _reflection.GeneratedProtocolMessageType('GetIdentityContractNonceRequest', (_message.Message,), { +GetDataContractRequest = _reflection.GeneratedProtocolMessageType('GetDataContractRequest', (_message.Message,), { - 'GetIdentityContractNonceRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityContractNonceRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYCONTRACTNONCEREQUEST_GETIDENTITYCONTRACTNONCEREQUESTV0, + 'GetDataContractRequestV0' : _reflection.GeneratedProtocolMessageType('GetDataContractRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETDATACONTRACTREQUEST_GETDATACONTRACTREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0) }) , - 'DESCRIPTOR' : _GETIDENTITYCONTRACTNONCEREQUEST, + 'DESCRIPTOR' : _GETDATACONTRACTREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityContractNonceRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractRequest) }) -_sym_db.RegisterMessage(GetIdentityContractNonceRequest) -_sym_db.RegisterMessage(GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0) +_sym_db.RegisterMessage(GetDataContractRequest) +_sym_db.RegisterMessage(GetDataContractRequest.GetDataContractRequestV0) -GetIdentityBalanceRequest = _reflection.GeneratedProtocolMessageType('GetIdentityBalanceRequest', (_message.Message,), { +GetDataContractResponse = _reflection.GeneratedProtocolMessageType('GetDataContractResponse', (_message.Message,), { - 'GetIdentityBalanceRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityBalanceRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYBALANCEREQUEST_GETIDENTITYBALANCEREQUESTV0, + 'GetDataContractResponseV0' : _reflection.GeneratedProtocolMessageType('GetDataContractResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETDATACONTRACTRESPONSE_GETDATACONTRACTRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0) }) , - 'DESCRIPTOR' : _GETIDENTITYBALANCEREQUEST, + 'DESCRIPTOR' : _GETDATACONTRACTRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractResponse) }) -_sym_db.RegisterMessage(GetIdentityBalanceRequest) -_sym_db.RegisterMessage(GetIdentityBalanceRequest.GetIdentityBalanceRequestV0) +_sym_db.RegisterMessage(GetDataContractResponse) +_sym_db.RegisterMessage(GetDataContractResponse.GetDataContractResponseV0) -GetIdentityBalanceAndRevisionRequest = _reflection.GeneratedProtocolMessageType('GetIdentityBalanceAndRevisionRequest', (_message.Message,), { +GetDataContractsRequest = _reflection.GeneratedProtocolMessageType('GetDataContractsRequest', (_message.Message,), { - 'GetIdentityBalanceAndRevisionRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityBalanceAndRevisionRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYBALANCEANDREVISIONREQUEST_GETIDENTITYBALANCEANDREVISIONREQUESTV0, + 'GetDataContractsRequestV0' : _reflection.GeneratedProtocolMessageType('GetDataContractsRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETDATACONTRACTSREQUEST_GETDATACONTRACTSREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0) }) , - 'DESCRIPTOR' : _GETIDENTITYBALANCEANDREVISIONREQUEST, + 'DESCRIPTOR' : _GETDATACONTRACTSREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractsRequest) }) -_sym_db.RegisterMessage(GetIdentityBalanceAndRevisionRequest) -_sym_db.RegisterMessage(GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0) +_sym_db.RegisterMessage(GetDataContractsRequest) +_sym_db.RegisterMessage(GetDataContractsRequest.GetDataContractsRequestV0) -GetIdentityResponse = _reflection.GeneratedProtocolMessageType('GetIdentityResponse', (_message.Message,), { +GetDataContractsResponse = _reflection.GeneratedProtocolMessageType('GetDataContractsResponse', (_message.Message,), { + + 'DataContractEntry' : _reflection.GeneratedProtocolMessageType('DataContractEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETDATACONTRACTSRESPONSE_DATACONTRACTENTRY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry) + }) + , + + 'DataContracts' : _reflection.GeneratedProtocolMessageType('DataContracts', (_message.Message,), { + 'DESCRIPTOR' : _GETDATACONTRACTSRESPONSE_DATACONTRACTS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts) + }) + , - 'GetIdentityResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYRESPONSE_GETIDENTITYRESPONSEV0, + 'GetDataContractsResponseV0' : _reflection.GeneratedProtocolMessageType('GetDataContractsResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETDATACONTRACTSRESPONSE_GETDATACONTRACTSRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0) }) , - 'DESCRIPTOR' : _GETIDENTITYRESPONSE, + 'DESCRIPTOR' : _GETDATACONTRACTSRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractsResponse) }) -_sym_db.RegisterMessage(GetIdentityResponse) -_sym_db.RegisterMessage(GetIdentityResponse.GetIdentityResponseV0) +_sym_db.RegisterMessage(GetDataContractsResponse) +_sym_db.RegisterMessage(GetDataContractsResponse.DataContractEntry) +_sym_db.RegisterMessage(GetDataContractsResponse.DataContracts) +_sym_db.RegisterMessage(GetDataContractsResponse.GetDataContractsResponseV0) -GetIdentityNonceResponse = _reflection.GeneratedProtocolMessageType('GetIdentityNonceResponse', (_message.Message,), { +GetDataContractHistoryRequest = _reflection.GeneratedProtocolMessageType('GetDataContractHistoryRequest', (_message.Message,), { - 'GetIdentityNonceResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityNonceResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYNONCERESPONSE_GETIDENTITYNONCERESPONSEV0, + 'GetDataContractHistoryRequestV0' : _reflection.GeneratedProtocolMessageType('GetDataContractHistoryRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETDATACONTRACTHISTORYREQUEST_GETDATACONTRACTHISTORYREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0) }) , - 'DESCRIPTOR' : _GETIDENTITYNONCERESPONSE, + 'DESCRIPTOR' : _GETDATACONTRACTHISTORYREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityNonceResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractHistoryRequest) }) -_sym_db.RegisterMessage(GetIdentityNonceResponse) -_sym_db.RegisterMessage(GetIdentityNonceResponse.GetIdentityNonceResponseV0) +_sym_db.RegisterMessage(GetDataContractHistoryRequest) +_sym_db.RegisterMessage(GetDataContractHistoryRequest.GetDataContractHistoryRequestV0) -GetIdentityContractNonceResponse = _reflection.GeneratedProtocolMessageType('GetIdentityContractNonceResponse', (_message.Message,), { +GetDataContractHistoryResponse = _reflection.GeneratedProtocolMessageType('GetDataContractHistoryResponse', (_message.Message,), { - 'GetIdentityContractNonceResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityContractNonceResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYCONTRACTNONCERESPONSE_GETIDENTITYCONTRACTNONCERESPONSEV0, + 'GetDataContractHistoryResponseV0' : _reflection.GeneratedProtocolMessageType('GetDataContractHistoryResponseV0', (_message.Message,), { + + 'DataContractHistoryEntry' : _reflection.GeneratedProtocolMessageType('DataContractHistoryEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORYENTRY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry) + }) + , + + 'DataContractHistory' : _reflection.GeneratedProtocolMessageType('DataContractHistory', (_message.Message,), { + 'DESCRIPTOR' : _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory) + }) + , + 'DESCRIPTOR' : _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0) }) , - 'DESCRIPTOR' : _GETIDENTITYCONTRACTNONCERESPONSE, + 'DESCRIPTOR' : _GETDATACONTRACTHISTORYRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityContractNonceResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractHistoryResponse) }) -_sym_db.RegisterMessage(GetIdentityContractNonceResponse) -_sym_db.RegisterMessage(GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0) +_sym_db.RegisterMessage(GetDataContractHistoryResponse) +_sym_db.RegisterMessage(GetDataContractHistoryResponse.GetDataContractHistoryResponseV0) +_sym_db.RegisterMessage(GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry) +_sym_db.RegisterMessage(GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory) -GetIdentityBalanceResponse = _reflection.GeneratedProtocolMessageType('GetIdentityBalanceResponse', (_message.Message,), { +GetDocumentsRequest = _reflection.GeneratedProtocolMessageType('GetDocumentsRequest', (_message.Message,), { - 'GetIdentityBalanceResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityBalanceResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYBALANCERESPONSE_GETIDENTITYBALANCERESPONSEV0, + 'GetDocumentsRequestV0' : _reflection.GeneratedProtocolMessageType('GetDocumentsRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0) }) , - 'DESCRIPTOR' : _GETIDENTITYBALANCERESPONSE, + 'DESCRIPTOR' : _GETDOCUMENTSREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest) }) -_sym_db.RegisterMessage(GetIdentityBalanceResponse) -_sym_db.RegisterMessage(GetIdentityBalanceResponse.GetIdentityBalanceResponseV0) +_sym_db.RegisterMessage(GetDocumentsRequest) +_sym_db.RegisterMessage(GetDocumentsRequest.GetDocumentsRequestV0) -GetIdentityBalanceAndRevisionResponse = _reflection.GeneratedProtocolMessageType('GetIdentityBalanceAndRevisionResponse', (_message.Message,), { +GetDocumentsResponse = _reflection.GeneratedProtocolMessageType('GetDocumentsResponse', (_message.Message,), { - 'GetIdentityBalanceAndRevisionResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityBalanceAndRevisionResponseV0', (_message.Message,), { + 'GetDocumentsResponseV0' : _reflection.GeneratedProtocolMessageType('GetDocumentsResponseV0', (_message.Message,), { - 'BalanceAndRevision' : _reflection.GeneratedProtocolMessageType('BalanceAndRevision', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0_BALANCEANDREVISION, + 'Documents' : _reflection.GeneratedProtocolMessageType('Documents', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV0_DOCUMENTS, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents) }) , - 'DESCRIPTOR' : _GETIDENTITYBALANCEANDREVISIONRESPONSE_GETIDENTITYBALANCEANDREVISIONRESPONSEV0, + 'DESCRIPTOR' : _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0) }) , - 'DESCRIPTOR' : _GETIDENTITYBALANCEANDREVISIONRESPONSE, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse) - }) -_sym_db.RegisterMessage(GetIdentityBalanceAndRevisionResponse) -_sym_db.RegisterMessage(GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0) -_sym_db.RegisterMessage(GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision) - -KeyRequestType = _reflection.GeneratedProtocolMessageType('KeyRequestType', (_message.Message,), { - 'DESCRIPTOR' : _KEYREQUESTTYPE, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.KeyRequestType) - }) -_sym_db.RegisterMessage(KeyRequestType) - -AllKeys = _reflection.GeneratedProtocolMessageType('AllKeys', (_message.Message,), { - 'DESCRIPTOR' : _ALLKEYS, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.AllKeys) - }) -_sym_db.RegisterMessage(AllKeys) - -SpecificKeys = _reflection.GeneratedProtocolMessageType('SpecificKeys', (_message.Message,), { - 'DESCRIPTOR' : _SPECIFICKEYS, + 'DESCRIPTOR' : _GETDOCUMENTSRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.SpecificKeys) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsResponse) }) -_sym_db.RegisterMessage(SpecificKeys) +_sym_db.RegisterMessage(GetDocumentsResponse) +_sym_db.RegisterMessage(GetDocumentsResponse.GetDocumentsResponseV0) +_sym_db.RegisterMessage(GetDocumentsResponse.GetDocumentsResponseV0.Documents) -SearchKey = _reflection.GeneratedProtocolMessageType('SearchKey', (_message.Message,), { +GetIdentityByPublicKeyHashRequest = _reflection.GeneratedProtocolMessageType('GetIdentityByPublicKeyHashRequest', (_message.Message,), { - 'PurposeMapEntry' : _reflection.GeneratedProtocolMessageType('PurposeMapEntry', (_message.Message,), { - 'DESCRIPTOR' : _SEARCHKEY_PURPOSEMAPENTRY, + 'GetIdentityByPublicKeyHashRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityByPublicKeyHashRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYBYPUBLICKEYHASHREQUEST_GETIDENTITYBYPUBLICKEYHASHREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.SearchKey.PurposeMapEntry) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0) }) , - 'DESCRIPTOR' : _SEARCHKEY, + 'DESCRIPTOR' : _GETIDENTITYBYPUBLICKEYHASHREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.SearchKey) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest) }) -_sym_db.RegisterMessage(SearchKey) -_sym_db.RegisterMessage(SearchKey.PurposeMapEntry) +_sym_db.RegisterMessage(GetIdentityByPublicKeyHashRequest) +_sym_db.RegisterMessage(GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0) -SecurityLevelMap = _reflection.GeneratedProtocolMessageType('SecurityLevelMap', (_message.Message,), { +GetIdentityByPublicKeyHashResponse = _reflection.GeneratedProtocolMessageType('GetIdentityByPublicKeyHashResponse', (_message.Message,), { - 'SecurityLevelMapEntry' : _reflection.GeneratedProtocolMessageType('SecurityLevelMapEntry', (_message.Message,), { - 'DESCRIPTOR' : _SECURITYLEVELMAP_SECURITYLEVELMAPENTRY, + 'GetIdentityByPublicKeyHashResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityByPublicKeyHashResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYBYPUBLICKEYHASHRESPONSE_GETIDENTITYBYPUBLICKEYHASHRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.SecurityLevelMap.SecurityLevelMapEntry) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0) }) , - 'DESCRIPTOR' : _SECURITYLEVELMAP, + 'DESCRIPTOR' : _GETIDENTITYBYPUBLICKEYHASHRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.SecurityLevelMap) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse) }) -_sym_db.RegisterMessage(SecurityLevelMap) -_sym_db.RegisterMessage(SecurityLevelMap.SecurityLevelMapEntry) +_sym_db.RegisterMessage(GetIdentityByPublicKeyHashResponse) +_sym_db.RegisterMessage(GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0) -GetIdentityKeysRequest = _reflection.GeneratedProtocolMessageType('GetIdentityKeysRequest', (_message.Message,), { +WaitForStateTransitionResultRequest = _reflection.GeneratedProtocolMessageType('WaitForStateTransitionResultRequest', (_message.Message,), { - 'GetIdentityKeysRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityKeysRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYKEYSREQUEST_GETIDENTITYKEYSREQUESTV0, + 'WaitForStateTransitionResultRequestV0' : _reflection.GeneratedProtocolMessageType('WaitForStateTransitionResultRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _WAITFORSTATETRANSITIONRESULTREQUEST_WAITFORSTATETRANSITIONRESULTREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0) }) , - 'DESCRIPTOR' : _GETIDENTITYKEYSREQUEST, + 'DESCRIPTOR' : _WAITFORSTATETRANSITIONRESULTREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityKeysRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest) }) -_sym_db.RegisterMessage(GetIdentityKeysRequest) -_sym_db.RegisterMessage(GetIdentityKeysRequest.GetIdentityKeysRequestV0) - -GetIdentityKeysResponse = _reflection.GeneratedProtocolMessageType('GetIdentityKeysResponse', (_message.Message,), { +_sym_db.RegisterMessage(WaitForStateTransitionResultRequest) +_sym_db.RegisterMessage(WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0) - 'GetIdentityKeysResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityKeysResponseV0', (_message.Message,), { +WaitForStateTransitionResultResponse = _reflection.GeneratedProtocolMessageType('WaitForStateTransitionResultResponse', (_message.Message,), { - 'Keys' : _reflection.GeneratedProtocolMessageType('Keys', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYKEYSRESPONSE_GETIDENTITYKEYSRESPONSEV0_KEYS, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys) - }) - , - 'DESCRIPTOR' : _GETIDENTITYKEYSRESPONSE_GETIDENTITYKEYSRESPONSEV0, + 'WaitForStateTransitionResultResponseV0' : _reflection.GeneratedProtocolMessageType('WaitForStateTransitionResultResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _WAITFORSTATETRANSITIONRESULTRESPONSE_WAITFORSTATETRANSITIONRESULTRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0) }) , - 'DESCRIPTOR' : _GETIDENTITYKEYSRESPONSE, + 'DESCRIPTOR' : _WAITFORSTATETRANSITIONRESULTRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityKeysResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse) }) -_sym_db.RegisterMessage(GetIdentityKeysResponse) -_sym_db.RegisterMessage(GetIdentityKeysResponse.GetIdentityKeysResponseV0) -_sym_db.RegisterMessage(GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys) +_sym_db.RegisterMessage(WaitForStateTransitionResultResponse) +_sym_db.RegisterMessage(WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0) -GetIdentitiesContractKeysRequest = _reflection.GeneratedProtocolMessageType('GetIdentitiesContractKeysRequest', (_message.Message,), { +GetConsensusParamsRequest = _reflection.GeneratedProtocolMessageType('GetConsensusParamsRequest', (_message.Message,), { - 'GetIdentitiesContractKeysRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesContractKeysRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSREQUEST_GETIDENTITIESCONTRACTKEYSREQUESTV0, + 'GetConsensusParamsRequestV0' : _reflection.GeneratedProtocolMessageType('GetConsensusParamsRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETCONSENSUSPARAMSREQUEST_GETCONSENSUSPARAMSREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0) }) , - 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSREQUEST, + 'DESCRIPTOR' : _GETCONSENSUSPARAMSREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetConsensusParamsRequest) }) -_sym_db.RegisterMessage(GetIdentitiesContractKeysRequest) -_sym_db.RegisterMessage(GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0) - -GetIdentitiesContractKeysResponse = _reflection.GeneratedProtocolMessageType('GetIdentitiesContractKeysResponse', (_message.Message,), { +_sym_db.RegisterMessage(GetConsensusParamsRequest) +_sym_db.RegisterMessage(GetConsensusParamsRequest.GetConsensusParamsRequestV0) - 'GetIdentitiesContractKeysResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesContractKeysResponseV0', (_message.Message,), { +GetConsensusParamsResponse = _reflection.GeneratedProtocolMessageType('GetConsensusParamsResponse', (_message.Message,), { - 'PurposeKeys' : _reflection.GeneratedProtocolMessageType('PurposeKeys', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSRESPONSE_GETIDENTITIESCONTRACTKEYSRESPONSEV0_PURPOSEKEYS, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys) - }) - , + 'ConsensusParamsBlock' : _reflection.GeneratedProtocolMessageType('ConsensusParamsBlock', (_message.Message,), { + 'DESCRIPTOR' : _GETCONSENSUSPARAMSRESPONSE_CONSENSUSPARAMSBLOCK, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock) + }) + , - 'IdentityKeys' : _reflection.GeneratedProtocolMessageType('IdentityKeys', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSRESPONSE_GETIDENTITIESCONTRACTKEYSRESPONSEV0_IDENTITYKEYS, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys) - }) - , + 'ConsensusParamsEvidence' : _reflection.GeneratedProtocolMessageType('ConsensusParamsEvidence', (_message.Message,), { + 'DESCRIPTOR' : _GETCONSENSUSPARAMSRESPONSE_CONSENSUSPARAMSEVIDENCE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence) + }) + , - 'IdentitiesKeys' : _reflection.GeneratedProtocolMessageType('IdentitiesKeys', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSRESPONSE_GETIDENTITIESCONTRACTKEYSRESPONSEV0_IDENTITIESKEYS, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys) - }) - , - 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSRESPONSE_GETIDENTITIESCONTRACTKEYSRESPONSEV0, + 'GetConsensusParamsResponseV0' : _reflection.GeneratedProtocolMessageType('GetConsensusParamsResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETCONSENSUSPARAMSRESPONSE_GETCONSENSUSPARAMSRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0) }) , - 'DESCRIPTOR' : _GETIDENTITIESCONTRACTKEYSRESPONSE, + 'DESCRIPTOR' : _GETCONSENSUSPARAMSRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetConsensusParamsResponse) }) -_sym_db.RegisterMessage(GetIdentitiesContractKeysResponse) -_sym_db.RegisterMessage(GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0) -_sym_db.RegisterMessage(GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys) -_sym_db.RegisterMessage(GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys) -_sym_db.RegisterMessage(GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys) +_sym_db.RegisterMessage(GetConsensusParamsResponse) +_sym_db.RegisterMessage(GetConsensusParamsResponse.ConsensusParamsBlock) +_sym_db.RegisterMessage(GetConsensusParamsResponse.ConsensusParamsEvidence) +_sym_db.RegisterMessage(GetConsensusParamsResponse.GetConsensusParamsResponseV0) -GetEvonodesProposedEpochBlocksByIdsRequest = _reflection.GeneratedProtocolMessageType('GetEvonodesProposedEpochBlocksByIdsRequest', (_message.Message,), { +GetProtocolVersionUpgradeStateRequest = _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeStateRequest', (_message.Message,), { - 'GetEvonodesProposedEpochBlocksByIdsRequestV0' : _reflection.GeneratedProtocolMessageType('GetEvonodesProposedEpochBlocksByIdsRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST_GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUESTV0, + 'GetProtocolVersionUpgradeStateRequestV0' : _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeStateRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADESTATEREQUEST_GETPROTOCOLVERSIONUPGRADESTATEREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0) }) , - 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSBYIDSREQUEST, + 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADESTATEREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest) }) -_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksByIdsRequest) -_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0) +_sym_db.RegisterMessage(GetProtocolVersionUpgradeStateRequest) +_sym_db.RegisterMessage(GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0) -GetEvonodesProposedEpochBlocksResponse = _reflection.GeneratedProtocolMessageType('GetEvonodesProposedEpochBlocksResponse', (_message.Message,), { +GetProtocolVersionUpgradeStateResponse = _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeStateResponse', (_message.Message,), { - 'GetEvonodesProposedEpochBlocksResponseV0' : _reflection.GeneratedProtocolMessageType('GetEvonodesProposedEpochBlocksResponseV0', (_message.Message,), { + 'GetProtocolVersionUpgradeStateResponseV0' : _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeStateResponseV0', (_message.Message,), { - 'EvonodeProposedBlocks' : _reflection.GeneratedProtocolMessageType('EvonodeProposedBlocks', (_message.Message,), { - 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODEPROPOSEDBLOCKS, + 'Versions' : _reflection.GeneratedProtocolMessageType('Versions', (_message.Message,), { + 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0_VERSIONS, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions) }) , - 'EvonodesProposedBlocks' : _reflection.GeneratedProtocolMessageType('EvonodesProposedBlocks', (_message.Message,), { - 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSE_GETEVONODESPROPOSEDEPOCHBLOCKSRESPONSEV0_EVONODESPROPOSEDBLOCKS, + 'VersionEntry' : _reflection.GeneratedProtocolMessageType('VersionEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0_VERSIONENTRY, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry) }) , - '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, + 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0) }) , - 'DESCRIPTOR' : _GETEVONODESPROPOSEDEPOCHBLOCKSBYRANGEREQUEST, + 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADESTATERESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse) }) -_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksByRangeRequest) -_sym_db.RegisterMessage(GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0) +_sym_db.RegisterMessage(GetProtocolVersionUpgradeStateResponse) +_sym_db.RegisterMessage(GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0) +_sym_db.RegisterMessage(GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions) +_sym_db.RegisterMessage(GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry) -GetIdentitiesBalancesRequest = _reflection.GeneratedProtocolMessageType('GetIdentitiesBalancesRequest', (_message.Message,), { +GetProtocolVersionUpgradeVoteStatusRequest = _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeVoteStatusRequest', (_message.Message,), { - 'GetIdentitiesBalancesRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesBalancesRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITIESBALANCESREQUEST_GETIDENTITIESBALANCESREQUESTV0, + 'GetProtocolVersionUpgradeVoteStatusRequestV0' : _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeVoteStatusRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADEVOTESTATUSREQUEST_GETPROTOCOLVERSIONUPGRADEVOTESTATUSREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0) }) , - 'DESCRIPTOR' : _GETIDENTITIESBALANCESREQUEST, + 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADEVOTESTATUSREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest) }) -_sym_db.RegisterMessage(GetIdentitiesBalancesRequest) -_sym_db.RegisterMessage(GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0) +_sym_db.RegisterMessage(GetProtocolVersionUpgradeVoteStatusRequest) +_sym_db.RegisterMessage(GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0) -GetIdentitiesBalancesResponse = _reflection.GeneratedProtocolMessageType('GetIdentitiesBalancesResponse', (_message.Message,), { +GetProtocolVersionUpgradeVoteStatusResponse = _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeVoteStatusResponse', (_message.Message,), { - 'GetIdentitiesBalancesResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesBalancesResponseV0', (_message.Message,), { + 'GetProtocolVersionUpgradeVoteStatusResponseV0' : _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeVoteStatusResponseV0', (_message.Message,), { - 'IdentityBalance' : _reflection.GeneratedProtocolMessageType('IdentityBalance', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITYBALANCE, + 'VersionSignals' : _reflection.GeneratedProtocolMessageType('VersionSignals', (_message.Message,), { + 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0_VERSIONSIGNALS, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals) }) , - 'IdentitiesBalances' : _reflection.GeneratedProtocolMessageType('IdentitiesBalances', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITIESBALANCES, + 'VersionSignal' : _reflection.GeneratedProtocolMessageType('VersionSignal', (_message.Message,), { + 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0_VERSIONSIGNAL, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal) }) , - 'DESCRIPTOR' : _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0, + 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0) }) , - 'DESCRIPTOR' : _GETIDENTITIESBALANCESRESPONSE, + 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse) }) -_sym_db.RegisterMessage(GetIdentitiesBalancesResponse) -_sym_db.RegisterMessage(GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0) -_sym_db.RegisterMessage(GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance) -_sym_db.RegisterMessage(GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances) +_sym_db.RegisterMessage(GetProtocolVersionUpgradeVoteStatusResponse) +_sym_db.RegisterMessage(GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0) +_sym_db.RegisterMessage(GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals) +_sym_db.RegisterMessage(GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal) -GetProofsRequest = _reflection.GeneratedProtocolMessageType('GetProofsRequest', (_message.Message,), { +GetEpochsInfoRequest = _reflection.GeneratedProtocolMessageType('GetEpochsInfoRequest', (_message.Message,), { - 'GetProofsRequestV0' : _reflection.GeneratedProtocolMessageType('GetProofsRequestV0', (_message.Message,), { + 'GetEpochsInfoRequestV0' : _reflection.GeneratedProtocolMessageType('GetEpochsInfoRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETEPOCHSINFOREQUEST_GETEPOCHSINFOREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0) + }) + , + 'DESCRIPTOR' : _GETEPOCHSINFOREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEpochsInfoRequest) + }) +_sym_db.RegisterMessage(GetEpochsInfoRequest) +_sym_db.RegisterMessage(GetEpochsInfoRequest.GetEpochsInfoRequestV0) - 'DocumentRequest' : _reflection.GeneratedProtocolMessageType('DocumentRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_DOCUMENTREQUEST, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest) - }) - , +GetEpochsInfoResponse = _reflection.GeneratedProtocolMessageType('GetEpochsInfoResponse', (_message.Message,), { - 'IdentityRequest' : _reflection.GeneratedProtocolMessageType('IdentityRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_IDENTITYREQUEST, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest) - }) - , + 'GetEpochsInfoResponseV0' : _reflection.GeneratedProtocolMessageType('GetEpochsInfoResponseV0', (_message.Message,), { - 'ContractRequest' : _reflection.GeneratedProtocolMessageType('ContractRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_CONTRACTREQUEST, + 'EpochInfos' : _reflection.GeneratedProtocolMessageType('EpochInfos', (_message.Message,), { + 'DESCRIPTOR' : _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0_EPOCHINFOS, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos) }) , - 'VoteStatusRequest' : _reflection.GeneratedProtocolMessageType('VoteStatusRequest', (_message.Message,), { - - 'ContestedResourceVoteStatusRequest' : _reflection.GeneratedProtocolMessageType('ContestedResourceVoteStatusRequest', (_message.Message,), { - 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST_CONTESTEDRESOURCEVOTESTATUSREQUEST, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest) - }) - , - 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0_VOTESTATUSREQUEST, + 'EpochInfo' : _reflection.GeneratedProtocolMessageType('EpochInfo', (_message.Message,), { + 'DESCRIPTOR' : _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0_EPOCHINFO, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo) }) , - 'DESCRIPTOR' : _GETPROOFSREQUEST_GETPROOFSREQUESTV0, + 'DESCRIPTOR' : _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0) }) , - 'DESCRIPTOR' : _GETPROOFSREQUEST, + 'DESCRIPTOR' : _GETEPOCHSINFORESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEpochsInfoResponse) }) -_sym_db.RegisterMessage(GetProofsRequest) -_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0) -_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.DocumentRequest) -_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.IdentityRequest) -_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.ContractRequest) -_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.VoteStatusRequest) -_sym_db.RegisterMessage(GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest) - -GetProofsResponse = _reflection.GeneratedProtocolMessageType('GetProofsResponse', (_message.Message,), { +_sym_db.RegisterMessage(GetEpochsInfoResponse) +_sym_db.RegisterMessage(GetEpochsInfoResponse.GetEpochsInfoResponseV0) +_sym_db.RegisterMessage(GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos) +_sym_db.RegisterMessage(GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo) - 'GetProofsResponseV0' : _reflection.GeneratedProtocolMessageType('GetProofsResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _GETPROOFSRESPONSE_GETPROOFSRESPONSEV0, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0) - }) - , - 'DESCRIPTOR' : _GETPROOFSRESPONSE, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProofsResponse) - }) -_sym_db.RegisterMessage(GetProofsResponse) -_sym_db.RegisterMessage(GetProofsResponse.GetProofsResponseV0) +GetContestedResourcesRequest = _reflection.GeneratedProtocolMessageType('GetContestedResourcesRequest', (_message.Message,), { -GetDataContractRequest = _reflection.GeneratedProtocolMessageType('GetDataContractRequest', (_message.Message,), { + 'GetContestedResourcesRequestV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourcesRequestV0', (_message.Message,), { - 'GetDataContractRequestV0' : _reflection.GeneratedProtocolMessageType('GetDataContractRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETDATACONTRACTREQUEST_GETDATACONTRACTREQUESTV0, + 'StartAtValueInfo' : _reflection.GeneratedProtocolMessageType('StartAtValueInfo', (_message.Message,), { + 'DESCRIPTOR' : _GETCONTESTEDRESOURCESREQUEST_GETCONTESTEDRESOURCESREQUESTV0_STARTATVALUEINFO, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo) + }) + , + 'DESCRIPTOR' : _GETCONTESTEDRESOURCESREQUEST_GETCONTESTEDRESOURCESREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0) }) , - 'DESCRIPTOR' : _GETDATACONTRACTREQUEST, + 'DESCRIPTOR' : _GETCONTESTEDRESOURCESREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourcesRequest) }) -_sym_db.RegisterMessage(GetDataContractRequest) -_sym_db.RegisterMessage(GetDataContractRequest.GetDataContractRequestV0) - -GetDataContractResponse = _reflection.GeneratedProtocolMessageType('GetDataContractResponse', (_message.Message,), { +_sym_db.RegisterMessage(GetContestedResourcesRequest) +_sym_db.RegisterMessage(GetContestedResourcesRequest.GetContestedResourcesRequestV0) +_sym_db.RegisterMessage(GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo) - 'GetDataContractResponseV0' : _reflection.GeneratedProtocolMessageType('GetDataContractResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _GETDATACONTRACTRESPONSE_GETDATACONTRACTRESPONSEV0, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0) - }) - , - 'DESCRIPTOR' : _GETDATACONTRACTRESPONSE, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractResponse) - }) -_sym_db.RegisterMessage(GetDataContractResponse) -_sym_db.RegisterMessage(GetDataContractResponse.GetDataContractResponseV0) +GetContestedResourcesResponse = _reflection.GeneratedProtocolMessageType('GetContestedResourcesResponse', (_message.Message,), { -GetDataContractsRequest = _reflection.GeneratedProtocolMessageType('GetDataContractsRequest', (_message.Message,), { + 'GetContestedResourcesResponseV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourcesResponseV0', (_message.Message,), { - 'GetDataContractsRequestV0' : _reflection.GeneratedProtocolMessageType('GetDataContractsRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETDATACONTRACTSREQUEST_GETDATACONTRACTSREQUESTV0, + 'ContestedResourceValues' : _reflection.GeneratedProtocolMessageType('ContestedResourceValues', (_message.Message,), { + 'DESCRIPTOR' : _GETCONTESTEDRESOURCESRESPONSE_GETCONTESTEDRESOURCESRESPONSEV0_CONTESTEDRESOURCEVALUES, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues) + }) + , + 'DESCRIPTOR' : _GETCONTESTEDRESOURCESRESPONSE_GETCONTESTEDRESOURCESRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0) }) , - 'DESCRIPTOR' : _GETDATACONTRACTSREQUEST, + 'DESCRIPTOR' : _GETCONTESTEDRESOURCESRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractsRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourcesResponse) }) -_sym_db.RegisterMessage(GetDataContractsRequest) -_sym_db.RegisterMessage(GetDataContractsRequest.GetDataContractsRequestV0) +_sym_db.RegisterMessage(GetContestedResourcesResponse) +_sym_db.RegisterMessage(GetContestedResourcesResponse.GetContestedResourcesResponseV0) +_sym_db.RegisterMessage(GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues) -GetDataContractsResponse = _reflection.GeneratedProtocolMessageType('GetDataContractsResponse', (_message.Message,), { +GetVotePollsByEndDateRequest = _reflection.GeneratedProtocolMessageType('GetVotePollsByEndDateRequest', (_message.Message,), { - 'DataContractEntry' : _reflection.GeneratedProtocolMessageType('DataContractEntry', (_message.Message,), { - 'DESCRIPTOR' : _GETDATACONTRACTSRESPONSE_DATACONTRACTENTRY, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry) - }) - , + 'GetVotePollsByEndDateRequestV0' : _reflection.GeneratedProtocolMessageType('GetVotePollsByEndDateRequestV0', (_message.Message,), { - 'DataContracts' : _reflection.GeneratedProtocolMessageType('DataContracts', (_message.Message,), { - 'DESCRIPTOR' : _GETDATACONTRACTSRESPONSE_DATACONTRACTS, + 'StartAtTimeInfo' : _reflection.GeneratedProtocolMessageType('StartAtTimeInfo', (_message.Message,), { + 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0_STARTATTIMEINFO, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo) + }) + , + + 'EndAtTimeInfo' : _reflection.GeneratedProtocolMessageType('EndAtTimeInfo', (_message.Message,), { + 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0_ENDATTIMEINFO, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo) + }) + , + 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0) }) , + 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATEREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest) + }) +_sym_db.RegisterMessage(GetVotePollsByEndDateRequest) +_sym_db.RegisterMessage(GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0) +_sym_db.RegisterMessage(GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo) +_sym_db.RegisterMessage(GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo) - 'GetDataContractsResponseV0' : _reflection.GeneratedProtocolMessageType('GetDataContractsResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _GETDATACONTRACTSRESPONSE_GETDATACONTRACTSRESPONSEV0, +GetVotePollsByEndDateResponse = _reflection.GeneratedProtocolMessageType('GetVotePollsByEndDateResponse', (_message.Message,), { + + 'GetVotePollsByEndDateResponseV0' : _reflection.GeneratedProtocolMessageType('GetVotePollsByEndDateResponseV0', (_message.Message,), { + + 'SerializedVotePollsByTimestamp' : _reflection.GeneratedProtocolMessageType('SerializedVotePollsByTimestamp', (_message.Message,), { + 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0_SERIALIZEDVOTEPOLLSBYTIMESTAMP, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp) + }) + , + + 'SerializedVotePollsByTimestamps' : _reflection.GeneratedProtocolMessageType('SerializedVotePollsByTimestamps', (_message.Message,), { + 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0_SERIALIZEDVOTEPOLLSBYTIMESTAMPS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps) + }) + , + 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0) }) , - 'DESCRIPTOR' : _GETDATACONTRACTSRESPONSE, + 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATERESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractsResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse) }) -_sym_db.RegisterMessage(GetDataContractsResponse) -_sym_db.RegisterMessage(GetDataContractsResponse.DataContractEntry) -_sym_db.RegisterMessage(GetDataContractsResponse.DataContracts) -_sym_db.RegisterMessage(GetDataContractsResponse.GetDataContractsResponseV0) +_sym_db.RegisterMessage(GetVotePollsByEndDateResponse) +_sym_db.RegisterMessage(GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0) +_sym_db.RegisterMessage(GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp) +_sym_db.RegisterMessage(GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps) -GetDataContractHistoryRequest = _reflection.GeneratedProtocolMessageType('GetDataContractHistoryRequest', (_message.Message,), { +GetContestedResourceVoteStateRequest = _reflection.GeneratedProtocolMessageType('GetContestedResourceVoteStateRequest', (_message.Message,), { - 'GetDataContractHistoryRequestV0' : _reflection.GeneratedProtocolMessageType('GetDataContractHistoryRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETDATACONTRACTHISTORYREQUEST_GETDATACONTRACTHISTORYREQUESTV0, + 'GetContestedResourceVoteStateRequestV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourceVoteStateRequestV0', (_message.Message,), { + + 'StartAtIdentifierInfo' : _reflection.GeneratedProtocolMessageType('StartAtIdentifierInfo', (_message.Message,), { + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0_STARTATIDENTIFIERINFO, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo) + }) + , + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0) }) , - 'DESCRIPTOR' : _GETDATACONTRACTHISTORYREQUEST, + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATEREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractHistoryRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest) }) -_sym_db.RegisterMessage(GetDataContractHistoryRequest) -_sym_db.RegisterMessage(GetDataContractHistoryRequest.GetDataContractHistoryRequestV0) +_sym_db.RegisterMessage(GetContestedResourceVoteStateRequest) +_sym_db.RegisterMessage(GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0) +_sym_db.RegisterMessage(GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo) -GetDataContractHistoryResponse = _reflection.GeneratedProtocolMessageType('GetDataContractHistoryResponse', (_message.Message,), { +GetContestedResourceVoteStateResponse = _reflection.GeneratedProtocolMessageType('GetContestedResourceVoteStateResponse', (_message.Message,), { - 'GetDataContractHistoryResponseV0' : _reflection.GeneratedProtocolMessageType('GetDataContractHistoryResponseV0', (_message.Message,), { + 'GetContestedResourceVoteStateResponseV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourceVoteStateResponseV0', (_message.Message,), { - 'DataContractHistoryEntry' : _reflection.GeneratedProtocolMessageType('DataContractHistoryEntry', (_message.Message,), { - 'DESCRIPTOR' : _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORYENTRY, + 'FinishedVoteInfo' : _reflection.GeneratedProtocolMessageType('FinishedVoteInfo', (_message.Message,), { + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_FINISHEDVOTEINFO, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo) }) , - 'DataContractHistory' : _reflection.GeneratedProtocolMessageType('DataContractHistory', (_message.Message,), { - 'DESCRIPTOR' : _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORY, + 'ContestedResourceContenders' : _reflection.GeneratedProtocolMessageType('ContestedResourceContenders', (_message.Message,), { + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_CONTESTEDRESOURCECONTENDERS, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders) }) , - 'DESCRIPTOR' : _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0, + + 'Contender' : _reflection.GeneratedProtocolMessageType('Contender', (_message.Message,), { + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_CONTENDER, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender) + }) + , + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0) }) , - 'DESCRIPTOR' : _GETDATACONTRACTHISTORYRESPONSE, + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATERESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDataContractHistoryResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse) }) -_sym_db.RegisterMessage(GetDataContractHistoryResponse) -_sym_db.RegisterMessage(GetDataContractHistoryResponse.GetDataContractHistoryResponseV0) -_sym_db.RegisterMessage(GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry) -_sym_db.RegisterMessage(GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory) +_sym_db.RegisterMessage(GetContestedResourceVoteStateResponse) +_sym_db.RegisterMessage(GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0) +_sym_db.RegisterMessage(GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo) +_sym_db.RegisterMessage(GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders) +_sym_db.RegisterMessage(GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender) -GetDocumentsRequest = _reflection.GeneratedProtocolMessageType('GetDocumentsRequest', (_message.Message,), { +GetContestedResourceVotersForIdentityRequest = _reflection.GeneratedProtocolMessageType('GetContestedResourceVotersForIdentityRequest', (_message.Message,), { - 'GetDocumentsRequestV0' : _reflection.GeneratedProtocolMessageType('GetDocumentsRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0, + 'GetContestedResourceVotersForIdentityRequestV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourceVotersForIdentityRequestV0', (_message.Message,), { + + 'StartAtIdentifierInfo' : _reflection.GeneratedProtocolMessageType('StartAtIdentifierInfo', (_message.Message,), { + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST_GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUESTV0_STARTATIDENTIFIERINFO, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo) + }) + , + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST_GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0) }) , - 'DESCRIPTOR' : _GETDOCUMENTSREQUEST, + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest) }) -_sym_db.RegisterMessage(GetDocumentsRequest) -_sym_db.RegisterMessage(GetDocumentsRequest.GetDocumentsRequestV0) +_sym_db.RegisterMessage(GetContestedResourceVotersForIdentityRequest) +_sym_db.RegisterMessage(GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0) +_sym_db.RegisterMessage(GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo) -GetDocumentsResponse = _reflection.GeneratedProtocolMessageType('GetDocumentsResponse', (_message.Message,), { +GetContestedResourceVotersForIdentityResponse = _reflection.GeneratedProtocolMessageType('GetContestedResourceVotersForIdentityResponse', (_message.Message,), { - 'GetDocumentsResponseV0' : _reflection.GeneratedProtocolMessageType('GetDocumentsResponseV0', (_message.Message,), { + 'GetContestedResourceVotersForIdentityResponseV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourceVotersForIdentityResponseV0', (_message.Message,), { - 'Documents' : _reflection.GeneratedProtocolMessageType('Documents', (_message.Message,), { - 'DESCRIPTOR' : _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV0_DOCUMENTS, + 'ContestedResourceVoters' : _reflection.GeneratedProtocolMessageType('ContestedResourceVoters', (_message.Message,), { + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE_GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSEV0_CONTESTEDRESOURCEVOTERS, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters) }) , - 'DESCRIPTOR' : _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV0, + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE_GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0) }) , - 'DESCRIPTOR' : _GETDOCUMENTSRESPONSE, + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse) }) -_sym_db.RegisterMessage(GetDocumentsResponse) -_sym_db.RegisterMessage(GetDocumentsResponse.GetDocumentsResponseV0) -_sym_db.RegisterMessage(GetDocumentsResponse.GetDocumentsResponseV0.Documents) +_sym_db.RegisterMessage(GetContestedResourceVotersForIdentityResponse) +_sym_db.RegisterMessage(GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0) +_sym_db.RegisterMessage(GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters) -GetIdentityByPublicKeyHashRequest = _reflection.GeneratedProtocolMessageType('GetIdentityByPublicKeyHashRequest', (_message.Message,), { +GetContestedResourceIdentityVotesRequest = _reflection.GeneratedProtocolMessageType('GetContestedResourceIdentityVotesRequest', (_message.Message,), { - 'GetIdentityByPublicKeyHashRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityByPublicKeyHashRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYBYPUBLICKEYHASHREQUEST_GETIDENTITYBYPUBLICKEYHASHREQUESTV0, + 'GetContestedResourceIdentityVotesRequestV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourceIdentityVotesRequestV0', (_message.Message,), { + + 'StartAtVotePollIdInfo' : _reflection.GeneratedProtocolMessageType('StartAtVotePollIdInfo', (_message.Message,), { + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST_GETCONTESTEDRESOURCEIDENTITYVOTESREQUESTV0_STARTATVOTEPOLLIDINFO, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo) + }) + , + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST_GETCONTESTEDRESOURCEIDENTITYVOTESREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0) }) , - 'DESCRIPTOR' : _GETIDENTITYBYPUBLICKEYHASHREQUEST, + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest) }) -_sym_db.RegisterMessage(GetIdentityByPublicKeyHashRequest) -_sym_db.RegisterMessage(GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0) +_sym_db.RegisterMessage(GetContestedResourceIdentityVotesRequest) +_sym_db.RegisterMessage(GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0) +_sym_db.RegisterMessage(GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo) -GetIdentityByPublicKeyHashResponse = _reflection.GeneratedProtocolMessageType('GetIdentityByPublicKeyHashResponse', (_message.Message,), { +GetContestedResourceIdentityVotesResponse = _reflection.GeneratedProtocolMessageType('GetContestedResourceIdentityVotesResponse', (_message.Message,), { - 'GetIdentityByPublicKeyHashResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityByPublicKeyHashResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _GETIDENTITYBYPUBLICKEYHASHRESPONSE_GETIDENTITYBYPUBLICKEYHASHRESPONSEV0, + 'GetContestedResourceIdentityVotesResponseV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourceIdentityVotesResponseV0', (_message.Message,), { + + 'ContestedResourceIdentityVotes' : _reflection.GeneratedProtocolMessageType('ContestedResourceIdentityVotes', (_message.Message,), { + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_CONTESTEDRESOURCEIDENTITYVOTES, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes) + }) + , + + 'ResourceVoteChoice' : _reflection.GeneratedProtocolMessageType('ResourceVoteChoice', (_message.Message,), { + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_RESOURCEVOTECHOICE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice) + }) + , + + 'ContestedResourceIdentityVote' : _reflection.GeneratedProtocolMessageType('ContestedResourceIdentityVote', (_message.Message,), { + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_CONTESTEDRESOURCEIDENTITYVOTE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote) + }) + , + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0) }) , - 'DESCRIPTOR' : _GETIDENTITYBYPUBLICKEYHASHRESPONSE, + 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse) }) -_sym_db.RegisterMessage(GetIdentityByPublicKeyHashResponse) -_sym_db.RegisterMessage(GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0) +_sym_db.RegisterMessage(GetContestedResourceIdentityVotesResponse) +_sym_db.RegisterMessage(GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0) +_sym_db.RegisterMessage(GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes) +_sym_db.RegisterMessage(GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice) +_sym_db.RegisterMessage(GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote) -WaitForStateTransitionResultRequest = _reflection.GeneratedProtocolMessageType('WaitForStateTransitionResultRequest', (_message.Message,), { +GetPrefundedSpecializedBalanceRequest = _reflection.GeneratedProtocolMessageType('GetPrefundedSpecializedBalanceRequest', (_message.Message,), { - 'WaitForStateTransitionResultRequestV0' : _reflection.GeneratedProtocolMessageType('WaitForStateTransitionResultRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _WAITFORSTATETRANSITIONRESULTREQUEST_WAITFORSTATETRANSITIONRESULTREQUESTV0, + 'GetPrefundedSpecializedBalanceRequestV0' : _reflection.GeneratedProtocolMessageType('GetPrefundedSpecializedBalanceRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETPREFUNDEDSPECIALIZEDBALANCEREQUEST_GETPREFUNDEDSPECIALIZEDBALANCEREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0) }) , - 'DESCRIPTOR' : _WAITFORSTATETRANSITIONRESULTREQUEST, + 'DESCRIPTOR' : _GETPREFUNDEDSPECIALIZEDBALANCEREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest) }) -_sym_db.RegisterMessage(WaitForStateTransitionResultRequest) -_sym_db.RegisterMessage(WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0) +_sym_db.RegisterMessage(GetPrefundedSpecializedBalanceRequest) +_sym_db.RegisterMessage(GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0) -WaitForStateTransitionResultResponse = _reflection.GeneratedProtocolMessageType('WaitForStateTransitionResultResponse', (_message.Message,), { +GetPrefundedSpecializedBalanceResponse = _reflection.GeneratedProtocolMessageType('GetPrefundedSpecializedBalanceResponse', (_message.Message,), { - 'WaitForStateTransitionResultResponseV0' : _reflection.GeneratedProtocolMessageType('WaitForStateTransitionResultResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _WAITFORSTATETRANSITIONRESULTRESPONSE_WAITFORSTATETRANSITIONRESULTRESPONSEV0, + 'GetPrefundedSpecializedBalanceResponseV0' : _reflection.GeneratedProtocolMessageType('GetPrefundedSpecializedBalanceResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETPREFUNDEDSPECIALIZEDBALANCERESPONSE_GETPREFUNDEDSPECIALIZEDBALANCERESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0) }) , - 'DESCRIPTOR' : _WAITFORSTATETRANSITIONRESULTRESPONSE, + 'DESCRIPTOR' : _GETPREFUNDEDSPECIALIZEDBALANCERESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse) }) -_sym_db.RegisterMessage(WaitForStateTransitionResultResponse) -_sym_db.RegisterMessage(WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0) +_sym_db.RegisterMessage(GetPrefundedSpecializedBalanceResponse) +_sym_db.RegisterMessage(GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0) -GetConsensusParamsRequest = _reflection.GeneratedProtocolMessageType('GetConsensusParamsRequest', (_message.Message,), { +GetTotalCreditsInPlatformRequest = _reflection.GeneratedProtocolMessageType('GetTotalCreditsInPlatformRequest', (_message.Message,), { - 'GetConsensusParamsRequestV0' : _reflection.GeneratedProtocolMessageType('GetConsensusParamsRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETCONSENSUSPARAMSREQUEST_GETCONSENSUSPARAMSREQUESTV0, + 'GetTotalCreditsInPlatformRequestV0' : _reflection.GeneratedProtocolMessageType('GetTotalCreditsInPlatformRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETTOTALCREDITSINPLATFORMREQUEST_GETTOTALCREDITSINPLATFORMREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0) }) , - 'DESCRIPTOR' : _GETCONSENSUSPARAMSREQUEST, + 'DESCRIPTOR' : _GETTOTALCREDITSINPLATFORMREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetConsensusParamsRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest) }) -_sym_db.RegisterMessage(GetConsensusParamsRequest) -_sym_db.RegisterMessage(GetConsensusParamsRequest.GetConsensusParamsRequestV0) +_sym_db.RegisterMessage(GetTotalCreditsInPlatformRequest) +_sym_db.RegisterMessage(GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0) -GetConsensusParamsResponse = _reflection.GeneratedProtocolMessageType('GetConsensusParamsResponse', (_message.Message,), { +GetTotalCreditsInPlatformResponse = _reflection.GeneratedProtocolMessageType('GetTotalCreditsInPlatformResponse', (_message.Message,), { - 'ConsensusParamsBlock' : _reflection.GeneratedProtocolMessageType('ConsensusParamsBlock', (_message.Message,), { - 'DESCRIPTOR' : _GETCONSENSUSPARAMSRESPONSE_CONSENSUSPARAMSBLOCK, + 'GetTotalCreditsInPlatformResponseV0' : _reflection.GeneratedProtocolMessageType('GetTotalCreditsInPlatformResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETTOTALCREDITSINPLATFORMRESPONSE_GETTOTALCREDITSINPLATFORMRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0) }) , + 'DESCRIPTOR' : _GETTOTALCREDITSINPLATFORMRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse) + }) +_sym_db.RegisterMessage(GetTotalCreditsInPlatformResponse) +_sym_db.RegisterMessage(GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0) - 'ConsensusParamsEvidence' : _reflection.GeneratedProtocolMessageType('ConsensusParamsEvidence', (_message.Message,), { - 'DESCRIPTOR' : _GETCONSENSUSPARAMSRESPONSE_CONSENSUSPARAMSEVIDENCE, +GetPathElementsRequest = _reflection.GeneratedProtocolMessageType('GetPathElementsRequest', (_message.Message,), { + + 'GetPathElementsRequestV0' : _reflection.GeneratedProtocolMessageType('GetPathElementsRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETPATHELEMENTSREQUEST_GETPATHELEMENTSREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0) }) , + 'DESCRIPTOR' : _GETPATHELEMENTSREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPathElementsRequest) + }) +_sym_db.RegisterMessage(GetPathElementsRequest) +_sym_db.RegisterMessage(GetPathElementsRequest.GetPathElementsRequestV0) - 'GetConsensusParamsResponseV0' : _reflection.GeneratedProtocolMessageType('GetConsensusParamsResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _GETCONSENSUSPARAMSRESPONSE_GETCONSENSUSPARAMSRESPONSEV0, +GetPathElementsResponse = _reflection.GeneratedProtocolMessageType('GetPathElementsResponse', (_message.Message,), { + + 'GetPathElementsResponseV0' : _reflection.GeneratedProtocolMessageType('GetPathElementsResponseV0', (_message.Message,), { + + 'Elements' : _reflection.GeneratedProtocolMessageType('Elements', (_message.Message,), { + 'DESCRIPTOR' : _GETPATHELEMENTSRESPONSE_GETPATHELEMENTSRESPONSEV0_ELEMENTS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements) + }) + , + 'DESCRIPTOR' : _GETPATHELEMENTSRESPONSE_GETPATHELEMENTSRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0) }) , - 'DESCRIPTOR' : _GETCONSENSUSPARAMSRESPONSE, + 'DESCRIPTOR' : _GETPATHELEMENTSRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetConsensusParamsResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPathElementsResponse) }) -_sym_db.RegisterMessage(GetConsensusParamsResponse) -_sym_db.RegisterMessage(GetConsensusParamsResponse.ConsensusParamsBlock) -_sym_db.RegisterMessage(GetConsensusParamsResponse.ConsensusParamsEvidence) -_sym_db.RegisterMessage(GetConsensusParamsResponse.GetConsensusParamsResponseV0) +_sym_db.RegisterMessage(GetPathElementsResponse) +_sym_db.RegisterMessage(GetPathElementsResponse.GetPathElementsResponseV0) +_sym_db.RegisterMessage(GetPathElementsResponse.GetPathElementsResponseV0.Elements) -GetProtocolVersionUpgradeStateRequest = _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeStateRequest', (_message.Message,), { +GetStatusRequest = _reflection.GeneratedProtocolMessageType('GetStatusRequest', (_message.Message,), { - 'GetProtocolVersionUpgradeStateRequestV0' : _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeStateRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADESTATEREQUEST_GETPROTOCOLVERSIONUPGRADESTATEREQUESTV0, + 'GetStatusRequestV0' : _reflection.GeneratedProtocolMessageType('GetStatusRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETSTATUSREQUEST_GETSTATUSREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0) }) , - 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADESTATEREQUEST, + 'DESCRIPTOR' : _GETSTATUSREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusRequest) }) -_sym_db.RegisterMessage(GetProtocolVersionUpgradeStateRequest) -_sym_db.RegisterMessage(GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0) +_sym_db.RegisterMessage(GetStatusRequest) +_sym_db.RegisterMessage(GetStatusRequest.GetStatusRequestV0) -GetProtocolVersionUpgradeStateResponse = _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeStateResponse', (_message.Message,), { +GetStatusResponse = _reflection.GeneratedProtocolMessageType('GetStatusResponse', (_message.Message,), { - 'GetProtocolVersionUpgradeStateResponseV0' : _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeStateResponseV0', (_message.Message,), { + 'GetStatusResponseV0' : _reflection.GeneratedProtocolMessageType('GetStatusResponseV0', (_message.Message,), { - 'Versions' : _reflection.GeneratedProtocolMessageType('Versions', (_message.Message,), { - 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0_VERSIONS, + 'Version' : _reflection.GeneratedProtocolMessageType('Version', (_message.Message,), { + + 'Software' : _reflection.GeneratedProtocolMessageType('Software', (_message.Message,), { + 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_SOFTWARE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software) + }) + , + + 'Protocol' : _reflection.GeneratedProtocolMessageType('Protocol', (_message.Message,), { + + 'Tenderdash' : _reflection.GeneratedProtocolMessageType('Tenderdash', (_message.Message,), { + 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL_TENDERDASH, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash) + }) + , + + 'Drive' : _reflection.GeneratedProtocolMessageType('Drive', (_message.Message,), { + 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL_DRIVE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive) + }) + , + 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol) + }) + , + 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version) }) , - 'VersionEntry' : _reflection.GeneratedProtocolMessageType('VersionEntry', (_message.Message,), { - 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0_VERSIONENTRY, + 'Time' : _reflection.GeneratedProtocolMessageType('Time', (_message.Message,), { + 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_TIME, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time) }) , - 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0, + + 'Node' : _reflection.GeneratedProtocolMessageType('Node', (_message.Message,), { + 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_NODE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node) + }) + , + + 'Chain' : _reflection.GeneratedProtocolMessageType('Chain', (_message.Message,), { + 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_CHAIN, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain) + }) + , + + 'Network' : _reflection.GeneratedProtocolMessageType('Network', (_message.Message,), { + 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_NETWORK, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network) + }) + , + + 'StateSync' : _reflection.GeneratedProtocolMessageType('StateSync', (_message.Message,), { + 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_STATESYNC, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync) + }) + , + 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0) }) , - 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADESTATERESPONSE, + 'DESCRIPTOR' : _GETSTATUSRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse) }) -_sym_db.RegisterMessage(GetProtocolVersionUpgradeStateResponse) -_sym_db.RegisterMessage(GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0) -_sym_db.RegisterMessage(GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions) -_sym_db.RegisterMessage(GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry) +_sym_db.RegisterMessage(GetStatusResponse) +_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0) +_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Version) +_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Version.Software) +_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Version.Protocol) +_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash) +_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive) +_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Time) +_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Node) +_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Chain) +_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Network) +_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.StateSync) -GetProtocolVersionUpgradeVoteStatusRequest = _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeVoteStatusRequest', (_message.Message,), { +GetCurrentQuorumsInfoRequest = _reflection.GeneratedProtocolMessageType('GetCurrentQuorumsInfoRequest', (_message.Message,), { - 'GetProtocolVersionUpgradeVoteStatusRequestV0' : _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeVoteStatusRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADEVOTESTATUSREQUEST_GETPROTOCOLVERSIONUPGRADEVOTESTATUSREQUESTV0, + 'GetCurrentQuorumsInfoRequestV0' : _reflection.GeneratedProtocolMessageType('GetCurrentQuorumsInfoRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETCURRENTQUORUMSINFOREQUEST_GETCURRENTQUORUMSINFOREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0) }) , - 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADEVOTESTATUSREQUEST, + 'DESCRIPTOR' : _GETCURRENTQUORUMSINFOREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest) }) -_sym_db.RegisterMessage(GetProtocolVersionUpgradeVoteStatusRequest) -_sym_db.RegisterMessage(GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0) - -GetProtocolVersionUpgradeVoteStatusResponse = _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeVoteStatusResponse', (_message.Message,), { +_sym_db.RegisterMessage(GetCurrentQuorumsInfoRequest) +_sym_db.RegisterMessage(GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0) - 'GetProtocolVersionUpgradeVoteStatusResponseV0' : _reflection.GeneratedProtocolMessageType('GetProtocolVersionUpgradeVoteStatusResponseV0', (_message.Message,), { +GetCurrentQuorumsInfoResponse = _reflection.GeneratedProtocolMessageType('GetCurrentQuorumsInfoResponse', (_message.Message,), { - 'VersionSignals' : _reflection.GeneratedProtocolMessageType('VersionSignals', (_message.Message,), { - 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0_VERSIONSIGNALS, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals) - }) - , + 'ValidatorV0' : _reflection.GeneratedProtocolMessageType('ValidatorV0', (_message.Message,), { + 'DESCRIPTOR' : _GETCURRENTQUORUMSINFORESPONSE_VALIDATORV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0) + }) + , - 'VersionSignal' : _reflection.GeneratedProtocolMessageType('VersionSignal', (_message.Message,), { - 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0_VERSIONSIGNAL, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal) - }) - , - 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0, + 'ValidatorSetV0' : _reflection.GeneratedProtocolMessageType('ValidatorSetV0', (_message.Message,), { + 'DESCRIPTOR' : _GETCURRENTQUORUMSINFORESPONSE_VALIDATORSETV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0) + }) + , + + 'GetCurrentQuorumsInfoResponseV0' : _reflection.GeneratedProtocolMessageType('GetCurrentQuorumsInfoResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETCURRENTQUORUMSINFORESPONSE_GETCURRENTQUORUMSINFORESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0) }) , - 'DESCRIPTOR' : _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE, + 'DESCRIPTOR' : _GETCURRENTQUORUMSINFORESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse) }) -_sym_db.RegisterMessage(GetProtocolVersionUpgradeVoteStatusResponse) -_sym_db.RegisterMessage(GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0) -_sym_db.RegisterMessage(GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals) -_sym_db.RegisterMessage(GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal) +_sym_db.RegisterMessage(GetCurrentQuorumsInfoResponse) +_sym_db.RegisterMessage(GetCurrentQuorumsInfoResponse.ValidatorV0) +_sym_db.RegisterMessage(GetCurrentQuorumsInfoResponse.ValidatorSetV0) +_sym_db.RegisterMessage(GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0) -GetEpochsInfoRequest = _reflection.GeneratedProtocolMessageType('GetEpochsInfoRequest', (_message.Message,), { +GetIdentityTokenBalancesRequest = _reflection.GeneratedProtocolMessageType('GetIdentityTokenBalancesRequest', (_message.Message,), { - 'GetEpochsInfoRequestV0' : _reflection.GeneratedProtocolMessageType('GetEpochsInfoRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETEPOCHSINFOREQUEST_GETEPOCHSINFOREQUESTV0, + 'GetIdentityTokenBalancesRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityTokenBalancesRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYTOKENBALANCESREQUEST_GETIDENTITYTOKENBALANCESREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0) }) , - 'DESCRIPTOR' : _GETEPOCHSINFOREQUEST, + 'DESCRIPTOR' : _GETIDENTITYTOKENBALANCESREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEpochsInfoRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest) }) -_sym_db.RegisterMessage(GetEpochsInfoRequest) -_sym_db.RegisterMessage(GetEpochsInfoRequest.GetEpochsInfoRequestV0) +_sym_db.RegisterMessage(GetIdentityTokenBalancesRequest) +_sym_db.RegisterMessage(GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0) -GetEpochsInfoResponse = _reflection.GeneratedProtocolMessageType('GetEpochsInfoResponse', (_message.Message,), { +GetIdentityTokenBalancesResponse = _reflection.GeneratedProtocolMessageType('GetIdentityTokenBalancesResponse', (_message.Message,), { - 'GetEpochsInfoResponseV0' : _reflection.GeneratedProtocolMessageType('GetEpochsInfoResponseV0', (_message.Message,), { + 'GetIdentityTokenBalancesResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityTokenBalancesResponseV0', (_message.Message,), { - 'EpochInfos' : _reflection.GeneratedProtocolMessageType('EpochInfos', (_message.Message,), { - 'DESCRIPTOR' : _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0_EPOCHINFOS, + 'TokenBalanceEntry' : _reflection.GeneratedProtocolMessageType('TokenBalanceEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCEENTRY, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry) }) , - 'EpochInfo' : _reflection.GeneratedProtocolMessageType('EpochInfo', (_message.Message,), { - 'DESCRIPTOR' : _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0_EPOCHINFO, + 'TokenBalances' : _reflection.GeneratedProtocolMessageType('TokenBalances', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCES, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances) }) , - 'DESCRIPTOR' : _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0, + 'DESCRIPTOR' : _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0) }) , - 'DESCRIPTOR' : _GETEPOCHSINFORESPONSE, + 'DESCRIPTOR' : _GETIDENTITYTOKENBALANCESRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetEpochsInfoResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse) }) -_sym_db.RegisterMessage(GetEpochsInfoResponse) -_sym_db.RegisterMessage(GetEpochsInfoResponse.GetEpochsInfoResponseV0) -_sym_db.RegisterMessage(GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos) -_sym_db.RegisterMessage(GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo) - -GetContestedResourcesRequest = _reflection.GeneratedProtocolMessageType('GetContestedResourcesRequest', (_message.Message,), { +_sym_db.RegisterMessage(GetIdentityTokenBalancesResponse) +_sym_db.RegisterMessage(GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0) +_sym_db.RegisterMessage(GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry) +_sym_db.RegisterMessage(GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances) - 'GetContestedResourcesRequestV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourcesRequestV0', (_message.Message,), { +GetIdentitiesTokenBalancesRequest = _reflection.GeneratedProtocolMessageType('GetIdentitiesTokenBalancesRequest', (_message.Message,), { - 'StartAtValueInfo' : _reflection.GeneratedProtocolMessageType('StartAtValueInfo', (_message.Message,), { - 'DESCRIPTOR' : _GETCONTESTEDRESOURCESREQUEST_GETCONTESTEDRESOURCESREQUESTV0_STARTATVALUEINFO, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo) - }) - , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCESREQUEST_GETCONTESTEDRESOURCESREQUESTV0, + 'GetIdentitiesTokenBalancesRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesTokenBalancesRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESTOKENBALANCESREQUEST_GETIDENTITIESTOKENBALANCESREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0) }) , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCESREQUEST, + 'DESCRIPTOR' : _GETIDENTITIESTOKENBALANCESREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourcesRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest) }) -_sym_db.RegisterMessage(GetContestedResourcesRequest) -_sym_db.RegisterMessage(GetContestedResourcesRequest.GetContestedResourcesRequestV0) -_sym_db.RegisterMessage(GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo) +_sym_db.RegisterMessage(GetIdentitiesTokenBalancesRequest) +_sym_db.RegisterMessage(GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0) -GetContestedResourcesResponse = _reflection.GeneratedProtocolMessageType('GetContestedResourcesResponse', (_message.Message,), { +GetIdentitiesTokenBalancesResponse = _reflection.GeneratedProtocolMessageType('GetIdentitiesTokenBalancesResponse', (_message.Message,), { - 'GetContestedResourcesResponseV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourcesResponseV0', (_message.Message,), { + 'GetIdentitiesTokenBalancesResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesTokenBalancesResponseV0', (_message.Message,), { - 'ContestedResourceValues' : _reflection.GeneratedProtocolMessageType('ContestedResourceValues', (_message.Message,), { - 'DESCRIPTOR' : _GETCONTESTEDRESOURCESRESPONSE_GETCONTESTEDRESOURCESRESPONSEV0_CONTESTEDRESOURCEVALUES, + 'IdentityTokenBalanceEntry' : _reflection.GeneratedProtocolMessageType('IdentityTokenBalanceEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCEENTRY, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry) }) , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCESRESPONSE_GETCONTESTEDRESOURCESRESPONSEV0, + + 'IdentityTokenBalances' : _reflection.GeneratedProtocolMessageType('IdentityTokenBalances', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCES, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances) + }) + , + 'DESCRIPTOR' : _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0) }) , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCESRESPONSE, + 'DESCRIPTOR' : _GETIDENTITIESTOKENBALANCESRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourcesResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse) }) -_sym_db.RegisterMessage(GetContestedResourcesResponse) -_sym_db.RegisterMessage(GetContestedResourcesResponse.GetContestedResourcesResponseV0) -_sym_db.RegisterMessage(GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues) - -GetVotePollsByEndDateRequest = _reflection.GeneratedProtocolMessageType('GetVotePollsByEndDateRequest', (_message.Message,), { +_sym_db.RegisterMessage(GetIdentitiesTokenBalancesResponse) +_sym_db.RegisterMessage(GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0) +_sym_db.RegisterMessage(GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry) +_sym_db.RegisterMessage(GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances) - 'GetVotePollsByEndDateRequestV0' : _reflection.GeneratedProtocolMessageType('GetVotePollsByEndDateRequestV0', (_message.Message,), { - - 'StartAtTimeInfo' : _reflection.GeneratedProtocolMessageType('StartAtTimeInfo', (_message.Message,), { - 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0_STARTATTIMEINFO, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo) - }) - , +GetIdentityTokenInfosRequest = _reflection.GeneratedProtocolMessageType('GetIdentityTokenInfosRequest', (_message.Message,), { - 'EndAtTimeInfo' : _reflection.GeneratedProtocolMessageType('EndAtTimeInfo', (_message.Message,), { - 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0_ENDATTIMEINFO, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo) - }) - , - 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0, + 'GetIdentityTokenInfosRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentityTokenInfosRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYTOKENINFOSREQUEST_GETIDENTITYTOKENINFOSREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0) }) , - 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATEREQUEST, + 'DESCRIPTOR' : _GETIDENTITYTOKENINFOSREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest) }) -_sym_db.RegisterMessage(GetVotePollsByEndDateRequest) -_sym_db.RegisterMessage(GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0) -_sym_db.RegisterMessage(GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo) -_sym_db.RegisterMessage(GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo) +_sym_db.RegisterMessage(GetIdentityTokenInfosRequest) +_sym_db.RegisterMessage(GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0) -GetVotePollsByEndDateResponse = _reflection.GeneratedProtocolMessageType('GetVotePollsByEndDateResponse', (_message.Message,), { +GetIdentityTokenInfosResponse = _reflection.GeneratedProtocolMessageType('GetIdentityTokenInfosResponse', (_message.Message,), { - 'GetVotePollsByEndDateResponseV0' : _reflection.GeneratedProtocolMessageType('GetVotePollsByEndDateResponseV0', (_message.Message,), { + 'GetIdentityTokenInfosResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentityTokenInfosResponseV0', (_message.Message,), { - 'SerializedVotePollsByTimestamp' : _reflection.GeneratedProtocolMessageType('SerializedVotePollsByTimestamp', (_message.Message,), { - 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0_SERIALIZEDVOTEPOLLSBYTIMESTAMP, + 'TokenIdentityInfoEntry' : _reflection.GeneratedProtocolMessageType('TokenIdentityInfoEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENIDENTITYINFOENTRY, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry) }) , - 'SerializedVotePollsByTimestamps' : _reflection.GeneratedProtocolMessageType('SerializedVotePollsByTimestamps', (_message.Message,), { - 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0_SERIALIZEDVOTEPOLLSBYTIMESTAMPS, + 'TokenInfoEntry' : _reflection.GeneratedProtocolMessageType('TokenInfoEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOENTRY, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry) }) , - 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0, + + 'TokenInfos' : _reflection.GeneratedProtocolMessageType('TokenInfos', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos) + }) + , + 'DESCRIPTOR' : _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0) }) , - 'DESCRIPTOR' : _GETVOTEPOLLSBYENDDATERESPONSE, + 'DESCRIPTOR' : _GETIDENTITYTOKENINFOSRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse) }) -_sym_db.RegisterMessage(GetVotePollsByEndDateResponse) -_sym_db.RegisterMessage(GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0) -_sym_db.RegisterMessage(GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp) -_sym_db.RegisterMessage(GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps) - -GetContestedResourceVoteStateRequest = _reflection.GeneratedProtocolMessageType('GetContestedResourceVoteStateRequest', (_message.Message,), { +_sym_db.RegisterMessage(GetIdentityTokenInfosResponse) +_sym_db.RegisterMessage(GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0) +_sym_db.RegisterMessage(GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry) +_sym_db.RegisterMessage(GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry) +_sym_db.RegisterMessage(GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos) - 'GetContestedResourceVoteStateRequestV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourceVoteStateRequestV0', (_message.Message,), { +GetIdentitiesTokenInfosRequest = _reflection.GeneratedProtocolMessageType('GetIdentitiesTokenInfosRequest', (_message.Message,), { - 'StartAtIdentifierInfo' : _reflection.GeneratedProtocolMessageType('StartAtIdentifierInfo', (_message.Message,), { - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0_STARTATIDENTIFIERINFO, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo) - }) - , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0, + 'GetIdentitiesTokenInfosRequestV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesTokenInfosRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESTOKENINFOSREQUEST_GETIDENTITIESTOKENINFOSREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0) }) , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATEREQUEST, + 'DESCRIPTOR' : _GETIDENTITIESTOKENINFOSREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest) }) -_sym_db.RegisterMessage(GetContestedResourceVoteStateRequest) -_sym_db.RegisterMessage(GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0) -_sym_db.RegisterMessage(GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo) +_sym_db.RegisterMessage(GetIdentitiesTokenInfosRequest) +_sym_db.RegisterMessage(GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0) -GetContestedResourceVoteStateResponse = _reflection.GeneratedProtocolMessageType('GetContestedResourceVoteStateResponse', (_message.Message,), { +GetIdentitiesTokenInfosResponse = _reflection.GeneratedProtocolMessageType('GetIdentitiesTokenInfosResponse', (_message.Message,), { - 'GetContestedResourceVoteStateResponseV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourceVoteStateResponseV0', (_message.Message,), { + 'GetIdentitiesTokenInfosResponseV0' : _reflection.GeneratedProtocolMessageType('GetIdentitiesTokenInfosResponseV0', (_message.Message,), { - 'FinishedVoteInfo' : _reflection.GeneratedProtocolMessageType('FinishedVoteInfo', (_message.Message,), { - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_FINISHEDVOTEINFO, + 'TokenIdentityInfoEntry' : _reflection.GeneratedProtocolMessageType('TokenIdentityInfoEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENIDENTITYINFOENTRY, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry) }) , - 'ContestedResourceContenders' : _reflection.GeneratedProtocolMessageType('ContestedResourceContenders', (_message.Message,), { - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_CONTESTEDRESOURCECONTENDERS, + 'TokenInfoEntry' : _reflection.GeneratedProtocolMessageType('TokenInfoEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENINFOENTRY, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry) }) , - 'Contender' : _reflection.GeneratedProtocolMessageType('Contender', (_message.Message,), { - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_CONTENDER, + 'IdentityTokenInfos' : _reflection.GeneratedProtocolMessageType('IdentityTokenInfos', (_message.Message,), { + 'DESCRIPTOR' : _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_IDENTITYTOKENINFOS, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos) }) , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0, + 'DESCRIPTOR' : _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0) }) , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTESTATERESPONSE, + 'DESCRIPTOR' : _GETIDENTITIESTOKENINFOSRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse) }) -_sym_db.RegisterMessage(GetContestedResourceVoteStateResponse) -_sym_db.RegisterMessage(GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0) -_sym_db.RegisterMessage(GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo) -_sym_db.RegisterMessage(GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders) -_sym_db.RegisterMessage(GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender) - -GetContestedResourceVotersForIdentityRequest = _reflection.GeneratedProtocolMessageType('GetContestedResourceVotersForIdentityRequest', (_message.Message,), { +_sym_db.RegisterMessage(GetIdentitiesTokenInfosResponse) +_sym_db.RegisterMessage(GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0) +_sym_db.RegisterMessage(GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry) +_sym_db.RegisterMessage(GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry) +_sym_db.RegisterMessage(GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos) - 'GetContestedResourceVotersForIdentityRequestV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourceVotersForIdentityRequestV0', (_message.Message,), { +GetTokenStatusesRequest = _reflection.GeneratedProtocolMessageType('GetTokenStatusesRequest', (_message.Message,), { - 'StartAtIdentifierInfo' : _reflection.GeneratedProtocolMessageType('StartAtIdentifierInfo', (_message.Message,), { - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST_GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUESTV0_STARTATIDENTIFIERINFO, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo) - }) - , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST_GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUESTV0, + 'GetTokenStatusesRequestV0' : _reflection.GeneratedProtocolMessageType('GetTokenStatusesRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETTOKENSTATUSESREQUEST_GETTOKENSTATUSESREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0) }) , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST, + 'DESCRIPTOR' : _GETTOKENSTATUSESREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenStatusesRequest) }) -_sym_db.RegisterMessage(GetContestedResourceVotersForIdentityRequest) -_sym_db.RegisterMessage(GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0) -_sym_db.RegisterMessage(GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo) +_sym_db.RegisterMessage(GetTokenStatusesRequest) +_sym_db.RegisterMessage(GetTokenStatusesRequest.GetTokenStatusesRequestV0) -GetContestedResourceVotersForIdentityResponse = _reflection.GeneratedProtocolMessageType('GetContestedResourceVotersForIdentityResponse', (_message.Message,), { +GetTokenStatusesResponse = _reflection.GeneratedProtocolMessageType('GetTokenStatusesResponse', (_message.Message,), { - 'GetContestedResourceVotersForIdentityResponseV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourceVotersForIdentityResponseV0', (_message.Message,), { + 'GetTokenStatusesResponseV0' : _reflection.GeneratedProtocolMessageType('GetTokenStatusesResponseV0', (_message.Message,), { - 'ContestedResourceVoters' : _reflection.GeneratedProtocolMessageType('ContestedResourceVoters', (_message.Message,), { - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE_GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSEV0_CONTESTEDRESOURCEVOTERS, + 'TokenStatusEntry' : _reflection.GeneratedProtocolMessageType('TokenStatusEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSENTRY, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry) }) , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE_GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSEV0, + + 'TokenStatuses' : _reflection.GeneratedProtocolMessageType('TokenStatuses', (_message.Message,), { + 'DESCRIPTOR' : _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSES, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses) + }) + , + 'DESCRIPTOR' : _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0) }) , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE, + 'DESCRIPTOR' : _GETTOKENSTATUSESRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenStatusesResponse) }) -_sym_db.RegisterMessage(GetContestedResourceVotersForIdentityResponse) -_sym_db.RegisterMessage(GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0) -_sym_db.RegisterMessage(GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters) - -GetContestedResourceIdentityVotesRequest = _reflection.GeneratedProtocolMessageType('GetContestedResourceIdentityVotesRequest', (_message.Message,), { +_sym_db.RegisterMessage(GetTokenStatusesResponse) +_sym_db.RegisterMessage(GetTokenStatusesResponse.GetTokenStatusesResponseV0) +_sym_db.RegisterMessage(GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry) +_sym_db.RegisterMessage(GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses) - 'GetContestedResourceIdentityVotesRequestV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourceIdentityVotesRequestV0', (_message.Message,), { +GetTokenTotalSupplyRequest = _reflection.GeneratedProtocolMessageType('GetTokenTotalSupplyRequest', (_message.Message,), { - 'StartAtVotePollIdInfo' : _reflection.GeneratedProtocolMessageType('StartAtVotePollIdInfo', (_message.Message,), { - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST_GETCONTESTEDRESOURCEIDENTITYVOTESREQUESTV0_STARTATVOTEPOLLIDINFO, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo) - }) - , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST_GETCONTESTEDRESOURCEIDENTITYVOTESREQUESTV0, + 'GetTokenTotalSupplyRequestV0' : _reflection.GeneratedProtocolMessageType('GetTokenTotalSupplyRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETTOKENTOTALSUPPLYREQUEST_GETTOKENTOTALSUPPLYREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0) }) , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST, + 'DESCRIPTOR' : _GETTOKENTOTALSUPPLYREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest) }) -_sym_db.RegisterMessage(GetContestedResourceIdentityVotesRequest) -_sym_db.RegisterMessage(GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0) -_sym_db.RegisterMessage(GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo) - -GetContestedResourceIdentityVotesResponse = _reflection.GeneratedProtocolMessageType('GetContestedResourceIdentityVotesResponse', (_message.Message,), { +_sym_db.RegisterMessage(GetTokenTotalSupplyRequest) +_sym_db.RegisterMessage(GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0) - 'GetContestedResourceIdentityVotesResponseV0' : _reflection.GeneratedProtocolMessageType('GetContestedResourceIdentityVotesResponseV0', (_message.Message,), { - - 'ContestedResourceIdentityVotes' : _reflection.GeneratedProtocolMessageType('ContestedResourceIdentityVotes', (_message.Message,), { - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_CONTESTEDRESOURCEIDENTITYVOTES, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes) - }) - , +GetTokenTotalSupplyResponse = _reflection.GeneratedProtocolMessageType('GetTokenTotalSupplyResponse', (_message.Message,), { - 'ResourceVoteChoice' : _reflection.GeneratedProtocolMessageType('ResourceVoteChoice', (_message.Message,), { - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_RESOURCEVOTECHOICE, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice) - }) - , + 'GetTokenTotalSupplyResponseV0' : _reflection.GeneratedProtocolMessageType('GetTokenTotalSupplyResponseV0', (_message.Message,), { - 'ContestedResourceIdentityVote' : _reflection.GeneratedProtocolMessageType('ContestedResourceIdentityVote', (_message.Message,), { - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_CONTESTEDRESOURCEIDENTITYVOTE, + 'TokenTotalSupplyEntry' : _reflection.GeneratedProtocolMessageType('TokenTotalSupplyEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0_TOKENTOTALSUPPLYENTRY, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry) }) , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0, + 'DESCRIPTOR' : _GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0) }) , - 'DESCRIPTOR' : _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE, + 'DESCRIPTOR' : _GETTOKENTOTALSUPPLYRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse) }) -_sym_db.RegisterMessage(GetContestedResourceIdentityVotesResponse) -_sym_db.RegisterMessage(GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0) -_sym_db.RegisterMessage(GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes) -_sym_db.RegisterMessage(GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice) -_sym_db.RegisterMessage(GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote) +_sym_db.RegisterMessage(GetTokenTotalSupplyResponse) +_sym_db.RegisterMessage(GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0) +_sym_db.RegisterMessage(GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry) -GetPrefundedSpecializedBalanceRequest = _reflection.GeneratedProtocolMessageType('GetPrefundedSpecializedBalanceRequest', (_message.Message,), { +GetGroupInfoRequest = _reflection.GeneratedProtocolMessageType('GetGroupInfoRequest', (_message.Message,), { - 'GetPrefundedSpecializedBalanceRequestV0' : _reflection.GeneratedProtocolMessageType('GetPrefundedSpecializedBalanceRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETPREFUNDEDSPECIALIZEDBALANCEREQUEST_GETPREFUNDEDSPECIALIZEDBALANCEREQUESTV0, + 'GetGroupInfoRequestV0' : _reflection.GeneratedProtocolMessageType('GetGroupInfoRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPINFOREQUEST_GETGROUPINFOREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0) }) , - 'DESCRIPTOR' : _GETPREFUNDEDSPECIALIZEDBALANCEREQUEST, + 'DESCRIPTOR' : _GETGROUPINFOREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfoRequest) }) -_sym_db.RegisterMessage(GetPrefundedSpecializedBalanceRequest) -_sym_db.RegisterMessage(GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0) +_sym_db.RegisterMessage(GetGroupInfoRequest) +_sym_db.RegisterMessage(GetGroupInfoRequest.GetGroupInfoRequestV0) -GetPrefundedSpecializedBalanceResponse = _reflection.GeneratedProtocolMessageType('GetPrefundedSpecializedBalanceResponse', (_message.Message,), { +GetGroupInfoResponse = _reflection.GeneratedProtocolMessageType('GetGroupInfoResponse', (_message.Message,), { - 'GetPrefundedSpecializedBalanceResponseV0' : _reflection.GeneratedProtocolMessageType('GetPrefundedSpecializedBalanceResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _GETPREFUNDEDSPECIALIZEDBALANCERESPONSE_GETPREFUNDEDSPECIALIZEDBALANCERESPONSEV0, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0) - }) - , - 'DESCRIPTOR' : _GETPREFUNDEDSPECIALIZEDBALANCERESPONSE, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse) - }) -_sym_db.RegisterMessage(GetPrefundedSpecializedBalanceResponse) -_sym_db.RegisterMessage(GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0) + 'GetGroupInfoResponseV0' : _reflection.GeneratedProtocolMessageType('GetGroupInfoResponseV0', (_message.Message,), { -GetTotalCreditsInPlatformRequest = _reflection.GeneratedProtocolMessageType('GetTotalCreditsInPlatformRequest', (_message.Message,), { + 'GroupMemberEntry' : _reflection.GeneratedProtocolMessageType('GroupMemberEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPMEMBERENTRY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry) + }) + , + + 'GroupInfoEntry' : _reflection.GeneratedProtocolMessageType('GroupInfoEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFOENTRY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry) + }) + , - 'GetTotalCreditsInPlatformRequestV0' : _reflection.GeneratedProtocolMessageType('GetTotalCreditsInPlatformRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETTOTALCREDITSINPLATFORMREQUEST_GETTOTALCREDITSINPLATFORMREQUESTV0, + 'GroupInfo' : _reflection.GeneratedProtocolMessageType('GroupInfo', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo) + }) + , + 'DESCRIPTOR' : _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0) }) , - 'DESCRIPTOR' : _GETTOTALCREDITSINPLATFORMREQUEST, + 'DESCRIPTOR' : _GETGROUPINFORESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfoResponse) }) -_sym_db.RegisterMessage(GetTotalCreditsInPlatformRequest) -_sym_db.RegisterMessage(GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0) +_sym_db.RegisterMessage(GetGroupInfoResponse) +_sym_db.RegisterMessage(GetGroupInfoResponse.GetGroupInfoResponseV0) +_sym_db.RegisterMessage(GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry) +_sym_db.RegisterMessage(GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry) +_sym_db.RegisterMessage(GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo) -GetTotalCreditsInPlatformResponse = _reflection.GeneratedProtocolMessageType('GetTotalCreditsInPlatformResponse', (_message.Message,), { +GetGroupInfosRequest = _reflection.GeneratedProtocolMessageType('GetGroupInfosRequest', (_message.Message,), { - 'GetTotalCreditsInPlatformResponseV0' : _reflection.GeneratedProtocolMessageType('GetTotalCreditsInPlatformResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _GETTOTALCREDITSINPLATFORMRESPONSE_GETTOTALCREDITSINPLATFORMRESPONSEV0, + 'StartAtGroupContractPosition' : _reflection.GeneratedProtocolMessageType('StartAtGroupContractPosition', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPINFOSREQUEST_STARTATGROUPCONTRACTPOSITION, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition) }) , - 'DESCRIPTOR' : _GETTOTALCREDITSINPLATFORMRESPONSE, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse) - }) -_sym_db.RegisterMessage(GetTotalCreditsInPlatformResponse) -_sym_db.RegisterMessage(GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0) - -GetPathElementsRequest = _reflection.GeneratedProtocolMessageType('GetPathElementsRequest', (_message.Message,), { - 'GetPathElementsRequestV0' : _reflection.GeneratedProtocolMessageType('GetPathElementsRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETPATHELEMENTSREQUEST_GETPATHELEMENTSREQUESTV0, + 'GetGroupInfosRequestV0' : _reflection.GeneratedProtocolMessageType('GetGroupInfosRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0) }) , - 'DESCRIPTOR' : _GETPATHELEMENTSREQUEST, + 'DESCRIPTOR' : _GETGROUPINFOSREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPathElementsRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfosRequest) }) -_sym_db.RegisterMessage(GetPathElementsRequest) -_sym_db.RegisterMessage(GetPathElementsRequest.GetPathElementsRequestV0) +_sym_db.RegisterMessage(GetGroupInfosRequest) +_sym_db.RegisterMessage(GetGroupInfosRequest.StartAtGroupContractPosition) +_sym_db.RegisterMessage(GetGroupInfosRequest.GetGroupInfosRequestV0) -GetPathElementsResponse = _reflection.GeneratedProtocolMessageType('GetPathElementsResponse', (_message.Message,), { +GetGroupInfosResponse = _reflection.GeneratedProtocolMessageType('GetGroupInfosResponse', (_message.Message,), { - 'GetPathElementsResponseV0' : _reflection.GeneratedProtocolMessageType('GetPathElementsResponseV0', (_message.Message,), { + 'GetGroupInfosResponseV0' : _reflection.GeneratedProtocolMessageType('GetGroupInfosResponseV0', (_message.Message,), { - 'Elements' : _reflection.GeneratedProtocolMessageType('Elements', (_message.Message,), { - 'DESCRIPTOR' : _GETPATHELEMENTSRESPONSE_GETPATHELEMENTSRESPONSEV0_ELEMENTS, + 'GroupMemberEntry' : _reflection.GeneratedProtocolMessageType('GroupMemberEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPMEMBERENTRY, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry) }) , - 'DESCRIPTOR' : _GETPATHELEMENTSRESPONSE_GETPATHELEMENTSRESPONSEV0, + + 'GroupPositionInfoEntry' : _reflection.GeneratedProtocolMessageType('GroupPositionInfoEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPPOSITIONINFOENTRY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry) + }) + , + + 'GroupInfos' : _reflection.GeneratedProtocolMessageType('GroupInfos', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPINFOS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos) + }) + , + 'DESCRIPTOR' : _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0) }) , - 'DESCRIPTOR' : _GETPATHELEMENTSRESPONSE, + 'DESCRIPTOR' : _GETGROUPINFOSRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetPathElementsResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupInfosResponse) }) -_sym_db.RegisterMessage(GetPathElementsResponse) -_sym_db.RegisterMessage(GetPathElementsResponse.GetPathElementsResponseV0) -_sym_db.RegisterMessage(GetPathElementsResponse.GetPathElementsResponseV0.Elements) +_sym_db.RegisterMessage(GetGroupInfosResponse) +_sym_db.RegisterMessage(GetGroupInfosResponse.GetGroupInfosResponseV0) +_sym_db.RegisterMessage(GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry) +_sym_db.RegisterMessage(GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry) +_sym_db.RegisterMessage(GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos) -GetStatusRequest = _reflection.GeneratedProtocolMessageType('GetStatusRequest', (_message.Message,), { +GetGroupActionsRequest = _reflection.GeneratedProtocolMessageType('GetGroupActionsRequest', (_message.Message,), { - 'GetStatusRequestV0' : _reflection.GeneratedProtocolMessageType('GetStatusRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETSTATUSREQUEST_GETSTATUSREQUESTV0, + 'StartAtActionId' : _reflection.GeneratedProtocolMessageType('StartAtActionId', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSREQUEST_STARTATACTIONID, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId) }) , - 'DESCRIPTOR' : _GETSTATUSREQUEST, + + 'GetGroupActionsRequestV0' : _reflection.GeneratedProtocolMessageType('GetGroupActionsRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0) + }) + , + 'DESCRIPTOR' : _GETGROUPACTIONSREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsRequest) }) -_sym_db.RegisterMessage(GetStatusRequest) -_sym_db.RegisterMessage(GetStatusRequest.GetStatusRequestV0) +_sym_db.RegisterMessage(GetGroupActionsRequest) +_sym_db.RegisterMessage(GetGroupActionsRequest.StartAtActionId) +_sym_db.RegisterMessage(GetGroupActionsRequest.GetGroupActionsRequestV0) -GetStatusResponse = _reflection.GeneratedProtocolMessageType('GetStatusResponse', (_message.Message,), { +GetGroupActionsResponse = _reflection.GeneratedProtocolMessageType('GetGroupActionsResponse', (_message.Message,), { - 'GetStatusResponseV0' : _reflection.GeneratedProtocolMessageType('GetStatusResponseV0', (_message.Message,), { + 'GetGroupActionsResponseV0' : _reflection.GeneratedProtocolMessageType('GetGroupActionsResponseV0', (_message.Message,), { - 'Version' : _reflection.GeneratedProtocolMessageType('Version', (_message.Message,), { + 'MintEvent' : _reflection.GeneratedProtocolMessageType('MintEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_MINTEVENT, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent) + }) + , - 'Software' : _reflection.GeneratedProtocolMessageType('Software', (_message.Message,), { - 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_SOFTWARE, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software) - }) - , + 'BurnEvent' : _reflection.GeneratedProtocolMessageType('BurnEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_BURNEVENT, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent) + }) + , - 'Protocol' : _reflection.GeneratedProtocolMessageType('Protocol', (_message.Message,), { + 'FreezeEvent' : _reflection.GeneratedProtocolMessageType('FreezeEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_FREEZEEVENT, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent) + }) + , - 'Tenderdash' : _reflection.GeneratedProtocolMessageType('Tenderdash', (_message.Message,), { - 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL_TENDERDASH, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash) - }) - , + 'UnfreezeEvent' : _reflection.GeneratedProtocolMessageType('UnfreezeEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UNFREEZEEVENT, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent) + }) + , - 'Drive' : _reflection.GeneratedProtocolMessageType('Drive', (_message.Message,), { - 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL_DRIVE, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive) - }) - , - 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol) - }) - , - 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION, + 'DestroyFrozenFundsEvent' : _reflection.GeneratedProtocolMessageType('DestroyFrozenFundsEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DESTROYFROZENFUNDSEVENT, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent) }) , - 'Time' : _reflection.GeneratedProtocolMessageType('Time', (_message.Message,), { - 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_TIME, + 'SharedEncryptedNote' : _reflection.GeneratedProtocolMessageType('SharedEncryptedNote', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_SHAREDENCRYPTEDNOTE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote) }) , - 'Node' : _reflection.GeneratedProtocolMessageType('Node', (_message.Message,), { - 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_NODE, + 'PersonalEncryptedNote' : _reflection.GeneratedProtocolMessageType('PersonalEncryptedNote', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_PERSONALENCRYPTEDNOTE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote) }) , - 'Chain' : _reflection.GeneratedProtocolMessageType('Chain', (_message.Message,), { - 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_CHAIN, + 'TransferEvent' : _reflection.GeneratedProtocolMessageType('TransferEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TRANSFEREVENT, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent) }) , - 'Network' : _reflection.GeneratedProtocolMessageType('Network', (_message.Message,), { - 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_NETWORK, + 'EmergencyActionEvent' : _reflection.GeneratedProtocolMessageType('EmergencyActionEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent) }) , - 'StateSync' : _reflection.GeneratedProtocolMessageType('StateSync', (_message.Message,), { - 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_STATESYNC, + 'TokenConfigUpdateEvent' : _reflection.GeneratedProtocolMessageType('TokenConfigUpdateEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENCONFIGUPDATEEVENT, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent) }) , - 'DESCRIPTOR' : _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0, + + 'GroupActionEvent' : _reflection.GeneratedProtocolMessageType('GroupActionEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent) + }) + , + + 'DocumentEvent' : _reflection.GeneratedProtocolMessageType('DocumentEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent) + }) + , + + 'DocumentCreateEvent' : _reflection.GeneratedProtocolMessageType('DocumentCreateEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTCREATEEVENT, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent) + }) + , + + 'ContractUpdateEvent' : _reflection.GeneratedProtocolMessageType('ContractUpdateEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTUPDATEEVENT, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent) + }) + , + + 'ContractEvent' : _reflection.GeneratedProtocolMessageType('ContractEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent) + }) + , + + 'TokenEvent' : _reflection.GeneratedProtocolMessageType('TokenEvent', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent) + }) + , + + 'GroupActionEntry' : _reflection.GeneratedProtocolMessageType('GroupActionEntry', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONENTRY, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry) + }) + , + + 'GroupActions' : _reflection.GeneratedProtocolMessageType('GroupActions', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions) + }) + , + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0) }) , - 'DESCRIPTOR' : _GETSTATUSRESPONSE, + 'DESCRIPTOR' : _GETGROUPACTIONSRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetStatusResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionsResponse) }) -_sym_db.RegisterMessage(GetStatusResponse) -_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0) -_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Version) -_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Version.Software) -_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Version.Protocol) -_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash) -_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive) -_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Time) -_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Node) -_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Chain) -_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.Network) -_sym_db.RegisterMessage(GetStatusResponse.GetStatusResponseV0.StateSync) - -GetCurrentQuorumsInfoRequest = _reflection.GeneratedProtocolMessageType('GetCurrentQuorumsInfoRequest', (_message.Message,), { - - 'GetCurrentQuorumsInfoRequestV0' : _reflection.GeneratedProtocolMessageType('GetCurrentQuorumsInfoRequestV0', (_message.Message,), { - 'DESCRIPTOR' : _GETCURRENTQUORUMSINFOREQUEST_GETCURRENTQUORUMSINFOREQUESTV0, +_sym_db.RegisterMessage(GetGroupActionsResponse) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry) +_sym_db.RegisterMessage(GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions) + +GetGroupActionSignersRequest = _reflection.GeneratedProtocolMessageType('GetGroupActionSignersRequest', (_message.Message,), { + + 'GetGroupActionSignersRequestV0' : _reflection.GeneratedProtocolMessageType('GetGroupActionSignersRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSIGNERSREQUEST_GETGROUPACTIONSIGNERSREQUESTV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0) }) , - 'DESCRIPTOR' : _GETCURRENTQUORUMSINFOREQUEST, + 'DESCRIPTOR' : _GETGROUPACTIONSIGNERSREQUEST, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionSignersRequest) }) -_sym_db.RegisterMessage(GetCurrentQuorumsInfoRequest) -_sym_db.RegisterMessage(GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0) +_sym_db.RegisterMessage(GetGroupActionSignersRequest) +_sym_db.RegisterMessage(GetGroupActionSignersRequest.GetGroupActionSignersRequestV0) -GetCurrentQuorumsInfoResponse = _reflection.GeneratedProtocolMessageType('GetCurrentQuorumsInfoResponse', (_message.Message,), { +GetGroupActionSignersResponse = _reflection.GeneratedProtocolMessageType('GetGroupActionSignersResponse', (_message.Message,), { - 'ValidatorV0' : _reflection.GeneratedProtocolMessageType('ValidatorV0', (_message.Message,), { - 'DESCRIPTOR' : _GETCURRENTQUORUMSINFORESPONSE_VALIDATORV0, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0) - }) - , + 'GetGroupActionSignersResponseV0' : _reflection.GeneratedProtocolMessageType('GetGroupActionSignersResponseV0', (_message.Message,), { - 'ValidatorSetV0' : _reflection.GeneratedProtocolMessageType('ValidatorSetV0', (_message.Message,), { - 'DESCRIPTOR' : _GETCURRENTQUORUMSINFORESPONSE_VALIDATORSETV0, - '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0) - }) - , + 'GroupActionSigner' : _reflection.GeneratedProtocolMessageType('GroupActionSigner', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNER, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner) + }) + , - 'GetCurrentQuorumsInfoResponseV0' : _reflection.GeneratedProtocolMessageType('GetCurrentQuorumsInfoResponseV0', (_message.Message,), { - 'DESCRIPTOR' : _GETCURRENTQUORUMSINFORESPONSE_GETCURRENTQUORUMSINFORESPONSEV0, + 'GroupActionSigners' : _reflection.GeneratedProtocolMessageType('GroupActionSigners', (_message.Message,), { + 'DESCRIPTOR' : _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNERS, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners) + }) + , + 'DESCRIPTOR' : _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0) }) , - 'DESCRIPTOR' : _GETCURRENTQUORUMSINFORESPONSE, + 'DESCRIPTOR' : _GETGROUPACTIONSIGNERSRESPONSE, '__module__' : 'platform_pb2' - # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse) + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetGroupActionSignersResponse) }) -_sym_db.RegisterMessage(GetCurrentQuorumsInfoResponse) -_sym_db.RegisterMessage(GetCurrentQuorumsInfoResponse.ValidatorV0) -_sym_db.RegisterMessage(GetCurrentQuorumsInfoResponse.ValidatorSetV0) -_sym_db.RegisterMessage(GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0) +_sym_db.RegisterMessage(GetGroupActionSignersResponse) +_sym_db.RegisterMessage(GetGroupActionSignersResponse.GetGroupActionSignersResponseV0) +_sym_db.RegisterMessage(GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner) +_sym_db.RegisterMessage(GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners) _SEARCHKEY_PURPOSEMAPENTRY._options = None @@ -10823,8 +15477,8 @@ index=0, serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_start=31605, - serialized_end=36249, + serialized_start=45431, + serialized_end=51421, methods=[ _descriptor.MethodDescriptor( name='broadcastStateTransition', @@ -11146,6 +15800,106 @@ serialized_options=None, create_key=_descriptor._internal_create_key, ), + _descriptor.MethodDescriptor( + name='getIdentityTokenBalances', + full_name='org.dash.platform.dapi.v0.Platform.getIdentityTokenBalances', + index=32, + containing_service=None, + input_type=_GETIDENTITYTOKENBALANCESREQUEST, + output_type=_GETIDENTITYTOKENBALANCESRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='getIdentitiesTokenBalances', + full_name='org.dash.platform.dapi.v0.Platform.getIdentitiesTokenBalances', + index=33, + containing_service=None, + input_type=_GETIDENTITIESTOKENBALANCESREQUEST, + output_type=_GETIDENTITIESTOKENBALANCESRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='getIdentityTokenInfos', + full_name='org.dash.platform.dapi.v0.Platform.getIdentityTokenInfos', + index=34, + containing_service=None, + input_type=_GETIDENTITYTOKENINFOSREQUEST, + output_type=_GETIDENTITYTOKENINFOSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='getIdentitiesTokenInfos', + full_name='org.dash.platform.dapi.v0.Platform.getIdentitiesTokenInfos', + index=35, + containing_service=None, + input_type=_GETIDENTITIESTOKENINFOSREQUEST, + output_type=_GETIDENTITIESTOKENINFOSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='getTokenStatuses', + full_name='org.dash.platform.dapi.v0.Platform.getTokenStatuses', + index=36, + containing_service=None, + input_type=_GETTOKENSTATUSESREQUEST, + output_type=_GETTOKENSTATUSESRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='getTokenTotalSupply', + full_name='org.dash.platform.dapi.v0.Platform.getTokenTotalSupply', + index=37, + containing_service=None, + input_type=_GETTOKENTOTALSUPPLYREQUEST, + output_type=_GETTOKENTOTALSUPPLYRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='getGroupInfo', + full_name='org.dash.platform.dapi.v0.Platform.getGroupInfo', + index=38, + containing_service=None, + input_type=_GETGROUPINFOREQUEST, + output_type=_GETGROUPINFORESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='getGroupInfos', + full_name='org.dash.platform.dapi.v0.Platform.getGroupInfos', + index=39, + containing_service=None, + input_type=_GETGROUPINFOSREQUEST, + output_type=_GETGROUPINFOSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='getGroupActions', + full_name='org.dash.platform.dapi.v0.Platform.getGroupActions', + index=40, + containing_service=None, + input_type=_GETGROUPACTIONSREQUEST, + output_type=_GETGROUPACTIONSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='getGroupActionSigners', + full_name='org.dash.platform.dapi.v0.Platform.getGroupActionSigners', + index=41, + containing_service=None, + input_type=_GETGROUPACTIONSIGNERSREQUEST, + output_type=_GETGROUPACTIONSIGNERSRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), ]) _sym_db.RegisterServiceDescriptor(_PLATFORM) 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 b8c3847869..fe75971710 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 @@ -174,6 +174,56 @@ def __init__(self, channel): request_serializer=platform__pb2.GetCurrentQuorumsInfoRequest.SerializeToString, response_deserializer=platform__pb2.GetCurrentQuorumsInfoResponse.FromString, ) + self.getIdentityTokenBalances = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getIdentityTokenBalances', + request_serializer=platform__pb2.GetIdentityTokenBalancesRequest.SerializeToString, + response_deserializer=platform__pb2.GetIdentityTokenBalancesResponse.FromString, + ) + self.getIdentitiesTokenBalances = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getIdentitiesTokenBalances', + request_serializer=platform__pb2.GetIdentitiesTokenBalancesRequest.SerializeToString, + response_deserializer=platform__pb2.GetIdentitiesTokenBalancesResponse.FromString, + ) + self.getIdentityTokenInfos = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getIdentityTokenInfos', + request_serializer=platform__pb2.GetIdentityTokenInfosRequest.SerializeToString, + response_deserializer=platform__pb2.GetIdentityTokenInfosResponse.FromString, + ) + self.getIdentitiesTokenInfos = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getIdentitiesTokenInfos', + request_serializer=platform__pb2.GetIdentitiesTokenInfosRequest.SerializeToString, + response_deserializer=platform__pb2.GetIdentitiesTokenInfosResponse.FromString, + ) + self.getTokenStatuses = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getTokenStatuses', + request_serializer=platform__pb2.GetTokenStatusesRequest.SerializeToString, + response_deserializer=platform__pb2.GetTokenStatusesResponse.FromString, + ) + self.getTokenTotalSupply = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getTokenTotalSupply', + request_serializer=platform__pb2.GetTokenTotalSupplyRequest.SerializeToString, + response_deserializer=platform__pb2.GetTokenTotalSupplyResponse.FromString, + ) + self.getGroupInfo = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getGroupInfo', + request_serializer=platform__pb2.GetGroupInfoRequest.SerializeToString, + response_deserializer=platform__pb2.GetGroupInfoResponse.FromString, + ) + self.getGroupInfos = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getGroupInfos', + request_serializer=platform__pb2.GetGroupInfosRequest.SerializeToString, + response_deserializer=platform__pb2.GetGroupInfosResponse.FromString, + ) + self.getGroupActions = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getGroupActions', + request_serializer=platform__pb2.GetGroupActionsRequest.SerializeToString, + response_deserializer=platform__pb2.GetGroupActionsResponse.FromString, + ) + self.getGroupActionSigners = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getGroupActionSigners', + request_serializer=platform__pb2.GetGroupActionSignersRequest.SerializeToString, + response_deserializer=platform__pb2.GetGroupActionSignersResponse.FromString, + ) class PlatformServicer(object): @@ -376,6 +426,66 @@ def getCurrentQuorumsInfo(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def getIdentityTokenBalances(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 getIdentitiesTokenBalances(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 getIdentityTokenInfos(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 getIdentitiesTokenInfos(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 getTokenStatuses(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 getTokenTotalSupply(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 getGroupInfo(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 getGroupInfos(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 getGroupActions(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 getGroupActionSigners(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 add_PlatformServicer_to_server(servicer, server): rpc_method_handlers = { @@ -539,6 +649,56 @@ def add_PlatformServicer_to_server(servicer, server): request_deserializer=platform__pb2.GetCurrentQuorumsInfoRequest.FromString, response_serializer=platform__pb2.GetCurrentQuorumsInfoResponse.SerializeToString, ), + 'getIdentityTokenBalances': grpc.unary_unary_rpc_method_handler( + servicer.getIdentityTokenBalances, + request_deserializer=platform__pb2.GetIdentityTokenBalancesRequest.FromString, + response_serializer=platform__pb2.GetIdentityTokenBalancesResponse.SerializeToString, + ), + 'getIdentitiesTokenBalances': grpc.unary_unary_rpc_method_handler( + servicer.getIdentitiesTokenBalances, + request_deserializer=platform__pb2.GetIdentitiesTokenBalancesRequest.FromString, + response_serializer=platform__pb2.GetIdentitiesTokenBalancesResponse.SerializeToString, + ), + 'getIdentityTokenInfos': grpc.unary_unary_rpc_method_handler( + servicer.getIdentityTokenInfos, + request_deserializer=platform__pb2.GetIdentityTokenInfosRequest.FromString, + response_serializer=platform__pb2.GetIdentityTokenInfosResponse.SerializeToString, + ), + 'getIdentitiesTokenInfos': grpc.unary_unary_rpc_method_handler( + servicer.getIdentitiesTokenInfos, + request_deserializer=platform__pb2.GetIdentitiesTokenInfosRequest.FromString, + response_serializer=platform__pb2.GetIdentitiesTokenInfosResponse.SerializeToString, + ), + 'getTokenStatuses': grpc.unary_unary_rpc_method_handler( + servicer.getTokenStatuses, + request_deserializer=platform__pb2.GetTokenStatusesRequest.FromString, + response_serializer=platform__pb2.GetTokenStatusesResponse.SerializeToString, + ), + 'getTokenTotalSupply': grpc.unary_unary_rpc_method_handler( + servicer.getTokenTotalSupply, + request_deserializer=platform__pb2.GetTokenTotalSupplyRequest.FromString, + response_serializer=platform__pb2.GetTokenTotalSupplyResponse.SerializeToString, + ), + 'getGroupInfo': grpc.unary_unary_rpc_method_handler( + servicer.getGroupInfo, + request_deserializer=platform__pb2.GetGroupInfoRequest.FromString, + response_serializer=platform__pb2.GetGroupInfoResponse.SerializeToString, + ), + 'getGroupInfos': grpc.unary_unary_rpc_method_handler( + servicer.getGroupInfos, + request_deserializer=platform__pb2.GetGroupInfosRequest.FromString, + response_serializer=platform__pb2.GetGroupInfosResponse.SerializeToString, + ), + 'getGroupActions': grpc.unary_unary_rpc_method_handler( + servicer.getGroupActions, + request_deserializer=platform__pb2.GetGroupActionsRequest.FromString, + response_serializer=platform__pb2.GetGroupActionsResponse.SerializeToString, + ), + 'getGroupActionSigners': grpc.unary_unary_rpc_method_handler( + servicer.getGroupActionSigners, + request_deserializer=platform__pb2.GetGroupActionSignersRequest.FromString, + response_serializer=platform__pb2.GetGroupActionSignersResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'org.dash.platform.dapi.v0.Platform', rpc_method_handlers) @@ -1092,3 +1252,173 @@ def getCurrentQuorumsInfo(request, platform__pb2.GetCurrentQuorumsInfoResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getIdentityTokenBalances(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/getIdentityTokenBalances', + platform__pb2.GetIdentityTokenBalancesRequest.SerializeToString, + platform__pb2.GetIdentityTokenBalancesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getIdentitiesTokenBalances(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/getIdentitiesTokenBalances', + platform__pb2.GetIdentitiesTokenBalancesRequest.SerializeToString, + platform__pb2.GetIdentitiesTokenBalancesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getIdentityTokenInfos(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/getIdentityTokenInfos', + platform__pb2.GetIdentityTokenInfosRequest.SerializeToString, + platform__pb2.GetIdentityTokenInfosResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getIdentitiesTokenInfos(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/getIdentitiesTokenInfos', + platform__pb2.GetIdentitiesTokenInfosRequest.SerializeToString, + platform__pb2.GetIdentitiesTokenInfosResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getTokenStatuses(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/getTokenStatuses', + platform__pb2.GetTokenStatusesRequest.SerializeToString, + platform__pb2.GetTokenStatusesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getTokenTotalSupply(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/getTokenTotalSupply', + platform__pb2.GetTokenTotalSupplyRequest.SerializeToString, + platform__pb2.GetTokenTotalSupplyResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getGroupInfo(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/getGroupInfo', + platform__pb2.GetGroupInfoRequest.SerializeToString, + platform__pb2.GetGroupInfoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getGroupInfos(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/getGroupInfos', + platform__pb2.GetGroupInfosRequest.SerializeToString, + platform__pb2.GetGroupInfosResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getGroupActions(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/getGroupActions', + platform__pb2.GetGroupActionsRequest.SerializeToString, + platform__pb2.GetGroupActionsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getGroupActionSigners(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/getGroupActionSigners', + platform__pb2.GetGroupActionSignersRequest.SerializeToString, + platform__pb2.GetGroupActionSignersResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) 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 e9028523b9..0d28fb59f7 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 @@ -1800,6 +1800,21 @@ export namespace GetProofsRequest { setVotesList(value: Array): void; addVotes(value?: GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, index?: number): GetProofsRequest.GetProofsRequestV0.VoteStatusRequest; + clearIdentityTokenBalancesList(): void; + getIdentityTokenBalancesList(): Array; + setIdentityTokenBalancesList(value: Array): void; + addIdentityTokenBalances(value?: GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest, index?: number): GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest; + + clearIdentityTokenInfosList(): void; + getIdentityTokenInfosList(): Array; + setIdentityTokenInfosList(value: Array): void; + addIdentityTokenInfos(value?: GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest, index?: number): GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest; + + clearTokenStatusesList(): void; + getTokenStatusesList(): Array; + setTokenStatusesList(value: Array): void; + addTokenStatuses(value?: GetProofsRequest.GetProofsRequestV0.TokenStatusRequest, index?: number): GetProofsRequest.GetProofsRequestV0.TokenStatusRequest; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetProofsRequestV0.AsObject; static toObject(includeInstance: boolean, msg: GetProofsRequestV0): GetProofsRequestV0.AsObject; @@ -1816,6 +1831,9 @@ export namespace GetProofsRequest { contractsList: Array, documentsList: Array, votesList: Array, + identityTokenBalancesList: Array, + identityTokenInfosList: Array, + tokenStatusesList: Array, } export class DocumentRequest extends jspb.Message { @@ -1994,6 +2012,84 @@ export namespace GetProofsRequest { CONTESTED_RESOURCE_VOTE_STATUS_REQUEST = 1, } } + + export class IdentityTokenBalanceRequest extends jspb.Message { + getTokenId(): Uint8Array | string; + getTokenId_asU8(): Uint8Array; + getTokenId_asB64(): string; + setTokenId(value: Uint8Array | string): void; + + getIdentityId(): Uint8Array | string; + getIdentityId_asU8(): Uint8Array; + getIdentityId_asB64(): string; + setIdentityId(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentityTokenBalanceRequest.AsObject; + static toObject(includeInstance: boolean, msg: IdentityTokenBalanceRequest): IdentityTokenBalanceRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentityTokenBalanceRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentityTokenBalanceRequest; + static deserializeBinaryFromReader(message: IdentityTokenBalanceRequest, reader: jspb.BinaryReader): IdentityTokenBalanceRequest; + } + + export namespace IdentityTokenBalanceRequest { + export type AsObject = { + tokenId: Uint8Array | string, + identityId: Uint8Array | string, + } + } + + export class IdentityTokenInfoRequest extends jspb.Message { + getTokenId(): Uint8Array | string; + getTokenId_asU8(): Uint8Array; + getTokenId_asB64(): string; + setTokenId(value: Uint8Array | string): void; + + getIdentityId(): Uint8Array | string; + getIdentityId_asU8(): Uint8Array; + getIdentityId_asB64(): string; + setIdentityId(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentityTokenInfoRequest.AsObject; + static toObject(includeInstance: boolean, msg: IdentityTokenInfoRequest): IdentityTokenInfoRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentityTokenInfoRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentityTokenInfoRequest; + static deserializeBinaryFromReader(message: IdentityTokenInfoRequest, reader: jspb.BinaryReader): IdentityTokenInfoRequest; + } + + export namespace IdentityTokenInfoRequest { + export type AsObject = { + tokenId: Uint8Array | string, + identityId: Uint8Array | string, + } + } + + export class TokenStatusRequest extends jspb.Message { + getTokenId(): Uint8Array | string; + getTokenId_asU8(): Uint8Array; + getTokenId_asB64(): string; + setTokenId(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenStatusRequest.AsObject; + static toObject(includeInstance: boolean, msg: TokenStatusRequest): TokenStatusRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenStatusRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenStatusRequest; + static deserializeBinaryFromReader(message: TokenStatusRequest, reader: jspb.BinaryReader): TokenStatusRequest; + } + + export namespace TokenStatusRequest { + export type AsObject = { + tokenId: Uint8Array | string, + } + } } export enum VersionCase { @@ -6004,6 +6100,2484 @@ export namespace GetCurrentQuorumsInfoResponse { } } +export class GetIdentityTokenBalancesRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 | undefined; + setV0(value?: GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0): void; + + getVersionCase(): GetIdentityTokenBalancesRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentityTokenBalancesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentityTokenBalancesRequest): GetIdentityTokenBalancesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentityTokenBalancesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentityTokenBalancesRequest; + static deserializeBinaryFromReader(message: GetIdentityTokenBalancesRequest, reader: jspb.BinaryReader): GetIdentityTokenBalancesRequest; +} + +export namespace GetIdentityTokenBalancesRequest { + export type AsObject = { + v0?: GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.AsObject, + } + + export class GetIdentityTokenBalancesRequestV0 extends jspb.Message { + getIdentityId(): Uint8Array | string; + getIdentityId_asU8(): Uint8Array; + getIdentityId_asB64(): string; + setIdentityId(value: Uint8Array | string): void; + + clearTokenIdsList(): void; + getTokenIdsList(): Array; + getTokenIdsList_asU8(): Array; + getTokenIdsList_asB64(): Array; + setTokenIdsList(value: Array): void; + addTokenIds(value: Uint8Array | string, index?: number): Uint8Array | string; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentityTokenBalancesRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentityTokenBalancesRequestV0): GetIdentityTokenBalancesRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentityTokenBalancesRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentityTokenBalancesRequestV0; + static deserializeBinaryFromReader(message: GetIdentityTokenBalancesRequestV0, reader: jspb.BinaryReader): GetIdentityTokenBalancesRequestV0; + } + + export namespace GetIdentityTokenBalancesRequestV0 { + export type AsObject = { + identityId: Uint8Array | string, + tokenIdsList: Array, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetIdentityTokenBalancesResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 | undefined; + setV0(value?: GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0): void; + + getVersionCase(): GetIdentityTokenBalancesResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentityTokenBalancesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentityTokenBalancesResponse): GetIdentityTokenBalancesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentityTokenBalancesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentityTokenBalancesResponse; + static deserializeBinaryFromReader(message: GetIdentityTokenBalancesResponse, reader: jspb.BinaryReader): GetIdentityTokenBalancesResponse; +} + +export namespace GetIdentityTokenBalancesResponse { + export type AsObject = { + v0?: GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.AsObject, + } + + export class GetIdentityTokenBalancesResponseV0 extends jspb.Message { + hasTokenBalances(): boolean; + clearTokenBalances(): void; + getTokenBalances(): GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances | undefined; + setTokenBalances(value?: GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetIdentityTokenBalancesResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentityTokenBalancesResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentityTokenBalancesResponseV0): GetIdentityTokenBalancesResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentityTokenBalancesResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentityTokenBalancesResponseV0; + static deserializeBinaryFromReader(message: GetIdentityTokenBalancesResponseV0, reader: jspb.BinaryReader): GetIdentityTokenBalancesResponseV0; + } + + export namespace GetIdentityTokenBalancesResponseV0 { + export type AsObject = { + tokenBalances?: GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class TokenBalanceEntry extends jspb.Message { + getTokenId(): Uint8Array | string; + getTokenId_asU8(): Uint8Array; + getTokenId_asB64(): string; + setTokenId(value: Uint8Array | string): void; + + hasBalance(): boolean; + clearBalance(): void; + getBalance(): number; + setBalance(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenBalanceEntry.AsObject; + static toObject(includeInstance: boolean, msg: TokenBalanceEntry): TokenBalanceEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenBalanceEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenBalanceEntry; + static deserializeBinaryFromReader(message: TokenBalanceEntry, reader: jspb.BinaryReader): TokenBalanceEntry; + } + + export namespace TokenBalanceEntry { + export type AsObject = { + tokenId: Uint8Array | string, + balance: number, + } + } + + export class TokenBalances extends jspb.Message { + clearTokenBalancesList(): void; + getTokenBalancesList(): Array; + setTokenBalancesList(value: Array): void; + addTokenBalances(value?: GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry, index?: number): GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenBalances.AsObject; + static toObject(includeInstance: boolean, msg: TokenBalances): TokenBalances.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenBalances, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenBalances; + static deserializeBinaryFromReader(message: TokenBalances, reader: jspb.BinaryReader): TokenBalances; + } + + export namespace TokenBalances { + export type AsObject = { + tokenBalancesList: Array, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + TOKEN_BALANCES = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetIdentitiesTokenBalancesRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 | undefined; + setV0(value?: GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0): void; + + getVersionCase(): GetIdentitiesTokenBalancesRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesTokenBalancesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesTokenBalancesRequest): GetIdentitiesTokenBalancesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesTokenBalancesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesTokenBalancesRequest; + static deserializeBinaryFromReader(message: GetIdentitiesTokenBalancesRequest, reader: jspb.BinaryReader): GetIdentitiesTokenBalancesRequest; +} + +export namespace GetIdentitiesTokenBalancesRequest { + export type AsObject = { + v0?: GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.AsObject, + } + + export class GetIdentitiesTokenBalancesRequestV0 extends jspb.Message { + getTokenId(): Uint8Array | string; + getTokenId_asU8(): Uint8Array; + getTokenId_asB64(): string; + setTokenId(value: Uint8Array | string): void; + + clearIdentityIdsList(): void; + getIdentityIdsList(): Array; + getIdentityIdsList_asU8(): Array; + getIdentityIdsList_asB64(): Array; + setIdentityIdsList(value: Array): void; + addIdentityIds(value: Uint8Array | string, index?: number): Uint8Array | string; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesTokenBalancesRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesTokenBalancesRequestV0): GetIdentitiesTokenBalancesRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesTokenBalancesRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesTokenBalancesRequestV0; + static deserializeBinaryFromReader(message: GetIdentitiesTokenBalancesRequestV0, reader: jspb.BinaryReader): GetIdentitiesTokenBalancesRequestV0; + } + + export namespace GetIdentitiesTokenBalancesRequestV0 { + export type AsObject = { + tokenId: Uint8Array | string, + identityIdsList: Array, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetIdentitiesTokenBalancesResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 | undefined; + setV0(value?: GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0): void; + + getVersionCase(): GetIdentitiesTokenBalancesResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesTokenBalancesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesTokenBalancesResponse): GetIdentitiesTokenBalancesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesTokenBalancesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesTokenBalancesResponse; + static deserializeBinaryFromReader(message: GetIdentitiesTokenBalancesResponse, reader: jspb.BinaryReader): GetIdentitiesTokenBalancesResponse; +} + +export namespace GetIdentitiesTokenBalancesResponse { + export type AsObject = { + v0?: GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.AsObject, + } + + export class GetIdentitiesTokenBalancesResponseV0 extends jspb.Message { + hasIdentityTokenBalances(): boolean; + clearIdentityTokenBalances(): void; + getIdentityTokenBalances(): GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances | undefined; + setIdentityTokenBalances(value?: GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetIdentitiesTokenBalancesResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesTokenBalancesResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesTokenBalancesResponseV0): GetIdentitiesTokenBalancesResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesTokenBalancesResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesTokenBalancesResponseV0; + static deserializeBinaryFromReader(message: GetIdentitiesTokenBalancesResponseV0, reader: jspb.BinaryReader): GetIdentitiesTokenBalancesResponseV0; + } + + export namespace GetIdentitiesTokenBalancesResponseV0 { + export type AsObject = { + identityTokenBalances?: GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class IdentityTokenBalanceEntry 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): IdentityTokenBalanceEntry.AsObject; + static toObject(includeInstance: boolean, msg: IdentityTokenBalanceEntry): IdentityTokenBalanceEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentityTokenBalanceEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentityTokenBalanceEntry; + static deserializeBinaryFromReader(message: IdentityTokenBalanceEntry, reader: jspb.BinaryReader): IdentityTokenBalanceEntry; + } + + export namespace IdentityTokenBalanceEntry { + export type AsObject = { + identityId: Uint8Array | string, + balance: number, + } + } + + export class IdentityTokenBalances extends jspb.Message { + clearIdentityTokenBalancesList(): void; + getIdentityTokenBalancesList(): Array; + setIdentityTokenBalancesList(value: Array): void; + addIdentityTokenBalances(value?: GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry, index?: number): GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentityTokenBalances.AsObject; + static toObject(includeInstance: boolean, msg: IdentityTokenBalances): IdentityTokenBalances.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentityTokenBalances, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentityTokenBalances; + static deserializeBinaryFromReader(message: IdentityTokenBalances, reader: jspb.BinaryReader): IdentityTokenBalances; + } + + export namespace IdentityTokenBalances { + export type AsObject = { + identityTokenBalancesList: Array, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + IDENTITY_TOKEN_BALANCES = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetIdentityTokenInfosRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 | undefined; + setV0(value?: GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0): void; + + getVersionCase(): GetIdentityTokenInfosRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentityTokenInfosRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentityTokenInfosRequest): GetIdentityTokenInfosRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentityTokenInfosRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentityTokenInfosRequest; + static deserializeBinaryFromReader(message: GetIdentityTokenInfosRequest, reader: jspb.BinaryReader): GetIdentityTokenInfosRequest; +} + +export namespace GetIdentityTokenInfosRequest { + export type AsObject = { + v0?: GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.AsObject, + } + + export class GetIdentityTokenInfosRequestV0 extends jspb.Message { + getIdentityId(): Uint8Array | string; + getIdentityId_asU8(): Uint8Array; + getIdentityId_asB64(): string; + setIdentityId(value: Uint8Array | string): void; + + clearTokenIdsList(): void; + getTokenIdsList(): Array; + getTokenIdsList_asU8(): Array; + getTokenIdsList_asB64(): Array; + setTokenIdsList(value: Array): void; + addTokenIds(value: Uint8Array | string, index?: number): Uint8Array | string; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentityTokenInfosRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentityTokenInfosRequestV0): GetIdentityTokenInfosRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentityTokenInfosRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentityTokenInfosRequestV0; + static deserializeBinaryFromReader(message: GetIdentityTokenInfosRequestV0, reader: jspb.BinaryReader): GetIdentityTokenInfosRequestV0; + } + + export namespace GetIdentityTokenInfosRequestV0 { + export type AsObject = { + identityId: Uint8Array | string, + tokenIdsList: Array, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetIdentityTokenInfosResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 | undefined; + setV0(value?: GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0): void; + + getVersionCase(): GetIdentityTokenInfosResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentityTokenInfosResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentityTokenInfosResponse): GetIdentityTokenInfosResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentityTokenInfosResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentityTokenInfosResponse; + static deserializeBinaryFromReader(message: GetIdentityTokenInfosResponse, reader: jspb.BinaryReader): GetIdentityTokenInfosResponse; +} + +export namespace GetIdentityTokenInfosResponse { + export type AsObject = { + v0?: GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.AsObject, + } + + export class GetIdentityTokenInfosResponseV0 extends jspb.Message { + hasTokenInfos(): boolean; + clearTokenInfos(): void; + getTokenInfos(): GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos | undefined; + setTokenInfos(value?: GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetIdentityTokenInfosResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentityTokenInfosResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentityTokenInfosResponseV0): GetIdentityTokenInfosResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentityTokenInfosResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentityTokenInfosResponseV0; + static deserializeBinaryFromReader(message: GetIdentityTokenInfosResponseV0, reader: jspb.BinaryReader): GetIdentityTokenInfosResponseV0; + } + + export namespace GetIdentityTokenInfosResponseV0 { + export type AsObject = { + tokenInfos?: GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class TokenIdentityInfoEntry extends jspb.Message { + getFrozen(): boolean; + setFrozen(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenIdentityInfoEntry.AsObject; + static toObject(includeInstance: boolean, msg: TokenIdentityInfoEntry): TokenIdentityInfoEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenIdentityInfoEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenIdentityInfoEntry; + static deserializeBinaryFromReader(message: TokenIdentityInfoEntry, reader: jspb.BinaryReader): TokenIdentityInfoEntry; + } + + export namespace TokenIdentityInfoEntry { + export type AsObject = { + frozen: boolean, + } + } + + export class TokenInfoEntry extends jspb.Message { + getTokenId(): Uint8Array | string; + getTokenId_asU8(): Uint8Array; + getTokenId_asB64(): string; + setTokenId(value: Uint8Array | string): void; + + hasInfo(): boolean; + clearInfo(): void; + getInfo(): GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry | undefined; + setInfo(value?: GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenInfoEntry.AsObject; + static toObject(includeInstance: boolean, msg: TokenInfoEntry): TokenInfoEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenInfoEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenInfoEntry; + static deserializeBinaryFromReader(message: TokenInfoEntry, reader: jspb.BinaryReader): TokenInfoEntry; + } + + export namespace TokenInfoEntry { + export type AsObject = { + tokenId: Uint8Array | string, + info?: GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.AsObject, + } + } + + export class TokenInfos extends jspb.Message { + clearTokenInfosList(): void; + getTokenInfosList(): Array; + setTokenInfosList(value: Array): void; + addTokenInfos(value?: GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry, index?: number): GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenInfos.AsObject; + static toObject(includeInstance: boolean, msg: TokenInfos): TokenInfos.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenInfos, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenInfos; + static deserializeBinaryFromReader(message: TokenInfos, reader: jspb.BinaryReader): TokenInfos; + } + + export namespace TokenInfos { + export type AsObject = { + tokenInfosList: Array, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + TOKEN_INFOS = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetIdentitiesTokenInfosRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 | undefined; + setV0(value?: GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0): void; + + getVersionCase(): GetIdentitiesTokenInfosRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesTokenInfosRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesTokenInfosRequest): GetIdentitiesTokenInfosRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesTokenInfosRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesTokenInfosRequest; + static deserializeBinaryFromReader(message: GetIdentitiesTokenInfosRequest, reader: jspb.BinaryReader): GetIdentitiesTokenInfosRequest; +} + +export namespace GetIdentitiesTokenInfosRequest { + export type AsObject = { + v0?: GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.AsObject, + } + + export class GetIdentitiesTokenInfosRequestV0 extends jspb.Message { + getTokenId(): Uint8Array | string; + getTokenId_asU8(): Uint8Array; + getTokenId_asB64(): string; + setTokenId(value: Uint8Array | string): void; + + clearIdentityIdsList(): void; + getIdentityIdsList(): Array; + getIdentityIdsList_asU8(): Array; + getIdentityIdsList_asB64(): Array; + setIdentityIdsList(value: Array): void; + addIdentityIds(value: Uint8Array | string, index?: number): Uint8Array | string; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesTokenInfosRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesTokenInfosRequestV0): GetIdentitiesTokenInfosRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesTokenInfosRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesTokenInfosRequestV0; + static deserializeBinaryFromReader(message: GetIdentitiesTokenInfosRequestV0, reader: jspb.BinaryReader): GetIdentitiesTokenInfosRequestV0; + } + + export namespace GetIdentitiesTokenInfosRequestV0 { + export type AsObject = { + tokenId: Uint8Array | string, + identityIdsList: Array, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetIdentitiesTokenInfosResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 | undefined; + setV0(value?: GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0): void; + + getVersionCase(): GetIdentitiesTokenInfosResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesTokenInfosResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesTokenInfosResponse): GetIdentitiesTokenInfosResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesTokenInfosResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesTokenInfosResponse; + static deserializeBinaryFromReader(message: GetIdentitiesTokenInfosResponse, reader: jspb.BinaryReader): GetIdentitiesTokenInfosResponse; +} + +export namespace GetIdentitiesTokenInfosResponse { + export type AsObject = { + v0?: GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.AsObject, + } + + export class GetIdentitiesTokenInfosResponseV0 extends jspb.Message { + hasIdentityTokenInfos(): boolean; + clearIdentityTokenInfos(): void; + getIdentityTokenInfos(): GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos | undefined; + setIdentityTokenInfos(value?: GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetIdentitiesTokenInfosResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetIdentitiesTokenInfosResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetIdentitiesTokenInfosResponseV0): GetIdentitiesTokenInfosResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetIdentitiesTokenInfosResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetIdentitiesTokenInfosResponseV0; + static deserializeBinaryFromReader(message: GetIdentitiesTokenInfosResponseV0, reader: jspb.BinaryReader): GetIdentitiesTokenInfosResponseV0; + } + + export namespace GetIdentitiesTokenInfosResponseV0 { + export type AsObject = { + identityTokenInfos?: GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class TokenIdentityInfoEntry extends jspb.Message { + getFrozen(): boolean; + setFrozen(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenIdentityInfoEntry.AsObject; + static toObject(includeInstance: boolean, msg: TokenIdentityInfoEntry): TokenIdentityInfoEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenIdentityInfoEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenIdentityInfoEntry; + static deserializeBinaryFromReader(message: TokenIdentityInfoEntry, reader: jspb.BinaryReader): TokenIdentityInfoEntry; + } + + export namespace TokenIdentityInfoEntry { + export type AsObject = { + frozen: boolean, + } + } + + export class TokenInfoEntry extends jspb.Message { + getIdentityId(): Uint8Array | string; + getIdentityId_asU8(): Uint8Array; + getIdentityId_asB64(): string; + setIdentityId(value: Uint8Array | string): void; + + hasInfo(): boolean; + clearInfo(): void; + getInfo(): GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry | undefined; + setInfo(value?: GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenInfoEntry.AsObject; + static toObject(includeInstance: boolean, msg: TokenInfoEntry): TokenInfoEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenInfoEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenInfoEntry; + static deserializeBinaryFromReader(message: TokenInfoEntry, reader: jspb.BinaryReader): TokenInfoEntry; + } + + export namespace TokenInfoEntry { + export type AsObject = { + identityId: Uint8Array | string, + info?: GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.AsObject, + } + } + + export class IdentityTokenInfos extends jspb.Message { + clearTokenInfosList(): void; + getTokenInfosList(): Array; + setTokenInfosList(value: Array): void; + addTokenInfos(value?: GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry, index?: number): GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentityTokenInfos.AsObject; + static toObject(includeInstance: boolean, msg: IdentityTokenInfos): IdentityTokenInfos.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdentityTokenInfos, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentityTokenInfos; + static deserializeBinaryFromReader(message: IdentityTokenInfos, reader: jspb.BinaryReader): IdentityTokenInfos; + } + + export namespace IdentityTokenInfos { + export type AsObject = { + tokenInfosList: Array, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + IDENTITY_TOKEN_INFOS = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetTokenStatusesRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetTokenStatusesRequest.GetTokenStatusesRequestV0 | undefined; + setV0(value?: GetTokenStatusesRequest.GetTokenStatusesRequestV0): void; + + getVersionCase(): GetTokenStatusesRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTokenStatusesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetTokenStatusesRequest): GetTokenStatusesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTokenStatusesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTokenStatusesRequest; + static deserializeBinaryFromReader(message: GetTokenStatusesRequest, reader: jspb.BinaryReader): GetTokenStatusesRequest; +} + +export namespace GetTokenStatusesRequest { + export type AsObject = { + v0?: GetTokenStatusesRequest.GetTokenStatusesRequestV0.AsObject, + } + + export class GetTokenStatusesRequestV0 extends jspb.Message { + clearTokenIdsList(): void; + getTokenIdsList(): Array; + getTokenIdsList_asU8(): Array; + getTokenIdsList_asB64(): Array; + setTokenIdsList(value: Array): void; + addTokenIds(value: Uint8Array | string, index?: number): Uint8Array | string; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTokenStatusesRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetTokenStatusesRequestV0): GetTokenStatusesRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTokenStatusesRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTokenStatusesRequestV0; + static deserializeBinaryFromReader(message: GetTokenStatusesRequestV0, reader: jspb.BinaryReader): GetTokenStatusesRequestV0; + } + + export namespace GetTokenStatusesRequestV0 { + export type AsObject = { + tokenIdsList: Array, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetTokenStatusesResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetTokenStatusesResponse.GetTokenStatusesResponseV0 | undefined; + setV0(value?: GetTokenStatusesResponse.GetTokenStatusesResponseV0): void; + + getVersionCase(): GetTokenStatusesResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTokenStatusesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetTokenStatusesResponse): GetTokenStatusesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTokenStatusesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTokenStatusesResponse; + static deserializeBinaryFromReader(message: GetTokenStatusesResponse, reader: jspb.BinaryReader): GetTokenStatusesResponse; +} + +export namespace GetTokenStatusesResponse { + export type AsObject = { + v0?: GetTokenStatusesResponse.GetTokenStatusesResponseV0.AsObject, + } + + export class GetTokenStatusesResponseV0 extends jspb.Message { + hasTokenStatuses(): boolean; + clearTokenStatuses(): void; + getTokenStatuses(): GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses | undefined; + setTokenStatuses(value?: GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetTokenStatusesResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTokenStatusesResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetTokenStatusesResponseV0): GetTokenStatusesResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTokenStatusesResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTokenStatusesResponseV0; + static deserializeBinaryFromReader(message: GetTokenStatusesResponseV0, reader: jspb.BinaryReader): GetTokenStatusesResponseV0; + } + + export namespace GetTokenStatusesResponseV0 { + export type AsObject = { + tokenStatuses?: GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class TokenStatusEntry extends jspb.Message { + getTokenId(): Uint8Array | string; + getTokenId_asU8(): Uint8Array; + getTokenId_asB64(): string; + setTokenId(value: Uint8Array | string): void; + + hasPaused(): boolean; + clearPaused(): void; + getPaused(): boolean; + setPaused(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenStatusEntry.AsObject; + static toObject(includeInstance: boolean, msg: TokenStatusEntry): TokenStatusEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenStatusEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenStatusEntry; + static deserializeBinaryFromReader(message: TokenStatusEntry, reader: jspb.BinaryReader): TokenStatusEntry; + } + + export namespace TokenStatusEntry { + export type AsObject = { + tokenId: Uint8Array | string, + paused: boolean, + } + } + + export class TokenStatuses extends jspb.Message { + clearTokenStatusesList(): void; + getTokenStatusesList(): Array; + setTokenStatusesList(value: Array): void; + addTokenStatuses(value?: GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry, index?: number): GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenStatuses.AsObject; + static toObject(includeInstance: boolean, msg: TokenStatuses): TokenStatuses.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenStatuses, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenStatuses; + static deserializeBinaryFromReader(message: TokenStatuses, reader: jspb.BinaryReader): TokenStatuses; + } + + export namespace TokenStatuses { + export type AsObject = { + tokenStatusesList: Array, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + TOKEN_STATUSES = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetTokenTotalSupplyRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 | undefined; + setV0(value?: GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0): void; + + getVersionCase(): GetTokenTotalSupplyRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTokenTotalSupplyRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetTokenTotalSupplyRequest): GetTokenTotalSupplyRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTokenTotalSupplyRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTokenTotalSupplyRequest; + static deserializeBinaryFromReader(message: GetTokenTotalSupplyRequest, reader: jspb.BinaryReader): GetTokenTotalSupplyRequest; +} + +export namespace GetTokenTotalSupplyRequest { + export type AsObject = { + v0?: GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.AsObject, + } + + export class GetTokenTotalSupplyRequestV0 extends jspb.Message { + getTokenId(): Uint8Array | string; + getTokenId_asU8(): Uint8Array; + getTokenId_asB64(): string; + setTokenId(value: Uint8Array | string): void; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTokenTotalSupplyRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetTokenTotalSupplyRequestV0): GetTokenTotalSupplyRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTokenTotalSupplyRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTokenTotalSupplyRequestV0; + static deserializeBinaryFromReader(message: GetTokenTotalSupplyRequestV0, reader: jspb.BinaryReader): GetTokenTotalSupplyRequestV0; + } + + export namespace GetTokenTotalSupplyRequestV0 { + export type AsObject = { + tokenId: Uint8Array | string, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetTokenTotalSupplyResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 | undefined; + setV0(value?: GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0): void; + + getVersionCase(): GetTokenTotalSupplyResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTokenTotalSupplyResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetTokenTotalSupplyResponse): GetTokenTotalSupplyResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTokenTotalSupplyResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTokenTotalSupplyResponse; + static deserializeBinaryFromReader(message: GetTokenTotalSupplyResponse, reader: jspb.BinaryReader): GetTokenTotalSupplyResponse; +} + +export namespace GetTokenTotalSupplyResponse { + export type AsObject = { + v0?: GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.AsObject, + } + + export class GetTokenTotalSupplyResponseV0 extends jspb.Message { + hasTokenTotalSupply(): boolean; + clearTokenTotalSupply(): void; + getTokenTotalSupply(): GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry | undefined; + setTokenTotalSupply(value?: GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetTokenTotalSupplyResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetTokenTotalSupplyResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetTokenTotalSupplyResponseV0): GetTokenTotalSupplyResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetTokenTotalSupplyResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetTokenTotalSupplyResponseV0; + static deserializeBinaryFromReader(message: GetTokenTotalSupplyResponseV0, reader: jspb.BinaryReader): GetTokenTotalSupplyResponseV0; + } + + export namespace GetTokenTotalSupplyResponseV0 { + export type AsObject = { + tokenTotalSupply?: GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class TokenTotalSupplyEntry extends jspb.Message { + getTokenId(): Uint8Array | string; + getTokenId_asU8(): Uint8Array; + getTokenId_asB64(): string; + setTokenId(value: Uint8Array | string): void; + + getTotalAggregatedAmountInUserAccounts(): number; + setTotalAggregatedAmountInUserAccounts(value: number): void; + + getTotalSystemAmount(): number; + setTotalSystemAmount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenTotalSupplyEntry.AsObject; + static toObject(includeInstance: boolean, msg: TokenTotalSupplyEntry): TokenTotalSupplyEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenTotalSupplyEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenTotalSupplyEntry; + static deserializeBinaryFromReader(message: TokenTotalSupplyEntry, reader: jspb.BinaryReader): TokenTotalSupplyEntry; + } + + export namespace TokenTotalSupplyEntry { + export type AsObject = { + tokenId: Uint8Array | string, + totalAggregatedAmountInUserAccounts: number, + totalSystemAmount: number, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + TOKEN_TOTAL_SUPPLY = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetGroupInfoRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetGroupInfoRequest.GetGroupInfoRequestV0 | undefined; + setV0(value?: GetGroupInfoRequest.GetGroupInfoRequestV0): void; + + getVersionCase(): GetGroupInfoRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupInfoRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupInfoRequest): GetGroupInfoRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupInfoRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupInfoRequest; + static deserializeBinaryFromReader(message: GetGroupInfoRequest, reader: jspb.BinaryReader): GetGroupInfoRequest; +} + +export namespace GetGroupInfoRequest { + export type AsObject = { + v0?: GetGroupInfoRequest.GetGroupInfoRequestV0.AsObject, + } + + export class GetGroupInfoRequestV0 extends jspb.Message { + getContractId(): Uint8Array | string; + getContractId_asU8(): Uint8Array; + getContractId_asB64(): string; + setContractId(value: Uint8Array | string): void; + + getGroupContractPosition(): number; + setGroupContractPosition(value: number): void; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupInfoRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupInfoRequestV0): GetGroupInfoRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupInfoRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupInfoRequestV0; + static deserializeBinaryFromReader(message: GetGroupInfoRequestV0, reader: jspb.BinaryReader): GetGroupInfoRequestV0; + } + + export namespace GetGroupInfoRequestV0 { + export type AsObject = { + contractId: Uint8Array | string, + groupContractPosition: number, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetGroupInfoResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetGroupInfoResponse.GetGroupInfoResponseV0 | undefined; + setV0(value?: GetGroupInfoResponse.GetGroupInfoResponseV0): void; + + getVersionCase(): GetGroupInfoResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupInfoResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupInfoResponse): GetGroupInfoResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupInfoResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupInfoResponse; + static deserializeBinaryFromReader(message: GetGroupInfoResponse, reader: jspb.BinaryReader): GetGroupInfoResponse; +} + +export namespace GetGroupInfoResponse { + export type AsObject = { + v0?: GetGroupInfoResponse.GetGroupInfoResponseV0.AsObject, + } + + export class GetGroupInfoResponseV0 extends jspb.Message { + hasGroupInfo(): boolean; + clearGroupInfo(): void; + getGroupInfo(): GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo | undefined; + setGroupInfo(value?: GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetGroupInfoResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupInfoResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupInfoResponseV0): GetGroupInfoResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupInfoResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupInfoResponseV0; + static deserializeBinaryFromReader(message: GetGroupInfoResponseV0, reader: jspb.BinaryReader): GetGroupInfoResponseV0; + } + + export namespace GetGroupInfoResponseV0 { + export type AsObject = { + groupInfo?: GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class GroupMemberEntry extends jspb.Message { + getMemberId(): Uint8Array | string; + getMemberId_asU8(): Uint8Array; + getMemberId_asB64(): string; + setMemberId(value: Uint8Array | string): void; + + getPower(): number; + setPower(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupMemberEntry.AsObject; + static toObject(includeInstance: boolean, msg: GroupMemberEntry): GroupMemberEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupMemberEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupMemberEntry; + static deserializeBinaryFromReader(message: GroupMemberEntry, reader: jspb.BinaryReader): GroupMemberEntry; + } + + export namespace GroupMemberEntry { + export type AsObject = { + memberId: Uint8Array | string, + power: number, + } + } + + export class GroupInfoEntry extends jspb.Message { + clearMembersList(): void; + getMembersList(): Array; + setMembersList(value: Array): void; + addMembers(value?: GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry, index?: number): GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry; + + getGroupRequiredPower(): number; + setGroupRequiredPower(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupInfoEntry.AsObject; + static toObject(includeInstance: boolean, msg: GroupInfoEntry): GroupInfoEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupInfoEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupInfoEntry; + static deserializeBinaryFromReader(message: GroupInfoEntry, reader: jspb.BinaryReader): GroupInfoEntry; + } + + export namespace GroupInfoEntry { + export type AsObject = { + membersList: Array, + groupRequiredPower: number, + } + } + + export class GroupInfo extends jspb.Message { + hasGroupInfo(): boolean; + clearGroupInfo(): void; + getGroupInfo(): GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry | undefined; + setGroupInfo(value?: GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupInfo.AsObject; + static toObject(includeInstance: boolean, msg: GroupInfo): GroupInfo.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupInfo, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupInfo; + static deserializeBinaryFromReader(message: GroupInfo, reader: jspb.BinaryReader): GroupInfo; + } + + export namespace GroupInfo { + export type AsObject = { + groupInfo?: GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.AsObject, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + GROUP_INFO = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetGroupInfosRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetGroupInfosRequest.GetGroupInfosRequestV0 | undefined; + setV0(value?: GetGroupInfosRequest.GetGroupInfosRequestV0): void; + + getVersionCase(): GetGroupInfosRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupInfosRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupInfosRequest): GetGroupInfosRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupInfosRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupInfosRequest; + static deserializeBinaryFromReader(message: GetGroupInfosRequest, reader: jspb.BinaryReader): GetGroupInfosRequest; +} + +export namespace GetGroupInfosRequest { + export type AsObject = { + v0?: GetGroupInfosRequest.GetGroupInfosRequestV0.AsObject, + } + + export class StartAtGroupContractPosition extends jspb.Message { + getStartGroupContractPosition(): number; + setStartGroupContractPosition(value: number): void; + + getStartGroupContractPositionIncluded(): boolean; + setStartGroupContractPositionIncluded(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StartAtGroupContractPosition.AsObject; + static toObject(includeInstance: boolean, msg: StartAtGroupContractPosition): StartAtGroupContractPosition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StartAtGroupContractPosition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StartAtGroupContractPosition; + static deserializeBinaryFromReader(message: StartAtGroupContractPosition, reader: jspb.BinaryReader): StartAtGroupContractPosition; + } + + export namespace StartAtGroupContractPosition { + export type AsObject = { + startGroupContractPosition: number, + startGroupContractPositionIncluded: boolean, + } + } + + export class GetGroupInfosRequestV0 extends jspb.Message { + getContractId(): Uint8Array | string; + getContractId_asU8(): Uint8Array; + getContractId_asB64(): string; + setContractId(value: Uint8Array | string): void; + + hasStartAtGroupContractPosition(): boolean; + clearStartAtGroupContractPosition(): void; + getStartAtGroupContractPosition(): GetGroupInfosRequest.StartAtGroupContractPosition | undefined; + setStartAtGroupContractPosition(value?: GetGroupInfosRequest.StartAtGroupContractPosition): void; + + hasCount(): boolean; + clearCount(): void; + getCount(): number; + setCount(value: number): void; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupInfosRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupInfosRequestV0): GetGroupInfosRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupInfosRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupInfosRequestV0; + static deserializeBinaryFromReader(message: GetGroupInfosRequestV0, reader: jspb.BinaryReader): GetGroupInfosRequestV0; + } + + export namespace GetGroupInfosRequestV0 { + export type AsObject = { + contractId: Uint8Array | string, + startAtGroupContractPosition?: GetGroupInfosRequest.StartAtGroupContractPosition.AsObject, + count: number, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetGroupInfosResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetGroupInfosResponse.GetGroupInfosResponseV0 | undefined; + setV0(value?: GetGroupInfosResponse.GetGroupInfosResponseV0): void; + + getVersionCase(): GetGroupInfosResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupInfosResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupInfosResponse): GetGroupInfosResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupInfosResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupInfosResponse; + static deserializeBinaryFromReader(message: GetGroupInfosResponse, reader: jspb.BinaryReader): GetGroupInfosResponse; +} + +export namespace GetGroupInfosResponse { + export type AsObject = { + v0?: GetGroupInfosResponse.GetGroupInfosResponseV0.AsObject, + } + + export class GetGroupInfosResponseV0 extends jspb.Message { + hasGroupInfos(): boolean; + clearGroupInfos(): void; + getGroupInfos(): GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos | undefined; + setGroupInfos(value?: GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetGroupInfosResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupInfosResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupInfosResponseV0): GetGroupInfosResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupInfosResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupInfosResponseV0; + static deserializeBinaryFromReader(message: GetGroupInfosResponseV0, reader: jspb.BinaryReader): GetGroupInfosResponseV0; + } + + export namespace GetGroupInfosResponseV0 { + export type AsObject = { + groupInfos?: GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class GroupMemberEntry extends jspb.Message { + getMemberId(): Uint8Array | string; + getMemberId_asU8(): Uint8Array; + getMemberId_asB64(): string; + setMemberId(value: Uint8Array | string): void; + + getPower(): number; + setPower(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupMemberEntry.AsObject; + static toObject(includeInstance: boolean, msg: GroupMemberEntry): GroupMemberEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupMemberEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupMemberEntry; + static deserializeBinaryFromReader(message: GroupMemberEntry, reader: jspb.BinaryReader): GroupMemberEntry; + } + + export namespace GroupMemberEntry { + export type AsObject = { + memberId: Uint8Array | string, + power: number, + } + } + + export class GroupPositionInfoEntry extends jspb.Message { + getGroupContractPosition(): number; + setGroupContractPosition(value: number): void; + + clearMembersList(): void; + getMembersList(): Array; + setMembersList(value: Array): void; + addMembers(value?: GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry, index?: number): GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry; + + getGroupRequiredPower(): number; + setGroupRequiredPower(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupPositionInfoEntry.AsObject; + static toObject(includeInstance: boolean, msg: GroupPositionInfoEntry): GroupPositionInfoEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupPositionInfoEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupPositionInfoEntry; + static deserializeBinaryFromReader(message: GroupPositionInfoEntry, reader: jspb.BinaryReader): GroupPositionInfoEntry; + } + + export namespace GroupPositionInfoEntry { + export type AsObject = { + groupContractPosition: number, + membersList: Array, + groupRequiredPower: number, + } + } + + export class GroupInfos extends jspb.Message { + clearGroupInfosList(): void; + getGroupInfosList(): Array; + setGroupInfosList(value: Array): void; + addGroupInfos(value?: GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry, index?: number): GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupInfos.AsObject; + static toObject(includeInstance: boolean, msg: GroupInfos): GroupInfos.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupInfos, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupInfos; + static deserializeBinaryFromReader(message: GroupInfos, reader: jspb.BinaryReader): GroupInfos; + } + + export namespace GroupInfos { + export type AsObject = { + groupInfosList: Array, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + GROUP_INFOS = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetGroupActionsRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetGroupActionsRequest.GetGroupActionsRequestV0 | undefined; + setV0(value?: GetGroupActionsRequest.GetGroupActionsRequestV0): void; + + getVersionCase(): GetGroupActionsRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupActionsRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupActionsRequest): GetGroupActionsRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupActionsRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupActionsRequest; + static deserializeBinaryFromReader(message: GetGroupActionsRequest, reader: jspb.BinaryReader): GetGroupActionsRequest; +} + +export namespace GetGroupActionsRequest { + export type AsObject = { + v0?: GetGroupActionsRequest.GetGroupActionsRequestV0.AsObject, + } + + export class StartAtActionId extends jspb.Message { + getStartActionId(): Uint8Array | string; + getStartActionId_asU8(): Uint8Array; + getStartActionId_asB64(): string; + setStartActionId(value: Uint8Array | string): void; + + getStartActionIdIncluded(): boolean; + setStartActionIdIncluded(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): StartAtActionId.AsObject; + static toObject(includeInstance: boolean, msg: StartAtActionId): StartAtActionId.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: StartAtActionId, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): StartAtActionId; + static deserializeBinaryFromReader(message: StartAtActionId, reader: jspb.BinaryReader): StartAtActionId; + } + + export namespace StartAtActionId { + export type AsObject = { + startActionId: Uint8Array | string, + startActionIdIncluded: boolean, + } + } + + export class GetGroupActionsRequestV0 extends jspb.Message { + getContractId(): Uint8Array | string; + getContractId_asU8(): Uint8Array; + getContractId_asB64(): string; + setContractId(value: Uint8Array | string): void; + + getGroupContractPosition(): number; + setGroupContractPosition(value: number): void; + + getStatus(): GetGroupActionsRequest.ActionStatusMap[keyof GetGroupActionsRequest.ActionStatusMap]; + setStatus(value: GetGroupActionsRequest.ActionStatusMap[keyof GetGroupActionsRequest.ActionStatusMap]): void; + + hasStartAtActionId(): boolean; + clearStartAtActionId(): void; + getStartAtActionId(): GetGroupActionsRequest.StartAtActionId | undefined; + setStartAtActionId(value?: GetGroupActionsRequest.StartAtActionId): void; + + hasCount(): boolean; + clearCount(): void; + getCount(): number; + setCount(value: number): void; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupActionsRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupActionsRequestV0): GetGroupActionsRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupActionsRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupActionsRequestV0; + static deserializeBinaryFromReader(message: GetGroupActionsRequestV0, reader: jspb.BinaryReader): GetGroupActionsRequestV0; + } + + export namespace GetGroupActionsRequestV0 { + export type AsObject = { + contractId: Uint8Array | string, + groupContractPosition: number, + status: GetGroupActionsRequest.ActionStatusMap[keyof GetGroupActionsRequest.ActionStatusMap], + startAtActionId?: GetGroupActionsRequest.StartAtActionId.AsObject, + count: number, + prove: boolean, + } + } + + export interface ActionStatusMap { + ACTIVE: 0; + CLOSED: 1; + } + + export const ActionStatus: ActionStatusMap; + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetGroupActionsResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetGroupActionsResponse.GetGroupActionsResponseV0 | undefined; + setV0(value?: GetGroupActionsResponse.GetGroupActionsResponseV0): void; + + getVersionCase(): GetGroupActionsResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupActionsResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupActionsResponse): GetGroupActionsResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupActionsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupActionsResponse; + static deserializeBinaryFromReader(message: GetGroupActionsResponse, reader: jspb.BinaryReader): GetGroupActionsResponse; +} + +export namespace GetGroupActionsResponse { + export type AsObject = { + v0?: GetGroupActionsResponse.GetGroupActionsResponseV0.AsObject, + } + + export class GetGroupActionsResponseV0 extends jspb.Message { + hasGroupActions(): boolean; + clearGroupActions(): void; + getGroupActions(): GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions | undefined; + setGroupActions(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetGroupActionsResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupActionsResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupActionsResponseV0): GetGroupActionsResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupActionsResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupActionsResponseV0; + static deserializeBinaryFromReader(message: GetGroupActionsResponseV0, reader: jspb.BinaryReader): GetGroupActionsResponseV0; + } + + export namespace GetGroupActionsResponseV0 { + export type AsObject = { + groupActions?: GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class MintEvent extends jspb.Message { + getAmount(): number; + setAmount(value: number): void; + + getRecipientId(): Uint8Array | string; + getRecipientId_asU8(): Uint8Array; + getRecipientId_asB64(): string; + setRecipientId(value: Uint8Array | string): void; + + hasPublicNote(): boolean; + clearPublicNote(): void; + getPublicNote(): string; + setPublicNote(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MintEvent.AsObject; + static toObject(includeInstance: boolean, msg: MintEvent): MintEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: MintEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): MintEvent; + static deserializeBinaryFromReader(message: MintEvent, reader: jspb.BinaryReader): MintEvent; + } + + export namespace MintEvent { + export type AsObject = { + amount: number, + recipientId: Uint8Array | string, + publicNote: string, + } + } + + export class BurnEvent extends jspb.Message { + getAmount(): number; + setAmount(value: number): void; + + hasPublicNote(): boolean; + clearPublicNote(): void; + getPublicNote(): string; + setPublicNote(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BurnEvent.AsObject; + static toObject(includeInstance: boolean, msg: BurnEvent): BurnEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BurnEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BurnEvent; + static deserializeBinaryFromReader(message: BurnEvent, reader: jspb.BinaryReader): BurnEvent; + } + + export namespace BurnEvent { + export type AsObject = { + amount: number, + publicNote: string, + } + } + + export class FreezeEvent extends jspb.Message { + getFrozenId(): Uint8Array | string; + getFrozenId_asU8(): Uint8Array; + getFrozenId_asB64(): string; + setFrozenId(value: Uint8Array | string): void; + + hasPublicNote(): boolean; + clearPublicNote(): void; + getPublicNote(): string; + setPublicNote(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FreezeEvent.AsObject; + static toObject(includeInstance: boolean, msg: FreezeEvent): FreezeEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FreezeEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FreezeEvent; + static deserializeBinaryFromReader(message: FreezeEvent, reader: jspb.BinaryReader): FreezeEvent; + } + + export namespace FreezeEvent { + export type AsObject = { + frozenId: Uint8Array | string, + publicNote: string, + } + } + + export class UnfreezeEvent extends jspb.Message { + getFrozenId(): Uint8Array | string; + getFrozenId_asU8(): Uint8Array; + getFrozenId_asB64(): string; + setFrozenId(value: Uint8Array | string): void; + + hasPublicNote(): boolean; + clearPublicNote(): void; + getPublicNote(): string; + setPublicNote(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UnfreezeEvent.AsObject; + static toObject(includeInstance: boolean, msg: UnfreezeEvent): UnfreezeEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UnfreezeEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UnfreezeEvent; + static deserializeBinaryFromReader(message: UnfreezeEvent, reader: jspb.BinaryReader): UnfreezeEvent; + } + + export namespace UnfreezeEvent { + export type AsObject = { + frozenId: Uint8Array | string, + publicNote: string, + } + } + + export class DestroyFrozenFundsEvent extends jspb.Message { + getFrozenId(): Uint8Array | string; + getFrozenId_asU8(): Uint8Array; + getFrozenId_asB64(): string; + setFrozenId(value: Uint8Array | string): void; + + getAmount(): number; + setAmount(value: number): void; + + hasPublicNote(): boolean; + clearPublicNote(): void; + getPublicNote(): string; + setPublicNote(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DestroyFrozenFundsEvent.AsObject; + static toObject(includeInstance: boolean, msg: DestroyFrozenFundsEvent): DestroyFrozenFundsEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DestroyFrozenFundsEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DestroyFrozenFundsEvent; + static deserializeBinaryFromReader(message: DestroyFrozenFundsEvent, reader: jspb.BinaryReader): DestroyFrozenFundsEvent; + } + + export namespace DestroyFrozenFundsEvent { + export type AsObject = { + frozenId: Uint8Array | string, + amount: number, + publicNote: string, + } + } + + export class SharedEncryptedNote extends jspb.Message { + getSenderKeyIndex(): number; + setSenderKeyIndex(value: number): void; + + getRecipientKeyIndex(): number; + setRecipientKeyIndex(value: number): void; + + getEncryptedData(): Uint8Array | string; + getEncryptedData_asU8(): Uint8Array; + getEncryptedData_asB64(): string; + setEncryptedData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SharedEncryptedNote.AsObject; + static toObject(includeInstance: boolean, msg: SharedEncryptedNote): SharedEncryptedNote.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SharedEncryptedNote, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SharedEncryptedNote; + static deserializeBinaryFromReader(message: SharedEncryptedNote, reader: jspb.BinaryReader): SharedEncryptedNote; + } + + export namespace SharedEncryptedNote { + export type AsObject = { + senderKeyIndex: number, + recipientKeyIndex: number, + encryptedData: Uint8Array | string, + } + } + + export class PersonalEncryptedNote extends jspb.Message { + getRootEncryptionKeyIndex(): number; + setRootEncryptionKeyIndex(value: number): void; + + getDerivationEncryptionKeyIndex(): number; + setDerivationEncryptionKeyIndex(value: number): void; + + getEncryptedData(): Uint8Array | string; + getEncryptedData_asU8(): Uint8Array; + getEncryptedData_asB64(): string; + setEncryptedData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PersonalEncryptedNote.AsObject; + static toObject(includeInstance: boolean, msg: PersonalEncryptedNote): PersonalEncryptedNote.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PersonalEncryptedNote, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PersonalEncryptedNote; + static deserializeBinaryFromReader(message: PersonalEncryptedNote, reader: jspb.BinaryReader): PersonalEncryptedNote; + } + + export namespace PersonalEncryptedNote { + export type AsObject = { + rootEncryptionKeyIndex: number, + derivationEncryptionKeyIndex: number, + encryptedData: Uint8Array | string, + } + } + + export class TransferEvent extends jspb.Message { + getRecipientId(): Uint8Array | string; + getRecipientId_asU8(): Uint8Array; + getRecipientId_asB64(): string; + setRecipientId(value: Uint8Array | string): void; + + hasPublicNote(): boolean; + clearPublicNote(): void; + getPublicNote(): string; + setPublicNote(value: string): void; + + hasSharedEncryptedNote(): boolean; + clearSharedEncryptedNote(): void; + getSharedEncryptedNote(): GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote | undefined; + setSharedEncryptedNote(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote): void; + + hasPersonalEncryptedNote(): boolean; + clearPersonalEncryptedNote(): void; + getPersonalEncryptedNote(): GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote | undefined; + setPersonalEncryptedNote(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote): void; + + getAmount(): number; + setAmount(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TransferEvent.AsObject; + static toObject(includeInstance: boolean, msg: TransferEvent): TransferEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TransferEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TransferEvent; + static deserializeBinaryFromReader(message: TransferEvent, reader: jspb.BinaryReader): TransferEvent; + } + + export namespace TransferEvent { + export type AsObject = { + recipientId: Uint8Array | string, + publicNote: string, + sharedEncryptedNote?: GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.AsObject, + personalEncryptedNote?: GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.AsObject, + amount: number, + } + } + + export class EmergencyActionEvent extends jspb.Message { + getActionType(): GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionTypeMap[keyof GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionTypeMap]; + setActionType(value: GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionTypeMap[keyof GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionTypeMap]): void; + + hasPublicNote(): boolean; + clearPublicNote(): void; + getPublicNote(): string; + setPublicNote(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EmergencyActionEvent.AsObject; + static toObject(includeInstance: boolean, msg: EmergencyActionEvent): EmergencyActionEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EmergencyActionEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EmergencyActionEvent; + static deserializeBinaryFromReader(message: EmergencyActionEvent, reader: jspb.BinaryReader): EmergencyActionEvent; + } + + export namespace EmergencyActionEvent { + export type AsObject = { + actionType: GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionTypeMap[keyof GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionTypeMap], + publicNote: string, + } + + export interface ActionTypeMap { + PAUSE: 0; + RESUME: 1; + } + + export const ActionType: ActionTypeMap; + } + + export class TokenConfigUpdateEvent extends jspb.Message { + getTokenConfigUpdateItem(): Uint8Array | string; + getTokenConfigUpdateItem_asU8(): Uint8Array; + getTokenConfigUpdateItem_asB64(): string; + setTokenConfigUpdateItem(value: Uint8Array | string): void; + + hasPublicNote(): boolean; + clearPublicNote(): void; + getPublicNote(): string; + setPublicNote(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenConfigUpdateEvent.AsObject; + static toObject(includeInstance: boolean, msg: TokenConfigUpdateEvent): TokenConfigUpdateEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenConfigUpdateEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenConfigUpdateEvent; + static deserializeBinaryFromReader(message: TokenConfigUpdateEvent, reader: jspb.BinaryReader): TokenConfigUpdateEvent; + } + + export namespace TokenConfigUpdateEvent { + export type AsObject = { + tokenConfigUpdateItem: Uint8Array | string, + publicNote: string, + } + } + + export class GroupActionEvent extends jspb.Message { + hasTokenEvent(): boolean; + clearTokenEvent(): void; + getTokenEvent(): GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent | undefined; + setTokenEvent(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent): void; + + hasDocumentEvent(): boolean; + clearDocumentEvent(): void; + getDocumentEvent(): GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent | undefined; + setDocumentEvent(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent): void; + + hasContractEvent(): boolean; + clearContractEvent(): void; + getContractEvent(): GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent | undefined; + setContractEvent(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent): void; + + getEventTypeCase(): GroupActionEvent.EventTypeCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupActionEvent.AsObject; + static toObject(includeInstance: boolean, msg: GroupActionEvent): GroupActionEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupActionEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupActionEvent; + static deserializeBinaryFromReader(message: GroupActionEvent, reader: jspb.BinaryReader): GroupActionEvent; + } + + export namespace GroupActionEvent { + export type AsObject = { + tokenEvent?: GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.AsObject, + documentEvent?: GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.AsObject, + contractEvent?: GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.AsObject, + } + + export enum EventTypeCase { + EVENT_TYPE_NOT_SET = 0, + TOKEN_EVENT = 1, + DOCUMENT_EVENT = 2, + CONTRACT_EVENT = 3, + } + } + + export class DocumentEvent extends jspb.Message { + hasCreate(): boolean; + clearCreate(): void; + getCreate(): GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent | undefined; + setCreate(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent): void; + + getTypeCase(): DocumentEvent.TypeCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DocumentEvent.AsObject; + static toObject(includeInstance: boolean, msg: DocumentEvent): DocumentEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DocumentEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DocumentEvent; + static deserializeBinaryFromReader(message: DocumentEvent, reader: jspb.BinaryReader): DocumentEvent; + } + + export namespace DocumentEvent { + export type AsObject = { + create?: GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.AsObject, + } + + export enum TypeCase { + TYPE_NOT_SET = 0, + CREATE = 1, + } + } + + export class DocumentCreateEvent extends jspb.Message { + getCreatedDocument(): Uint8Array | string; + getCreatedDocument_asU8(): Uint8Array; + getCreatedDocument_asB64(): string; + setCreatedDocument(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DocumentCreateEvent.AsObject; + static toObject(includeInstance: boolean, msg: DocumentCreateEvent): DocumentCreateEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DocumentCreateEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DocumentCreateEvent; + static deserializeBinaryFromReader(message: DocumentCreateEvent, reader: jspb.BinaryReader): DocumentCreateEvent; + } + + export namespace DocumentCreateEvent { + export type AsObject = { + createdDocument: Uint8Array | string, + } + } + + export class ContractUpdateEvent extends jspb.Message { + getUpdatedContract(): Uint8Array | string; + getUpdatedContract_asU8(): Uint8Array; + getUpdatedContract_asB64(): string; + setUpdatedContract(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractUpdateEvent.AsObject; + static toObject(includeInstance: boolean, msg: ContractUpdateEvent): ContractUpdateEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractUpdateEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractUpdateEvent; + static deserializeBinaryFromReader(message: ContractUpdateEvent, reader: jspb.BinaryReader): ContractUpdateEvent; + } + + export namespace ContractUpdateEvent { + export type AsObject = { + updatedContract: Uint8Array | string, + } + } + + export class ContractEvent extends jspb.Message { + hasUpdate(): boolean; + clearUpdate(): void; + getUpdate(): GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent | undefined; + setUpdate(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent): void; + + getTypeCase(): ContractEvent.TypeCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractEvent.AsObject; + static toObject(includeInstance: boolean, msg: ContractEvent): ContractEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractEvent; + static deserializeBinaryFromReader(message: ContractEvent, reader: jspb.BinaryReader): ContractEvent; + } + + export namespace ContractEvent { + export type AsObject = { + update?: GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.AsObject, + } + + export enum TypeCase { + TYPE_NOT_SET = 0, + UPDATE = 1, + } + } + + export class TokenEvent extends jspb.Message { + hasMint(): boolean; + clearMint(): void; + getMint(): GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent | undefined; + setMint(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent): void; + + hasBurn(): boolean; + clearBurn(): void; + getBurn(): GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent | undefined; + setBurn(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent): void; + + hasFreeze(): boolean; + clearFreeze(): void; + getFreeze(): GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent | undefined; + setFreeze(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent): void; + + hasUnfreeze(): boolean; + clearUnfreeze(): void; + getUnfreeze(): GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent | undefined; + setUnfreeze(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent): void; + + hasDestroyFrozenFunds(): boolean; + clearDestroyFrozenFunds(): void; + getDestroyFrozenFunds(): GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent | undefined; + setDestroyFrozenFunds(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent): void; + + hasTransfer(): boolean; + clearTransfer(): void; + getTransfer(): GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent | undefined; + setTransfer(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent): void; + + hasEmergencyAction(): boolean; + clearEmergencyAction(): void; + getEmergencyAction(): GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent | undefined; + setEmergencyAction(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent): void; + + hasTokenConfigUpdate(): boolean; + clearTokenConfigUpdate(): void; + getTokenConfigUpdate(): GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent | undefined; + setTokenConfigUpdate(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent): void; + + getTypeCase(): TokenEvent.TypeCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TokenEvent.AsObject; + static toObject(includeInstance: boolean, msg: TokenEvent): TokenEvent.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TokenEvent, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TokenEvent; + static deserializeBinaryFromReader(message: TokenEvent, reader: jspb.BinaryReader): TokenEvent; + } + + export namespace TokenEvent { + export type AsObject = { + mint?: GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.AsObject, + burn?: GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.AsObject, + freeze?: GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.AsObject, + unfreeze?: GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.AsObject, + destroyFrozenFunds?: GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.AsObject, + transfer?: GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.AsObject, + emergencyAction?: GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.AsObject, + tokenConfigUpdate?: GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.AsObject, + } + + export enum TypeCase { + TYPE_NOT_SET = 0, + MINT = 1, + BURN = 2, + FREEZE = 3, + UNFREEZE = 4, + DESTROY_FROZEN_FUNDS = 5, + TRANSFER = 6, + EMERGENCY_ACTION = 7, + TOKEN_CONFIG_UPDATE = 8, + } + } + + export class GroupActionEntry extends jspb.Message { + getActionId(): Uint8Array | string; + getActionId_asU8(): Uint8Array; + getActionId_asB64(): string; + setActionId(value: Uint8Array | string): void; + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent | undefined; + setEvent(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupActionEntry.AsObject; + static toObject(includeInstance: boolean, msg: GroupActionEntry): GroupActionEntry.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupActionEntry, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupActionEntry; + static deserializeBinaryFromReader(message: GroupActionEntry, reader: jspb.BinaryReader): GroupActionEntry; + } + + export namespace GroupActionEntry { + export type AsObject = { + actionId: Uint8Array | string, + event?: GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.AsObject, + } + } + + export class GroupActions extends jspb.Message { + clearGroupActionsList(): void; + getGroupActionsList(): Array; + setGroupActionsList(value: Array): void; + addGroupActions(value?: GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry, index?: number): GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupActions.AsObject; + static toObject(includeInstance: boolean, msg: GroupActions): GroupActions.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupActions, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupActions; + static deserializeBinaryFromReader(message: GroupActions, reader: jspb.BinaryReader): GroupActions; + } + + export namespace GroupActions { + export type AsObject = { + groupActionsList: Array, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + GROUP_ACTIONS = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetGroupActionSignersRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 | undefined; + setV0(value?: GetGroupActionSignersRequest.GetGroupActionSignersRequestV0): void; + + getVersionCase(): GetGroupActionSignersRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupActionSignersRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupActionSignersRequest): GetGroupActionSignersRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupActionSignersRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupActionSignersRequest; + static deserializeBinaryFromReader(message: GetGroupActionSignersRequest, reader: jspb.BinaryReader): GetGroupActionSignersRequest; +} + +export namespace GetGroupActionSignersRequest { + export type AsObject = { + v0?: GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.AsObject, + } + + export class GetGroupActionSignersRequestV0 extends jspb.Message { + getContractId(): Uint8Array | string; + getContractId_asU8(): Uint8Array; + getContractId_asB64(): string; + setContractId(value: Uint8Array | string): void; + + getGroupContractPosition(): number; + setGroupContractPosition(value: number): void; + + getStatus(): GetGroupActionSignersRequest.ActionStatusMap[keyof GetGroupActionSignersRequest.ActionStatusMap]; + setStatus(value: GetGroupActionSignersRequest.ActionStatusMap[keyof GetGroupActionSignersRequest.ActionStatusMap]): void; + + getActionId(): Uint8Array | string; + getActionId_asU8(): Uint8Array; + getActionId_asB64(): string; + setActionId(value: Uint8Array | string): void; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupActionSignersRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupActionSignersRequestV0): GetGroupActionSignersRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupActionSignersRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupActionSignersRequestV0; + static deserializeBinaryFromReader(message: GetGroupActionSignersRequestV0, reader: jspb.BinaryReader): GetGroupActionSignersRequestV0; + } + + export namespace GetGroupActionSignersRequestV0 { + export type AsObject = { + contractId: Uint8Array | string, + groupContractPosition: number, + status: GetGroupActionSignersRequest.ActionStatusMap[keyof GetGroupActionSignersRequest.ActionStatusMap], + actionId: Uint8Array | string, + prove: boolean, + } + } + + export interface ActionStatusMap { + ACTIVE: 0; + CLOSED: 1; + } + + export const ActionStatus: ActionStatusMap; + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetGroupActionSignersResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 | undefined; + setV0(value?: GetGroupActionSignersResponse.GetGroupActionSignersResponseV0): void; + + getVersionCase(): GetGroupActionSignersResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupActionSignersResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupActionSignersResponse): GetGroupActionSignersResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupActionSignersResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupActionSignersResponse; + static deserializeBinaryFromReader(message: GetGroupActionSignersResponse, reader: jspb.BinaryReader): GetGroupActionSignersResponse; +} + +export namespace GetGroupActionSignersResponse { + export type AsObject = { + v0?: GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.AsObject, + } + + export class GetGroupActionSignersResponseV0 extends jspb.Message { + hasGroupActionSigners(): boolean; + clearGroupActionSigners(): void; + getGroupActionSigners(): GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners | undefined; + setGroupActionSigners(value?: GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetGroupActionSignersResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetGroupActionSignersResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetGroupActionSignersResponseV0): GetGroupActionSignersResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetGroupActionSignersResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetGroupActionSignersResponseV0; + static deserializeBinaryFromReader(message: GetGroupActionSignersResponseV0, reader: jspb.BinaryReader): GetGroupActionSignersResponseV0; + } + + export namespace GetGroupActionSignersResponseV0 { + export type AsObject = { + groupActionSigners?: GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export class GroupActionSigner extends jspb.Message { + getSignerId(): Uint8Array | string; + getSignerId_asU8(): Uint8Array; + getSignerId_asB64(): string; + setSignerId(value: Uint8Array | string): void; + + getPower(): number; + setPower(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupActionSigner.AsObject; + static toObject(includeInstance: boolean, msg: GroupActionSigner): GroupActionSigner.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupActionSigner, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupActionSigner; + static deserializeBinaryFromReader(message: GroupActionSigner, reader: jspb.BinaryReader): GroupActionSigner; + } + + export namespace GroupActionSigner { + export type AsObject = { + signerId: Uint8Array | string, + power: number, + } + } + + export class GroupActionSigners extends jspb.Message { + clearSignersList(): void; + getSignersList(): Array; + setSignersList(value: Array): void; + addSigners(value?: GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner, index?: number): GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GroupActionSigners.AsObject; + static toObject(includeInstance: boolean, msg: GroupActionSigners): GroupActionSigners.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GroupActionSigners, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GroupActionSigners; + static deserializeBinaryFromReader(message: GroupActionSigners, reader: jspb.BinaryReader): GroupActionSigners; + } + + export namespace GroupActionSigners { + export type AsObject = { + signersList: Array, + } + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + GROUP_ACTION_SIGNERS = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + export interface KeyPurposeMap { AUTHENTICATION: 0; ENCRYPTION: 1; 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 ca80ce2ad7..32492c8ade 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js @@ -139,6 +139,69 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlock 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.GetGroupActionSignersRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.TypeCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.TypeCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.EventTypeCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.TypeCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.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.VersionCase', null, { proto }); @@ -158,6 +221,25 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResp goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase', null, { proto }); @@ -209,6 +291,25 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse', null, { goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetPathElementsRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase', null, { proto }); @@ -231,6 +332,9 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsReq goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase', null, { proto }); @@ -273,6 +377,23 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusRe goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase', null, { proto }); @@ -1652,6 +1773,69 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest'; } +/** + * 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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest'; +} +/** + * 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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest'; +} +/** + * 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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -4256,382 +4440,19185 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0'; } - - - -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.GetIdentityTokenBalancesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest'; +} /** - * 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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.repeatedFields_, null); }; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0'; } - - /** - * 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.GetIdentityTokenBalancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse'; +} /** - * 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} + * 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.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; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0'; +} /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * 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.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry'; +} /** - * 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 + * 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.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 - ); - } +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.repeatedFields_, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances'; +} /** - * optional bytes grovedb_proof = 1; - * @return {string} + * 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.getGrovedbProof = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest'; +} /** - * optional bytes grovedb_proof = 1; - * This is a type-conversion wrapper around `getGrovedbProof()` - * @return {string} + * 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.getGrovedbProof_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getGrovedbProof())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.repeatedFields_, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0'; +} /** - * 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} + * 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.getGrovedbProof_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getGrovedbProof())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse'; +} /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * 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.setGrovedbProof = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0'; +} /** - * optional bytes quorum_hash = 2; - * @return {string} + * 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.getQuorumHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry'; +} /** - * optional bytes quorum_hash = 2; - * This is a type-conversion wrapper around `getQuorumHash()` - * @return {string} + * 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.getQuorumHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getQuorumHash())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.repeatedFields_, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances'; +} /** - * 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} + * 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.getQuorumHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getQuorumHash())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest'; +} /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * 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.setQuorumHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.repeatedFields_, null); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0'; +} /** - * optional bytes signature = 3; - * @return {string} + * 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.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse'; +} /** - * optional bytes signature = 3; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} + * 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.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.oneofGroups_); }; - - +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0'; +} /** - * 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} - */ + * 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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry'; +} +/** + * 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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry'; +} +/** + * 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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos'; +} +/** + * 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.GetIdentitiesTokenInfosRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest'; +} +/** + * 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.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0'; +} +/** + * 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.GetIdentitiesTokenInfosResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse'; +} +/** + * 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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0'; +} +/** + * 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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry'; +} +/** + * 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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry'; +} +/** + * 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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.displayName = 'proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos'; +} +/** + * 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.GetTokenStatusesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest'; +} +/** + * 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.GetTokenStatusesRequest.GetTokenStatusesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0'; +} +/** + * 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.GetTokenStatusesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse'; +} +/** + * 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.GetTokenStatusesResponse.GetTokenStatusesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0'; +} +/** + * 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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry'; +} +/** + * 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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses'; +} +/** + * 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.GetTokenTotalSupplyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest'; +} +/** + * 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.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0'; +} +/** + * 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.GetTokenTotalSupplyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse'; +} +/** + * 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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0'; +} +/** + * 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.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry'; +} +/** + * 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.GetGroupInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoRequest'; +} +/** + * 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.GetGroupInfoRequest.GetGroupInfoRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0'; +} +/** + * 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.GetGroupInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoResponse'; +} +/** + * 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.GetGroupInfoResponse.GetGroupInfoResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0'; +} +/** + * 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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry'; +} +/** + * 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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry'; +} +/** + * 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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo'; +} +/** + * 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.GetGroupInfosRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosRequest'; +} +/** + * 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.GetGroupInfosRequest.StartAtGroupContractPosition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition'; +} +/** + * 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.GetGroupInfosRequest.GetGroupInfosRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0'; +} +/** + * 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.GetGroupInfosResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosResponse'; +} +/** + * 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.GetGroupInfosResponse.GetGroupInfosResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0'; +} +/** + * 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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry'; +} +/** + * 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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry'; +} +/** + * 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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos'; +} +/** + * 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.GetGroupActionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsRequest'; +} +/** + * 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.GetGroupActionsRequest.StartAtActionId = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId'; +} +/** + * 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.GetGroupActionsRequest.GetGroupActionsRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0'; +} +/** + * 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.GetGroupActionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry'; +} +/** + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions'; +} +/** + * 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.GetGroupActionSignersRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest'; +} +/** + * 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.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0'; +} +/** + * 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.GetGroupActionSignersResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse'; +} +/** + * 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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0'; +} +/** + * 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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner'; +} +/** + * 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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.displayName = 'proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners'; +} + + + +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())); + 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.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; + } + 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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequestV0} 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) { + 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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.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.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetIdentityBalanceAndRevisionRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + */ +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)); +}; + + +/** + * @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); +}; + + +/** + * 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); +}; + + +/** + * 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; +}; + + + +/** + * 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.GetIdentityResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +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])); +}; + + + +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.GetIdentityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityResponse.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.GetIdentityResponse} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.GetIdentityResponse} + */ +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.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.GetIdentityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.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.GetIdentityResponse.GetIdentityResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.GetIdentityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityResponse.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} 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) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITY: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase} + */ +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. + * 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.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.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.GetIdentityResponse.GetIdentityResponseV0.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) + }; + + 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.GetIdentityResponse.GetIdentityResponseV0} + */ +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.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.GetIdentityResponse.GetIdentityResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.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); + 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.GetIdentityResponse.GetIdentityResponseV0.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; +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +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 {?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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.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.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)); +}; + + +/** + * @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); +}; + + +/** + * 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.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentityResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} + */ +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)); +}; + + +/** + * @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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityResponse.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.GetIdentityNonceResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +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])); +}; + + + +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.GetIdentityNonceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.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.GetIdentityNonceResponse} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.GetIdentityNonceResponse} + */ +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.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.GetIdentityNonceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} + */ +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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.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.GetIdentityNonceResponse} 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) { + 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 +}; + +/** + * @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])); +}; + + + +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.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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) + }; + + 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.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + */ +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.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.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.GetIdentityNonceResponse.GetIdentityNonceResponseV0} 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) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 identity_nonce = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getIdentityNonce = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + */ +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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + */ +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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasIdentityNonce = 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.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)); +}; + + +/** + * @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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * 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; +}; + + +/** + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + */ +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)); +}; + + +/** + * @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.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentityNonceResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + */ +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.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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.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.GetIdentityContractNonceResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase} + */ +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])); +}; + + + +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.GetIdentityContractNonceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.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.GetIdentityContractNonceResponse} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse} + */ +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.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.GetIdentityContractNonceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.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.GetIdentityContractNonceResponse} 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) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + 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) { +/** + * 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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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) + }; + + 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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + */ +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.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.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); + 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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} 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) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint64( + 1, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 identity_contract_nonce = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getIdentityContractNonce = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + */ +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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + */ +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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasIdentityContractNonce = 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.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.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)); +}; + + +/** + * @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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * 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.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.GetIdentityContractNonceResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.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.GetIdentityBalanceResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.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])); +}; + + + +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.GetIdentityBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.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.GetIdentityBalanceResponse} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse} + */ +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.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.GetIdentityBalanceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.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.GetIdentityBalanceResponse} 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) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + 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) { +/** + * 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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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) + }; + + 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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + */ +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.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.setBalance(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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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 + ); + } +}; + + +/** + * optional uint64 balance = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} 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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} 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); +}; + + +/** + * 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; +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +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); +}; + + +/** + * 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.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.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.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); +}; + + +/** + * 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.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); +}; + + +/** + * 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.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; +}; +} + + +/** + * 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.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); +}; + + +/** + * 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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +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(); +}; + + +/** + * 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.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 + ); + } +}; + + + +/** + * 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.GetIdentityBalanceAndRevisionResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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])); +}; + + + +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.GetIdentityBalanceAndRevisionResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + 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) { + 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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + */ +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.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} 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) { + var f = undefined; + f = message.getBalanceAndRevision(); + if (f != null) { + writer.writeMessage( + 1, + f, + 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 + ); + } +}; + + + + + +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.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.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.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.toObject = function(includeInstance, msg) { + var f, obj = { + balance: jspb.Message.getFieldWithDefault(msg, 1, 0), + revision: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} + */ +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.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.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.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.setBalance(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevision(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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} 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) { + var f = undefined; + f = message.getBalance(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getRevision(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 balance = 1; + * @return {number} + */ +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 uint64 revision = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.getRevision = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 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.setRevision = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional BalanceAndRevision balance_and_revision = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} + */ +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)); +}; + + +/** + * @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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearBalanceAndRevision = function() { + return this.setBalanceAndRevision(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasBalanceAndRevision = 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.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.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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.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)); +}; + + +/** + * @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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentityBalanceAndRevisionResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + */ +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)); +}; + + +/** + * @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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.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.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])); +}; + + + +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.KeyRequestType.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.KeyRequestType.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.KeyRequestType} 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) { + 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) + }; + + 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.KeyRequestType} + */ +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.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.KeyRequestType} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} + */ +proto.org.dash.platform.dapi.v0.KeyRequestType.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.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); + 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.KeyRequestType.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.KeyRequestType.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 + */ +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 + ); + } +}; + + +/** + * optional AllKeys all_keys = 1; + * @return {?proto.org.dash.platform.dapi.v0.AllKeys} + */ +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)); +}; + + +/** + * @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.KeyRequestType.prototype.clearAllKeys = function() { + return this.setAllKeys(undefined); +}; + + +/** + * 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; +}; + + +/** + * optional SpecificKeys specific_keys = 2; + * @return {?proto.org.dash.platform.dapi.v0.SpecificKeys} + */ +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)); +}; + + +/** + * @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.KeyRequestType.prototype.clearSpecificKeys = function() { + return this.setSpecificKeys(undefined); +}; + + +/** + * 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; +}; + + +/** + * optional SearchKey search_key = 3; + * @return {?proto.org.dash.platform.dapi.v0.SearchKey} + */ +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.SearchKey|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} 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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + */ +proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSearchKey = function() { + return this.setSearchKey(undefined); +}; + + +/** + * 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; +}; + + + + + +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.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(); +}; + + +/** + * 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.AllKeys.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.SpecificKeys.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.SpecificKeys.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.SpecificKeys} 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) { + var f, obj = { + keyIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.SpecificKeys} + */ +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.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.SpecificKeys} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} + */ +proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + 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]); + } + 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.SpecificKeys.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.SpecificKeys.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.SpecificKeys} 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) { + var f = undefined; + f = message.getKeyIdsList(); + if (f.length > 0) { + writer.writePackedUint32( + 1, + 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)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this + */ +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.setKeyIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this + */ +proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.addKeyIds = 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.SpecificKeys} returns this + */ +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. + * 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.SearchKey.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.SearchKey.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.SearchKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.SearchKey} + */ +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); +}; + + +/** + * 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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +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(); +}; + + +/** + * 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.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); + } +}; + + +/** + * 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 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.SearchKey.prototype.clearPurposeMapMap = function() { + this.getPurposeMapMap().clear(); + return this;}; + + + + + +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.SecurityLevelMap.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.SecurityLevelMap.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.SecurityLevelMap} 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) { + var f, obj = { + securityLevelMapMap: (f = msg.getSecurityLevelMapMap()) ? f.toObject(includeInstance, undefined) : [] + }; + + 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.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); +}; + + +/** + * 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.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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +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(); +}; + + +/** + * 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.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); + } +}; + + +/** + * @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 + * 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.GetIdentityKeysRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase} + */ +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])); +}; + + + +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.GetIdentityKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.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.GetIdentityKeysRequest} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.GetIdentityKeysRequest} + */ +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.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.GetIdentityKeysRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.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.GetIdentityKeysRequest.GetIdentityKeysRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.GetIdentityKeysRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.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.GetIdentityKeysRequest} 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) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.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.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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) + }; + + 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.GetIdentityKeysRequest.GetIdentityKeysRequestV0} + */ +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.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.GetIdentityKeysRequest.GetIdentityKeysRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.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); + 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.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.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.GetIdentityKeysRequest.GetIdentityKeysRequestV0} 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) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getRequestType(); + if (f != null) { + writer.writeMessage( + 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 + ); + } +}; + + +/** + * 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} + */ +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.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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.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.GetIdentityKeysResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @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) { +/** + * 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.GetIdentityKeysResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.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.GetIdentityKeysResponse} 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) { + 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; +}; +} + + +/** + * 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.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); +}; + + +/** + * 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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +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(); +}; + + +/** + * 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.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 + ); + } +}; + + + +/** + * 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.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + KEYS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase} + */ +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])); +}; + + + +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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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) + }; + + 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.GetIdentityKeysResponse.GetIdentityKeysResponseV0} + */ +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.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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); + 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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0} 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) { + var f = undefined; + 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( + 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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.toObject = function(includeInstance, msg) { + var f, obj = { + 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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} + */ +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.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.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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.addKeysBytes(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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.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.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} 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) { + var f = undefined; + f = message.getKeysBytesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes keys_bytes = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes keys_bytes = 1; + * This is a type-conversion wrapper around `getKeysBytesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getKeysBytesList())); +}; + + +/** + * 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.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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasKeys = 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.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)); +}; + + +/** + * @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); +}; + + +/** + * 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.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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.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)); +}; + + +/** + * @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); +}; + + +/** + * 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.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * 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; +}; + + +/** + * optional GetIdentityKeysResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} + */ +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.GetIdentityKeysResponse.GetIdentityKeysResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} 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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.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.GetIdentitiesContractKeysRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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])); +}; + + + +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.GetIdentitiesContractKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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.GetIdentitiesContractKeysRequest} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.GetIdentitiesContractKeysRequest} + */ +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.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.GetIdentitiesContractKeysRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.GetIdentitiesContractKeysRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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} 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) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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) { +/** + * 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.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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) + }; + + 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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + */ +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.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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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; + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * 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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string document_type_name = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getDocumentTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearDocumentTypeName = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.hasDocumentTypeName = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated KeyPurpose purposes = 4; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getPurposesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @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.KeyPurpose} 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.addPurposes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, 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.clearPurposesList = function() { + return this.setPurposesList([]); +}; + + +/** + * optional bool prove = 5; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional GetIdentitiesContractKeysRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + */ +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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} 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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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.GetIdentitiesContractKeysResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.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])); +}; + + + +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.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.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} 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) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.GetIdentitiesContractKeysResponse} + */ +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.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.GetIdentitiesContractKeysResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.GetIdentitiesContractKeysResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.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} 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) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITIES_KEYS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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])); +}; + + + +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.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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} 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) { + var f, obj = { + 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) + }; + + 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} + */ +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.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.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; + 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; + 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.PurposeKeys.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.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.PurposeKeys} 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) { + var f = undefined; + f = message.getPurpose(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getKeysBytesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } +}; + + +/** + * 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) { +/** + * 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); +}; + + +/** + * 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; +}; +} + + +/** + * 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.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); +}; + + +/** + * 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.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 bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * repeated PurposeKeys keys = 2; + * @return {!Array} + */ +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 {!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 {!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.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); +}; + + +/** + * 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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.clearKeysList = function() { + return this.setKeysList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.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.IdentitiesKeys} 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) { + var f, obj = { + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} + */ +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.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.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + 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.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasIdentitiesKeys = 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.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.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} 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); +}; + + +/** + * 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.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.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.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this +*/ +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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentitiesContractKeysResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} + */ +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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} 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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +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) { +/** + * 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.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.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.GetEvonodesProposedEpochBlocksByIdsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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) { + 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.GetEvonodesProposedEpochBlocksByIdsRequest} + */ +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.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.GetEvonodesProposedEpochBlocksByIdsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} + */ +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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.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.GetEvonodesProposedEpochBlocksByIdsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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 + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.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.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), + idsList: msg.getIdsList_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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} + */ +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.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.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.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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + 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 + ); + } +}; + + +/** + * 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.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.clearEpoch = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.hasEpoch = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * 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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + */ +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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.clearIdsList = function() { + return this.setIdsList([]); +}; + + +/** + * optional bool prove = 3; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional GetEvonodesProposedEpochBlocksByIdsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} + */ +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)); +}; + + +/** + * @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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.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.GetEvonodesProposedEpochBlocksResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +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])); +}; + + + +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.GetEvonodesProposedEpochBlocksResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.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.GetEvonodesProposedEpochBlocksResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse} + */ +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.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.GetEvonodesProposedEpochBlocksResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.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.GetEvonodesProposedEpochBlocksResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.ResultCase} + */ +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])); +}; + + + +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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + 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) { + 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} + */ +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.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + 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( + 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.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.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject = function(includeInstance, msg) { + var f, obj = { + proTxHash: msg.getProTxHash_asB64(), + count: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} + */ +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.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.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.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.setProTxHash(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProTxHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getCount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes pro_tx_hash = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * 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())); +}; + + +/** + * 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProTxHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.setProTxHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 count = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.toObject = function(includeInstance, msg) { + var f, obj = { + evonodesProposedBlockCountsList: jspb.Message.toObjectList(msg.getEvonodesProposedBlockCountsList(), + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} + */ +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.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.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinaryFromReader); + msg.addEvonodesProposedBlockCounts(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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvonodesProposedBlockCountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + 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 + * 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.GetEvonodesProposedEpochBlocksByRangeRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase} + */ +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])); +}; + + + +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.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.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.GetEvonodesProposedEpochBlocksByRangeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.GetEvonodesProposedEpochBlocksByRangeRequest} + */ +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.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.GetEvonodesProposedEpochBlocksByRangeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} + */ +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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.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.GetEvonodesProposedEpochBlocksByRangeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.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])); +}; + + + +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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + 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) { + 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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} + */ +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.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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.setEpoch(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLimit(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + 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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + 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 + ); + } +}; + + +/** + * optional uint32 epoch = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setEpoch = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearEpoch = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasEpoch = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 limit = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearLimit = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasLimit = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes start_after = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * 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())); +}; + + +/** + * 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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartAfter())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +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); +}; + + +/** + * 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; +}; + + +/** + * optional bytes start_at = 4; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes start_at = 4; + * This is a type-conversion wrapper around `getStartAt()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartAt())); +}; + + +/** + * 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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartAt())); +}; + + +/** + * @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 field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + */ +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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +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 GetEvonodesProposedEpochBlocksByRangeRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} + */ +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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} returns this +*/ +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.GetEvonodesProposedEpochBlocksByRangeRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.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.GetIdentitiesBalancesRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase} + */ +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])); +}; + + + +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.GetIdentitiesBalancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.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.GetIdentitiesBalancesRequest} + */ +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.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.GetIdentitiesBalancesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.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.GetIdentitiesBalancesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.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.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + idsList: msg.getIdsList_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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} + */ +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.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.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.addIds(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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * repeated bytes ids = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes ids = 1; + * This is a type-conversion wrapper around `getIdsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdsList())); +}; + + +/** + * repeated bytes ids = 1; + * 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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.setIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.addIds = 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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.clearIdsList = function() { + return this.setIdsList([]); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetIdentitiesBalancesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} + */ +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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} returns this +*/ +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.GetIdentitiesBalancesRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase} + */ +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])); +}; + + + +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.GetIdentitiesBalancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesBalancesResponse} + */ +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.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.GetIdentitiesBalancesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesBalancesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITIES_BALANCES: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase} + */ +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])); +}; + + + +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + 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) + }; + + 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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} + */ +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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentitiesBalances(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + balance: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} + */ +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.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.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 {number} */ (reader.readUint64()); + msg.setBalance(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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 balance = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.clearBalance = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.hasBalance = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.toObject = function(includeInstance, msg) { + var f, obj = { + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} + */ +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.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentityBalance entries = 1; + * @return {!Array} + */ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} returns this +*/ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} + */ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + +/** + * optional IdentitiesBalances identities_balances = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} + */ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this +*/ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearIdentitiesBalances = function() { + return this.setIdentitiesBalances(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasIdentitiesBalances = 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.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)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this +*/ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.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)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this +*/ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentitiesBalancesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} + */ +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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} returns this +*/ +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.GetIdentitiesBalancesResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetProofsRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetProofsRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProofsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.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.GetProofsRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest.GetProofsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.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.GetProofsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.repeatedFields_ = [1,2,3,4,5,6,7]; + + + +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.GetProofsRequest.GetProofsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.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.GetProofsRequest.GetProofsRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + identitiesList: jspb.Message.toObjectList(msg.getIdentitiesList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.toObject, includeInstance), + contractsList: jspb.Message.toObjectList(msg.getContractsList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.toObject, includeInstance), + documentsList: jspb.Message.toObjectList(msg.getDocumentsList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.toObject, includeInstance), + votesList: jspb.Message.toObjectList(msg.getVotesList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.toObject, includeInstance), + identityTokenBalancesList: jspb.Message.toObjectList(msg.getIdentityTokenBalancesList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.toObject, includeInstance), + identityTokenInfosList: jspb.Message.toObjectList(msg.getIdentityTokenInfosList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.toObject, includeInstance), + tokenStatusesList: jspb.Message.toObjectList(msg.getTokenStatusesList(), + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.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.GetProofsRequest.GetProofsRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.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.GetProofsRequest.GetProofsRequestV0.IdentityRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.deserializeBinaryFromReader); + msg.addIdentities(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.deserializeBinaryFromReader); + msg.addContracts(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.deserializeBinaryFromReader); + msg.addDocuments(value); + break; + case 4: + var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.deserializeBinaryFromReader); + msg.addVotes(value); + break; + case 5: + var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.deserializeBinaryFromReader); + msg.addIdentityTokenBalances(value); + break; + case 6: + var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.deserializeBinaryFromReader); + msg.addIdentityTokenInfos(value); + break; + case 7: + var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.deserializeBinaryFromReader); + msg.addTokenStatuses(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.GetProofsRequest.GetProofsRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.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.GetProofsRequest.GetProofsRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentitiesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.serializeBinaryToWriter + ); + } + f = message.getContractsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.serializeBinaryToWriter + ); + } + f = message.getDocumentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.serializeBinaryToWriter + ); + } + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.serializeBinaryToWriter + ); + } + f = message.getIdentityTokenBalancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.serializeBinaryToWriter + ); + } + f = message.getIdentityTokenInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.serializeBinaryToWriter + ); + } + f = message.getTokenStatusesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.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.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.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.GetProofsRequest.GetProofsRequestV0.DocumentRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.toObject = function(includeInstance, msg) { + var f, obj = { + contractId: msg.getContractId_asB64(), + documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + documentTypeKeepsHistory: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + documentId: msg.getDocumentId_asB64(), + documentContestedStatus: jspb.Message.getFieldWithDefault(msg, 5, 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.GetProofsRequest.GetProofsRequestV0.DocumentRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.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.GetProofsRequest.GetProofsRequestV0.DocumentRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.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.setContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentType(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDocumentTypeKeepsHistory(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDocumentId(value); + break; + case 5: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} */ (reader.readEnum()); + msg.setDocumentContestedStatus(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.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.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.GetProofsRequest.GetProofsRequestV0.DocumentRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDocumentTypeKeepsHistory(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getDocumentId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getDocumentContestedStatus(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus = { + NOT_CONTESTED: 0, + MAYBE_CONTESTED: 1, + CONTESTED: 2 +}; + +/** + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string document_type = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool document_type_keeps_history = 3; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentTypeKeepsHistory = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentTypeKeepsHistory = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional bytes document_id = 4; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes document_id = 4; + * This is a type-conversion wrapper around `getDocumentId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDocumentId())); +}; + + +/** + * optional bytes document_id = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDocumentId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDocumentId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentId = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional DocumentContestedStatus document_contested_status = 5; + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentContestedStatus = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentContestedStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 5, 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.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + requestType: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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 {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} */ (reader.readEnum()); + msg.setRequestType(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.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getRequestType(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type = { + FULL_IDENTITY: 0, + BALANCE: 1, + KEYS: 2, + REVISION: 3 +}; + +/** + * optional bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional Type request_type = 2; + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.getRequestType = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.setRequestType = function(value) { + return jspb.Message.setProto3EnumField(this, 2, 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.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.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.GetProofsRequest.GetProofsRequestV0.ContractRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.toObject = function(includeInstance, msg) { + var f, obj = { + contractId: msg.getContractId_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.GetProofsRequest.GetProofsRequestV0.ContractRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.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.GetProofsRequest.GetProofsRequestV0.ContractRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.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.setContractId(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.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.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.GetProofsRequest.GetProofsRequestV0.ContractRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.setContractId = 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 + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase = { + REQUEST_TYPE_NOT_SET: 0, + CONTESTED_RESOURCE_VOTE_STATUS_REQUEST: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.getRequestTypeCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + contestedResourceVoteStatusRequest: (f = msg.getContestedResourceVoteStatusRequest()) && proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.deserializeBinaryFromReader); + msg.setContestedResourceVoteStatusRequest(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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContestedResourceVoteStatusRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.repeatedFields_ = [4]; + + + +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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + contractId: msg.getContractId_asB64(), + documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), + indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), + indexValuesList: msg.getIndexValuesList_asB64(), + voterIdentifier: msg.getVoterIdentifier_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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.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.setContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentTypeName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setIndexName(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIndexValues(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setVoterIdentifier(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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentTypeName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIndexName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getIndexValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } + f = message.getVoterIdentifier_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string document_type_name = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getDocumentTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setDocumentTypeName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string index_name = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setIndexName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated bytes index_values = 4; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * repeated bytes index_values = 4; + * This is a type-conversion wrapper around `getIndexValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexValuesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIndexValuesList())); +}; + + +/** + * repeated bytes index_values = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIndexValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexValuesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIndexValuesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setIndexValuesList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.addIndexValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.clearIndexValuesList = function() { + return this.setIndexValuesList([]); +}; + + +/** + * optional bytes voter_identifier = 5; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getVoterIdentifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes voter_identifier = 5; + * This is a type-conversion wrapper around `getVoterIdentifier()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getVoterIdentifier_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getVoterIdentifier())); +}; + + +/** + * optional bytes voter_identifier = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getVoterIdentifier()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getVoterIdentifier_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getVoterIdentifier())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setVoterIdentifier = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional ContestedResourceVoteStatusRequest contested_resource_vote_status_request = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.getContestedResourceVoteStatusRequest = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.setContestedResourceVoteStatusRequest = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.clearContestedResourceVoteStatusRequest = function() { + return this.setContestedResourceVoteStatusRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.hasContestedResourceVoteStatusRequest = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + + +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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tokenId: msg.getTokenId_asB64(), + identityId: msg.getIdentityId_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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.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.setTokenId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setIdentityId(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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes token_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes identity_id = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes identity_id = 2; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); +}; + + +/** + * optional bytes identity_id = 2; + * 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.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, 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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tokenId: msg.getTokenId_asB64(), + identityId: msg.getIdentityId_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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.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.setTokenId(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setIdentityId(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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes token_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes identity_id = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes identity_id = 2; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); +}; + + +/** + * optional bytes identity_id = 2; + * 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.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, 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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tokenId: msg.getTokenId_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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest; + return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.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.setTokenId(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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.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.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes token_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * repeated IdentityRequest identities = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getIdentitiesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setIdentitiesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addIdentities = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearIdentitiesList = function() { + return this.setIdentitiesList([]); +}; + + +/** + * repeated ContractRequest contracts = 2; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getContractsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setContractsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addContracts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearContractsList = function() { + return this.setContractsList([]); +}; + + +/** + * repeated DocumentRequest documents = 3; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getDocumentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setDocumentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addDocuments = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearDocumentsList = function() { + return this.setDocumentsList([]); +}; + + +/** + * repeated VoteStatusRequest votes = 4; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearVotesList = function() { + return this.setVotesList([]); +}; + + +/** + * repeated IdentityTokenBalanceRequest identity_token_balances = 5; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getIdentityTokenBalancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setIdentityTokenBalancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addIdentityTokenBalances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenBalanceRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearIdentityTokenBalancesList = function() { + return this.setIdentityTokenBalancesList([]); +}; + + +/** + * repeated IdentityTokenInfoRequest identity_token_infos = 6; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getIdentityTokenInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setIdentityTokenInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addIdentityTokenInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityTokenInfoRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearIdentityTokenInfosList = function() { + return this.setIdentityTokenInfosList([]); +}; + + +/** + * repeated TokenStatusRequest token_statuses = 7; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getTokenStatusesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setTokenStatusesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addTokenStatuses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.TokenStatusRequest, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearTokenStatusesList = function() { + return this.setTokenStatusesList([]); +}; + + +/** + * optional GetProofsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetProofsResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProofsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetProofsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetProofsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsResponse; + return proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetProofsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetProofsResponse.GetProofsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetProofsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.GetProofsResponseV0.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + PROOF: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.GetProofsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.GetProofsResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0; + return proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.GetProofsResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.Proof; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + case 2: + 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.GetProofsResponse.GetProofsResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.GetProofsResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Proof proof = 1; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ResponseMetadata metadata = 2; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional GetProofsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetDataContractRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractRequest; + return proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest.GetDataContractRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0; + return proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0.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.GetDataContractRequest.GetDataContractRequestV0.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetDataContractRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractResponse; + return proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse.GetDataContractResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + DATA_CONTRACT: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + dataContract: msg.getDataContract_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) { + 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.GetDataContractResponse.GetDataContractResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0; + return proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.setDataContract(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.GetDataContractResponse.GetDataContractResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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 data_contract = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getDataContract = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data_contract = 1; + * This is a type-conversion wrapper around `getDataContract()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getDataContract_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataContract())); +}; + + +/** + * optional bytes data_contract = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataContract()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getDataContract_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDataContract())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.setDataContract = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.clearDataContract = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.hasDataContract = 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.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetDataContractResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractsRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractsRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.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.GetDataContractsRequest} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsRequest; + return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest.GetDataContractsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.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.GetDataContractsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.serializeBinaryToWriter + ); + } +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.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.GetDataContractsRequest.GetDataContractsRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + idsList: msg.getIdsList_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.GetDataContractsRequest.GetDataContractsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0; + return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.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.GetDataContractsRequest.GetDataContractsRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.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.addIds(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.GetDataContractsRequest.GetDataContractsRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.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.GetDataContractsRequest.GetDataContractsRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * repeated bytes ids = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes ids = 1; + * This is a type-conversion wrapper around `getIdsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdsList())); +}; + + +/** + * repeated bytes ids = 1; + * 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.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.setIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.addIds = 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.GetDataContractsRequest.GetDataContractsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.clearIdsList = function() { + return this.setIdsList([]); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetDataContractsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse; + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractsResponse.GetDataContractsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.DataContractEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.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.GetDataContractsResponse.DataContractEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.toObject = function(includeInstance, msg) { + var f, obj = { + identifier: msg.getIdentifier_asB64(), + dataContract: (f = msg.getDataContract()) && google_protobuf_wrappers_pb.BytesValue.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.GetDataContractsResponse.DataContractEntry} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry; + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.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.GetDataContractsResponse.DataContractEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.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.setIdentifier(value); + break; + case 2: + var value = new google_protobuf_wrappers_pb.BytesValue; + reader.readMessage(value,google_protobuf_wrappers_pb.BytesValue.deserializeBinaryFromReader); + msg.setDataContract(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.GetDataContractsResponse.DataContractEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.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.GetDataContractsResponse.DataContractEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentifier_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDataContract(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_wrappers_pb.BytesValue.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes identifier = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getIdentifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes identifier = 1; + * This is a type-conversion wrapper around `getIdentifier()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getIdentifier_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentifier())); +}; + + +/** + * optional bytes identifier = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentifier()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getIdentifier_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentifier())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.setIdentifier = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional google.protobuf.BytesValue data_contract = 2; + * @return {?proto.google.protobuf.BytesValue} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getDataContract = function() { + return /** @type{?proto.google.protobuf.BytesValue} */ ( + jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BytesValue, 2)); +}; + + +/** + * @param {?proto.google.protobuf.BytesValue|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.setDataContract = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.clearDataContract = function() { + return this.setDataContract(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.hasDataContract = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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.GetDataContractsResponse.DataContracts} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.toObject = function(includeInstance, msg) { + var f, obj = { + dataContractEntriesList: jspb.Message.toObjectList(msg.getDataContractEntriesList(), + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts; + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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.GetDataContractsResponse.DataContracts} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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.GetDataContractsResponse.DataContractEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deserializeBinaryFromReader); + msg.addDataContractEntries(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.GetDataContractsResponse.DataContracts.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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.GetDataContractsResponse.DataContracts} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataContractEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DataContractEntry data_contract_entries = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.getDataContractEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.setDataContractEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.addDataContractEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.clearDataContractEntriesList = function() { + return this.setDataContractEntriesList([]); +}; + + + +/** + * 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.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + DATA_CONTRACTS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + dataContracts: (f = msg.getDataContracts()) && proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.toObject(includeInstance, f), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0; + return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.DataContracts; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deserializeBinaryFromReader); + msg.setDataContracts(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.GetDataContractsResponse.GetDataContractsResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataContracts(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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 + ); + } +}; + + +/** + * optional DataContracts data_contracts = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.getDataContracts = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.setDataContracts = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.clearDataContracts = function() { + return this.setDataContracts(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.hasDataContracts = 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.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetDataContractsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractHistoryRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.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.GetDataContractHistoryRequest} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest; + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional uint32 round = 4; - * @return {number} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -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.GetDataContractHistoryRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.serializeBinaryToWriter + ); + } }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} 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.Proof.prototype.setRound = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.toObject(opt_includeInstance, this); }; /** - * optional bytes block_id_hash = 5; + * 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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + id: msg.getId_asB64(), + limit: (f = msg.getLimit()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + offset: (f = msg.getOffset()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + startAtMs: jspb.Message.getFieldWithDefault(msg, 4, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0; + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.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 = new google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setLimit(value); + break; + case 3: + var value = new google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setOffset(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartAtMs(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getLimit(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter + ); + } + f = message.getOffset(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter + ); + } + f = message.getStartAtMs(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional bytes id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes block_id_hash = 5; - * This is a type-conversion wrapper around `getBlockIdHash()` + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getBlockIdHash())); + this.getId())); }; /** - * optional bytes block_id_hash = 5; + * 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 `getBlockIdHash()` + * This is a type-conversion wrapper around `getId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.Proof.prototype.getBlockIdHash_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getBlockIdHash())); + this.getId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.Proof} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.Proof.prototype.setBlockIdHash = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional google.protobuf.UInt32Value limit = 2; + * @return {?proto.google.protobuf.UInt32Value} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getLimit = function() { + return /** @type{?proto.google.protobuf.UInt32Value} */ ( + jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 2)); +}; + + +/** + * @param {?proto.google.protobuf.UInt32Value|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.clearLimit = function() { + return this.setLimit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.hasLimit = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.UInt32Value offset = 3; + * @return {?proto.google.protobuf.UInt32Value} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getOffset = 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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setOffset = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.clearOffset = function() { + return this.setOffset(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.hasOffset = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 start_at_ms = 4; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getStartAtMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setStartAtMs = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bool prove = 5; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional GetDataContractHistoryRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.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.GetDataContractHistoryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.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.GetDataContractHistoryResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse; + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.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.GetDataContractHistoryResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.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.GetDataContractHistoryResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.serializeBinaryToWriter + ); + } }; + /** - * 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_ = [[1,2]]; /** - * @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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + DATA_CONTRACT_HISTORY: 1, + PROOF: 2 }; - +/** + * @return {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_[0])); +}; @@ -4648,8 +23635,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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.toObject(opt_includeInstance, this); }; @@ -4658,18 +23645,15 @@ 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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, "") + dataContractHistory: (f = msg.getDataContractHistory()) && proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.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) { @@ -4683,23 +23667,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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0; + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4707,28 +23691,19 @@ 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); + var value = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.deserializeBinaryFromReader); + msg.setDataContractHistory(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCoreChainLockedHeight(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 {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.ResponseMetadata; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader); + msg.setMetadata(value); break; default: reader.skipField(); @@ -4743,9 +23718,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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4753,166 +23728,231 @@ 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeUint64( + f = message.getDataContractHistory(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.serializeBinaryToWriter ); } - f = message.getCoreChainLockedHeight(); - if (f !== 0) { - writer.writeUint32( + f = message.getProof(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter ); } - f = message.getEpoch(); - if (f !== 0) { - writer.writeUint32( + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( 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.ResponseMetadata.serializeBinaryToWriter ); } }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional uint64 height = 1; - * @return {number} + * 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.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.toObject(opt_includeInstance, this); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.toObject = function(includeInstance, msg) { + var f, obj = { + date: jspb.Message.getFieldWithDefault(msg, 1, 0), + value: msg.getValue_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional uint32 core_chain_locked_height = 2; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getCoreChainLockedHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry; + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setCoreChainLockedHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.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.setDate(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint32 epoch = 3; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getEpoch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setEpoch = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDate(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } }; /** - * optional uint64 time_ms = 4; + * optional uint64 date = 1; * @return {number} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getTimeMs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getDate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} returns this */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setTimeMs = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.setDate = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional uint32 protocol_version = 5; - * @return {number} + * optional bytes value = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getProtocolVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + * optional bytes value = 2; + * This is a type-conversion wrapper around `getValue()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setProtocolVersion = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); }; /** - * optional string chain_id = 6; - * @return {string} + * optional bytes value = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValue()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getChainId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} returns this */ -proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setChainId = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4928,8 +23968,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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.toObject(opt_includeInstance, this); }; @@ -4938,15 +23978,14 @@ 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - data: msg.getData_asB64() + dataContractEntriesList: jspb.Message.toObjectList(msg.getDataContractEntriesList(), + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.toObject, includeInstance) }; if (includeInstance) { @@ -4960,23 +23999,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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory; + return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4984,16 +24023,9 @@ 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); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setData(value); + var value = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinaryFromReader); + msg.addDataContractEntries(value); break; default: reader.skipField(); @@ -5005,130 +24037,250 @@ 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() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataContractEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DataContractHistoryEntry data_contract_entries = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.getDataContractEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.setDataContractEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.addDataContractEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.clearDataContractEntriesList = function() { + return this.setDataContractEntriesList([]); +}; + + +/** + * optional DataContractHistory data_contract_history = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.getDataContractHistory = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.setDataContractHistory = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.clearDataContractHistory = function() { + return this.setDataContractHistory(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.hasDataContractHistory = 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * 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 + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this */ -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 - ); - } +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * optional uint32 code = 1; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + * optional GetDataContractHistoryResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setCode = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0, 1)); }; /** - * 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 {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.oneofGroups_[0], value); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} 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.GetDataContractHistoryResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * optional bytes data = 3; - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.getData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional bytes data = 3; - * This is a type-conversion wrapper around `getData()` - * @return {string} + * 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.StateTransitionBroadcastError.prototype.getData_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getData())); -}; - +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_ = [[1]]; /** - * 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} + * @enum {number} */ -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.GetDocumentsRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; - /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} returns this + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.prototype.setData = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -5142,8 +24294,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.toObject(opt_includeInstance, this); }; @@ -5152,13 +24304,13 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.BroadcastStateTransitionRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} 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) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.toObject = function(includeInstance, msg) { var f, obj = { - stateTransition: msg.getStateTransition_asB64() + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -5172,23 +24324,23 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.toObject = funct /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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 {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5196,8 +24348,9 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinar var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStateTransition(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -5212,9 +24365,9 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.deserializeBinar * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5222,67 +24375,52 @@ proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.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.BroadcastStateTransitionRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} 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) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStateTransition_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getV0(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter ); } }; -/** - * 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} + * 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_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStateTransition())); -}; - +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_ = [[6,7]]; /** - * 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} + * @enum {number} */ -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.GetDocumentsRequest.GetDocumentsRequestV0.StartCase = { + START_NOT_SET: 0, + START_AFTER: 6, + START_AT: 7 }; - /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest} returns this + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest.prototype.setStateTransition = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -5296,8 +24434,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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject(opt_includeInstance, this); }; @@ -5306,13 +24444,20 @@ 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.GetDocumentsRequest.GetDocumentsRequestV0} 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.GetDocumentsRequest.GetDocumentsRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - + dataContractId: msg.getDataContractId_asB64(), + documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + where: msg.getWhere_asB64(), + orderBy: msg.getOrderBy_asB64(), + limit: jspb.Message.getFieldWithDefault(msg, 5, 0), + startAfter: msg.getStartAfter_asB64(), + startAt: msg.getStartAt_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) }; if (includeInstance) { @@ -5326,29 +24471,61 @@ 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.GetDocumentsRequest.GetDocumentsRequestV0} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.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.GetDocumentsRequest.GetDocumentsRequestV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.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.GetDocumentsRequest.GetDocumentsRequestV0} 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.GetDocumentsRequest.GetDocumentsRequestV0} */ -proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDataContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentType(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWhere(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOrderBy(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLimit(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartAfter(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartAt(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; default: reader.skipField(); break; @@ -5362,9 +24539,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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5372,514 +24549,433 @@ 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.GetDocumentsRequest.GetDocumentsRequestV0} 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.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getDataContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWhere_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getOrderBy_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 8, + f + ); + } }; - /** - * 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 bytes data_contract_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + /** - * @enum {number} + * optional bytes data_contract_id = 1; + * This is a type-conversion wrapper around `getDataContractId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataContractId())); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityRequest.VersionCase} + * optional bytes data_contract_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataContractId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDataContractId())); }; - -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} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setDataContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, 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.GetIdentityRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional string document_type = 2; + * @return {string} */ -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; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDocumentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setDocumentType = function(value) { + return jspb.Message.setProto3StringField(this, 2, 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} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} + * optional bytes where = 3; + * @return {string} */ -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; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getWhere = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bytes where = 3; + * This is a type-conversion wrapper around `getWhere()` + * @return {string} */ -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(); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getWhere_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getWhere())); }; /** - * 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 + * optional bytes where = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getWhere()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.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 - ); - } +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getWhere_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getWhere())); }; - - - -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); + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setWhere = function(value) { + return jspb.Message.setProto3BytesField(this, 3, 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.GetIdentityRequest.GetIdentityRequestV0} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional bytes order_by = 4; + * @return {string} */ -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) - }; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getOrderBy = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * optional bytes order_by = 4; + * This is a type-conversion wrapper around `getOrderBy()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getOrderBy_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOrderBy())); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + * optional bytes order_by = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOrderBy()` + * @return {!Uint8Array} */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getOrderBy_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOrderBy())); }; /** - * 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} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} 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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setOrderBy = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint32 limit = 5; + * @return {number} */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * 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 + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional bytes id = 1; + * optional bytes start_after = 6; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAfter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` + * optional bytes start_after = 6; + * This is a type-conversion wrapper around `getStartAfter()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAfter_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + this.getStartAfter())); }; /** - * optional bytes id = 1; + * optional bytes start_after = 6; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` + * This is a type-conversion wrapper around `getStartAfter()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0.prototype.getId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAfter_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); + this.getStartAfter())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setStartAfter = function(value) { + return jspb.Message.setOneofField(this, 6, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], value); }; /** - * optional bool prove = 2; - * @return {boolean} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} 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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.clearStartAfter = function() { + return jspb.Message.setOneofField(this, 6, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], 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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.hasStartAfter = function() { + return jspb.Message.getField(this, 6) != null; }; /** - * optional GetIdentityRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0} + * optional bytes start_at = 7; + * @return {string} */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** - * @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); + * optional bytes start_at = 7; + * This is a type-conversion wrapper around `getStartAt()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAt_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartAt())); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityRequest} returns this + * optional bytes start_at = 7; + * 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.GetIdentityRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAt_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartAt())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setStartAt = function(value) { + return jspb.Message.setOneofField(this, 7, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], 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 + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.clearStartAt = function() { + return jspb.Message.setOneofField(this, 7, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], undefined); +}; + /** - * @enum {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.hasStartAt = function() { + return jspb.Message.getField(this, 7) != null; }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.VersionCase} + * optional bool prove = 8; + * @return {boolean} */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; - -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} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this */ -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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, 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.GetIdentityNonceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional GetDocumentsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} */ -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; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0, 1)); }; -} /** - * 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); + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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.GetIdentityNonceRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} returns this */ -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; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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.GetIdentityNonceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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.GetIdentityNonceRequest} 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.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 - ); - } -}; +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_ = [[1]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_[0])); +}; @@ -5896,8 +24992,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.GetDocumentsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.toObject(opt_includeInstance, this); }; @@ -5906,14 +25002,13 @@ 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.GetDocumentsResponse} 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.GetDocumentsResponse.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -5927,23 +25022,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.GetDocumentsResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.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.GetDocumentsResponse; + return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.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.GetDocumentsResponse} 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.GetDocumentsResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5951,153 +25046,47 @@ 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); - 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); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.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.GetIdentityNonceRequest} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.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.GetDocumentsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.serializeBinaryToWriter + ); + } }; @@ -6110,21 +25099,22 @@ 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.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + DOCUMENTS: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase} */ -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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_[0])); }; @@ -6142,8 +25132,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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.toObject(opt_includeInstance, this); }; @@ -6152,13 +25142,15 @@ 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.GetDocumentsResponse.GetDocumentsResponseV0} 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.GetDocumentsResponse.GetDocumentsResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.toObject(includeInstance, f) + documents: (f = msg.getDocuments()) && proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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) { @@ -6172,23 +25164,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.GetDocumentsResponse.GetDocumentsResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.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.GetDocumentsResponse.GetDocumentsResponseV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.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.GetDocumentsResponse.GetDocumentsResponseV0} 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.GetDocumentsResponse.GetDocumentsResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6196,9 +25188,19 @@ 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); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.deserializeBinaryFromReader); + msg.setDocuments(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(); @@ -6213,9 +25215,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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6223,24 +25225,47 @@ 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.GetDocumentsResponse.GetDocumentsResponseV0} 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.GetDocumentsResponse.GetDocumentsResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getDocuments(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -6256,8 +25281,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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.toObject(opt_includeInstance, this); }; @@ -6266,15 +25291,13 @@ 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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} 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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - contractId: msg.getContractId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + documentsList: msg.getDocumentsList_asB64() }; if (includeInstance) { @@ -6288,23 +25311,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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents; + return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} 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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6313,15 +25336,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContr 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); + msg.addDocuments(value); break; default: reader.skipField(); @@ -6336,9 +25351,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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6346,162 +25361,218 @@ 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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} 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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); + f = message.getDocumentsList_asU8(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedBytes( 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} + * repeated bytes documents = 1; + * @return {!Array} */ -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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.getDocumentsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * optional bytes identity_id = 1; - * This is a type-conversion wrapper around `getIdentityId()` - * @return {string} + * repeated bytes documents = 1; + * This is a type-conversion wrapper around `getDocumentsList()` + * @return {!Array} */ -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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.getDocumentsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getDocumentsList())); }; /** - * optional bytes identity_id = 1; + * repeated bytes documents = 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} + * This is a type-conversion wrapper around `getDocumentsList()` + * @return {!Array} */ -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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.getDocumentsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getDocumentsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.setDocumentsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} returns this + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} returns this */ -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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.addDocuments = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * optional bytes contract_id = 2; - * @return {string} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} returns this */ -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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.clearDocumentsList = function() { + return this.setDocumentsList([]); }; /** - * optional bytes contract_id = 2; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} + * optional Documents documents = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} */ -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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.getDocuments = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents, 1)); }; /** - * 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} + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.setDocuments = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this */ -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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.clearDocuments = function() { + return this.setDocuments(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.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.hasDocuments = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bool prove = 3; + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.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.GetDocumentsResponse.GetDocumentsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.clearProof = function() { + return this.setProof(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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {boolean} 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.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.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 GetIdentityContractNonceRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0} + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.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.GetDocumentsResponse.GetDocumentsResponseV0} returns this */ -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.GetDocumentsResponse.GetDocumentsResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} returns this + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetDocumentsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse} 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); +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -6510,7 +25581,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.clearV * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -6524,21 +25595,21 @@ 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.GetIdentityByPublicKeyHashRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.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])); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.oneofGroups_[0])); }; @@ -6556,8 +25627,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.GetIdentityByPublicKeyHashRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.toObject(opt_includeInstance, this); }; @@ -6566,13 +25637,13 @@ 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.GetIdentityByPublicKeyHashRequest} 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.GetIdentityByPublicKeyHashRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -6586,23 +25657,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.GetIdentityByPublicKeyHashRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.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.GetIdentityByPublicKeyHashRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.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.GetIdentityByPublicKeyHashRequest} 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.GetIdentityByPublicKeyHashRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6610,8 +25681,8 @@ 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); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -6627,9 +25698,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.GetIdentityByPublicKeyHashRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6637,18 +25708,18 @@ 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.GetIdentityByPublicKeyHashRequest} 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.GetIdentityByPublicKeyHashRequest.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 + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.serializeBinaryToWriter ); } }; @@ -6670,8 +25741,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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.toObject(opt_includeInstance, this); }; @@ -6680,13 +25751,13 @@ 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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} 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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), + publicKeyHash: msg.getPublicKeyHash_asB64(), prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; @@ -6701,23 +25772,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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} 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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6726,7 +25797,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + msg.setPublicKeyHash(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); @@ -6745,9 +25816,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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6755,13 +25826,13 @@ 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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} 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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); + f = message.getPublicKeyHash_asU8(); if (f.length > 0) { writer.writeBytes( 1, @@ -6779,43 +25850,43 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ /** - * optional bytes id = 1; + * optional bytes public_key_hash = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getPublicKeyHash = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` + * optional bytes public_key_hash = 1; + * This is a type-conversion wrapper around `getPublicKeyHash()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getPublicKeyHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + this.getPublicKeyHash())); }; /** - * optional bytes id = 1; + * optional bytes public_key_hash = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` + * This is a type-conversion wrapper around `getPublicKeyHash()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getPublicKeyHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); + this.getPublicKeyHash())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.setId = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.setPublicKeyHash = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -6824,44 +25895,44 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequ * optional bool prove = 2; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.getProve = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.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 + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0.prototype.setProve = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.setProve = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetIdentityBalanceRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0} + * optional GetIdentityByPublicKeyHashRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} */ -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.GetIdentityByPublicKeyHashRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0, 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); + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.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.GetIdentityByPublicKeyHashRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -6870,7 +25941,7 @@ 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() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -6884,21 +25955,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.prototype.hasV0 = func * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.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])); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_[0])); }; @@ -6916,8 +25987,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * 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); +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.toObject(opt_includeInstance, this); }; @@ -6926,13 +25997,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.t * @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. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} 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) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -6946,23 +26017,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.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); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.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 {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6970,8 +26041,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserialize 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); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -6987,9 +26058,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.deserialize * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6997,24 +26068,50 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.s /** * 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 {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} 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) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITY: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -7030,8 +26127,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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.toObject(opt_includeInstance, this); }; @@ -7040,14 +26137,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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} 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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + 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) { @@ -7061,23 +26159,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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} 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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7086,11 +26184,17 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentity switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + msg.setIdentity(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(); @@ -7105,9 +26209,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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7115,113 +26219,196 @@ 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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} 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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { writer.writeBytes( 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 id = 1; + * optional bytes identity = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getIdentity = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` + * optional bytes identity = 1; + * This is a type-conversion wrapper around `getIdentity()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getIdentity_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + this.getIdentity())); }; /** - * optional bytes id = 1; + * 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 `getId()` + * This is a type-conversion wrapper around `getIdentity()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0.prototype.getId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getIdentity_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); + this.getIdentity())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this */ -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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.setIdentity = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0], value); }; /** - * optional bool prove = 2; + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.clearIdentity = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.hasIdentity = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} returns this + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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 GetIdentityBalanceAndRevisionRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0} + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this */ -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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest} returns this + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} 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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityBalanceAndRevisionRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetIdentityByPublicKeyHashResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -7230,7 +26417,7 @@ 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() { +proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -7244,21 +26431,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.prototype.h * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.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])); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_[0])); }; @@ -7276,8 +26463,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.WaitForStateTransitionResultRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.toObject(opt_includeInstance, this); }; @@ -7286,13 +26473,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.WaitForStateTransitionResultRequest} 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.WaitForStateTransitionResultRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -7306,23 +26493,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.WaitForStateTransitionResultRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.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.WaitForStateTransitionResultRequest; + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.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.WaitForStateTransitionResultRequest} 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.WaitForStateTransitionResultRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7330,8 +26517,8 @@ 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); + var value = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -7347,9 +26534,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.WaitForStateTransitionResultRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7357,50 +26544,24 @@ 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.WaitForStateTransitionResultRequest} 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.WaitForStateTransitionResultRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.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.GetIdentityResponse.GetIdentityResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - IDENTITY: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.ResultCase} - */ -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) { @@ -7416,8 +26577,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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.toObject(opt_includeInstance, this); }; @@ -7426,15 +26587,14 @@ 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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} 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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.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) + stateTransitionHash: msg.getStateTransitionHash_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -7448,23 +26608,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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0; + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} 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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7473,17 +26633,11 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.deseri switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentity(value); + msg.setStateTransitionHash(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 {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -7498,206 +26652,123 @@ 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() { - 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; -}; - - -/** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} - */ -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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @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); + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStateTransitionHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this + * optional bytes state_transition_hash = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getStateTransitionHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes state_transition_hash = 1; + * This is a type-conversion wrapper around `getStateTransitionHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getStateTransitionHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStateTransitionHash())); }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * optional bytes state_transition_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStateTransitionHash()` + * @return {!Uint8Array} */ -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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getStateTransitionHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStateTransitionHash())); }; /** - * @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); + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.setStateTransitionHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} returns this + * optional bool prove = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetIdentityResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0} + * optional WaitForStateTransitionResultRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} */ -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.WaitForStateTransitionResultRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} 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); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -7706,7 +26777,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.clearV0 = function * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -7720,21 +26791,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.WaitForStateTransitionResultResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.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.WaitForStateTransitionResultResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_[0])); }; @@ -7752,8 +26823,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.WaitForStateTransitionResultResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.toObject(opt_includeInstance, this); }; @@ -7762,13 +26833,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.WaitForStateTransitionResultResponse} 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.WaitForStateTransitionResultResponse.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -7782,23 +26853,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.WaitForStateTransitionResultResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.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.WaitForStateTransitionResultResponse; + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.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.WaitForStateTransitionResultResponse} 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.WaitForStateTransitionResultResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7806,8 +26877,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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -7823,9 +26894,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.WaitForStateTransitionResultResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7833,18 +26904,18 @@ 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.WaitForStateTransitionResultResponse} 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.WaitForStateTransitionResultResponse.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 + proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.serializeBinaryToWriter ); } }; @@ -7859,22 +26930,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.serializeBinaryToWriter * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.ResultCase = { RESULT_NOT_SET: 0, - IDENTITY_NONCE: 1, + ERROR: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.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])); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_[0])); }; @@ -7892,8 +26963,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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.toObject(opt_includeInstance, this); }; @@ -7902,13 +26973,13 @@ 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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} 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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - identityNonce: jspb.Message.getFieldWithDefault(msg, 1, 0), + error: (f = msg.getError()) && proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.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) }; @@ -7924,23 +26995,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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0; + return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} 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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7948,8 +27019,9 @@ 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 = new proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryFromReader); + msg.setError(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -7974,9 +27046,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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7984,17 +27056,18 @@ 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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} 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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); + f = message.getError(); if (f != null) { - writer.writeUint64( + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.serializeBinaryToWriter ); } f = message.getProof(); @@ -8017,29 +27090,30 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons /** - * optional uint64 identity_nonce = 1; - * @return {number} + * optional StateTransitionBroadcastError error = 1; + * @return {?proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} */ -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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getError = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError, 1)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this - */ -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); + * @param {?proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.setError = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_[0], value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this */ -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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.clearError = function() { + return this.setError(undefined); }; @@ -8047,7 +27121,7 @@ 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.hasIdentityNonce = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.hasError = function() { return jspb.Message.getField(this, 1) != null; }; @@ -8056,7 +27130,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -8064,18 +27138,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} 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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -8084,7 +27158,7 @@ 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() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -8093,7 +27167,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -8101,18 +27175,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceRespons /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.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 + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -8121,35 +27195,35 @@ 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.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetIdentityNonceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0} + * optional WaitForStateTransitionResultResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} */ -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.WaitForStateTransitionResultResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} 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); +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -8158,7 +27232,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.clearV0 = fun * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityNonceResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -8172,21 +27246,21 @@ 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.GetConsensusParamsRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.VersionCase} */ -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.GetConsensusParamsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.oneofGroups_[0])); }; @@ -8204,8 +27278,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.GetConsensusParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.toObject(opt_includeInstance, this); }; @@ -8214,13 +27288,13 @@ 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.GetConsensusParamsRequest} 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.GetConsensusParamsRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -8234,23 +27308,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.GetConsensusParamsRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.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.GetConsensusParamsRequest; + return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.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.GetConsensusParamsRequest} 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.GetConsensusParamsRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8258,8 +27332,8 @@ 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); + var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -8275,9 +27349,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.GetConsensusParamsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8285,50 +27359,24 @@ 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.GetConsensusParamsRequest} 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.GetConsensusParamsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.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) { @@ -8344,8 +27392,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.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.toObject(opt_includeInstance, this); }; @@ -8354,15 +27402,14 @@ 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.GetConsensusParamsRequest.GetConsensusParamsRequestV0} 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.GetConsensusParamsRequest.GetConsensusParamsRequestV0.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) + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -8374,234 +27421,145 @@ 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} - */ -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.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} - */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.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); - 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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.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.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} 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) { - var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint64( - 1, - f - ); - } - f = message.getProof(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter - ); - } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter - ); - } -}; - - -/** - * optional uint64 identity_contract_nonce = 1; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.getIdentityContractNonce = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this - */ -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); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this - */ -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); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasIdentityContractNonce = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} */ -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)); +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0; + return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinaryFromReader(msg, reader); }; /** - * @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); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.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.GetConsensusParamsRequest.GetConsensusParamsRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * optional int32 height = 1; + * @return {number} */ -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)); +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @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); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} returns this + * optional bool prove = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetIdentityContractNonceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0} + * optional GetConsensusParamsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} */ -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.GetConsensusParamsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0, 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.GetConsensusParamsRequest.GetConsensusParamsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest} 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.GetConsensusParamsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.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.GetConsensusParamsRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -8610,7 +27568,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.GetConsensusParamsRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -8624,21 +27582,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.GetConsensusParamsResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetConsensusParamsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_[0])); }; @@ -8656,8 +27614,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.GetConsensusParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.toObject(opt_includeInstance, this); }; @@ -8666,13 +27624,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.GetConsensusParamsResponse} 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.GetConsensusParamsResponse.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.GetConsensusParamsResponse.GetConsensusParamsResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -8686,23 +27644,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.GetConsensusParamsResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetConsensusParamsResponse; + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetConsensusParamsResponse} 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.GetConsensusParamsResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8710,8 +27668,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.GetConsensusParamsResponse.GetConsensusParamsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -8727,9 +27685,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.GetConsensusParamsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8737,50 +27695,24 @@ 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.GetConsensusParamsResponse} 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.GetConsensusParamsResponse.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.GetConsensusParamsResponse.GetConsensusParamsResponseV0.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) { @@ -8796,8 +27728,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.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.toObject(opt_includeInstance, this); }; @@ -8806,15 +27738,15 @@ 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.GetConsensusParamsResponse.ConsensusParamsBlock} 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.GetConsensusParamsResponse.ConsensusParamsBlock.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) + maxBytes: jspb.Message.getFieldWithDefault(msg, 1, ""), + maxGas: jspb.Message.getFieldWithDefault(msg, 2, ""), + timeIotaMs: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -8828,23 +27760,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.GetConsensusParamsResponse.ConsensusParamsBlock} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.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.GetConsensusParamsResponse.ConsensusParamsBlock; + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.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.GetConsensusParamsResponse.ConsensusParamsBlock} 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.GetConsensusParamsResponse.ConsensusParamsBlock} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8852,18 +27784,16 @@ 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 {string} */ (reader.readString()); + msg.setMaxBytes(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 {string} */ (reader.readString()); + msg.setMaxGas(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.setTimeIotaMs(value); break; default: reader.skipField(); @@ -8878,9 +27808,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8888,213 +27818,283 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceRes /** * 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 {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeUint64( + f = message.getMaxBytes(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getMaxGas(); + if (f.length > 0) { + writer.writeString( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( + f = message.getTimeIotaMs(); + if (f.length > 0) { + writer.writeString( 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + f ); } }; /** - * optional uint64 balance = 1; - * @return {number} + * optional string max_bytes = 1; + * @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.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.getMaxBytes = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} 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.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * optional string max_gas = 2; + * @return {string} */ -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.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.getMaxGas = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasBalance = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.setMaxGas = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * optional string time_iota_ms = 3; + * @return {string} */ -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)); +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.getTimeIotaMs = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @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); + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} returns this + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.setTimeIotaMs = function(value) { + return jspb.Message.setProto3StringField(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.clearProof = function() { - return this.setProof(undefined); -}; + +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.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.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.GetConsensusParamsResponse.ConsensusParamsEvidence} 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.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.GetConsensusParamsResponse.ConsensusParamsEvidence.toObject = function(includeInstance, msg) { + var f, obj = { + maxAgeNumBlocks: jspb.Message.getFieldWithDefault(msg, 1, ""), + maxAgeDuration: jspb.Message.getFieldWithDefault(msg, 2, ""), + maxBytes: jspb.Message.getFieldWithDefault(msg, 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); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence; + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.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.GetConsensusParamsResponse.ConsensusParamsEvidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMaxAgeNumBlocks(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMaxAgeDuration(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMaxBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional GetIdentityBalanceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -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.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @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); + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxAgeNumBlocks(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMaxAgeDuration(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMaxBytes(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse} returns this + * optional string max_age_num_blocks = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.getMaxAgeNumBlocks = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.setMaxAgeNumBlocks = function(value) { + return jspb.Message.setProto3StringField(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 string max_age_duration = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.getMaxAgeDuration = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.setMaxAgeDuration = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + /** - * @enum {number} + * optional string max_bytes = 3; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.getMaxBytes = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.VersionCase} + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} returns this */ -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.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -9108,8 +28108,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.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.toObject(opt_includeInstance, this); }; @@ -9118,13 +28118,14 @@ 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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} 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.GetConsensusParamsResponse.GetConsensusParamsResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.toObject(includeInstance, f) + block: (f = msg.getBlock()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.toObject(includeInstance, f), + evidence: (f = msg.getEvidence()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.toObject(includeInstance, f) }; if (includeInstance) { @@ -9138,23 +28139,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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.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.GetConsensusParamsResponse.GetConsensusParamsResponseV0; + return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} 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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9162,9 +28163,14 @@ 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); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinaryFromReader); + msg.setEvidence(value); break; default: reader.skipField(); @@ -9179,9 +28185,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.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9189,23 +28195,142 @@ 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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} 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.GetConsensusParamsResponse.GetConsensusParamsResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getBlock(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.serializeBinaryToWriter + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.serializeBinaryToWriter ); } }; +/** + * optional ConsensusParamsBlock block = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.getBlock = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.hasBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ConsensusParamsEvidence evidence = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.getEvidence = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.hasEvidence = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional GetConsensusParamsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + /** * Oneof group definitions for this message. Each group defines the field @@ -9215,22 +28340,21 @@ 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.GetProtocolVersionUpgradeStateRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - BALANCE_AND_REVISION: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.VersionCase} */ -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.GetProtocolVersionUpgradeStateRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.oneofGroups_[0])); }; @@ -9248,8 +28372,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.GetProtocolVersionUpgradeStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.toObject(opt_includeInstance, this); }; @@ -9258,15 +28382,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.GetProtocolVersionUpgradeStateRequest} 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.GetProtocolVersionUpgradeStateRequest.toObject = function(includeInstance, msg) { var f, obj = { - 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) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -9280,23 +28402,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.GetProtocolVersionUpgradeStateRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.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.GetProtocolVersionUpgradeStateRequest; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.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.GetProtocolVersionUpgradeStateRequest} 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.GetProtocolVersionUpgradeStateRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9304,19 +28426,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); - 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 = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -9331,9 +28443,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.GetProtocolVersionUpgradeStateRequest.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.GetProtocolVersionUpgradeStateRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9341,34 +28453,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.GetProtocolVersionUpgradeStateRequest} 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.GetProtocolVersionUpgradeStateRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBalanceAndRevision(); + f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - 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 + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.serializeBinaryToWriter ); } }; @@ -9390,8 +28486,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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.toObject(opt_includeInstance, this); }; @@ -9400,14 +28496,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.BalanceAndRevision} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} 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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - balance: jspb.Message.getFieldWithDefault(msg, 1, 0), - revision: jspb.Message.getFieldWithDefault(msg, 2, 0) + prove: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -9421,23 +28516,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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} 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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9445,12 +28540,8 @@ 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); - break; - case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRevision(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -9465,9 +28556,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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9475,200 +28566,64 @@ 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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} 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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBalance(); - if (f !== 0) { - writer.writeUint64( + f = message.getProve(); + if (f) { + writer.writeBool( 1, f ); } - f = message.getRevision(); - if (f !== 0) { - writer.writeUint64( - 2, - f - ); - } -}; - - -/** - * optional uint64 balance = 1; - * @return {number} - */ -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 uint64 revision = 2; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision.prototype.getRevision = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 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.setRevision = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional BalanceAndRevision balance_and_revision = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevision} - */ -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)); -}; - - -/** - * @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.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearBalanceAndRevision = function() { - return this.setBalanceAndRevision(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.hasBalanceAndRevision = 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.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.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); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); }; /** - * Returns whether this field is set. + * optional bool prove = 1; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.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.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)); -}; - - -/** - * @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); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} 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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional GetIdentityBalanceAndRevisionResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0} + * optional GetProtocolVersionUpgradeStateRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} */ -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.GetProtocolVersionUpgradeStateRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} 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.GetProtocolVersionUpgradeStateRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -9677,7 +28632,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype. * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -9691,23 +28646,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.prototype. * @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 +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.KeyRequestType.RequestCase} + * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.VersionCase} */ -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.GetProtocolVersionUpgradeStateResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_[0])); }; @@ -9725,8 +28678,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.GetProtocolVersionUpgradeStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.toObject(opt_includeInstance, this); }; @@ -9735,15 +28688,13 @@ 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.GetProtocolVersionUpgradeStateResponse} 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.GetProtocolVersionUpgradeStateResponse.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) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -9757,23 +28708,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.GetProtocolVersionUpgradeStateResponse} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.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.GetProtocolVersionUpgradeStateResponse; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.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.GetProtocolVersionUpgradeStateResponse} 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.GetProtocolVersionUpgradeStateResponse} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -9781,19 +28732,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -9808,9 +28749,9 @@ 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.GetProtocolVersionUpgradeStateResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -9818,153 +28759,52 @@ proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.serializeBinary = funct /** * 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 {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.KeyRequestType.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAllKeys(); + f = message.getV0(); 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.serializeBinaryToWriter ); } }; -/** - * optional AllKeys all_keys = 1; - * @return {?proto.org.dash.platform.dapi.v0.AllKeys} - */ -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)); -}; - - -/** - * @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.KeyRequestType.prototype.clearAllKeys = function() { - return this.setAllKeys(undefined); -}; - - -/** - * 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; -}; - - -/** - * optional SpecificKeys specific_keys = 2; - * @return {?proto.org.dash.platform.dapi.v0.SpecificKeys} - */ -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)); -}; - - -/** - * @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.KeyRequestType.prototype.clearSpecificKeys = function() { - return this.setSpecificKeys(undefined); -}; - - -/** - * 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; -}; - /** - * optional SearchKey search_key = 3; - * @return {?proto.org.dash.platform.dapi.v0.SearchKey} + * 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.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.SearchKey|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_ = [[1,2]]; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.KeyRequestType} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.clearSearchKey = function() { - return this.setSearchKey(undefined); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + VERSIONS: 1, + PROOF: 2 }; - /** - * Returns whether this field is set. - * @return {boolean} + * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.KeyRequestType.prototype.hasSearchKey = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -9978,8 +28818,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.toObject(opt_includeInstance, this); }; @@ -9988,13 +28828,15 @@ 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - + versions: (f = msg.getVersions()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.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) { @@ -10008,29 +28850,44 @@ 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} */ -proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} */ -proto.org.dash.platform.dapi.v0.AllKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.deserializeBinaryFromReader); + msg.setVersions(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; @@ -10044,9 +28901,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.AllKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10054,12 +28911,36 @@ 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getVersions(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.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 + ); + } }; @@ -10069,7 +28950,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.repeatedFields_ = [1]; @@ -10086,8 +28967,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.toObject(opt_includeInstance, this); }; @@ -10096,13 +28977,14 @@ 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.toObject = function(includeInstance, msg) { var f, obj = { - keyIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + versionsList: jspb.Message.toObjectList(msg.getVersionsList(), + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.toObject, includeInstance) }; if (includeInstance) { @@ -10116,23 +28998,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} */ -proto.org.dash.platform.dapi.v0.SpecificKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10140,10 +29022,9 @@ 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 = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.deserializeBinaryFromReader); + msg.addVersions(value); break; default: reader.skipField(); @@ -10158,9 +29039,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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.SpecificKeys.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10168,56 +29049,58 @@ 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeyIdsList(); + f = message.getVersionsList(); if (f.length > 0) { - writer.writePackedUint32( + writer.writeRepeatedMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.serializeBinaryToWriter ); } }; /** - * repeated uint32 key_ids = 1; - * @return {!Array} + * repeated VersionEntry versions = 1; + * @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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.getVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry, 1)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this - */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.setKeyIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.setVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {number} value + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry=} opt_value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.SpecificKeys} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} */ -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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.addVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry, 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} returns this */ -proto.org.dash.platform.dapi.v0.SpecificKeys.prototype.clearKeyIdsList = function() { - return this.setKeyIdsList([]); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.clearVersionsList = function() { + return this.setVersionsList([]); }; @@ -10237,8 +29120,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.toObject(opt_includeInstance, this); }; @@ -10247,13 +29130,14 @@ proto.org.dash.platform.dapi.v0.SearchKey.prototype.toObject = function(opt_incl * @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. + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.SearchKey.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.toObject = function(includeInstance, msg) { var f, obj = { - purposeMapMap: (f = msg.getPurposeMapMap()) ? f.toObject(includeInstance, proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject) : [] + versionNumber: jspb.Message.getFieldWithDefault(msg, 1, 0), + voteCount: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -10267,23 +29151,23 @@ proto.org.dash.platform.dapi.v0.SearchKey.toObject = function(includeInstance, m /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.SearchKey} + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} */ -proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.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); + var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.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.SearchKey} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.SearchKey} + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} */ -proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10291,10 +29175,12 @@ proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader = function 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()); - }); + var value = /** @type {number} */ (reader.readUint32()); + msg.setVersionNumber(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setVoteCount(value); break; default: reader.skipField(); @@ -10309,9 +29195,9 @@ proto.org.dash.platform.dapi.v0.SearchKey.deserializeBinaryFromReader = function * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.SearchKey.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10319,180 +29205,211 @@ proto.org.dash.platform.dapi.v0.SearchKey.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.SearchKey} message + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.SearchKey.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.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); + f = message.getVersionNumber(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getVoteCount(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); } }; /** - * map purpose_map = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional uint32 version_number = 1; + * @return {number} */ -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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.getVersionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.org.dash.platform.dapi.v0.SearchKey} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} returns this */ -proto.org.dash.platform.dapi.v0.SearchKey.prototype.clearPurposeMapMap = function() { - this.getPurposeMapMap().clear(); - return this;}; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.setVersionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 vote_count = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.getVoteCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.setVoteCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional Versions versions = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.getVersions = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.setVersions = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.clearVersions = function() { + return this.setVersions(undefined); +}; +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.hasVersions = 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_[0], value); +}; +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.SecurityLevelMap.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.SecurityLevelMap.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.SecurityLevelMap} 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.SecurityLevelMap.toObject = function(includeInstance, msg) { - var f, obj = { - securityLevelMapMap: (f = msg.getSecurityLevelMapMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; -} /** - * 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); + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * 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} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this */ -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; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(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.SecurityLevelMap.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.SecurityLevelMap.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * 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 + * optional GetProtocolVersionUpgradeStateResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} */ -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); - } +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0, 1)); }; /** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType = { - CURRENT_KEY_OF_KIND_REQUEST: 0, - ALL_KEYS_OF_KIND_REQUEST: 1 + * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_[0], value); }; + /** - * map security_level_map = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} returns this */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.getSecurityLevelMapMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - null)); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.org.dash.platform.dapi.v0.SecurityLevelMap} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.SecurityLevelMap.prototype.clearSecurityLevelMapMap = function() { - this.getSecurityLevelMapMap().clear(); - return this;}; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; @@ -10504,21 +29421,21 @@ 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.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.VersionCase} */ -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.GetProtocolVersionUpgradeVoteStatusRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_[0])); }; @@ -10536,8 +29453,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.GetProtocolVersionUpgradeVoteStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.toObject(opt_includeInstance, this); }; @@ -10546,13 +29463,13 @@ 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.GetProtocolVersionUpgradeVoteStatusRequest} 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.GetProtocolVersionUpgradeVoteStatusRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -10566,23 +29483,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.GetProtocolVersionUpgradeVoteStatusRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.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.GetProtocolVersionUpgradeVoteStatusRequest; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.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.GetProtocolVersionUpgradeVoteStatusRequest} 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.GetProtocolVersionUpgradeVoteStatusRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10590,8 +29507,8 @@ 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); + var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -10607,9 +29524,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.GetProtocolVersionUpgradeVoteStatusRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10617,18 +29534,18 @@ 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.GetProtocolVersionUpgradeVoteStatusRequest} 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.GetProtocolVersionUpgradeVoteStatusRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.serializeBinaryToWriter ); } }; @@ -10650,8 +29567,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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.toObject(opt_includeInstance, this); }; @@ -10660,17 +29577,15 @@ 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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} 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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.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) + startProTxHash: msg.getStartProTxHash_asB64(), + count: jspb.Message.getFieldWithDefault(msg, 2, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -10684,23 +29599,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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} 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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -10709,24 +29624,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); + msg.setStartProTxHash(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); + var value = /** @type {number} */ (reader.readUint32()); + msg.setCount(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); break; @@ -10743,9 +29647,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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -10753,47 +29657,30 @@ 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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} 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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); + f = message.getStartProTxHash_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getRequestType(); - if (f != null) { - writer.writeMessage( + f = message.getCount(); + if (f !== 0) { + writer.writeUint32( 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 ); } f = message.getProve(); if (f) { writer.writeBool( - 5, + 3, f ); } @@ -10801,200 +29688,107 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0. /** - * optional bytes identity_id = 1; + * optional bytes start_pro_tx_hash = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getStartProTxHash = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes identity_id = 1; - * This is a type-conversion wrapper around `getIdentityId()` + * optional bytes start_pro_tx_hash = 1; + * This is a type-conversion wrapper around `getStartProTxHash()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getStartProTxHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); + this.getStartProTxHash())); }; /** - * optional bytes identity_id = 1; + * optional bytes start_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 `getIdentityId()` + * This is a type-conversion wrapper around `getStartProTxHash()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getIdentityId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getStartProTxHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); + this.getStartProTxHash())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setIdentityId = function(value) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.setStartProTxHash = 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 + * optional uint32 count = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.clearOffset = function() { - return this.setOffset(undefined); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.hasOffset = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional bool prove = 5; + * optional bool prove = 3; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional GetIdentityKeysRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0} + * optional GetProtocolVersionUpgradeVoteStatusRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} */ -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.GetProtocolVersionUpgradeVoteStatusRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} 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); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -11003,7 +29797,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.clearV0 = funct * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -11017,21 +29811,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysRequest.prototype.hasV0 = functio * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.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])); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_[0])); }; @@ -11049,8 +29843,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.GetProtocolVersionUpgradeVoteStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.toObject(opt_includeInstance, this); }; @@ -11059,13 +29853,13 @@ 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.GetProtocolVersionUpgradeVoteStatusResponse} 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.GetProtocolVersionUpgradeVoteStatusResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -11079,23 +29873,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.GetProtocolVersionUpgradeVoteStatusResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.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.GetProtocolVersionUpgradeVoteStatusResponse; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.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.GetProtocolVersionUpgradeVoteStatusResponse} 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.GetProtocolVersionUpgradeVoteStatusResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11103,8 +29897,8 @@ 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); + var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -11120,9 +29914,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.GetProtocolVersionUpgradeVoteStatusResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11130,18 +29924,18 @@ 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.GetProtocolVersionUpgradeVoteStatusResponse} 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.GetProtocolVersionUpgradeVoteStatusResponse.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 + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.serializeBinaryToWriter ); } }; @@ -11156,22 +29950,22 @@ 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.ResultCase = { RESULT_NOT_SET: 0, - KEYS: 1, + VERSIONS: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.ResultCase} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_[0])); }; @@ -11189,8 +29983,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.toObject(opt_includeInstance, this); }; @@ -11199,13 +29993,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - keys: (f = msg.getKeys()) && proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.toObject(includeInstance, f), + versions: (f = msg.getVersions()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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) }; @@ -11221,23 +30015,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} + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11245,9 +30039,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV 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); + var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.deserializeBinaryFromReader); + msg.setVersions(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -11272,9 +30066,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11282,18 +30076,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeys(); + f = message.getVersions(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.serializeBinaryToWriter ); } f = message.getProof(); @@ -11321,7 +30115,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.repeatedFields_ = [1]; @@ -11338,8 +30132,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.toObject(opt_includeInstance, this); }; @@ -11348,13 +30142,14 @@ 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.toObject = function(includeInstance, msg) { var f, obj = { - keysBytesList: msg.getKeysBytesList_asB64() + versionSignalsList: jspb.Message.toObjectList(msg.getVersionSignalsList(), + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.toObject, includeInstance) }; if (includeInstance) { @@ -11368,23 +30163,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11392,8 +30187,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addKeysBytes(value); + var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.deserializeBinaryFromReader); + msg.addVersionSignals(value); break; default: reader.skipField(); @@ -11408,9 +30204,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11418,378 +30214,62 @@ 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeysBytesList_asU8(); + f = message.getVersionSignalsList(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeRepeatedMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.serializeBinaryToWriter ); } }; /** - * repeated bytes keys_bytes = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes keys_bytes = 1; - * This is a type-conversion wrapper around `getKeysBytesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys.prototype.getKeysBytesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getKeysBytesList())); -}; - - -/** - * 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} + * repeated VersionSignal version_signals = 1; + * @return {!Array} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.getVersionSignalsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal, 1)); }; /** - * @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 {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.setVersionSignalsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal=} opt_value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.Keys} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.addVersionSignals = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal, 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); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.prototype.hasKeys = 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.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)); -}; - - -/** - * @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); -}; - - -/** - * 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.clearProof = function() { - return this.setProof(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.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.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)); -}; - - -/** - * @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); -}; - - -/** - * 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.clearMetadata = function() { - return this.setMetadata(undefined); -}; - - -/** - * 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; -}; - - -/** - * optional GetIdentityKeysResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0} - */ -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.GetIdentityKeysResponse.GetIdentityKeysResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} 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); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentityKeysResponse.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.GetIdentitiesContractKeysRequest.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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])); -}; - - - -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.GetIdentitiesContractKeysRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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.GetIdentitiesContractKeysRequest} 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) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.GetIdentitiesContractKeysRequest} - */ -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.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.GetIdentitiesContractKeysRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.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.GetIdentitiesContractKeysRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.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} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} returns this */ -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.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.clearVersionSignalsList = function() { + return this.setVersionSignalsList([]); }; -/** - * 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) { @@ -11805,8 +30285,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.toObject(opt_includeInstance, this); }; @@ -11815,17 +30295,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.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) + proTxHash: msg.getProTxHash_asB64(), + version: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -11839,23 +30316,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal; + return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -11864,25 +30341,11 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIdentitiesIds(value); + msg.setProTxHash(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); + var value = /** @type {number} */ (reader.readUint32()); + msg.setVersion(value); break; default: reader.skipField(); @@ -11897,9 +30360,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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -11907,44 +30370,23 @@ 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 {!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(); + * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProTxHash_asU8(); if (f.length > 0) { - writer.writePackedEnum( - 4, + writer.writeBytes( + 1, f ); } - f = message.getProve(); - if (f) { - writer.writeBool( - 5, + f = message.getVersion(); + if (f !== 0) { + writer.writeUint32( + 2, f ); } @@ -11952,132 +30394,127 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo /** - * repeated bytes identities_ids = 1; - * @return {!Array} + * optional bytes pro_tx_hash = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getIdentitiesIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getProTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * repeated bytes identities_ids = 1; - * This is a type-conversion wrapper around `getIdentitiesIdsList()` - * @return {!Array} + * optional bytes pro_tx_hash = 1; + * This is a type-conversion wrapper around `getProTxHash()` + * @return {string} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getProTxHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProTxHash())); }; /** - * repeated bytes identities_ids = 1; + * 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 `getIdentitiesIdsList()` - * @return {!Array} + * This is a type-conversion wrapper around `getProTxHash()` + * @return {!Uint8Array} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getProTxHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProTxHash())); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} returns this */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.setProTxHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * optional uint32 version = 2; + * @return {number} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearIdentitiesIdsList = function() { - return this.setIdentitiesIdsList([]); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional bytes contract_id = 2; - * @return {string} + * optional VersionSignals versions = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.getVersions = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals, 1)); }; /** - * 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())); + * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.setVersions = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_[0], value); }; /** - * 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} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.clearVersions = function() { + return this.setVersions(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @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.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.hasVersions = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional string document_type_name = 3; - * @return {string} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setDocumentTypeName = function(value) { - return jspb.Message.setField(this, 3, value); + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_[0], value); }; /** - * Clears the field making it undefined. - * @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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; @@ -12085,90 +30522,72 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesCo * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.hasDocumentTypeName = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * repeated KeyPurpose purposes = 4; - * @return {!Array} - */ -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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} returns this + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.setPurposesList = function(value) { - return jspb.Message.setField(this, 4, value || []); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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.KeyPurpose} 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.addPurposes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * Clears the list making it empty but non-null. - * @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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.clearPurposesList = function() { - return this.setPurposesList([]); +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * optional bool prove = 5; + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional GetIdentitiesContractKeysRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0} + * optional GetProtocolVersionUpgradeVoteStatusResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} */ -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.GetProtocolVersionUpgradeVoteStatusResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0, 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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} 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.GetProtocolVersionUpgradeVoteStatusResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.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.GetProtocolVersionUpgradeVoteStatusResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -12177,7 +30596,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.GetProtocolVersionUpgradeVoteStatusResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -12191,21 +30610,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.GetEpochsInfoRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.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.GetEpochsInfoRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_[0])); }; @@ -12223,8 +30642,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.GetEpochsInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.toObject(opt_includeInstance, this); }; @@ -12233,13 +30652,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.GetEpochsInfoRequest} 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.GetEpochsInfoRequest.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.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -12253,23 +30672,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.GetEpochsInfoRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.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.GetEpochsInfoRequest; + return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.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.GetEpochsInfoRequest} 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.GetEpochsInfoRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12277,8 +30696,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.GetEpochsInfoRequest.GetEpochsInfoRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -12294,9 +30713,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.GetEpochsInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12304,50 +30723,24 @@ 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.GetEpochsInfoRequest} 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.GetEpochsInfoRequest.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.GetEpochsInfoRequest.GetEpochsInfoRequestV0.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - IDENTITIES_KEYS: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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])); -}; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -12363,8 +30756,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.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toObject(opt_includeInstance, this); }; @@ -12373,15 +30766,16 @@ 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.GetEpochsInfoRequest.GetEpochsInfoRequestV0} 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.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - 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) + startEpoch: (f = msg.getStartEpoch()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + count: jspb.Message.getFieldWithDefault(msg, 2, 0), + ascending: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) }; if (includeInstance) { @@ -12395,23 +30789,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.GetEpochsInfoRequest.GetEpochsInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.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.GetEpochsInfoRequest.GetEpochsInfoRequestV0; + return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.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.GetEpochsInfoRequest.GetEpochsInfoRequestV0} 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.GetEpochsInfoRequest.GetEpochsInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12419,19 +30813,21 @@ 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 google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setStartEpoch(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 {number} */ (reader.readUint32()); + msg.setCount(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 {boolean} */ (reader.readBool()); + msg.setAscending(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -12446,9 +30842,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.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12456,256 +30852,197 @@ 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} message + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} 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) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentitiesKeys(); + f = message.getStartEpoch(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.serializeBinaryToWriter + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getCount(); + if (f !== 0) { + writer.writeUint32( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( + f = message.getAscending(); + if (f) { + writer.writeBool( 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 4, + f ); } -}; - - - -/** - * 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 + * optional google.protobuf.UInt32Value start_epoch = 1; + * @return {?proto.google.protobuf.UInt32Value} */ -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; +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getStartEpoch = function() { + return /** @type{?proto.google.protobuf.UInt32Value} */ ( + jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 1)); }; -} /** - * 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); + * @param {?proto.google.protobuf.UInt32Value|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setStartEpoch = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * 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} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this */ -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; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.clearStartEpoch = function() { + return this.setStartEpoch(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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.hasStartEpoch = 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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional uint32 count = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getPurpose(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getKeysBytesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * optional KeyPurpose purpose = 1; - * @return {!proto.org.dash.platform.dapi.v0.KeyPurpose} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this */ -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)); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.KeyPurpose} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this + * optional bool ascending = 3; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.setPurpose = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getAscending = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * repeated bytes keys_bytes = 2; - * @return {!Array} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setAscending = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * repeated bytes keys_bytes = 2; - * This is a type-conversion wrapper around `getKeysBytesList()` - * @return {!Array} + * optional bool prove = 4; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getKeysBytesList())); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** - * 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} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.getKeysBytesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getKeysBytesList())); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this + * optional GetEpochsInfoRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.setKeysBytesList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0, 1)); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest} 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); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.prototype.clearKeysBytesList = function() { - return this.setKeysBytesList([]); +proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * 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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.repeatedFields_ = [2]; +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_[0])); +}; @@ -12722,8 +31059,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.GetEpochsInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.toObject(opt_includeInstance, this); }; @@ -12732,15 +31069,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.IdentityKeys} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} 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.GetEpochsInfoResponse.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) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -12754,23 +31089,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.GetEpochsInfoResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.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.GetEpochsInfoResponse; + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.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.GetEpochsInfoResponse} 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.GetEpochsInfoResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12778,13 +31113,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesC 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); + var value = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -12799,9 +31130,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.GetEpochsInfoResponse.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.GetEpochsInfoResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -12809,120 +31140,52 @@ 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.GetEpochsInfoResponse} 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.GetEpochsInfoResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getV0(); + if (f != null) { + writer.writeMessage( 1, - f - ); - } - f = message.getKeysList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.serializeBinaryToWriter ); } }; -/** - * optional bytes identity_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - /** - * repeated PurposeKeys keys = 2; - * @return {!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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.getKeysList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys, 2)); -}; - - -/** - * @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); -}; - +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_ = [[1,2]]; /** - * @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} + * @enum {number} */ -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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + EPOCHS: 1, + PROOF: 2 }; - /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys} returns this + * @return {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.prototype.clearKeysList = function() { - return this.setKeysList([]); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_[0])); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.repeatedFields_ = [1]; - - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -12936,8 +31199,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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.toObject(opt_includeInstance, this); }; @@ -12946,14 +31209,15 @@ 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - entriesList: jspb.Message.toObjectList(msg.getEntriesList(), - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.toObject, includeInstance) + epochs: (f = msg.getEpochs()) && proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.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) { @@ -12967,23 +31231,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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0; + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeys.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -12991,9 +31255,19 @@ 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); - msg.addEntries(value); + var value = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.deserializeBinaryFromReader); + msg.setEpochs(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(); @@ -13008,9 +31282,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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13018,234 +31292,46 @@ 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEntriesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getEpochs(); + if (f != null) { + writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeys.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.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 ); } -}; - - -/** - * 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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasIdentitiesKeys = 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.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.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} 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); -}; - - -/** - * 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.clearProof = function() { - return this.setProof(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.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.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.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this -*/ -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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional GetIdentitiesContractKeysResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0} - */ -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.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} 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); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -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>} + * List of repeated fields within this message type. + * @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])); -}; +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.repeatedFields_ = [1]; @@ -13262,8 +31348,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.toObject(opt_includeInstance, this); }; @@ -13272,13 +31358,14 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.proto * @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.GetEvonodesProposedEpochBlocksByIdsRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject(includeInstance, f) + epochInfosList: jspb.Message.toObjectList(msg.getEpochInfosList(), + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.toObject, includeInstance) }; if (includeInstance) { @@ -13292,23 +31379,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.toObj /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos; + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.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.GetEvonodesProposedEpochBlocksByIdsRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13316,9 +31403,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.deser 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); + var value = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinaryFromReader); + msg.addEpochInfos(value); break; default: reader.skipField(); @@ -13333,9 +31420,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.deser * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13343,30 +31430,61 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.proto /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getEpochInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.serializeBinaryToWriter ); } }; +/** + * repeated EpochInfo epoch_infos = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.getEpochInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.setEpochInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.repeatedFields_ = [2]; +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.addEpochInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} returns this + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.clearEpochInfosList = function() { + return this.setEpochInfosList([]); +}; + + @@ -13383,8 +31501,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.toObject(opt_includeInstance, this); }; @@ -13393,15 +31511,18 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEv * @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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.toObject = function(includeInstance, msg) { var f, obj = { - epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), - idsList: msg.getIdsList_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + number: jspb.Message.getFieldWithDefault(msg, 1, 0), + firstBlockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + firstCoreBlockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + startTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + feeMultiplier: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), + protocolVersion: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -13415,23 +31536,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEv /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo; + return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.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.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13440,15 +31561,27 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEv switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); - msg.setEpoch(value); + msg.setNumber(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIds(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setFirstBlockHeight(value); break; case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setFirstCoreBlockHeight(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readDouble()); + msg.setFeeMultiplier(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setProtocolVersion(value); break; default: reader.skipField(); @@ -13463,9 +31596,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEv * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13473,175 +31606,300 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEv /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); - if (f != null) { + f = message.getNumber(); + if (f !== 0) { writer.writeUint32( 1, f ); } - f = message.getIdsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( + f = message.getFirstBlockHeight(); + if (f !== 0) { + writer.writeUint64( 2, f ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = message.getFirstCoreBlockHeight(); + if (f !== 0) { + writer.writeUint32( 3, f ); } + f = message.getStartTime(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getFeeMultiplier(); + if (f !== 0.0) { + writer.writeDouble( + 5, + f + ); + } + f = message.getProtocolVersion(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } }; /** - * optional uint32 epoch = 1; + * optional uint32 number = 1; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getEpoch = function() { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getNumber = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setEpoch = function(value) { - return jspb.Message.setField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + * optional uint64 first_block_height = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.clearEpoch = function() { - return jspb.Message.setField(this, 1, undefined); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getFirstBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.hasEpoch = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setFirstBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * repeated bytes ids = 2; - * @return {!Array} + * optional uint32 first_core_block_height = 3; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getFirstCoreBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * repeated bytes ids = 2; - * This is a type-conversion wrapper around `getIdsList()` - * @return {!Array} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIdsList())); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setFirstCoreBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * 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} + * optional uint64 start_time = 4; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getIdsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIdsList())); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getStartTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setIdsList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setStartTime = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + * optional double fee_multiplier = 5; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.addIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getFeeMultiplier = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.clearIdsList = function() { - return this.setIdsList([]); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setFeeMultiplier = function(value) { + return jspb.Message.setProto3FloatField(this, 5, value); }; /** - * optional bool prove = 3; + * optional uint32 protocol_version = 6; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getProtocolVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setProtocolVersion = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional EpochInfos epochs = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.getEpochs = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.setEpochs = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.clearEpochs = function() { + return this.setEpochs(undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.hasEpochs = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} returns this + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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 GetEvonodesProposedEpochBlocksByIdsRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0} + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this */ -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)); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest} returns this + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} 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); +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEvonodesProposedEpochBlocksByIdsRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetEpochsInfoResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -13650,7 +31908,7 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.proto * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -13664,21 +31922,21 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.proto * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.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])); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_[0])); }; @@ -13696,8 +31954,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.toObject(opt_includeInstance, this); }; @@ -13706,13 +31964,13 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.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.GetEvonodesProposedEpochBlocksResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -13726,23 +31984,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.toObject /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest; + return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.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.GetEvonodesProposedEpochBlocksResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13750,8 +32008,8 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deseriali var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -13767,9 +32025,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.deseriali * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13777,18 +32035,18 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.serializeBinaryToWriter ); } }; @@ -13796,30 +32054,11 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.serialize /** - * 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.ResultCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -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])); -}; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.repeatedFields_ = [4,5]; @@ -13836,8 +32075,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.toObject(opt_includeInstance, this); }; @@ -13846,15 +32085,21 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod * @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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - 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) + contractId: msg.getContractId_asB64(), + documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), + indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), + startIndexValuesList: msg.getStartIndexValuesList_asB64(), + endIndexValuesList: msg.getEndIndexValuesList_asB64(), + startAtValueInfo: (f = msg.getStartAtValueInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.toObject(includeInstance, f), + count: jspb.Message.getFieldWithDefault(msg, 7, 0), + orderAscending: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) }; if (includeInstance) { @@ -13868,23 +32113,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -13892,19 +32137,41 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod var field = reader.getFieldNumber(); switch (field) { case 1: - 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); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractId(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 {string} */ (reader.readString()); + msg.setDocumentTypeName(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.setIndexName(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addStartIndexValues(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addEndIndexValues(value); + break; + case 6: + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.deserializeBinaryFromReader); + msg.setStartAtValueInfo(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCount(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOrderAscending(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -13919,9 +32186,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -13929,34 +32196,74 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEvonodesProposedBlockCountsInfo(); - if (f != null) { - writer.writeMessage( + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.serializeBinaryToWriter + f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getDocumentTypeName(); + if (f.length > 0) { + writer.writeString( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); + f = message.getIndexName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStartIndexValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } + f = message.getEndIndexValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 5, + f + ); + } + f = message.getStartAtValueInfo(); if (f != null) { writer.writeMessage( - 3, + 6, f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeUint32( + 7, + f + ); + } + f = message.getOrderAscending(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 9, + f ); } }; @@ -13978,8 +32285,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.toObject(opt_includeInstance, this); }; @@ -13988,14 +32295,14 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod * @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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.toObject = function(includeInstance, msg) { var f, obj = { - proTxHash: msg.getProTxHash_asB64(), - count: jspb.Message.getFieldWithDefault(msg, 2, 0) + startValue: msg.getStartValue_asB64(), + startValueIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -14009,23 +32316,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - 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); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo; + return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14034,11 +32341,11 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProTxHash(value); + msg.setStartValue(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCount(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStartValueIncluded(value); break; default: reader.skipField(); @@ -14053,9 +32360,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14063,22 +32370,22 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProTxHash_asU8(); + f = message.getStartValue_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getCount(); - if (f !== 0) { - writer.writeUint64( + f = message.getStartValueIncluded(); + if (f) { + writer.writeBool( 2, f ); @@ -14087,287 +32394,326 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod /** - * optional bytes pro_tx_hash = 1; + * optional bytes start_value = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValue = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes pro_tx_hash = 1; - * This is a type-conversion wrapper around `getProTxHash()` + * optional bytes start_value = 1; + * This is a type-conversion wrapper around `getStartValue()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValue_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProTxHash())); + this.getStartValue())); }; /** - * optional bytes pro_tx_hash = 1; + * optional bytes start_value = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProTxHash()` + * This is a type-conversion wrapper around `getStartValue()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getProTxHash_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValue_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProTxHash())); + this.getStartValue())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.setProTxHash = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.setStartValue = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint64 count = 2; - * @return {number} + * optional bool start_value_included = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValueIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.prototype.setCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.setStartValueIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; +/** + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; +/** + * optional bytes contract_id = 1; + * 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.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + -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} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns 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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, 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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional string document_type_name = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.toObject = function(includeInstance, msg) { - var f, obj = { - evonodesProposedBlockCountsList: jspb.Message.toObjectList(msg.getEvonodesProposedBlockCountsList(), - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.toObject, includeInstance) - }; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getDocumentTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setDocumentTypeName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} + * optional string index_name = 3; + * @return {string} */ -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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getIndexName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.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.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.deserializeBinaryFromReader); - msg.addEvonodesProposedBlockCounts(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setIndexName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * repeated bytes start_index_values = 4; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartIndexValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated bytes start_index_values = 4; + * This is a type-conversion wrapper around `getStartIndexValuesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEvonodesProposedBlockCountsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartIndexValuesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getStartIndexValuesList())); }; /** - * repeated EvonodeProposedBlocks evonodes_proposed_block_counts = 1; - * @return {!Array} + * repeated bytes start_index_values = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartIndexValuesList()` + * @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)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartIndexValuesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getStartIndexValuesList())); }; /** - * @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 {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setStartIndexValuesList = function(value) { + return jspb.Message.setField(this, 4, value || []); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks=} opt_value + * @param {!(string|Uint8Array)} value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocks} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.addStartIndexValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks.prototype.clearEvonodesProposedBlockCountsList = function() { - return this.setEvonodesProposedBlockCountsList([]); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearStartIndexValuesList = function() { + return this.setStartIndexValuesList([]); }; /** - * optional EvonodesProposedBlocks evonodes_proposed_block_counts_info = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks} + * repeated bytes end_index_values = 5; + * @return {!Array} */ -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)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getEndIndexValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocks|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + * repeated bytes end_index_values = 5; + * This is a type-conversion wrapper around `getEndIndexValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getEndIndexValuesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getEndIndexValuesList())); +}; + + +/** + * repeated bytes end_index_values = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEndIndexValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getEndIndexValuesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getEndIndexValuesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setEndIndexValuesList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.addEndIndexValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearEndIndexValuesList = function() { + return this.setEndIndexValuesList([]); +}; + + +/** + * optional StartAtValueInfo start_at_value_info = 6; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartAtValueInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo, 6)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} 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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setStartAtValueInfo = function(value) { + return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.clearEvonodesProposedBlockCountsInfo = function() { - return this.setEvonodesProposedBlockCountsInfo(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearStartAtValueInfo = function() { + return this.setStartAtValueInfo(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; + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.hasStartAtValueInfo = function() { + return jspb.Message.getField(this, 6) != null; }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * optional uint32 count = 7; + * @return {number} */ -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)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * @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); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setCount = function(value) { + return jspb.Message.setField(this, 7, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearCount = function() { + return jspb.Message.setField(this, 7, undefined); }; @@ -14375,72 +32721,71 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonod * 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; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.hasCount = function() { + return jspb.Message.getField(this, 7) != null; }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * optional bool order_ascending = 8; + * @return {boolean} */ -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)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getOrderAscending = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; /** - * @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); + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setOrderAscending = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} returns this + * optional bool prove = 9; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); }; /** - * optional GetEvonodesProposedEpochBlocksResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0} + * optional GetContestedResourcesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} */ -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)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} 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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -14449,7 +32794,7 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -14463,21 +32808,21 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.prototype * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.VersionCase} */ -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])); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_[0])); }; @@ -14495,8 +32840,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.toObject(opt_includeInstance, this); }; @@ -14505,13 +32850,13 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.pro * @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.GetEvonodesProposedEpochBlocksByRangeRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -14525,23 +32870,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.toO /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse; + return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.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.GetEvonodesProposedEpochBlocksByRangeRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14549,8 +32894,8 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.des var field = reader.getFieldNumber(); switch (field) { 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); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -14566,9 +32911,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.des * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14576,18 +32921,18 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.pro /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.serializeBinaryToWriter ); } }; @@ -14602,22 +32947,22 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.ser * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.oneofGroups_ = [[3,4]]; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase = { - START_NOT_SET: 0, - START_AFTER: 3, - START_AT: 4 +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + CONTESTED_RESOURCE_VALUES: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.StartCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ResultCase} */ -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])); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_[0])); }; @@ -14635,8 +32980,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.toObject(opt_includeInstance, this); }; @@ -14645,17 +32990,15 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.Get * @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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - 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) + contestedResourceValues: (f = msg.getContestedResourceValues()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.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) { @@ -14669,23 +33012,23 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.Get /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0; - return proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -14693,24 +33036,19 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.Get var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setEpoch(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinaryFromReader); + msg.setContestedResourceValues(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLimit(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.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); + 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(); @@ -14725,9 +33063,9 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.Get * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -14735,230 +33073,281 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.Get /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); + f = message.getContestedResourceValues(); if (f != null) { - writer.writeUint32( + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.serializeBinaryToWriter ); } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); + f = message.getProof(); if (f != null) { - writer.writeUint32( + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter ); } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + f = message.getMetadata(); if (f != null) { - writer.writeBytes( + writer.writeMessage( 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 + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter ); } }; + /** - * optional uint32 epoch = 1; - * @return {number} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getEpoch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} 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.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setEpoch = function(value) { - return jspb.Message.setField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.toObject(opt_includeInstance, this); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} 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.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearEpoch = function() { - return jspb.Message.setField(this, 1, undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.toObject = function(includeInstance, msg) { + var f, obj = { + contestedResourceValuesList: msg.getContestedResourceValuesList_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasEpoch = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues; + return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinaryFromReader(msg, reader); }; /** - * optional uint32 limit = 2; - * @return {number} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.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.addContestedResourceValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setLimit = function(value) { - return jspb.Message.setField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.clearLimit = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContestedResourceValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } }; /** - * Returns whether this field is set. - * @return {boolean} + * repeated bytes contested_resource_values = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasLimit = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.getContestedResourceValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * optional bytes start_after = 3; - * @return {string} + * repeated bytes contested_resource_values = 1; + * This is a type-conversion wrapper around `getContestedResourceValuesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.getContestedResourceValuesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getContestedResourceValuesList())); }; /** - * optional bytes start_after = 3; - * This is a type-conversion wrapper around `getStartAfter()` - * @return {string} + * repeated bytes contested_resource_values = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContestedResourceValuesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartAfter())); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.getContestedResourceValuesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getContestedResourceValuesList())); }; /** - * 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} + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAfter_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartAfter())); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.setContestedResourceValuesList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.addContestedResourceValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.clearContestedResourceValuesList = function() { + return this.setContestedResourceValuesList([]); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional ContestedResourceValues contested_resource_values = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasStartAfter = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getContestedResourceValues = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues, 1)); }; /** - * optional bytes start_at = 4; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.setContestedResourceValues = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_[0], value); }; /** - * optional bytes start_at = 4; - * This is a type-conversion wrapper around `getStartAt()` - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartAt())); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.clearContestedResourceValues = function() { + return this.setContestedResourceValues(undefined); }; /** - * 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} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getStartAt_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartAt())); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.hasContestedResourceValues = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; @@ -14966,53 +33355,72 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.Get * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.hasStartAt = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.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.GetContestedResourcesResponse.GetContestedResourcesResponseV0.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.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * optional bool prove = 5; - * @return {boolean} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional GetEvonodesProposedEpochBlocksByRangeRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0} + * optional GetContestedResourcesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} */ -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)); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -15021,7 +33429,7 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.pro * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -15035,21 +33443,21 @@ proto.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.pro * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.VersionCase} */ -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])); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_[0])); }; @@ -15067,8 +33475,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.toObject(opt_includeInstance, this); }; @@ -15077,13 +33485,13 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -15097,23 +33505,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.toObject = function /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest; - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.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.GetIdentitiesBalancesRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -15121,8 +33529,8 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinaryFr var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -15138,9 +33546,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.deserializeBinaryFr * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15148,31 +33556,24 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.serialize /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.serializeBinaryToWriter ); } }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -15188,8 +33589,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.toObject(opt_includeInstance, this); }; @@ -15198,14 +33599,18 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalanc * @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} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - idsList: msg.getIdsList_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + startTimeInfo: (f = msg.getStartTimeInfo()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.toObject(includeInstance, f), + endTimeInfo: (f = msg.getEndTimeInfo()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.toObject(includeInstance, f), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0), + offset: jspb.Message.getFieldWithDefault(msg, 4, 0), + ascending: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -15219,23 +33624,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalanc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -15243,10 +33648,28 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalanc var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIds(value); + var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.deserializeBinaryFromReader); + msg.setStartTimeInfo(value); break; case 2: + var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinaryFromReader); + msg.setEndTimeInfo(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLimit(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOffset(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAscending(value); + break; + case 6: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -15263,9 +33686,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalanc * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15273,170 +33696,59 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalanc /** * 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} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( + f = message.getStartTimeInfo(); + if (f != null) { + writer.writeMessage( 1, + f, + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.serializeBinaryToWriter + ); + } + f = message.getEndTimeInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f + ); + } + f = message.getAscending(); + if (f) { + writer.writeBool( + 5, f ); } f = message.getProve(); if (f) { writer.writeBool( - 2, + 6, f ); } }; -/** - * repeated bytes ids = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes ids = 1; - * This is a type-conversion wrapper around `getIdsList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIdsList())); -}; - - -/** - * repeated bytes ids = 1; - * 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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.getIdsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIdsList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.setIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.addIds = 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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.clearIdsList = function() { - return this.setIdsList([]); -}; - - -/** - * optional bool prove = 2; - * @return {boolean} - */ -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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional GetIdentitiesBalancesRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0} - */ -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.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest} returns this -*/ -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.GetIdentitiesBalancesRequest} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.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.GetIdentitiesBalancesResponse.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.VersionCase} - */ -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])); -}; @@ -15453,8 +33765,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.toObject(opt_includeInstance, this); }; @@ -15463,13 +33775,14 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject(includeInstance, f) + startTimeMs: jspb.Message.getFieldWithDefault(msg, 1, 0), + startTimeIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -15483,23 +33796,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse; - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.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.GetIdentitiesBalancesResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -15507,9 +33820,12 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - 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); + var value = /** @type {number} */ (reader.readUint64()); + msg.setStartTimeMs(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStartTimeIncluded(value); break; default: reader.skipField(); @@ -15524,9 +33840,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15534,188 +33850,62 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetIdentitiesBalancesResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getStartTimeMs(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter + f ); } -}; - - - -/** - * 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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - IDENTITIES_BALANCES: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.ResultCase} - */ -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])); -}; - - - -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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.toObject = function(includeInstance, msg) { - var f, obj = { - 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) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; + f = message.getStartTimeIncluded(); + if (f) { + writer.writeBool( + 2, + f + ); } - return obj; }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} + * optional uint64 start_time_ms = 1; + * @return {number} */ -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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.getStartTimeMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.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.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; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.setStartTimeMs = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional bool start_time_included = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.getStartTimeIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIdentitiesBalances(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.setStartTimeIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -15735,8 +33925,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -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); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.toObject(opt_includeInstance, this); }; @@ -15745,14 +33935,14 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan * @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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - balance: jspb.Message.getFieldWithDefault(msg, 2, 0) + endTimeMs: jspb.Message.getFieldWithDefault(msg, 1, 0), + endTimeIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -15766,23 +33956,23 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - 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); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -15790,12 +33980,12 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setEndTimeMs(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBalance(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setEndTimeIncluded(value); break; default: reader.skipField(); @@ -15810,9 +34000,9 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -15820,22 +34010,22 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getEndTimeMs(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint64( + f = message.getEndTimeIncluded(); + if (f) { + writer.writeBool( 2, f ); @@ -15844,71 +34034,66 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan /** - * optional bytes identity_id = 1; - * @return {string} + * optional uint64 end_time_ms = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.getEndTimeMs = 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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.setEndTimeMs = function(value) { + return jspb.Message.setProto3IntField(this, 1, 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} + * optional bool end_time_included = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.getEndTimeIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.setEndTimeIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional uint64 balance = 2; - * @return {number} + * optional StartAtTimeInfo start_time_info = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getStartTimeInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo, 1)); }; /** - * @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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setStartTimeInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.clearBalance = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearStartTimeInfo = function() { + return this.setStartTimeInfo(undefined); }; @@ -15916,233 +34101,181 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.prototype.hasBalance = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasStartTimeInfo = function() { + return jspb.Message.getField(this, 1) != null; }; - /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * optional EndAtTimeInfo end_time_info = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getEndTimeInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo, 2)); +}; +/** + * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setEndTimeInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, 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} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns 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); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearEndTimeInfo = function() { + return this.setEndTimeInfo(undefined); }; /** - * 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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasEndTimeInfo = function() { + return jspb.Message.getField(this, 2) != null; }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} + * optional uint32 limit = 3; + * @return {number} */ -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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances; - return proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.deserializeBinaryFromReader); - msg.addEntries(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setLimit = function(value) { + return jspb.Message.setField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearLimit = function() { + return jspb.Message.setField(this, 3, undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} 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.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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasLimit = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * repeated IdentityBalance entries = 1; - * @return {!Array} + * optional uint32 offset = 4; + * @return {number} */ -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)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.setEntriesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setOffset = function(value) { + return jspb.Message.setField(this, 4, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalance} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearOffset = function() { + return jspb.Message.setField(this, 4, undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances.prototype.clearEntriesList = function() { - return this.setEntriesList([]); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasOffset = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional IdentitiesBalances identities_balances = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalances} + * optional bool ascending = 5; + * @return {boolean} */ -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)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getAscending = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); }; /** - * @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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.setIdentitiesBalances = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.oneofGroups_[0], value); + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setAscending = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this + * optional bool prove = 6; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearIdentitiesBalances = function() { - return this.setIdentitiesBalances(undefined); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasIdentitiesBalances = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * optional GetVotePollsByEndDateRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} */ -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)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} returns this */ -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); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; @@ -16150,82 +34283,147 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalan * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.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.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)); -}; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_ = [[1]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * @return {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} 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.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.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.GetVotePollsByEndDateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional GetIdentitiesBalancesResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} */ -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)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @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.GetIdentitiesBalancesResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.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.GetVotePollsByEndDateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.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.GetIdentitiesBalancesResponse} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.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.GetVotePollsByEndDateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.serializeBinaryToWriter + ); + } }; @@ -16238,21 +34436,22 @@ proto.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.prototype.hasV0 = * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + VOTE_POLLS_BY_TIMESTAMPS: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetProofsRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProofsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_[0])); }; @@ -16270,8 +34469,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.toObject(opt_includeInstance, this); }; @@ -16280,13 +34479,15 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.toObject(includeInstance, f) + votePollsByTimestamps: (f = msg.getVotePollsByTimestamps()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.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) { @@ -16300,23 +34501,23 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.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.GetProofsRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -16324,9 +34525,19 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.deserializeBinaryFromReader = f var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinaryFromReader); + msg.setVotePollsByTimestamps(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(); @@ -16341,9 +34552,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16351,18 +34562,34 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getVotePollsByTimestamps(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.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 ); } }; @@ -16374,7 +34601,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.serializeBinaryToWriter = funct * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.repeatedFields_ = [1,2,3,4]; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.repeatedFields_ = [2]; @@ -16391,8 +34618,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.toObject(opt_includeInstance, this); }; @@ -16401,20 +34628,14 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.to * @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.GetProofsRequest.GetProofsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.toObject = function(includeInstance, msg) { var f, obj = { - identitiesList: jspb.Message.toObjectList(msg.getIdentitiesList(), - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.toObject, includeInstance), - contractsList: jspb.Message.toObjectList(msg.getContractsList(), - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.toObject, includeInstance), - documentsList: jspb.Message.toObjectList(msg.getDocumentsList(), - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.toObject, includeInstance), - votesList: jspb.Message.toObjectList(msg.getVotesList(), - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.toObject, includeInstance) + timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), + serializedVotePollsList: msg.getSerializedVotePollsList_asB64() }; if (includeInstance) { @@ -16428,23 +34649,23 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.toObject = f /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.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.GetProofsRequest.GetProofsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -16452,24 +34673,12 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeB var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.deserializeBinaryFromReader); - msg.addIdentities(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.deserializeBinaryFromReader); - msg.addContracts(value); - break; - case 3: - var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.deserializeBinaryFromReader); - msg.addDocuments(value); - break; - case 4: - var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.deserializeBinaryFromReader); - msg.addVotes(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSerializedVotePolls(value); break; default: reader.skipField(); @@ -16484,9 +34693,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.deserializeB * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16494,47 +34703,115 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.se /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentitiesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.serializeBinaryToWriter + f ); } - f = message.getContractsList(); + f = message.getSerializedVotePollsList_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeRepeatedBytes( 2, - f, - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.serializeBinaryToWriter - ); - } - f = message.getDocumentsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.serializeBinaryToWriter - ); - } - f = message.getVotesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 4, - f, - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.serializeBinaryToWriter + f ); } }; +/** + * optional uint64 timestamp = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated bytes serialized_vote_polls = 2; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getSerializedVotePollsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes serialized_vote_polls = 2; + * This is a type-conversion wrapper around `getSerializedVotePollsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getSerializedVotePollsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSerializedVotePollsList())); +}; + + +/** + * repeated bytes serialized_vote_polls = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSerializedVotePollsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getSerializedVotePollsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSerializedVotePollsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.setSerializedVotePollsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.addSerializedVotePolls = 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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.clearSerializedVotePollsList = function() { + return this.setSerializedVotePollsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.repeatedFields_ = [1]; @@ -16551,8 +34828,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.toObject(opt_includeInstance, this); }; @@ -16561,17 +34838,15 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequ * @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.GetProofsRequest.GetProofsRequestV0.DocumentRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64(), - documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), - documentTypeKeepsHistory: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - documentId: msg.getDocumentId_asB64(), - documentContestedStatus: jspb.Message.getFieldWithDefault(msg, 5, 0) + votePollsByTimestampsList: jspb.Message.toObjectList(msg.getVotePollsByTimestampsList(), + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.toObject, includeInstance), + finishedResults: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -16585,23 +34860,23 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps; + return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.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.GetProofsRequest.GetProofsRequestV0.DocumentRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -16609,24 +34884,13 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); + var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinaryFromReader); + msg.addVotePollsByTimestamps(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentType(value); - break; - case 3: var value = /** @type {boolean} */ (reader.readBool()); - msg.setDocumentTypeKeepsHistory(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDocumentId(value); - break; - case 5: - var value = /** @type {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} */ (reader.readEnum()); - msg.setDocumentContestedStatus(value); + msg.setFinishedResults(value); break; default: reader.skipField(); @@ -16641,9 +34905,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -16651,44 +34915,24 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); + f = message.getVotePollsByTimestampsList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getDocumentType(); - if (f.length > 0) { - writer.writeString( - 2, - f + f, + proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.serializeBinaryToWriter ); } - f = message.getDocumentTypeKeepsHistory(); + f = message.getFinishedResults(); if (f) { writer.writeBool( - 3, - f - ); - } - f = message.getDocumentId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getDocumentContestedStatus(); - if (f !== 0.0) { - writer.writeEnum( - 5, + 2, f ); } @@ -16696,349 +34940,237 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequ /** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus = { - NOT_CONTESTED: 0, - MAYBE_CONTESTED: 1, - CONTESTED: 2 -}; - -/** - * optional bytes contract_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes contract_id = 1; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); -}; - - -/** - * optional bytes contract_id = 1; - * 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 SerializedVotePollsByTimestamp vote_polls_by_timestamps = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.getVotePollsByTimestampsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp, 1)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.setVotePollsByTimestampsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional string document_type = 2; - * @return {string} + * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.addVotePollsByTimestamps = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp, opt_index); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentType = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.clearVotePollsByTimestampsList = function() { + return this.setVotePollsByTimestampsList([]); }; /** - * optional bool document_type_keeps_history = 3; + * optional bool finished_results = 2; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentTypeKeepsHistory = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.getFinishedResults = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentTypeKeepsHistory = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional bytes document_id = 4; - * @return {string} + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.setFinishedResults = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional bytes document_id = 4; - * This is a type-conversion wrapper around `getDocumentId()` - * @return {string} + * optional SerializedVotePollsByTimestamps vote_polls_by_timestamps = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDocumentId())); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getVotePollsByTimestamps = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps, 1)); }; /** - * optional bytes document_id = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDocumentId()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDocumentId())); + * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.setVotePollsByTimestamps = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_[0], value); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentId = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.clearVotePollsByTimestamps = function() { + return this.setVotePollsByTimestamps(undefined); }; /** - * optional DocumentContestedStatus document_contested_status = 5; - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.getDocumentContestedStatus = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.hasVotePollsByTimestamps = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.DocumentContestedStatus} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} returns this + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest.prototype.setDocumentContestedStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_[0], 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} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * 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.GetProofsRequest.GetProofsRequestV0.IdentityRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.toObject = function(includeInstance, msg) { - var f, obj = { - identityId: msg.getIdentityId_asB64(), - requestType: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.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 {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} */ (reader.readEnum()); - msg.setRequestType(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, 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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} 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.GetProofsRequest.GetProofsRequestV0.IdentityRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIdentityId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getRequestType(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * @enum {number} + * optional GetVotePollsByEndDateResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type = { - FULL_IDENTITY: 0, - BALANCE: 1, - KEYS: 2, - REVISION: 3 +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0, 1)); }; + /** - * optional bytes identity_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.getIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); + * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_[0], value); }; /** - * optional bytes identity_id = 1; - * This is a type-conversion wrapper around `getIdentityId()` - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.getIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * 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} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} 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.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_ = [[1]]; /** - * optional Type request_type = 2; - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.getRequestType = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; - /** - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.Type} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} returns this + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest.prototype.setRequestType = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -17052,8 +35184,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.toObject(opt_includeInstance, this); }; @@ -17062,13 +35194,13 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequ * @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.GetProofsRequest.GetProofsRequestV0.ContractRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64() + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -17082,23 +35214,23 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.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.GetProofsRequest.GetProofsRequestV0.ContractRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -17106,8 +35238,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -17122,9 +35255,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -17132,89 +35265,30 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getV0(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.serializeBinaryToWriter ); } }; -/** - * optional bytes contract_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes contract_id = 1; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); -}; - - -/** - * optional bytes contract_id = 1; - * 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.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest.prototype.setContractId = 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>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase = { - REQUEST_TYPE_NOT_SET: 0, - CONTESTED_RESOURCE_VOTE_STATUS_REQUEST: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.getRequestTypeCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.RequestTypeCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.repeatedFields_ = [4]; @@ -17231,8 +35305,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.toObject(opt_includeInstance, this); }; @@ -17241,13 +35315,21 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * @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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - contestedResourceVoteStatusRequest: (f = msg.getContestedResourceVoteStatusRequest()) && proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.toObject(includeInstance, f) + contractId: msg.getContractId_asB64(), + documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), + indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), + indexValuesList: msg.getIndexValuesList_asB64(), + resultType: jspb.Message.getFieldWithDefault(msg, 5, 0), + allowIncludeLockedAndAbstainingVoteTally: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), + startAtIdentifierInfo: (f = msg.getStartAtIdentifierInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.toObject(includeInstance, f), + count: jspb.Message.getFieldWithDefault(msg, 8, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) }; if (includeInstance) { @@ -17261,23 +35343,23 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -17285,9 +35367,41 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.deserializeBinaryFromReader); - msg.setContestedResourceVoteStatusRequest(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentTypeName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setIndexName(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIndexValues(value); + break; + case 5: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} */ (reader.readEnum()); + msg.setResultType(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowIncludeLockedAndAbstainingVoteTally(value); + break; + case 7: + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader); + msg.setStartAtIdentifierInfo(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCount(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -17302,9 +35416,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -17312,30 +35426,88 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContestedResourceVoteStatusRequest(); + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentTypeName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIndexName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getIndexValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } + f = message.getResultType(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } + f = message.getAllowIncludeLockedAndAbstainingVoteTally(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getStartAtIdentifierInfo(); if (f != null) { writer.writeMessage( - 1, + 7, f, - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 8)); + if (f != null) { + writer.writeUint32( + 8, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 9, + f ); } }; - /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.repeatedFields_ = [4]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType = { + DOCUMENTS: 0, + VOTE_TALLY: 1, + DOCUMENTS_AND_VOTE_TALLY: 2 +}; + @@ -17352,8 +35524,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.toObject(opt_includeInstance, this); }; @@ -17362,17 +35534,14 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * @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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64(), - documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), - indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), - indexValuesList: msg.getIndexValuesList_asB64(), - voterIdentifier: msg.getVoterIdentifier_asB64() + startIdentifier: msg.getStartIdentifier_asB64(), + startIdentifierIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -17386,48 +35555,36 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest; - return proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.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.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.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.setContractId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentTypeName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setIndexName(value); + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { break; - case 4: + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIndexValues(value); + msg.setStartIdentifier(value); break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setVoterIdentifier(value); + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStartIdentifierIncluded(value); break; default: reader.skipField(); @@ -17442,9 +35599,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -17452,47 +35609,86 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); + f = message.getStartIdentifier_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getDocumentTypeName(); - if (f.length > 0) { - writer.writeString( + f = message.getStartIdentifierIncluded(); + if (f) { + writer.writeBool( 2, f ); } - f = message.getIndexName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getIndexValuesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 4, - f - ); - } - f = message.getVoterIdentifier_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } +}; + + +/** + * optional bytes start_identifier = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes start_identifier = 1; + * This is a type-conversion wrapper around `getStartIdentifier()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartIdentifier())); +}; + + +/** + * optional bytes start_identifier = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartIdentifier()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartIdentifier())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifier = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool start_identifier_included = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifierIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifierIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; @@ -17500,7 +35696,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * optional bytes contract_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getContractId = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getContractId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -17510,7 +35706,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * This is a type-conversion wrapper around `getContractId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getContractId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getContractId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getContractId())); }; @@ -17523,7 +35719,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * This is a type-conversion wrapper around `getContractId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getContractId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getContractId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getContractId())); }; @@ -17531,9 +35727,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setContractId = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setContractId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -17542,16 +35738,16 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * optional string document_type_name = 2; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getDocumentTypeName = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getDocumentTypeName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setDocumentTypeName = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setDocumentTypeName = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -17560,16 +35756,16 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * optional string index_name = 3; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexName = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setIndexName = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setIndexName = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; @@ -17578,7 +35774,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * repeated bytes index_values = 4; * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexValuesList = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexValuesList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); }; @@ -17588,7 +35784,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * This is a type-conversion wrapper around `getIndexValuesList()` * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexValuesList_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexValuesList_asB64 = function() { return /** @type {!Array} */ (jspb.Message.bytesListAsB64( this.getIndexValuesList())); }; @@ -17601,7 +35797,7 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * This is a type-conversion wrapper around `getIndexValuesList()` * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getIndexValuesList_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexValuesList_asU8 = function() { return /** @type {!Array} */ (jspb.Message.bytesListAsU8( this.getIndexValuesList())); }; @@ -17609,9 +35805,9 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setIndexValuesList = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setIndexValuesList = function(value) { return jspb.Message.setField(this, 4, value || []); }; @@ -17619,89 +35815,83 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.addIndexValues = function(value, opt_index) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.addIndexValues = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.clearIndexValuesList = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.clearIndexValuesList = function() { return this.setIndexValuesList([]); }; /** - * optional bytes voter_identifier = 5; - * @return {string} + * optional ResultType result_type = 5; + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getVoterIdentifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getResultType = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * optional bytes voter_identifier = 5; - * This is a type-conversion wrapper around `getVoterIdentifier()` - * @return {string} + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getVoterIdentifier_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getVoterIdentifier())); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setResultType = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); }; /** - * optional bytes voter_identifier = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getVoterIdentifier()` - * @return {!Uint8Array} + * optional bool allow_include_locked_and_abstaining_vote_tally = 6; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.getVoterIdentifier_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getVoterIdentifier())); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getAllowIncludeLockedAndAbstainingVoteTally = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest.prototype.setVoterIdentifier = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setAllowIncludeLockedAndAbstainingVoteTally = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); }; /** - * optional ContestedResourceVoteStatusRequest contested_resource_vote_status_request = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} + * optional StartAtIdentifierInfo start_at_identifier_info = 7; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.getContestedResourceVoteStatusRequest = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getStartAtIdentifierInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo, 7)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.ContestedResourceVoteStatusRequest|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.setContestedResourceVoteStatusRequest = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setStartAtIdentifierInfo = function(value) { + return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.clearContestedResourceVoteStatusRequest = function() { - return this.setContestedResourceVoteStatusRequest(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.clearStartAtIdentifierInfo = function() { + return this.setStartAtIdentifierInfo(undefined); }; @@ -17709,188 +35899,35 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRe * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest.prototype.hasContestedResourceVoteStatusRequest = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * repeated IdentityRequest identities = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getIdentitiesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setIdentitiesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addIdentities = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.IdentityRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearIdentitiesList = function() { - return this.setIdentitiesList([]); -}; - - -/** - * repeated ContractRequest contracts = 2; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getContractsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setContractsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; - - -/** - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addContracts = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.ContractRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearContractsList = function() { - return this.setContractsList([]); -}; - - -/** - * repeated DocumentRequest documents = 3; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getDocumentsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setDocumentsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addDocuments = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.DocumentRequest, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearDocumentsList = function() { - return this.setDocumentsList([]); -}; - - -/** - * repeated VoteStatusRequest votes = 4; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.getVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.setVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 4, value); -}; - - -/** - * @param {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest} - */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.addVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.VoteStatusRequest, opt_index); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.hasStartAtIdentifierInfo = function() { + return jspb.Message.getField(this, 7) != null; }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} returns this + * optional uint32 count = 8; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0.prototype.clearVotesList = function() { - return this.setVotesList([]); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** - * optional GetProofsRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetProofsRequest.GetProofsRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setCount = function(value) { + return jspb.Message.setField(this, 8, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsRequest} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.clearCount = function() { + return jspb.Message.setField(this, 8, undefined); }; @@ -17898,147 +35935,63 @@ proto.org.dash.platform.dapi.v0.GetProofsRequest.prototype.clearV0 = function() * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsRequest.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.GetProofsResponse.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetProofsResponse.VersionCase} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProofsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.hasCount = function() { + return jspb.Message.getField(this, 8) != null; }; - -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 = 9; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, 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.GetProofsResponse} 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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} + * optional GetContestedResourceVoteStateRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsResponse; - return proto.org.dash.platform.dapi.v0.GetProofsResponse.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0, 1)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.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.GetProofsResponse.GetProofsResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializeBinaryFromReader); - msg.setV0(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.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.GetContestedResourceVoteStateRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.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.GetProofsResponse} 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.GetProofsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; @@ -18051,21 +36004,21 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.serializeBinaryToWriter = func * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - PROOF: 1 +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_[0])); }; @@ -18083,8 +36036,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.toObject(opt_includeInstance, this); }; @@ -18093,14 +36046,13 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.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.GetProofsResponse.GetProofsResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.toObject = function(includeInstance, msg) { var f, obj = { - 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -18114,23 +36066,23 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0; - return proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.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.GetProofsResponse.GetProofsResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18138,14 +36090,9 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - 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 2: - 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 proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -18160,9 +36107,9 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.deserializ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18170,142 +36117,23 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProof(); + f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter - ); - } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.serializeBinaryToWriter ); } }; -/** - * optional Proof proof = 1; - * @return {?proto.org.dash.platform.dapi.v0.Proof} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.getProof = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ResponseMetadata metadata = 2; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.getMetadata = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 2)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional GetProofsResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetProofsResponse.GetProofsResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProofsResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProofsResponse} returns this - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; -}; - - /** * Oneof group definitions for this message. Each group defines the field @@ -18315,21 +36143,22 @@ proto.org.dash.platform.dapi.v0.GetProofsResponse.prototype.hasV0 = function() { * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + CONTESTED_RESOURCE_CONTENDERS: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_[0])); }; @@ -18347,8 +36176,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.toObject(opt_includeInstance, this); }; @@ -18357,13 +36186,15 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.toObject(includeInstance, f) + contestedResourceContenders: (f = msg.getContestedResourceContenders()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.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) { @@ -18377,23 +36208,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractRequest; - return proto.org.dash.platform.dapi.v0.GetDataContractRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.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.GetDataContractRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18401,9 +36232,19 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinaryFromReader); + msg.setContestedResourceContenders(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(); @@ -18418,9 +36259,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18428,18 +36269,34 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.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.GetDataContractRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getContestedResourceContenders(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.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 ); } }; @@ -18461,8 +36318,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.toObject(opt_includeInstance, this); }; @@ -18471,14 +36328,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0. * @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.GetDataContractRequest.GetDataContractRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + finishedVoteOutcome: jspb.Message.getFieldWithDefault(msg, 1, 0), + wonByIdentityId: msg.getWonByIdentityId_asB64(), + finishedAtBlockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + finishedAtCoreBlockHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + finishedAtBlockTimeMs: jspb.Message.getFieldWithDefault(msg, 5, 0), + finishedAtEpoch: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -18492,23 +36353,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0. /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0; - return proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.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.GetDataContractRequest.GetDataContractRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18516,12 +36377,28 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0. var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} */ (reader.readEnum()); + msg.setFinishedVoteOutcome(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWonByIdentityId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFinishedAtBlockHeight(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFinishedAtCoreBlockHeight(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setFinishedAtBlockTimeMs(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setFinishedAtEpoch(value); break; default: reader.skipField(); @@ -18536,9 +36413,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0. * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18546,151 +36423,223 @@ proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getFinishedVoteOutcome(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( 2, f ); } + f = message.getFinishedAtBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getFinishedAtCoreBlockHeight(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getFinishedAtBlockTimeMs(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getFinishedAtEpoch(); + if (f !== 0) { + writer.writeUint32( + 6, + f + ); + } }; /** - * optional bytes id = 1; + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome = { + TOWARDS_IDENTITY: 0, + LOCKED: 1, + NO_PREVIOUS_WINNER: 2 +}; + +/** + * optional FinishedVoteOutcome finished_vote_outcome = 1; + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedVoteOutcome = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedVoteOutcome = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bytes won_by_identity_id = 2; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getWonByIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` + * optional bytes won_by_identity_id = 2; + * This is a type-conversion wrapper around `getWonByIdentityId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.getId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getWonByIdentityId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + this.getWonByIdentityId())); }; /** - * optional bytes id = 1; + * optional bytes won_by_identity_id = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` + * This is a type-conversion wrapper around `getWonByIdentityId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.getId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getWonByIdentityId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); + this.getWonByIdentityId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setWonByIdentityId = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * optional bool prove = 2; + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.clearWonByIdentityId = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.hasWonByIdentityId = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} returns this + * optional uint64 finished_at_block_height = 3; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * optional GetDataContractRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractRequest.oneofGroups_[0], value); + * optional uint32 finished_at_core_block_height = 4; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtCoreBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractRequest} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtCoreBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional uint64 finished_at_block_time_ms = 5; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtBlockTimeMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtBlockTimeMs = function(value) { + return jspb.Message.setProto3IntField(this, 5, 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 uint32 finished_at_epoch = 6; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + /** - * @enum {number} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; + + /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractResponse.VersionCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractResponse.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.repeatedFields_ = [1]; @@ -18707,8 +36656,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.toObject(opt_includeInstance, this); }; @@ -18717,13 +36666,17 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.toObject(includeInstance, f) + contendersList: jspb.Message.toObjectList(msg.getContendersList(), + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.toObject, includeInstance), + abstainVoteTally: jspb.Message.getFieldWithDefault(msg, 2, 0), + lockVoteTally: jspb.Message.getFieldWithDefault(msg, 3, 0), + finishedVoteInfo: (f = msg.getFinishedVoteInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.toObject(includeInstance, f) }; if (includeInstance) { @@ -18737,23 +36690,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractResponse; - return proto.org.dash.platform.dapi.v0.GetDataContractResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.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.GetDataContractResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18761,9 +36714,22 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.deserializeBinaryFromRea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinaryFromReader); + msg.addContenders(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setAbstainVoteTally(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLockVoteTally(value); + break; + case 4: + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinaryFromReader); + msg.setFinishedVoteInfo(value); break; default: reader.skipField(); @@ -18778,9 +36744,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18788,52 +36754,195 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.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.GetDataContractResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getContendersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32( + 2, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } + f = message.getFinishedVoteInfo(); if (f != null) { writer.writeMessage( - 1, + 4, f, - proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.serializeBinaryToWriter ); } }; +/** + * repeated Contender contenders = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getContendersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender, 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setContendersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.addContenders = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender, opt_index); +}; + /** - * @enum {number} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - DATA_CONTRACT: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearContendersList = function() { + return this.setContendersList([]); +}; + + +/** + * optional uint32 abstain_vote_tally = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getAbstainVoteTally = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.ResultCase} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setAbstainVoteTally = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearAbstainVoteTally = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.hasAbstainVoteTally = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 lock_vote_tally = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getLockVoteTally = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setLockVoteTally = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearLockVoteTally = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.hasLockVoteTally = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional FinishedVoteInfo finished_vote_info = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getFinishedVoteInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo, 4)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setFinishedVoteInfo = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearFinishedVoteInfo = function() { + return this.setFinishedVoteInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.hasFinishedVoteInfo = function() { + return jspb.Message.getField(this, 4) != null; }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -18847,8 +36956,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.toObject(opt_includeInstance, this); }; @@ -18857,15 +36966,15 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * @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.GetDataContractResponse.GetDataContractResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.toObject = function(includeInstance, msg) { var f, obj = { - dataContract: msg.getDataContract_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) + identifier: msg.getIdentifier_asB64(), + voteCount: jspb.Message.getFieldWithDefault(msg, 2, 0), + document: msg.getDocument_asB64() }; if (includeInstance) { @@ -18879,23 +36988,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0; - return proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.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.GetDataContractResponse.GetDataContractResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -18904,17 +37013,15 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDataContract(value); + msg.setIdentifier(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 {number} */ (reader.readUint32()); + msg.setVoteCount(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.setDocument(value); break; default: reader.skipField(); @@ -18929,9 +37036,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -18939,86 +37046,102 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); - if (f != null) { + f = message.getIdentifier_asU8(); + if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getProof(); + f = /** @type {number} */ (jspb.Message.getField(message, 2)); if (f != null) { - writer.writeMessage( + writer.writeUint32( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); if (f != null) { - writer.writeMessage( + writer.writeBytes( 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + f ); } }; /** - * optional bytes data_contract = 1; + * optional bytes identifier = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getDataContract = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getIdentifier = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes data_contract = 1; - * This is a type-conversion wrapper around `getDataContract()` + * optional bytes identifier = 1; + * This is a type-conversion wrapper around `getIdentifier()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getDataContract_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getIdentifier_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDataContract())); + this.getIdentifier())); }; /** - * optional bytes data_contract = 1; + * optional bytes identifier = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDataContract()` + * This is a type-conversion wrapper around `getIdentifier()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getDataContract_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getIdentifier_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDataContract())); + this.getIdentifier())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.setDataContract = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.setIdentifier = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 vote_count = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getVoteCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.setVoteCount = function(value) { + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.clearDataContract = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0], undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.clearVoteCount = function() { + return jspb.Message.setField(this, 2, undefined); }; @@ -19026,7 +37149,104 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.hasDataContract = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.hasVoteCount = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes document = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getDocument = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes document = 3; + * This is a type-conversion wrapper around `getDocument()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getDocument_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDocument())); +}; + + +/** + * optional bytes document = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDocument()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getDocument_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDocument())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.setDocument = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.clearDocument = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.hasDocument = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ContestedResourceContenders contested_resource_contenders = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.getContestedResourceContenders = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.setContestedResourceContenders = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.clearContestedResourceContenders = function() { + return this.setContestedResourceContenders(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.hasContestedResourceContenders = function() { return jspb.Message.getField(this, 1) != null; }; @@ -19035,7 +37255,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -19043,18 +37263,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -19063,7 +37283,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -19072,7 +37292,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -19080,18 +37300,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.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.GetDataContractResponse.GetDataContractResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -19100,35 +37320,35 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetDataContractResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} + * optional GetContestedResourceVoteStateResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -19137,7 +37357,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.clearV0 = func * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -19151,21 +37371,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractResponse.prototype.hasV0 = functi * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractsRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.oneofGroups_[0])); }; @@ -19183,8 +37403,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.toObject(opt_includeInstance, this); }; @@ -19193,13 +37413,13 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -19213,23 +37433,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsRequest; - return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.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.GetDataContractsRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19237,8 +37457,8 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.deserializeBinaryFromRea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -19254,9 +37474,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractsRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19264,18 +37484,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.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.GetDataContractsRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.serializeBinaryToWriter ); } }; @@ -19287,7 +37507,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.serializeBinaryToWriter * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.repeatedFields_ = [4]; @@ -19304,8 +37524,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.toObject(opt_includeInstance, this); }; @@ -19314,14 +37534,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV * @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.GetDataContractsRequest.GetDataContractsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - idsList: msg.getIdsList_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + contractId: msg.getContractId_asB64(), + documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), + indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), + indexValuesList: msg.getIndexValuesList_asB64(), + contestantId: msg.getContestantId_asB64(), + startAtIdentifierInfo: (f = msg.getStartAtIdentifierInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.toObject(includeInstance, f), + count: jspb.Message.getFieldWithDefault(msg, 7, 0), + orderAscending: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) }; if (includeInstance) { @@ -19335,23 +37562,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0; - return proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.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.GetDataContractsRequest.GetDataContractsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19360,9 +37587,38 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIds(value); + msg.setContractId(value); break; case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentTypeName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setIndexName(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIndexValues(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContestantId(value); + break; + case 6: + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader); + msg.setStartAtIdentifierInfo(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCount(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOrderAscending(value); + break; + case 9: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -19379,9 +37635,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19389,20 +37645,194 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdsList_asU8(); + f = message.getContractId_asU8(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeBytes( 1, f ); } + f = message.getDocumentTypeName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIndexName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getIndexValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } + f = message.getContestantId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getStartAtIdentifierInfo(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeUint32( + 7, + f + ); + } + f = message.getOrderAscending(); + if (f) { + writer.writeBool( + 8, + f + ); + } f = message.getProve(); + if (f) { + writer.writeBool( + 9, + f + ); + } +}; + + + + + +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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.toObject = function(includeInstance, msg) { + var f, obj = { + startIdentifier: msg.getStartIdentifier_asB64(), + startIdentifierIncluded: 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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.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.setStartIdentifier(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStartIdentifierIncluded(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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartIdentifier_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getStartIdentifierIncluded(); if (f) { writer.writeBool( 2, @@ -19413,109 +37843,307 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV /** - * repeated bytes ids = 1; - * @return {!Array} + * optional bytes start_identifier = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes start_identifier = 1; + * This is a type-conversion wrapper around `getStartIdentifier()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartIdentifier())); +}; + + +/** + * optional bytes start_identifier = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartIdentifier()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartIdentifier())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifier = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool start_identifier_included = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifierIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifierIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string document_type_name = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getDocumentTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setDocumentTypeName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string index_name = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setIndexName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated bytes index_values = 4; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * repeated bytes index_values = 4; + * This is a type-conversion wrapper around `getIndexValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexValuesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIndexValuesList())); +}; + + +/** + * repeated bytes index_values = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIndexValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexValuesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIndexValuesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setIndexValuesList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.addIndexValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getIdsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.clearIndexValuesList = function() { + return this.setIndexValuesList([]); }; /** - * repeated bytes ids = 1; - * This is a type-conversion wrapper around `getIdsList()` - * @return {!Array} + * optional bytes contestant_id = 5; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getIdsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIdsList())); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContestantId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * repeated bytes ids = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdsList()` - * @return {!Array} + * optional bytes contestant_id = 5; + * This is a type-conversion wrapper around `getContestantId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getIdsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIdsList())); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContestantId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContestantId())); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + * optional bytes contestant_id = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getContestantId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.setIdsList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContestantId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContestantId())); }; /** * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.addIds = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setContestantId = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + * optional StartAtIdentifierInfo start_at_identifier_info = 6; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.clearIdsList = function() { - return this.setIdsList([]); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getStartAtIdentifierInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo, 6)); }; /** - * optional bool prove = 2; - * @return {boolean} + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setStartAtIdentifierInfo = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.clearStartAtIdentifierInfo = function() { + return this.setStartAtIdentifierInfo(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.hasStartAtIdentifierInfo = function() { + return jspb.Message.getField(this, 6) != null; }; /** - * optional GetDataContractsRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} + * optional uint32 count = 7; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractsRequest.oneofGroups_[0], value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setCount = function(value) { + return jspb.Message.setField(this, 7, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsRequest} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.clearCount = function() { + return jspb.Message.setField(this, 7, undefined); }; @@ -19523,150 +38151,109 @@ proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.clearV0 = func * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.hasCount = function() { + return jspb.Message.getField(this, 7) != 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 bool order_ascending = 8; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getOrderAscending = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + /** - * @enum {number} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setOrderAscending = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase} + * optional bool prove = 9; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); }; - -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} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, 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.GetDataContractsResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional GetContestedResourceVotersForIdentityRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.toObject = function(includeInstance, msg) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0, 1)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse; - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.deserializeBinaryFromReader(msg, reader); + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.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.GetDataContractsResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.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.GetDataContractsResponse.GetDataContractsResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.deserializeBinaryFromReader); - msg.setV0(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.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.GetDataContractsResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.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.GetDataContractsResponse} 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.GetDataContractsResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.serializeBinaryToWriter - ); - } -}; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_ = [[1]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; +/** + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_[0])); +}; @@ -19683,8 +38270,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.toObject(opt_includeInstance, this); }; @@ -19693,14 +38280,13 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.proto * @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.GetDataContractsResponse.DataContractEntry} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.toObject = function(includeInstance, msg) { var f, obj = { - identifier: msg.getIdentifier_asB64(), - dataContract: (f = msg.getDataContract()) && google_protobuf_wrappers_pb.BytesValue.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -19714,23 +38300,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.toObj /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry; - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.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.GetDataContractsResponse.DataContractEntry} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19738,13 +38324,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deser var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentifier(value); - break; - case 2: - var value = new google_protobuf_wrappers_pb.BytesValue; - reader.readMessage(value,google_protobuf_wrappers_pb.BytesValue.deserializeBinaryFromReader); - msg.setDataContract(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -19759,9 +38341,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deser * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -19769,119 +38351,52 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.proto /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentifier_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getDataContract(); + f = message.getV0(); if (f != null) { writer.writeMessage( - 2, + 1, f, - google_protobuf_wrappers_pb.BytesValue.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.serializeBinaryToWriter ); } }; -/** - * optional bytes identifier = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getIdentifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes identifier = 1; - * This is a type-conversion wrapper around `getIdentifier()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getIdentifier_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentifier())); -}; - - -/** - * optional bytes identifier = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentifier()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.getIdentifier_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentifier())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} returns this - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.setIdentifier = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - /** - * optional google.protobuf.BytesValue data_contract = 2; - * @return {?proto.google.protobuf.BytesValue} + * 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.GetDataContractsResponse.DataContractEntry.prototype.getDataContract = function() { - return /** @type{?proto.google.protobuf.BytesValue} */ ( - jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BytesValue, 2)); -}; - - -/** - * @param {?proto.google.protobuf.BytesValue|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} returns this -*/ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.setDataContract = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_ = [[1,2]]; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.clearDataContract = function() { - return this.setDataContract(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + CONTESTED_RESOURCE_VOTERS: 1, + PROOF: 2 }; - /** - * Returns whether this field is set. - * @return {boolean} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.prototype.hasDataContract = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_[0])); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.repeatedFields_ = [1]; - - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -19895,8 +38410,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.toObject(opt_includeInstance, this); }; @@ -19905,14 +38420,15 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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.GetDataContractsResponse.DataContracts} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - dataContractEntriesList: jspb.Message.toObjectList(msg.getDataContractEntriesList(), - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.toObject, includeInstance) + contestedResourceVoters: (f = msg.getContestedResourceVoters()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.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) { @@ -19926,23 +38442,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.toObject /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts; - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.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.GetDataContractsResponse.DataContracts} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -19950,114 +38466,83 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deseriali var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.deserializeBinaryFromReader); - msg.addDataContractEntries(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinaryFromReader); + msg.setContestedResourceVoters(value); break; - default: - reader.skipField(); + 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; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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.GetDataContractsResponse.DataContracts} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDataContractEntriesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated DataContractEntry data_contract_entries = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.getDataContractEntriesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} returns this -*/ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.setDataContractEntriesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + 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; }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.addDataContractEntries = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry, opt_index); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.prototype.clearDataContractEntriesList = function() { - return this.setDataContractEntriesList([]); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContestedResourceVoters(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.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 + ); + } }; /** - * 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.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - DATA_CONTRACTS: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.repeatedFields_ = [1]; @@ -20074,8 +38559,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.toObject(opt_includeInstance, this); }; @@ -20084,15 +38569,14 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * @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.GetDataContractsResponse.GetDataContractsResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.toObject = function(includeInstance, msg) { var f, obj = { - dataContracts: (f = msg.getDataContracts()) && proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.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) + votersList: msg.getVotersList_asB64(), + finishedResults: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -20106,23 +38590,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0; - return proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters; + return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.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.GetDataContractsResponse.GetDataContractsResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20130,19 +38614,12 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.deserializeBinaryFromReader); - msg.setDataContracts(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addVoters(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 {boolean} */ (reader.readBool()); + msg.setFinishedResults(value); break; default: reader.skipField(); @@ -20157,9 +38634,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20167,64 +38644,133 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDataContracts(); - if (f != null) { - writer.writeMessage( + f = message.getVotersList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts.serializeBinaryToWriter + f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getFinishedResults(); + if (f) { + writer.writeBool( 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 + f ); } }; /** - * optional DataContracts data_contracts = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} + * repeated bytes voters = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.getDataContracts = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getVotersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContracts|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + * repeated bytes voters = 1; + * This is a type-conversion wrapper around `getVotersList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getVotersList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getVotersList())); +}; + + +/** + * repeated bytes voters = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getVotersList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getVotersList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getVotersList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.setVotersList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.addVoters = 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.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.clearVotersList = function() { + return this.setVotersList([]); +}; + + +/** + * optional bool finished_results = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getFinishedResults = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.setFinishedResults = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional ContestedResourceVoters contested_resource_voters = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getContestedResourceVoters = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.setDataContracts = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.setContestedResourceVoters = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.clearDataContracts = function() { - return this.setDataContracts(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.clearContestedResourceVoters = function() { + return this.setContestedResourceVoters(undefined); }; @@ -20232,7 +38778,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.hasDataContracts = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.hasContestedResourceVoters = function() { return jspb.Message.getField(this, 1) != null; }; @@ -20241,7 +38787,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -20249,18 +38795,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -20269,7 +38815,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -20278,7 +38824,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -20286,18 +38832,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.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.GetDataContractsResponse.GetDataContractsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -20306,35 +38852,35 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsRespons * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetDataContractsResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} + * optional GetContestedResourceVotersForIdentityResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractsResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractsResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -20343,7 +38889,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.clearV0 = fun * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -20357,21 +38903,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractsResponse.prototype.hasV0 = funct * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_[0])); }; @@ -20389,8 +38935,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.toObject(opt_includeInstance, this); }; @@ -20399,13 +38945,13 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -20419,23 +38965,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest; - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.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.GetDataContractHistoryRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20443,8 +38989,8 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -20460,9 +39006,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20470,18 +39016,196 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.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.GetDataContractHistoryRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( - 1, + 1, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + limit: (f = msg.getLimit()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + offset: (f = msg.getOffset()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), + orderAscending: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + startAtVotePollIdInfo: (f = msg.getStartAtVotePollIdInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.toObject(includeInstance, f), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 6, 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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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 google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setLimit(value); + break; + case 3: + var value = new google_protobuf_wrappers_pb.UInt32Value; + reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); + msg.setOffset(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOrderAscending(value); + break; + case 5: + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.deserializeBinaryFromReader); + msg.setStartAtVotePollIdInfo(value); + break; + case 6: + 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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getLimit(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter + ); + } + f = message.getOffset(); + if (f != null) { + writer.writeMessage( + 3, f, - proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.serializeBinaryToWriter + google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter + ); + } + f = message.getOrderAscending(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getStartAtVotePollIdInfo(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.serializeBinaryToWriter + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 6, + f ); } }; @@ -20503,8 +39227,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.toObject(opt_includeInstance, this); }; @@ -20513,17 +39237,14 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis * @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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - limit: (f = msg.getLimit()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - offset: (f = msg.getOffset()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - startAtMs: jspb.Message.getFieldWithDefault(msg, 4, 0), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + startAtPollIdentifier: msg.getStartAtPollIdentifier_asB64(), + startPollIdentifierIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -20537,23 +39258,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0; - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.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.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20562,25 +39283,11 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + msg.setStartAtPollIdentifier(value); break; case 2: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setLimit(value); - break; - case 3: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setOffset(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartAtMs(value); - break; - case 5: var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + msg.setStartPollIdentifierIncluded(value); break; default: reader.skipField(); @@ -20595,9 +39302,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20605,46 +39312,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); + f = message.getStartAtPollIdentifier_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getLimit(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getOffset(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getStartAtMs(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getProve(); + f = message.getStartPollIdentifierIncluded(); if (f) { writer.writeBool( - 5, + 2, f ); } @@ -20652,43 +39336,103 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis /** - * optional bytes id = 1; + * optional bytes start_at_poll_identifier = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getId = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartAtPollIdentifier = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` + * optional bytes start_at_poll_identifier = 1; + * This is a type-conversion wrapper around `getStartAtPollIdentifier()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartAtPollIdentifier_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + this.getStartAtPollIdentifier())); }; /** - * optional bytes id = 1; + * optional bytes start_at_poll_identifier = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` + * This is a type-conversion wrapper around `getStartAtPollIdentifier()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartAtPollIdentifier_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); + this.getStartAtPollIdentifier())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setId = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.setStartAtPollIdentifier = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bool start_poll_identifier_included = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartPollIdentifierIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.setStartPollIdentifierIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setIdentityId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -20697,7 +39441,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis * optional google.protobuf.UInt32Value limit = 2; * @return {?proto.google.protobuf.UInt32Value} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getLimit = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getLimit = function() { return /** @type{?proto.google.protobuf.UInt32Value} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 2)); }; @@ -20705,18 +39449,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis /** * @param {?proto.google.protobuf.UInt32Value|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setLimit = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setLimit = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.clearLimit = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.clearLimit = function() { return this.setLimit(undefined); }; @@ -20725,7 +39469,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.hasLimit = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.hasLimit = function() { return jspb.Message.getField(this, 2) != null; }; @@ -20734,7 +39478,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis * optional google.protobuf.UInt32Value offset = 3; * @return {?proto.google.protobuf.UInt32Value} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getOffset = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getOffset = function() { return /** @type{?proto.google.protobuf.UInt32Value} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 3)); }; @@ -20742,18 +39486,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis /** * @param {?proto.google.protobuf.UInt32Value|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setOffset = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setOffset = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.clearOffset = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.clearOffset = function() { return this.setOffset(undefined); }; @@ -20762,71 +39506,108 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHis * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.hasOffset = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.hasOffset = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional uint64 start_at_ms = 4; - * @return {number} + * optional bool order_ascending = 4; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getStartAtMs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getOrderAscending = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setStartAtMs = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setOrderAscending = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * optional bool prove = 5; + * optional StartAtVotePollIdInfo start_at_vote_poll_id_info = 5; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getStartAtVotePollIdInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo, 5)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setStartAtVotePollIdInfo = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.clearStartAtVotePollIdInfo = function() { + return this.setStartAtVotePollIdInfo(undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.hasStartAtVotePollIdInfo = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bool prove = 6; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); }; /** - * optional GetDataContractHistoryRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} + * optional GetContestedResourceIdentityVotesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -20835,7 +39616,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.clearV0 * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -20849,21 +39630,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.prototype.hasV0 = * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_[0])); }; @@ -20881,8 +39662,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.toObject(opt_includeInstance, this); }; @@ -20891,13 +39672,13 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.toObjec * @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.GetDataContractHistoryResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -20911,23 +39692,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.toObject = functi /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse; - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.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.GetDataContractHistoryResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -20935,8 +39716,8 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.deserializeBinary var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -20952,9 +39733,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.deserializeBinary * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -20962,18 +39743,186 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.seriali /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( - 1, + 1, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + VOTES: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + votes: (f = msg.getVotes()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.toObject(includeInstance, f), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinaryFromReader); + msg.setVotes(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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVotes(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, f, - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.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 ); } }; @@ -20981,30 +39930,11 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.serializeBinaryTo /** - * 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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - DATA_CONTRACT_HISTORY: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.repeatedFields_ = [1]; @@ -21021,8 +39951,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.toObject(opt_includeInstance, this); }; @@ -21031,15 +39961,15 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * @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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.toObject = function(includeInstance, msg) { var f, obj = { - dataContractHistory: (f = msg.getDataContractHistory()) && proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.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) + contestedResourceIdentityVotesList: jspb.Message.toObjectList(msg.getContestedResourceIdentityVotesList(), + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.toObject, includeInstance), + finishedResults: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -21053,23 +39983,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0; - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21077,19 +40007,13 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.deserializeBinaryFromReader); - msg.setDataContractHistory(value); + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinaryFromReader); + msg.addContestedResourceIdentityVotes(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 {boolean} */ (reader.readBool()); + msg.setFinishedResults(value); break; default: reader.skipField(); @@ -21104,9 +40028,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21114,39 +40038,86 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDataContractHistory(); - if (f != null) { - writer.writeMessage( + f = message.getContestedResourceIdentityVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.serializeBinaryToWriter ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getFinishedResults(); + if (f) { + writer.writeBool( 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 + f ); } }; +/** + * repeated ContestedResourceIdentityVote contested_resource_identity_votes = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.getContestedResourceIdentityVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} returns this +*/ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.setContestedResourceIdentityVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.addContestedResourceIdentityVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.clearContestedResourceIdentityVotesList = function() { + return this.setContestedResourceIdentityVotesList([]); +}; + + +/** + * optional bool finished_results = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.getFinishedResults = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.setFinishedResults = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + @@ -21163,8 +40134,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.toObject(opt_includeInstance, this); }; @@ -21173,14 +40144,14 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * @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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.toObject = function(includeInstance, msg) { var f, obj = { - date: jspb.Message.getFieldWithDefault(msg, 1, 0), - value: msg.getValue_asB64() + voteChoiceType: jspb.Message.getFieldWithDefault(msg, 1, 0), + identityId: msg.getIdentityId_asB64() }; if (includeInstance) { @@ -21194,23 +40165,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry; - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21218,12 +40189,12 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setDate(value); + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} */ (reader.readEnum()); + msg.setVoteChoiceType(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setValue(value); + msg.setIdentityId(value); break; default: reader.skipField(); @@ -21238,9 +40209,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21248,21 +40219,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDate(); - if (f !== 0) { - writer.writeUint64( + f = message.getVoteChoiceType(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getValue_asU8(); - if (f.length > 0) { + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { writer.writeBytes( 2, f @@ -21272,62 +40243,89 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** - * optional uint64 date = 1; - * @return {number} + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getDate = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType = { + TOWARDS_IDENTITY: 0, + ABSTAIN: 1, + LOCK: 2 +}; + +/** + * optional VoteChoiceType vote_choice_type = 1; + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getVoteChoiceType = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} returns this + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.setDate = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.setVoteChoiceType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional bytes value = 2; + * optional bytes identity_id = 2; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getValue = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getIdentityId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes value = 2; - * This is a type-conversion wrapper around `getValue()` + * optional bytes identity_id = 2; + * This is a type-conversion wrapper around `getIdentityId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getValue_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getIdentityId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getValue())); + this.getIdentityId())); }; /** - * optional bytes value = 2; + * optional bytes identity_id = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getValue()` + * This is a type-conversion wrapper around `getIdentityId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.getValue_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getIdentityId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getValue())); + this.getIdentityId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.prototype.setValue = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.setIdentityId = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.clearIdentityId = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.hasIdentityId = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -21337,7 +40335,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.repeatedFields_ = [3]; @@ -21354,8 +40352,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.toObject(opt_includeInstance, this); }; @@ -21364,14 +40362,16 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * @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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.toObject = function(includeInstance, msg) { var f, obj = { - dataContractEntriesList: jspb.Message.toObjectList(msg.getDataContractEntriesList(), - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.toObject, includeInstance) + contractId: msg.getContractId_asB64(), + documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), + serializedIndexStorageValuesList: msg.getSerializedIndexStorageValuesList_asB64(), + voteChoice: (f = msg.getVoteChoice()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.toObject(includeInstance, f) }; if (includeInstance) { @@ -21385,23 +40385,23 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory; - return proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote; + return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21409,9 +40409,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.deserializeBinaryFromReader); - msg.addDataContractEntries(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentTypeName(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSerializedIndexStorageValues(value); + break; + case 4: + var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.deserializeBinaryFromReader); + msg.setVoteChoice(value); break; default: reader.skipField(); @@ -21426,9 +40438,9 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21436,86 +40448,227 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} message + * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDataContractEntriesList(); + f = message.getContractId_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeBytes( 1, + f + ); + } + f = message.getDocumentTypeName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSerializedIndexStorageValuesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } + f = message.getVoteChoice(); + if (f != null) { + writer.writeMessage( + 4, f, - proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.serializeBinaryToWriter ); } }; /** - * repeated DataContractHistoryEntry data_contract_entries = 1; - * @return {!Array} + * optional bytes contract_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.getDataContractEntriesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} returns this + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string document_type_name = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getDocumentTypeName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setDocumentTypeName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated bytes serialized_index_storage_values = 3; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getSerializedIndexStorageValuesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes serialized_index_storage_values = 3; + * This is a type-conversion wrapper around `getSerializedIndexStorageValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getSerializedIndexStorageValuesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSerializedIndexStorageValuesList())); +}; + + +/** + * repeated bytes serialized_index_storage_values = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSerializedIndexStorageValuesList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getSerializedIndexStorageValuesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSerializedIndexStorageValuesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setSerializedIndexStorageValuesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.addSerializedIndexStorageValues = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.clearSerializedIndexStorageValuesList = function() { + return this.setSerializedIndexStorageValuesList([]); +}; + + +/** + * optional ResourceVoteChoice vote_choice = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} + */ +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getVoteChoice = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice, 4)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.setDataContractEntriesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setVoteChoice = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.addDataContractEntries = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry, opt_index); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.clearVoteChoice = function() { + return this.setVoteChoice(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.prototype.clearDataContractEntriesList = function() { - return this.setDataContractEntriesList([]); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.hasVoteChoice = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional DataContractHistory data_contract_history = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} + * optional ContestedResourceIdentityVotes votes = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.getDataContractHistory = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.getVotes = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.setDataContractHistory = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.setVotes = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.clearDataContractHistory = function() { - return this.setDataContractHistory(undefined); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.clearVotes = function() { + return this.setVotes(undefined); }; @@ -21523,7 +40676,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.hasDataContractHistory = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.hasVotes = function() { return jspb.Message.getField(this, 1) != null; }; @@ -21532,7 +40685,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -21540,18 +40693,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -21560,7 +40713,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -21569,7 +40722,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -21577,18 +40730,18 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -21597,35 +40750,35 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHi * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetDataContractHistoryResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} + * optional GetContestedResourceIdentityVotesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -21634,7 +40787,7 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.clearV0 * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -21648,21 +40801,21 @@ proto.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.prototype.hasV0 = * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_[0])); }; @@ -21680,8 +40833,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.toObject(opt_includeInstance, this); }; @@ -21690,13 +40843,13 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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.GetDocumentsRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -21710,23 +40863,23 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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.GetDocumentsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest; - return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest; + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.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.GetDocumentsRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21734,8 +40887,8 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.deserializeBinaryFromReader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -21751,9 +40904,9 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.deserializeBinaryFromReader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDocumentsRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21761,50 +40914,24 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.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.GetDocumentsRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.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.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_ = [[6,7]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase = { - START_NOT_SET: 0, - START_AFTER: 6, - START_AT: 7 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0])); -}; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -21820,8 +40947,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.toObject(opt_includeInstance, this); }; @@ -21830,20 +40957,14 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.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.GetDocumentsRequest.GetDocumentsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - dataContractId: msg.getDataContractId_asB64(), - documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), - where: msg.getWhere_asB64(), - orderBy: msg.getOrderBy_asB64(), - limit: jspb.Message.getFieldWithDefault(msg, 5, 0), - startAfter: msg.getStartAfter_asB64(), - startAt: msg.getStartAt_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) + id: msg.getId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -21857,23 +40978,23 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObje /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0; - return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0; + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.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.GetDocumentsRequest.GetDocumentsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -21882,33 +41003,9 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deseri switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDataContractId(value); + msg.setId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentType(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWhere(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderBy(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLimit(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStartAfter(value); - break; - case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStartAt(value); - break; - case 8: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -21925,9 +41022,9 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deseri * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -21935,395 +41032,113 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.protot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDataContractId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getDocumentType(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getWhere_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getOrderBy_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getLimit(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); - if (f != null) { - writer.writeBytes( - 6, - f - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); - if (f != null) { - writer.writeBytes( - 7, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 8, - f - ); - } -}; - - -/** - * optional bytes data_contract_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes data_contract_id = 1; - * This is a type-conversion wrapper around `getDataContractId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDataContractId())); -}; - - -/** - * optional bytes data_contract_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDataContractId()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDataContractId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setDataContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string document_type = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDocumentType = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setDocumentType = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bytes where = 3; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getWhere = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes where = 3; - * This is a type-conversion wrapper around `getWhere()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getWhere_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWhere())); -}; - - -/** - * optional bytes where = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWhere()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getWhere_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWhere())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setWhere = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); -}; - - -/** - * optional bytes order_by = 4; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getOrderBy = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes order_by = 4; - * This is a type-conversion wrapper around `getOrderBy()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getOrderBy_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderBy())); -}; - - -/** - * optional bytes order_by = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderBy()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getOrderBy_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderBy())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setOrderBy = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - -/** - * optional uint32 limit = 5; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setLimit = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional bytes start_after = 6; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAfter = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * optional bytes start_after = 6; - * This is a type-conversion wrapper around `getStartAfter()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAfter_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartAfter())); -}; - - -/** - * optional bytes start_after = 6; - * 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.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAfter_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartAfter())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setStartAfter = function(value) { - return jspb.Message.setOneofField(this, 6, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.clearStartAfter = function() { - return jspb.Message.setOneofField(this, 6, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.hasStartAfter = function() { - return jspb.Message.getField(this, 6) != null; +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.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 start_at = 7; + * optional bytes id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAt = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes start_at = 7; - * This is a type-conversion wrapper around `getStartAt()` + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAt_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartAt())); + this.getId())); }; /** - * optional bytes start_at = 7; + * 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 `getStartAt()` + * This is a type-conversion wrapper around `getId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartAt_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartAt())); + this.getId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setStartAt = function(value) { - return jspb.Message.setOneofField(this, 7, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.clearStartAt = function() { - return jspb.Message.setOneofField(this, 7, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.hasStartAt = function() { - return jspb.Message.getField(this, 7) != null; +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional bool prove = 8; + * optional bool prove = 2; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetDocumentsRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + * optional GetPrefundedSpecializedBalanceRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -22332,7 +41147,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.clearV0 = function * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -22346,21 +41161,21 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.prototype.hasV0 = function() * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_[0])); }; @@ -22378,8 +41193,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.toObject(opt_includeInstance, this); }; @@ -22388,13 +41203,13 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.toObject = functi * @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.GetDocumentsResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -22408,23 +41223,23 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.toObject = function(include /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse; - return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse; + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.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.GetDocumentsResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -22432,8 +41247,8 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.deserializeBinaryFromReader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -22449,9 +41264,9 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.deserializeBinaryFromReader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -22459,18 +41274,18 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.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.GetDocumentsResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.serializeBinaryToWriter ); } }; @@ -22485,22 +41300,22 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.serializeBinaryToWriter = f * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.ResultCase = { RESULT_NOT_SET: 0, - DOCUMENTS: 1, + BALANCE: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0])); }; @@ -22518,8 +41333,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.toObject(opt_includeInstance, this); }; @@ -22528,13 +41343,13 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot * @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.GetDocumentsResponse.GetDocumentsResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - documents: (f = msg.getDocuments()) && proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.toObject(includeInstance, f), + 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) }; @@ -22550,23 +41365,23 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.toOb /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0; - return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0; + return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.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.GetDocumentsResponse.GetDocumentsResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -22574,9 +41389,8 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.dese var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.deserializeBinaryFromReader); - msg.setDocuments(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -22601,9 +41415,9 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.dese * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -22611,18 +41425,17 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDocuments(); + f = /** @type {number} */ (jspb.Message.getField(message, 1)); if (f != null) { - writer.writeMessage( + writer.writeUint64( 1, - f, - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.serializeBinaryToWriter + f ); } f = message.getProof(); @@ -22644,211 +41457,30 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.seri }; - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.toObject = function(includeInstance, msg) { - var f, obj = { - documentsList: msg.getDocumentsList_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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents; - return proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.addDocuments(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.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDocumentsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } -}; - - -/** - * repeated bytes documents = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.getDocumentsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes documents = 1; - * This is a type-conversion wrapper around `getDocumentsList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.getDocumentsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getDocumentsList())); -}; - - -/** - * repeated bytes documents = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDocumentsList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.getDocumentsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getDocumentsList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.setDocumentsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} returns this - */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.addDocuments = 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.GetDocumentsResponse.GetDocumentsResponseV0.Documents} returns this + * optional uint64 balance = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents.prototype.clearDocumentsList = function() { - return this.setDocumentsList([]); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * optional Documents documents = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.getDocuments = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.setDocuments = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.setBalance = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0], value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.clearDocuments = function() { - return this.setDocuments(undefined); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.clearBalance = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0], undefined); }; @@ -22856,7 +41488,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.hasDocuments = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.hasBalance = function() { return jspb.Message.getField(this, 1) != null; }; @@ -22865,7 +41497,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -22873,18 +41505,18 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -22893,7 +41525,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -22902,7 +41534,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -22910,18 +41542,18 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.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.GetDocumentsResponse.GetDocumentsResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -22930,35 +41562,35 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prot * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetDocumentsResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} + * optional GetPrefundedSpecializedBalanceResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -22967,7 +41599,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.clearV0 = functio * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -22981,21 +41613,21 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.prototype.hasV0 = function( * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_[0])); }; @@ -23013,8 +41645,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.toObject(opt_includeInstance, this); }; @@ -23023,13 +41655,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.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.GetIdentityByPublicKeyHashRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -23043,23 +41675,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.toObject = fun /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest; - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest; + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.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.GetIdentityByPublicKeyHashRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23067,8 +41699,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.deserializeBin var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -23084,9 +41716,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.deserializeBin * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23094,18 +41726,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.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.GetIdentityByPublicKeyHashRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.serializeBinaryToWriter ); } }; @@ -23127,8 +41759,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.toObject(opt_includeInstance, this); }; @@ -23137,14 +41769,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByP * @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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - publicKeyHash: msg.getPublicKeyHash_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + prove: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -23158,23 +41789,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByP /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0; - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0; + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.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.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23182,10 +41813,6 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByP var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPublicKeyHash(value); - break; - case 2: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -23202,9 +41829,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByP * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23212,23 +41839,16 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByP /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPublicKeyHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } f = message.getProve(); if (f) { writer.writeBool( - 2, + 1, f ); } @@ -23236,89 +41856,47 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByP /** - * optional bytes public_key_hash = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getPublicKeyHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes public_key_hash = 1; - * This is a type-conversion wrapper around `getPublicKeyHash()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getPublicKeyHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPublicKeyHash())); -}; - - -/** - * optional bytes public_key_hash = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPublicKeyHash()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getPublicKeyHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPublicKeyHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.setPublicKeyHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bool prove = 2; + * optional bool prove = 1; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; /** - * optional GetIdentityByPublicKeyHashRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} + * optional GetTotalCreditsInPlatformRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -23327,7 +41905,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.clea * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -23341,21 +41919,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.prototype.hasV * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_[0])); }; @@ -23373,8 +41951,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.toObject(opt_includeInstance, this); }; @@ -23383,13 +41961,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.toO * @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.GetIdentityByPublicKeyHashResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -23403,23 +41981,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.toObject = fu /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse; - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse; + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.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.GetIdentityByPublicKeyHashResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23427,8 +42005,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.deserializeBi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -23444,9 +42022,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.deserializeBi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23454,18 +42032,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.ser /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.serializeBinaryToWriter ); } }; @@ -23480,22 +42058,22 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.serializeBina * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.ResultCase = { RESULT_NOT_SET: 0, - IDENTITY: 1, + CREDITS: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0])); }; @@ -23513,8 +42091,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.toObject(opt_includeInstance, this); }; @@ -23523,13 +42101,13 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * @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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - identity: msg.getIdentity_asB64(), + credits: 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) }; @@ -23545,23 +42123,23 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0; - return proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0; + return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23569,8 +42147,8 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentity(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setCredits(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -23595,9 +42173,9 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23605,15 +42183,15 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + f = /** @type {number} */ (jspb.Message.getField(message, 1)); if (f != null) { - writer.writeBytes( + writer.writeUint64( 1, f ); @@ -23638,53 +42216,29 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy /** - * optional bytes identity = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.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} + * optional uint64 credits = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getIdentity_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentity())); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.getCredits = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.setIdentity = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.setCredits = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0], value); }; /** * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.clearIdentity = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0], undefined); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.clearCredits = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0], undefined); }; @@ -23692,7 +42246,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.hasIdentity = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.hasCredits = function() { return jspb.Message.getField(this, 1) != null; }; @@ -23701,7 +42255,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -23709,18 +42263,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -23729,7 +42283,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -23738,7 +42292,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -23746,18 +42300,18 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.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.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -23766,35 +42320,35 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityBy * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetIdentityByPublicKeyHashResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} + * optional GetTotalCreditsInPlatformResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -23803,7 +42357,7 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.cle * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -23817,21 +42371,21 @@ proto.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.prototype.has * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_[0])); }; @@ -23849,8 +42403,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.toObject(opt_includeInstance, this); }; @@ -23859,13 +42413,13 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.to * @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.WaitForStateTransitionResultRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -23879,23 +42433,23 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.toObject = f /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest; - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsRequest; + return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.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.WaitForStateTransitionResultRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -23903,8 +42457,8 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.deserializeB var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -23920,9 +42474,9 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.deserializeB * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPathElementsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -23930,24 +42484,31 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.se /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.serializeBinaryToWriter ); } }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.repeatedFields_ = [1,2]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -23963,8 +42524,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.toObject(opt_includeInstance, this); }; @@ -23973,14 +42534,15 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForState * @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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - stateTransitionHash: msg.getStateTransitionHash_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + pathList: msg.getPathList_asB64(), + keysList: msg.getKeysList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -23994,23 +42556,23 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForState /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0; - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0; + return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.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.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24019,9 +42581,13 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForState switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStateTransitionHash(value); + msg.addPath(value); break; case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addKeys(value); + break; + case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -24038,9 +42604,9 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForState * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24048,23 +42614,30 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForState /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStateTransitionHash_asU8(); + f = message.getPathList_asU8(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedBytes( 1, f ); } + f = message.getKeysList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } f = message.getProve(); if (f) { writer.writeBool( - 2, + 3, f ); } @@ -24072,89 +42645,169 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForState /** - * optional bytes state_transition_hash = 1; - * @return {string} + * repeated bytes path = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getStateTransitionHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getPathList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * optional bytes state_transition_hash = 1; - * This is a type-conversion wrapper around `getStateTransitionHash()` - * @return {string} + * repeated bytes path = 1; + * This is a type-conversion wrapper around `getPathList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getStateTransitionHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStateTransitionHash())); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getPathList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getPathList())); }; /** - * optional bytes state_transition_hash = 1; + * repeated bytes path = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStateTransitionHash()` - * @return {!Uint8Array} + * This is a type-conversion wrapper around `getPathList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getStateTransitionHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStateTransitionHash())); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getPathList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getPathList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.setPathList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} returns this + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.setStateTransitionHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.addPath = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * optional bool prove = 2; + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.clearPathList = function() { + return this.setPathList([]); +}; + + +/** + * repeated bytes keys = 2; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getKeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * repeated bytes keys = 2; + * This is a type-conversion wrapper around `getKeysList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getKeysList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getKeysList())); +}; + + +/** + * repeated bytes keys = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKeysList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getKeysList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getKeysList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.setKeysList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.addKeys = 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.GetPathElementsRequest.GetPathElementsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.clearKeysList = function() { + return this.setKeysList([]); +}; + + +/** + * optional bool prove = 3; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional WaitForStateTransitionResultRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} + * optional GetPathElementsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -24163,7 +42816,7 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.cl * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -24177,21 +42830,21 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.prototype.ha * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_[0])); }; @@ -24209,8 +42862,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.toObject(opt_includeInstance, this); }; @@ -24219,13 +42872,13 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.t * @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.WaitForStateTransitionResultResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -24239,23 +42892,23 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse; - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse; + return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.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.WaitForStateTransitionResultResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24263,8 +42916,8 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.deserialize var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -24280,9 +42933,9 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.deserialize * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24290,18 +42943,18 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.s /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.serializeBinaryToWriter ); } }; @@ -24316,22 +42969,22 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.serializeBi * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ResultCase = { RESULT_NOT_SET: 0, - ERROR: 1, + ELEMENTS: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_[0])); }; @@ -24349,8 +43002,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.toObject(opt_includeInstance, this); }; @@ -24359,13 +43012,13 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * @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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - error: (f = msg.getError()) && proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.toObject(includeInstance, f), + elements: (f = msg.getElements()) && proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.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) }; @@ -24381,23 +43034,23 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0; - return proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0; + return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24405,9 +43058,9 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.deserializeBinaryFromReader); - msg.setError(value); + var value = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.deserializeBinaryFromReader); + msg.setElements(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -24432,9 +43085,9 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24442,18 +43095,18 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getError(); + f = message.getElements(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.serializeBinaryToWriter ); } f = message.getProof(); @@ -24475,31 +43128,211 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat }; + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.toObject = function(includeInstance, msg) { + var f, obj = { + elementsList: msg.getElementsList_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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements; + return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.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.addElements(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.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getElementsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes elements = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.getElementsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes elements = 1; + * This is a type-conversion wrapper around `getElementsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.getElementsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getElementsList())); +}; + + +/** + * repeated bytes elements = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getElementsList()` + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.getElementsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getElementsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.setElementsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.addElements = 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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} returns this + */ +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.clearElementsList = function() { + return this.setElementsList([]); +}; + + /** - * optional StateTransitionBroadcastError error = 1; - * @return {?proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} + * optional Elements elements = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getError = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError, 1)); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.getElements = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.setError = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.setElements = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.clearError = function() { - return this.setError(undefined); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.clearElements = function() { + return this.setElements(undefined); }; @@ -24507,7 +43340,7 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.hasError = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.hasElements = function() { return jspb.Message.getField(this, 1) != null; }; @@ -24516,7 +43349,7 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -24524,18 +43357,18 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -24544,7 +43377,7 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -24553,7 +43386,7 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -24561,18 +43394,18 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.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.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -24581,35 +43414,35 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStat * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional WaitForStateTransitionResultResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} + * optional GetPathElementsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} returns this */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -24618,7 +43451,7 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.c * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -24632,21 +43465,21 @@ proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.prototype.h * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_[0])); }; @@ -24664,8 +43497,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusRequest.toObject(opt_includeInstance, this); }; @@ -24674,13 +43507,13 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.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.GetConsensusParamsRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -24694,23 +43527,23 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.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.GetConsensusParamsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest; - return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusRequest; + return proto.org.dash.platform.dapi.v0.GetStatusRequest.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.GetConsensusParamsRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24718,8 +43551,8 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.deserializeBinaryFromR var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -24735,9 +43568,9 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.deserializeBinaryFromR * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24745,18 +43578,18 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.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.GetConsensusParamsRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.serializeBinaryToWriter ); } }; @@ -24778,8 +43611,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject(opt_includeInstance, this); }; @@ -24788,14 +43621,13 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequ * @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.GetConsensusParamsRequest.GetConsensusParamsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - height: jspb.Message.getFieldWithDefault(msg, 1, 0), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; if (includeInstance) { @@ -24809,37 +43641,29 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0; - return proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0; + return proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.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.GetConsensusParamsRequest.GetConsensusParamsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setHeight(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); - break; default: reader.skipField(); break; @@ -24853,9 +43677,9 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24863,89 +43687,39 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getHeight(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 2, - f - ); - } -}; - - -/** - * optional int32 height = 1; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.getHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.setHeight = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bool prove = 2; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetConsensusParamsRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} + * optional GetStatusRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -24954,7 +43728,7 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.clearV0 = fu * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -24968,21 +43742,21 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest.prototype.hasV0 = func * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_[0])); }; @@ -25000,8 +43774,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.toObject(opt_includeInstance, this); }; @@ -25010,13 +43784,13 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetConsensusParamsResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -25030,23 +43804,23 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetConsensusParamsResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse; - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.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.GetConsensusParamsResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25054,8 +43828,8 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.deserializeBinaryFrom var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -25071,9 +43845,9 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.deserializeBinaryFrom * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25081,18 +43855,18 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetConsensusParamsResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.serializeBinaryToWriter ); } }; @@ -25114,8 +43888,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject(opt_includeInstance, this); }; @@ -25124,15 +43898,18 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock. * @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.GetConsensusParamsResponse.ConsensusParamsBlock} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - maxBytes: jspb.Message.getFieldWithDefault(msg, 1, ""), - maxGas: jspb.Message.getFieldWithDefault(msg, 2, ""), - timeIotaMs: jspb.Message.getFieldWithDefault(msg, 3, "") + version: (f = msg.getVersion()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.toObject(includeInstance, f), + node: (f = msg.getNode()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject(includeInstance, f), + chain: (f = msg.getChain()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject(includeInstance, f), + network: (f = msg.getNetwork()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject(includeInstance, f), + stateSync: (f = msg.getStateSync()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject(includeInstance, f), + time: (f = msg.getTime()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject(includeInstance, f) }; if (includeInstance) { @@ -25146,23 +43923,23 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock. /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock; - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.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.GetConsensusParamsResponse.ConsensusParamsBlock} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25170,16 +43947,194 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock. var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMaxBytes(value); + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.deserializeBinaryFromReader); + msg.setVersion(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMaxGas(value); + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinaryFromReader); + msg.setNode(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setTimeIotaMs(value); + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinaryFromReader); + msg.setChain(value); + break; + case 4: + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinaryFromReader); + msg.setNetwork(value); + break; + case 5: + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinaryFromReader); + msg.setStateSync(value); + break; + case 6: + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinaryFromReader); + msg.setTime(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.GetStatusResponse.GetStatusResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.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.GetStatusResponse.GetStatusResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.serializeBinaryToWriter + ); + } + f = message.getNode(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.serializeBinaryToWriter + ); + } + f = message.getChain(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.serializeBinaryToWriter + ); + } + f = message.getNetwork(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.serializeBinaryToWriter + ); + } + f = message.getStateSync(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.serializeBinaryToWriter + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.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.GetStatusResponse.GetStatusResponseV0.Version.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.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.GetStatusResponse.GetStatusResponseV0.Version} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.toObject = function(includeInstance, msg) { + var f, obj = { + software: (f = msg.getSoftware()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject(includeInstance, f), + protocol: (f = msg.getProtocol()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.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.GetStatusResponse.GetStatusResponseV0.Version} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.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.GetStatusResponse.GetStatusResponseV0.Version} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.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.GetStatusResponse.GetStatusResponseV0.Version.Software; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinaryFromReader); + msg.setSoftware(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinaryFromReader); + msg.setProtocol(value); break; default: reader.skipField(); @@ -25194,9 +44149,9 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock. * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25204,90 +44159,31 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMaxBytes(); - if (f.length > 0) { - writer.writeString( + f = message.getSoftware(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.serializeBinaryToWriter ); } - f = message.getMaxGas(); - if (f.length > 0) { - writer.writeString( + f = message.getProtocol(); + if (f != null) { + writer.writeMessage( 2, - f - ); - } - f = message.getTimeIotaMs(); - if (f.length > 0) { - writer.writeString( - 3, - f + f, + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.serializeBinaryToWriter ); } }; -/** - * optional string max_bytes = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.getMaxBytes = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.setMaxBytes = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string max_gas = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.getMaxGas = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.setMaxGas = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string time_iota_ms = 3; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.getTimeIotaMs = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.prototype.setTimeIotaMs = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - @@ -25304,8 +44200,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject(opt_includeInstance, this); }; @@ -25314,15 +44210,15 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEviden * @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.GetConsensusParamsResponse.ConsensusParamsEvidence} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject = function(includeInstance, msg) { var f, obj = { - maxAgeNumBlocks: jspb.Message.getFieldWithDefault(msg, 1, ""), - maxAgeDuration: jspb.Message.getFieldWithDefault(msg, 2, ""), - maxBytes: jspb.Message.getFieldWithDefault(msg, 3, "") + dapi: jspb.Message.getFieldWithDefault(msg, 1, ""), + drive: jspb.Message.getFieldWithDefault(msg, 2, ""), + tenderdash: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -25336,23 +44232,23 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEviden /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence; - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.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.GetConsensusParamsResponse.ConsensusParamsEvidence} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25361,15 +44257,15 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEviden switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setMaxAgeNumBlocks(value); + msg.setDapi(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setMaxAgeDuration(value); + msg.setDrive(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setMaxBytes(value); + msg.setTenderdash(value); break; default: reader.skipField(); @@ -25384,9 +44280,9 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEviden * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25394,28 +44290,28 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEviden /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getMaxAgeNumBlocks(); + f = message.getDapi(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getMaxAgeDuration(); - if (f.length > 0) { + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { writer.writeString( 2, f ); } - f = message.getMaxBytes(); - if (f.length > 0) { + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { writer.writeString( 3, f @@ -25425,56 +44321,92 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEviden /** - * optional string max_age_num_blocks = 1; + * optional string dapi = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.getMaxAgeNumBlocks = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.getDapi = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.setMaxAgeNumBlocks = function(value) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.setDapi = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string max_age_duration = 2; + * optional string drive = 2; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.getMaxAgeDuration = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.getDrive = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.setMaxAgeDuration = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.setDrive = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * optional string max_bytes = 3; + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.clearDrive = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.hasDrive = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string tenderdash = 3; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.getMaxBytes = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.getTenderdash = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.prototype.setMaxBytes = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.setTenderdash = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.clearTenderdash = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.hasTenderdash = function() { + return jspb.Message.getField(this, 3) != null; }; @@ -25494,8 +44426,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.toObject(opt_includeInstance, this); }; @@ -25504,14 +44436,14 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsRes * @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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.toObject = function(includeInstance, msg) { var f, obj = { - block: (f = msg.getBlock()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.toObject(includeInstance, f), - evidence: (f = msg.getEvidence()) && proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.toObject(includeInstance, f) + tenderdash: (f = msg.getTenderdash()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject(includeInstance, f), + drive: (f = msg.getDrive()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject(includeInstance, f) }; if (includeInstance) { @@ -25525,23 +44457,23 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsRes /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0; - return proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.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.GetConsensusParamsResponse.GetConsensusParamsResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25549,14 +44481,14 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsRes var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.deserializeBinaryFromReader); - msg.setBlock(value); + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinaryFromReader); + msg.setTenderdash(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.deserializeBinaryFromReader); - msg.setEvidence(value); + var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinaryFromReader); + msg.setDrive(value); break; default: reader.skipField(); @@ -25571,9 +44503,9 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsRes * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25581,167 +44513,31 @@ proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsRes /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBlock(); + f = message.getTenderdash(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.serializeBinaryToWriter ); } - f = message.getEvidence(); + f = message.getDrive(); if (f != null) { writer.writeMessage( 2, f, - proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.serializeBinaryToWriter ); } }; -/** - * optional ConsensusParamsBlock block = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.getBlock = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.setBlock = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.clearBlock = function() { - return this.setBlock(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.hasBlock = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional ConsensusParamsEvidence evidence = 2; - * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.getEvidence = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence, 2)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidence|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.setEvidence = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.clearEvidence = function() { - return this.setEvidence(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0.prototype.hasEvidence = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional GetConsensusParamsResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse} returns this - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse.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.GetProtocolVersionUpgradeStateRequest.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.VersionCase} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.oneofGroups_[0])); -}; @@ -25758,8 +44554,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject(opt_includeInstance, this); }; @@ -25768,13 +44564,14 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.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.GetProtocolVersionUpgradeStateRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.toObject(includeInstance, f) + p2p: jspb.Message.getFieldWithDefault(msg, 1, 0), + block: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -25788,23 +44585,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.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.GetProtocolVersionUpgradeStateRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -25812,9 +44609,12 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setP2p(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBlock(value); break; default: reader.skipField(); @@ -25829,9 +44629,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.deserializ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25839,23 +44639,65 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getP2p(); + if (f !== 0) { + writer.writeUint32( 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.serializeBinaryToWriter + f + ); + } + f = message.getBlock(); + if (f !== 0) { + writer.writeUint32( + 2, + f ); } }; +/** + * optional uint32 p2p = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.getP2p = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.setP2p = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 block = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.getBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.setBlock = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + @@ -25872,8 +44714,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject(opt_includeInstance, this); }; @@ -25882,13 +44724,14 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtoco * @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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject = function(includeInstance, msg) { var f, obj = { - prove: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + latest: jspb.Message.getFieldWithDefault(msg, 3, 0), + current: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -25902,32 +44745,36 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtoco /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.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.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLatest(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCurrent(value); break; default: reader.skipField(); @@ -25942,9 +44789,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtoco * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -25952,16 +44799,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtoco /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProve(); - if (f) { - writer.writeBool( - 1, + f = message.getLatest(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getCurrent(); + if (f !== 0) { + writer.writeUint32( + 4, f ); } @@ -25969,48 +44823,66 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtoco /** - * optional bool prove = 1; - * @return {boolean} + * optional uint32 latest = 3; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.getLatest = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.setLatest = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional GetProtocolVersionUpgradeStateRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} + * optional uint32 current = 4; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.getCurrent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.setCurrent = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional Tenderdash tenderdash = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.getTenderdash = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.setTenderdash = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.clearTenderdash = function() { + return this.setTenderdash(undefined); }; @@ -26018,179 +44890,125 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype. * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.hasTenderdash = 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 + * optional Drive drive = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.getDrive = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive, 2)); +}; + /** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this +*/ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.setDrive = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.VersionCase} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.clearDrive = function() { + return this.setDrive(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.GetProtocolVersionUpgradeStateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.hasDrive = 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.GetProtocolVersionUpgradeStateResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional Software software = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.toObject = function(includeInstance, msg) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.getSoftware = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software, 1)); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.deserializeBinaryFromReader(msg, reader); + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this +*/ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.setSoftware = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.deserializeBinaryFromReader); - msg.setV0(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.clearSoftware = function() { + return this.setSoftware(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.GetProtocolVersionUpgradeStateResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.hasSoftware = 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.GetProtocolVersionUpgradeStateResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional Protocol protocol = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.getProtocol = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol, 2)); }; - /** - * 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_ = [[1,2]]; + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this +*/ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.setProtocol = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + /** - * @enum {number} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - VERSIONS: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.clearProtocol = function() { + return this.setProtocol(undefined); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.ResultCase} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.hasProtocol = function() { + return jspb.Message.getField(this, 2) != null; }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -26204,8 +45022,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject(opt_includeInstance, this); }; @@ -26214,15 +45032,16 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc * @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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject = function(includeInstance, msg) { var f, obj = { - versions: (f = msg.getVersions()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.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) + local: jspb.Message.getFieldWithDefault(msg, 1, 0), + block: jspb.Message.getFieldWithDefault(msg, 2, 0), + genesis: jspb.Message.getFieldWithDefault(msg, 3, 0), + epoch: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -26236,23 +45055,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -26260,19 +45079,20 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.deserializeBinaryFromReader); - msg.setVersions(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setLocal(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 {number} */ (reader.readUint64()); + msg.setBlock(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 {number} */ (reader.readUint64()); + msg.setGenesis(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setEpoch(value); break; default: reader.skipField(); @@ -26287,9 +45107,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -26297,196 +45117,166 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVersions(); - if (f != null) { - writer.writeMessage( + f = message.getLocal(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.serializeBinaryToWriter + f ); } - f = message.getProof(); + f = /** @type {number} */ (jspb.Message.getField(message, 2)); if (f != null) { - writer.writeMessage( + writer.writeUint64( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); + f = /** @type {number} */ (jspb.Message.getField(message, 3)); if (f != null) { - writer.writeMessage( + writer.writeUint64( 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeUint32( + 4, + f ); } }; +/** + * optional uint64 local = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getLocal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setLocal = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + +/** + * optional uint64 block = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 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} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setBlock = function(value) { + return jspb.Message.setField(this, 2, 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.toObject = function(includeInstance, msg) { - var f, obj = { - versionsList: jspb.Message.toObjectList(msg.getVersionsList(), - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.toObject, includeInstance) - }; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.clearBlock = function() { + return jspb.Message.setField(this, 2, undefined); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.hasBlock = function() { + return jspb.Message.getField(this, 2) != null; }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} + * optional uint64 genesis = 3; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getGenesis = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.deserializeBinaryFromReader); - msg.addVersions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setGenesis = function(value) { + return jspb.Message.setField(this, 3, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.clearGenesis = function() { + return jspb.Message.setField(this, 3, undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.hasGenesis = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * repeated VersionEntry versions = 1; - * @return {!Array} + * optional uint32 epoch = 4; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.getVersionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry, 1)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.setVersionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setEpoch = function(value) { + return jspb.Message.setField(this, 4, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.addVersions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry, opt_index); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.clearEpoch = function() { + return jspb.Message.setField(this, 4, undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions.prototype.clearVersionsList = function() { - return this.setVersionsList([]); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.hasEpoch = function() { + return jspb.Message.getField(this, 4) != null; }; @@ -26506,8 +45296,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject(opt_includeInstance, this); }; @@ -26516,14 +45306,14 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc * @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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject = function(includeInstance, msg) { var f, obj = { - versionNumber: jspb.Message.getFieldWithDefault(msg, 1, 0), - voteCount: jspb.Message.getFieldWithDefault(msg, 2, 0) + id: msg.getId_asB64(), + proTxHash: msg.getProTxHash_asB64() }; if (includeInstance) { @@ -26537,23 +45327,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -26561,12 +45351,12 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVersionNumber(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setId(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVoteCount(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProTxHash(value); break; default: reader.skipField(); @@ -26581,9 +45371,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -26591,22 +45381,22 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVersionNumber(); - if (f !== 0) { - writer.writeUint32( + f = message.getId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getVoteCount(); - if (f !== 0) { - writer.writeUint32( + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( 2, f ); @@ -26615,103 +45405,95 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc /** - * optional uint32 version_number = 1; - * @return {number} + * optional bytes id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.getVersionNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} returns this + * optional bytes id = 1; + * This is a type-conversion wrapper around `getId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.setVersionNumber = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getId())); }; /** - * optional uint32 vote_count = 2; - * @return {number} + * 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.getVoteCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getId())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry.prototype.setVoteCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.setId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional Versions versions = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} + * optional bytes pro_tx_hash = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.getVersions = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.Versions|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.setVersions = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getProTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this + * optional bytes pro_tx_hash = 2; + * This is a type-conversion wrapper around `getProTxHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.clearVersions = function() { - return this.setVersions(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getProTxHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProTxHash())); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes pro_tx_hash = 2; + * 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.hasVersions = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getProTxHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProTxHash())); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.setProTxHash = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.clearProTxHash = function() { + return jspb.Message.setField(this, 2, undefined); }; @@ -26719,110 +45501,11 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtoc * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.hasProTxHash = 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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.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.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional GetProtocolVersionUpgradeStateResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse} returns this - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.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.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.VersionCase} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_[0])); -}; @@ -26839,8 +45522,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject(opt_includeInstance, this); }; @@ -26849,13 +45532,21 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.proto * @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.GetProtocolVersionUpgradeVoteStatusRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.toObject(includeInstance, f) + catchingUp: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + latestBlockHash: msg.getLatestBlockHash_asB64(), + latestAppHash: msg.getLatestAppHash_asB64(), + latestBlockHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + earliestBlockHash: msg.getEarliestBlockHash_asB64(), + earliestAppHash: msg.getEarliestAppHash_asB64(), + earliestBlockHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), + maxPeerBlockHeight: jspb.Message.getFieldWithDefault(msg, 9, 0), + coreChainLockedHeight: jspb.Message.getFieldWithDefault(msg, 10, 0) }; if (includeInstance) { @@ -26869,23 +45560,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.toObj /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.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.GetProtocolVersionUpgradeVoteStatusRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -26893,9 +45584,40 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.deser var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCatchingUp(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLatestBlockHash(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLatestAppHash(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLatestBlockHeight(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEarliestBlockHash(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEarliestAppHash(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setEarliestBlockHeight(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxPeerBlockHeight(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCoreChainLockedHeight(value); break; default: reader.skipField(); @@ -26910,9 +45632,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.deser * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -26920,442 +45642,357 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.proto /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getCatchingUp(); + if (f) { + writer.writeBool( 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.serializeBinaryToWriter + f + ); + } + f = message.getLatestBlockHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getLatestAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getLatestBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getEarliestBlockHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getEarliestAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getEarliestBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getMaxPeerBlockHeight(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeUint32( + 10, + f ); } }; - - - -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 catching_up = 1; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getCatchingUp = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, 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.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} 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.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.toObject = function(includeInstance, msg) { - var f, obj = { - startProTxHash: msg.getStartProTxHash_asB64(), - count: jspb.Message.getFieldWithDefault(msg, 2, 0), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setCatchingUp = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} + * optional bytes latest_block_hash = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} + * optional bytes latest_block_hash = 2; + * This is a type-conversion wrapper around `getLatestBlockHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.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.setStartProTxHash(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCount(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLatestBlockHash())); }; /** - * Serializes the message to binary data (in protobuf wire format). + * optional bytes latest_block_hash = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLatestBlockHash()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLatestBlockHash())); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} 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.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartProTxHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getCount(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 3, - f - ); - } +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setLatestBlockHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * optional bytes start_pro_tx_hash = 1; + * optional bytes latest_app_hash = 3; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getStartProTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestAppHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * optional bytes start_pro_tx_hash = 1; - * This is a type-conversion wrapper around `getStartProTxHash()` + * optional bytes latest_app_hash = 3; + * This is a type-conversion wrapper around `getLatestAppHash()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getStartProTxHash_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestAppHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartProTxHash())); + this.getLatestAppHash())); }; /** - * optional bytes start_pro_tx_hash = 1; + * optional bytes latest_app_hash = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartProTxHash()` + * This is a type-conversion wrapper around `getLatestAppHash()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getStartProTxHash_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestAppHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartProTxHash())); + this.getLatestAppHash())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.setStartProTxHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setLatestAppHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); }; /** - * optional uint32 count = 2; + * optional uint64 latest_block_height = 4; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.setCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setLatestBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional bool prove = 3; - * @return {boolean} + * optional bytes earliest_block_hash = 5; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} returns this + * optional bytes earliest_block_hash = 5; + * This is a type-conversion wrapper around `getEarliestBlockHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEarliestBlockHash())); }; /** - * optional GetProtocolVersionUpgradeVoteStatusRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} + * optional bytes earliest_block_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEarliestBlockHash()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEarliestBlockHash())); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.oneofGroups_[0], value); + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setEarliestBlockHash = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest} returns this + * optional bytes earliest_app_hash = 6; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestAppHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes earliest_app_hash = 6; + * This is a type-conversion wrapper around `getEarliestAppHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEarliestAppHash())); }; - -/** - * 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.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_ = [[1]]; - /** - * @enum {number} + * optional bytes earliest_app_hash = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEarliestAppHash()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEarliestAppHash())); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.VersionCase} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setEarliestAppHash = function(value) { + return jspb.Message.setProto3BytesField(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} + * optional uint64 earliest_block_height = 7; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * 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.GetProtocolVersionUpgradeVoteStatusResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.toObject = function(includeInstance, msg) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setEarliestBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} + * optional uint64 max_peer_block_height = 9; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getMaxPeerBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.deserializeBinaryFromReader); - msg.setV0(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setMaxPeerBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional uint32 core_chain_locked_height = 10; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getCoreChainLockedHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setCoreChainLockedHeight = function(value) { + return jspb.Message.setField(this, 10, 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 - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_ = [[1,2]]; - /** - * @enum {number} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - VERSIONS: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.clearCoreChainLockedHeight = function() { + return jspb.Message.setField(this, 10, undefined); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.ResultCase} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.hasCoreChainLockedHeight = function() { + return jspb.Message.getField(this, 10) != null; }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -27369,8 +46006,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject(opt_includeInstance, this); }; @@ -27379,15 +46016,15 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * @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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject = function(includeInstance, msg) { var f, obj = { - versions: (f = msg.getVersions()) && proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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) + chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + peersCount: jspb.Message.getFieldWithDefault(msg, 2, 0), + listening: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -27401,23 +46038,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -27425,19 +46062,16 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.deserializeBinaryFromReader); - msg.setVersions(value); + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(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 {number} */ (reader.readUint32()); + msg.setPeersCount(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 {boolean} */ (reader.readBool()); + msg.setListening(value); break; default: reader.skipField(); @@ -27452,9 +46086,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -27462,196 +46096,87 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVersions(); - if (f != null) { - writer.writeMessage( + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.serializeBinaryToWriter + f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getPeersCount(); + if (f !== 0) { + writer.writeUint32( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( + f = message.getListening(); + if (f) { + writer.writeBool( 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + f ); } }; - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.toObject = function(includeInstance, msg) { - var f, obj = { - versionSignalsList: jspb.Message.toObjectList(msg.getVersionSignalsList(), - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} - */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.deserializeBinaryFromReader); - msg.addVersionSignals(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional string chain_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVersionSignalsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * repeated VersionSignal version_signals = 1; - * @return {!Array} + * optional uint32 peers_count = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.getVersionSignalsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal, 1)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.getPeersCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} returns this -*/ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.setVersionSignalsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.setPeersCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} + * optional bool listening = 3; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.addVersionSignals = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal, opt_index); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.getListening = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals.prototype.clearVersionSignalsList = function() { - return this.setVersionSignalsList([]); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.setListening = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; @@ -27671,8 +46196,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject(opt_includeInstance, this); }; @@ -27681,14 +46206,20 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * @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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject = function(includeInstance, msg) { var f, obj = { - proTxHash: msg.getProTxHash_asB64(), - version: jspb.Message.getFieldWithDefault(msg, 2, 0) + totalSyncedTime: jspb.Message.getFieldWithDefault(msg, 1, 0), + remainingTime: jspb.Message.getFieldWithDefault(msg, 2, 0), + totalSnapshots: jspb.Message.getFieldWithDefault(msg, 3, 0), + chunkProcessAvgTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + snapshotHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), + snapshotChunksCount: jspb.Message.getFieldWithDefault(msg, 6, 0), + backfilledBlocks: jspb.Message.getFieldWithDefault(msg, 7, 0), + backfillBlocksTotal: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -27702,23 +46233,23 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal; - return proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync; + return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.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.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -27726,12 +46257,36 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProTxHash(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalSyncedTime(value); break; case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRemainingTime(value); + break; + case 3: var value = /** @type {number} */ (reader.readUint32()); - msg.setVersion(value); + msg.setTotalSnapshots(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setChunkProcessAvgTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSnapshotHeight(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSnapshotChunksCount(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBackfilledBlocks(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBackfillBlocksTotal(value); break; default: reader.skipField(); @@ -27746,9 +46301,9 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -27756,114 +46311,240 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} message + * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProTxHash_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getTotalSyncedTime(); + if (f !== 0) { + writer.writeUint64( 1, f ); } - f = message.getVersion(); + f = message.getRemainingTime(); if (f !== 0) { - writer.writeUint32( + writer.writeUint64( 2, f ); } + f = message.getTotalSnapshots(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getChunkProcessAvgTime(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getSnapshotHeight(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getSnapshotChunksCount(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getBackfilledBlocks(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getBackfillBlocksTotal(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } }; /** - * optional bytes pro_tx_hash = 1; - * @return {string} + * optional uint64 total_synced_time = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getProTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getTotalSyncedTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * optional bytes pro_tx_hash = 1; - * This is a type-conversion wrapper around `getProTxHash()` - * @return {string} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getProTxHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProTxHash())); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setTotalSyncedTime = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * 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} + * optional uint64 remaining_time = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getProTxHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProTxHash())); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getRemainingTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.setProTxHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setRemainingTime = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional uint32 version = 2; + * optional uint32 total_snapshots = 3; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.getVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getTotalSnapshots = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal.prototype.setVersion = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setTotalSnapshots = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional VersionSignals versions = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} + * optional uint64 chunk_process_avg_time = 4; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.getVersions = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals, 1)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getChunkProcessAvgTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setChunkProcessAvgTime = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 snapshot_height = 5; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getSnapshotHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setSnapshotHeight = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 snapshot_chunks_count = 6; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getSnapshotChunksCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setSnapshotChunksCount = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 backfilled_blocks = 7; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getBackfilledBlocks = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setBackfilledBlocks = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint64 backfill_blocks_total = 8; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getBackfillBlocksTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setBackfillBlocksTotal = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional Version version = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getVersion = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.setVersions = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.clearVersions = function() { - return this.setVersions(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearVersion = function() { + return this.setVersion(undefined); }; @@ -27871,36 +46552,36 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.hasVersions = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasVersion = function() { return jspb.Message.getField(this, 1) != null; }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * optional Node node = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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.GetStatusResponse.GetStatusResponseV0.prototype.getNode = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node, 2)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setNode = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearNode = function() { + return this.setNode(undefined); }; @@ -27908,36 +46589,36 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasNode = function() { return jspb.Message.getField(this, 2) != null; }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * optional Chain chain = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.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.GetStatusResponse.GetStatusResponseV0.prototype.getChain = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain, 3)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setChain = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearChain = function() { + return this.setChain(undefined); }; @@ -27945,35 +46626,146 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetP * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasChain = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetProtocolVersionUpgradeVoteStatusResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} + * optional Network network = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getNetwork = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network, 4)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setNetwork = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearNetwork = function() { + return this.setNetwork(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasNetwork = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional StateSync state_sync = 5; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getStateSync = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync, 5)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setStateSync = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearStateSync = function() { + return this.setStateSync(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasStateSync = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional Time time = 6; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getTime = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time, 6)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasTime = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional GetStatusResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -27982,7 +46774,7 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prot * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -27996,21 +46788,21 @@ proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.prot * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.oneofGroups_[0])); }; @@ -28028,8 +46820,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.toObject(opt_includeInstance, this); }; @@ -28038,13 +46830,13 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.toObject = functi * @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.GetEpochsInfoRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -28058,23 +46850,23 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.toObject = function(include /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest; - return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest; + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.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.GetEpochsInfoRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -28082,8 +46874,8 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.deserializeBinaryFromReader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -28099,9 +46891,9 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.deserializeBinaryFromReader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28109,18 +46901,18 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.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.GetEpochsInfoRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.serializeBinaryToWriter ); } }; @@ -28142,8 +46934,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.toObject(opt_includeInstance, this); }; @@ -28152,16 +46944,13 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prot * @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.GetEpochsInfoRequest.GetEpochsInfoRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - startEpoch: (f = msg.getStartEpoch()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - count: jspb.Message.getFieldWithDefault(msg, 2, 0), - ascending: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; if (includeInstance) { @@ -28175,46 +46964,29 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.toOb /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0; - return proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0; + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.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.GetEpochsInfoRequest.GetEpochsInfoRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setStartEpoch(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCount(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAscending(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); - break; default: reader.skipField(); break; @@ -28228,9 +47000,9 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.dese * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28238,159 +47010,39 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStartEpoch(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getCount(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getAscending(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 4, - f - ); - } -}; - - -/** - * optional google.protobuf.UInt32Value start_epoch = 1; - * @return {?proto.google.protobuf.UInt32Value} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getStartEpoch = function() { - return /** @type{?proto.google.protobuf.UInt32Value} */ ( - jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 1)); -}; - - -/** - * @param {?proto.google.protobuf.UInt32Value|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setStartEpoch = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.clearStartEpoch = function() { - return this.setStartEpoch(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.hasStartEpoch = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional uint32 count = 2; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional bool ascending = 3; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getAscending = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setAscending = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional bool prove = 4; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * optional GetEpochsInfoRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} + * optional GetCurrentQuorumsInfoRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -28399,7 +47051,7 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.clearV0 = functio * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -28413,21 +47065,21 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoRequest.prototype.hasV0 = function( * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.oneofGroups_[0])); }; @@ -28445,8 +47097,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.toObject(opt_includeInstance, this); }; @@ -28455,13 +47107,13 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.toObject = funct * @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.GetEpochsInfoResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -28475,23 +47127,23 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.toObject = function(includ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse; - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse; + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.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.GetEpochsInfoResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -28499,8 +47151,8 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.deserializeBinaryFromReade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -28516,9 +47168,9 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.deserializeBinaryFromReade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28526,50 +47178,24 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.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.GetEpochsInfoResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - EPOCHS: 1, - PROOF: 2 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_[0])); -}; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -28585,8 +47211,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObject(opt_includeInstance, this); }; @@ -28595,15 +47221,15 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.pr * @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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObject = function(includeInstance, msg) { var f, obj = { - epochs: (f = msg.getEpochs()) && proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.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) + proTxHash: msg.getProTxHash_asB64(), + nodeIp: jspb.Message.getFieldWithDefault(msg, 2, ""), + isBanned: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -28617,23 +47243,23 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.to /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0; - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0; + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -28641,19 +47267,16 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.de var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.deserializeBinaryFromReader); - msg.setEpochs(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProTxHash(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 {string} */ (reader.readString()); + msg.setNodeIp(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 {boolean} */ (reader.readBool()); + msg.setIsBanned(value); break; default: reader.skipField(); @@ -28668,9 +47291,9 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.de * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28678,200 +47301,122 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEpochs(); - if (f != null) { - writer.writeMessage( + f = message.getProTxHash_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.serializeBinaryToWriter + f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getNodeIp(); + if (f.length > 0) { + writer.writeString( 2, - f, - proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + f ); } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( + f = message.getIsBanned(); + if (f) { + writer.writeBool( 3, - f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + f ); } }; - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.toObject = function(includeInstance, msg) { - var f, obj = { - epochInfosList: jspb.Message.toObjectList(msg.getEpochInfosList(), - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} + * optional bytes pro_tx_hash = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos; - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getProTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} + * optional bytes pro_tx_hash = 1; + * This is a type-conversion wrapper around `getProTxHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinaryFromReader); - msg.addEpochInfos(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getProTxHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProTxHash())); }; /** - * Serializes the message to binary data (in protobuf wire format). + * 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getProTxHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProTxHash())); }; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEpochInfosList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.serializeBinaryToWriter - ); - } + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.setProTxHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * repeated EpochInfo epoch_infos = 1; - * @return {!Array} + * optional string node_ip = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.getEpochInfosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo, 1)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getNodeIp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} returns this -*/ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.setEpochInfosList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.setNodeIp = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} + * optional bool is_banned = 3; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.addEpochInfos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo, opt_index); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getIsBanned = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos.prototype.clearEpochInfosList = function() { - return this.setEpochInfosList([]); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.setIsBanned = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.repeatedFields_ = [3]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -28887,8 +47432,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toObject(opt_includeInstance, this); }; @@ -28897,18 +47442,17 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.Ep * @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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toObject = function(includeInstance, msg) { var f, obj = { - number: jspb.Message.getFieldWithDefault(msg, 1, 0), - firstBlockHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - firstCoreBlockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), - startTime: jspb.Message.getFieldWithDefault(msg, 4, 0), - feeMultiplier: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), - protocolVersion: jspb.Message.getFieldWithDefault(msg, 6, 0) + quorumHash: msg.getQuorumHash_asB64(), + coreHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + membersList: jspb.Message.toObjectList(msg.getMembersList(), + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObject, includeInstance), + thresholdPublicKey: msg.getThresholdPublicKey_asB64() }; if (includeInstance) { @@ -28922,23 +47466,23 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.Ep /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo; - return proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0; + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -28946,28 +47490,21 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.Ep var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNumber(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setQuorumHash(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFirstBlockHeight(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setCoreHeight(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFirstCoreBlockHeight(value); + var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinaryFromReader); + msg.addMembers(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setStartTime(value); - break; - case 5: - var value = /** @type {number} */ (reader.readDouble()); - msg.setFeeMultiplier(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setProtocolVersion(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setThresholdPublicKey(value); break; default: reader.skipField(); @@ -28982,9 +47519,9 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.Ep * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -28992,449 +47529,181 @@ proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.Ep /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} message + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNumber(); - if (f !== 0) { - writer.writeUint32( + f = message.getQuorumHash_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getFirstBlockHeight(); + f = message.getCoreHeight(); if (f !== 0) { - writer.writeUint64( + writer.writeUint32( 2, f ); } - f = message.getFirstCoreBlockHeight(); - if (f !== 0) { - writer.writeUint32( + f = message.getMembersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 3, - f + f, + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.serializeBinaryToWriter ); } - f = message.getStartTime(); - if (f !== 0) { - writer.writeUint64( + f = message.getThresholdPublicKey_asU8(); + if (f.length > 0) { + writer.writeBytes( 4, f ); } - f = message.getFeeMultiplier(); - if (f !== 0.0) { - writer.writeDouble( - 5, - f - ); - } - f = message.getProtocolVersion(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } -}; - - -/** - * optional uint32 number = 1; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getNumber = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setNumber = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint64 first_block_height = 2; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getFirstBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setFirstBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional uint32 first_core_block_height = 3; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getFirstCoreBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setFirstCoreBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional uint64 start_time = 4; - * @return {number} + * optional bytes quorum_hash = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getStartTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getQuorumHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this + * optional bytes quorum_hash = 1; + * This is a type-conversion wrapper around `getQuorumHash()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setStartTime = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getQuorumHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getQuorumHash())); }; /** - * optional double fee_multiplier = 5; - * @return {number} + * optional bytes quorum_hash = 1; + * 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getFeeMultiplier = function() { - return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getQuorumHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getQuorumHash())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setFeeMultiplier = function(value) { - return jspb.Message.setProto3FloatField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setQuorumHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 protocol_version = 6; + * optional uint32 core_height = 2; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.getProtocolVersion = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getCoreHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo.prototype.setProtocolVersion = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional EpochInfos epochs = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.getEpochs = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfos|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.setEpochs = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.clearEpochs = function() { - return this.setEpochs(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.hasEpochs = 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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.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.GetEpochsInfoResponse.GetEpochsInfoResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setCoreHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional GetEpochsInfoResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} + * repeated ValidatorV0 members = 3; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getMembersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0, 3)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse} returns this - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.prototype.clearV0 = function() { - return this.setV0(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetEpochsInfoResponse.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.GetContestedResourcesRequest.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.VersionCase} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setMembersList = function(value) { + return jspb.Message.setRepeatedWrapperField(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} + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.addMembers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0, opt_index); }; /** - * 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.GetContestedResourcesRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.toObject = function(includeInstance, msg) { - var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.toObject(includeInstance, f) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.clearMembersList = function() { + return this.setMembersList([]); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} + * optional bytes threshold_public_key = 4; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest; - return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getThresholdPublicKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} + * optional bytes threshold_public_key = 4; + * This is a type-conversion wrapper around `getThresholdPublicKey()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.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.GetContestedResourcesRequest.GetContestedResourcesRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinaryFromReader); - msg.setV0(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getThresholdPublicKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getThresholdPublicKey())); }; /** - * Serializes the message to binary data (in protobuf wire format). + * optional bytes threshold_public_key = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getThresholdPublicKey()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getThresholdPublicKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getThresholdPublicKey())); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} 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.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setThresholdPublicKey = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); }; @@ -29444,7 +47713,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.serializeBinaryToWr * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.repeatedFields_ = [4,5]; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.repeatedFields_ = [1,3]; @@ -29461,8 +47730,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.toObject(opt_includeInstance, this); }; @@ -29471,21 +47740,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourc * @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.GetContestedResourcesRequest.GetContestedResourcesRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64(), - documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), - indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), - startIndexValuesList: msg.getStartIndexValuesList_asB64(), - endIndexValuesList: msg.getEndIndexValuesList_asB64(), - startAtValueInfo: (f = msg.getStartAtValueInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.toObject(includeInstance, f), - count: jspb.Message.getFieldWithDefault(msg, 7, 0), - orderAscending: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) + quorumHashesList: msg.getQuorumHashesList_asB64(), + currentQuorumHash: msg.getCurrentQuorumHash_asB64(), + validatorSetsList: jspb.Message.toObjectList(msg.getValidatorSetsList(), + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toObject, includeInstance), + lastBlockProposer: msg.getLastBlockProposer_asB64(), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) }; if (includeInstance) { @@ -29499,23 +47765,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourc /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0; + return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.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.GetContestedResourcesRequest.GetContestedResourcesRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -29524,40 +47790,25 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourc switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); + msg.addQuorumHashes(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentTypeName(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setCurrentQuorumHash(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setIndexName(value); + var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinaryFromReader); + msg.addValidatorSets(value); break; case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addStartIndexValues(value); + msg.setLastBlockProposer(value); break; case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addEndIndexValues(value); - break; - case 6: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.deserializeBinaryFromReader); - msg.setStartAtValueInfo(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCount(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOrderAscending(value); - break; - case 9: - 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(); @@ -29572,9 +47823,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourc * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -29582,596 +47833,736 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourc /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); + f = message.getQuorumHashesList_asU8(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedBytes( 1, f ); } - f = message.getDocumentTypeName(); + f = message.getCurrentQuorumHash_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 2, f ); } - f = message.getIndexName(); + f = message.getValidatorSetsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 3, - f + f, + proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.serializeBinaryToWriter ); } - f = message.getStartIndexValuesList_asU8(); + f = message.getLastBlockProposer_asU8(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeBytes( 4, f ); } - f = message.getEndIndexValuesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 5, - f - ); - } - f = message.getStartAtValueInfo(); + f = message.getMetadata(); if (f != null) { writer.writeMessage( - 6, + 5, f, - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.serializeBinaryToWriter - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 7)); - if (f != null) { - writer.writeUint32( - 7, - f - ); - } - f = message.getOrderAscending(); - if (f) { - writer.writeBool( - 8, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 9, - 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} + * repeated bytes quorum_hashes = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getQuorumHashesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * 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.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * repeated bytes quorum_hashes = 1; + * This is a type-conversion wrapper around `getQuorumHashesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.toObject = function(includeInstance, msg) { - var f, obj = { - startValue: msg.getStartValue_asB64(), - startValueIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getQuorumHashesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getQuorumHashesList())); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} + * repeated bytes quorum_hashes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getQuorumHashesList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo; - return proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getQuorumHashesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getQuorumHashesList())); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.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.setStartValue(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStartValueIncluded(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setQuorumHashesList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.addQuorumHashes = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartValue_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getStartValueIncluded(); - if (f) { - writer.writeBool( - 2, - f - ); - } +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.clearQuorumHashesList = function() { + return this.setQuorumHashesList([]); }; /** - * optional bytes start_value = 1; + * optional bytes current_quorum_hash = 2; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValue = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getCurrentQuorumHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes start_value = 1; - * This is a type-conversion wrapper around `getStartValue()` + * optional bytes current_quorum_hash = 2; + * This is a type-conversion wrapper around `getCurrentQuorumHash()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValue_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getCurrentQuorumHash_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartValue())); + this.getCurrentQuorumHash())); }; /** - * optional bytes start_value = 1; + * optional bytes current_quorum_hash = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartValue()` + * This is a type-conversion wrapper around `getCurrentQuorumHash()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValue_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getCurrentQuorumHash_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartValue())); + this.getCurrentQuorumHash())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.setStartValue = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setCurrentQuorumHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * optional bool start_value_included = 2; - * @return {boolean} + * repeated ValidatorSetV0 validator_sets = 3; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.getStartValueIncluded = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getValidatorSetsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0, 3)); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setValidatorSetsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo.prototype.setStartValueIncluded = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.addValidatorSets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0, opt_index); }; /** - * optional bytes contract_id = 1; + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.clearValidatorSetsList = function() { + return this.setValidatorSetsList([]); +}; + + +/** + * optional bytes last_block_proposer = 4; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getLastBlockProposer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * optional bytes contract_id = 1; - * This is a type-conversion wrapper around `getContractId()` + * optional bytes last_block_proposer = 4; + * This is a type-conversion wrapper around `getLastBlockProposer()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getContractId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getLastBlockProposer_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); + this.getLastBlockProposer())); }; /** - * optional bytes contract_id = 1; + * optional bytes last_block_proposer = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractId()` + * This is a type-conversion wrapper around `getLastBlockProposer()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getContractId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getLastBlockProposer_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); + this.getLastBlockProposer())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setLastBlockProposer = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); }; /** - * optional string document_type_name = 2; - * @return {string} + * optional ResponseMetadata metadata = 5; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getDocumentTypeName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 5)); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setDocumentTypeName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * optional string index_name = 3; - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getIndexName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * optional GetCurrentQuorumsInfoResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setIndexName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.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.GetIdentityTokenBalancesRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.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.GetIdentityTokenBalancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.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.GetIdentityTokenBalancesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * repeated bytes start_index_values = 4; - * @return {!Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartIndexValuesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.deserializeBinaryFromReader(msg, reader); }; /** - * repeated bytes start_index_values = 4; - * This is a type-conversion wrapper around `getStartIndexValuesList()` - * @return {!Array} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartIndexValuesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getStartIndexValuesList())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * repeated bytes start_index_values = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartIndexValuesList()` - * @return {!Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartIndexValuesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getStartIndexValuesList())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setStartIndexValuesList = function(value) { - return jspb.Message.setField(this, 4, value || []); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.serializeBinaryToWriter + ); + } }; -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.addStartIndexValues = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); -}; - /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearStartIndexValuesList = function() { - return this.setStartIndexValuesList([]); -}; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.repeatedFields_ = [2]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * repeated bytes end_index_values = 5; - * @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.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getEndIndexValuesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.toObject(opt_includeInstance, this); }; /** - * repeated bytes end_index_values = 5; - * This is a type-conversion wrapper around `getEndIndexValuesList()` - * @return {!Array} + * 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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getEndIndexValuesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getEndIndexValuesList())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + identityId: msg.getIdentityId_asB64(), + tokenIdsList: msg.getTokenIdsList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * repeated bytes end_index_values = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEndIndexValuesList()` - * @return {!Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getEndIndexValuesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getEndIndexValuesList())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} 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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setEndIndexValuesList = function(value) { - return jspb.Message.setField(this, 5, value || []); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.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.addTokenIds(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.addEndIndexValues = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearEndIndexValuesList = function() { - return this.setEndIndexValuesList([]); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTokenIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 3, + f + ); + } }; /** - * optional StartAtValueInfo start_at_value_info = 6; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} + * optional bytes identity_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getStartAtValueInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo, 6)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setStartAtValueInfo = function(value) { - return jspb.Message.setWrapperField(this, 6, value); + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.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.GetContestedResourcesRequest.GetContestedResourcesRequestV0} 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.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearStartAtValueInfo = function() { - return this.setStartAtValueInfo(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.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.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.hasStartAtValueInfo = function() { - return jspb.Message.getField(this, 6) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 count = 7; - * @return {number} + * repeated bytes token_ids = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.getTokenIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * repeated bytes token_ids = 2; + * This is a type-conversion wrapper around `getTokenIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setCount = function(value) { - return jspb.Message.setField(this, 7, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.getTokenIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTokenIdsList())); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * repeated bytes token_ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.clearCount = function() { - return jspb.Message.setField(this, 7, undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.getTokenIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTokenIdsList())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.hasCount = function() { - return jspb.Message.getField(this, 7) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.setTokenIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** - * optional bool order_ascending = 8; - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getOrderAscending = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.addTokenIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setOrderAscending = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.clearTokenIdsList = function() { + return this.setTokenIdsList([]); }; /** - * optional bool prove = 9; + * optional bool prove = 3; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional GetContestedResourcesRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} + * optional GetIdentityTokenBalancesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -30180,7 +48571,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.clearV0 = * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -30194,21 +48585,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesRequest.prototype.hasV0 = f * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.oneofGroups_[0])); }; @@ -30226,8 +48617,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.toObject(opt_includeInstance, this); }; @@ -30236,13 +48627,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.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.GetContestedResourcesResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -30256,23 +48647,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse; - return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.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.GetContestedResourcesResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30280,8 +48671,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -30297,9 +48688,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30307,18 +48698,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.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.GetContestedResourcesResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.serializeBinaryToWriter ); } }; @@ -30333,22 +48724,22 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.serializeBinaryToW * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ResultCase = { RESULT_NOT_SET: 0, - CONTESTED_RESOURCE_VALUES: 1, + TOKEN_BALANCES: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.oneofGroups_[0])); }; @@ -30366,8 +48757,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.toObject(opt_includeInstance, this); }; @@ -30376,13 +48767,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * @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.GetContestedResourcesResponse.GetContestedResourcesResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - contestedResourceValues: (f = msg.getContestedResourceValues()) && proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.toObject(includeInstance, f), + tokenBalances: (f = msg.getTokenBalances()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.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) }; @@ -30398,23 +48789,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.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.GetContestedResourcesResponse.GetContestedResourcesResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30422,9 +48813,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinaryFromReader); - msg.setContestedResourceValues(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.deserializeBinaryFromReader); + msg.setTokenBalances(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -30446,49 +48837,251 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenBalances(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.toObject = function(includeInstance, msg) { + var f, obj = { + tokenId: msg.getTokenId_asB64(), + balance: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.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.setTokenId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes token_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); +}; + + +/** + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 balance = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.setBalance = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getContestedResourceValues(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.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.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.clearBalance = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.prototype.hasBalance = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -30498,7 +49091,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.repeatedFields_ = [1]; @@ -30515,8 +49108,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.toObject(opt_includeInstance, this); }; @@ -30525,13 +49118,14 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * @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.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.toObject = function(includeInstance, msg) { var f, obj = { - contestedResourceValuesList: msg.getContestedResourceValuesList_asB64() + tokenBalancesList: jspb.Message.toObjectList(msg.getTokenBalancesList(), + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.toObject, includeInstance) }; if (includeInstance) { @@ -30545,23 +49139,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues; - return proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.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.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30569,8 +49163,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addContestedResourceValues(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.deserializeBinaryFromReader); + msg.addTokenBalances(value); break; default: reader.skipField(); @@ -30585,9 +49180,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -30595,108 +49190,86 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContestedResourceValuesList_asU8(); + f = message.getTokenBalancesList(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeRepeatedMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry.serializeBinaryToWriter ); } }; /** - * repeated bytes contested_resource_values = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.getContestedResourceValuesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes contested_resource_values = 1; - * This is a type-conversion wrapper around `getContestedResourceValuesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.getContestedResourceValuesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getContestedResourceValuesList())); -}; - - -/** - * repeated bytes contested_resource_values = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContestedResourceValuesList()` - * @return {!Array} + * repeated TokenBalanceEntry token_balances = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.getContestedResourceValuesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getContestedResourceValuesList())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.prototype.getTokenBalancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry, 1)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.setContestedResourceValuesList = function(value) { - return jspb.Message.setField(this, 1, value || []); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.prototype.setTokenBalancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry=} opt_value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.addContestedResourceValues = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.prototype.addTokenBalances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntry, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues.prototype.clearContestedResourceValuesList = function() { - return this.setContestedResourceValuesList([]); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances.prototype.clearTokenBalancesList = function() { + return this.setTokenBalancesList([]); }; /** - * optional ContestedResourceValues contested_resource_values = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} + * optional TokenBalances token_balances = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getContestedResourceValues = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.getTokenBalances = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValues|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalances|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.setContestedResourceValues = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.setTokenBalances = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.clearContestedResourceValues = function() { - return this.setContestedResourceValues(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.clearTokenBalances = function() { + return this.setTokenBalances(undefined); }; @@ -30704,7 +49277,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.hasContestedResourceValues = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.hasTokenBalances = function() { return jspb.Message.getField(this, 1) != null; }; @@ -30713,7 +49286,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -30721,18 +49294,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -30741,7 +49314,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -30750,7 +49323,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -30758,18 +49331,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.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.GetContestedResourcesResponse.GetContestedResourcesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -30778,35 +49351,35 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResour * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetContestedResourcesResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} + * optional GetIdentityTokenBalancesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -30815,7 +49388,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.clearV0 * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -30829,21 +49402,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourcesResponse.prototype.hasV0 = * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.oneofGroups_[0])); }; @@ -30861,8 +49434,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.toObject(opt_includeInstance, this); }; @@ -30871,13 +49444,13 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.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.GetVotePollsByEndDateRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -30891,23 +49464,23 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.toObject = function /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.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.GetVotePollsByEndDateRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -30915,386 +49488,57 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.deserializeBinaryFr var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.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.GetVotePollsByEndDateRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.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.GetVotePollsByEndDateRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.toObject = function(includeInstance, msg) { - var f, obj = { - startTimeInfo: (f = msg.getStartTimeInfo()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.toObject(includeInstance, f), - endTimeInfo: (f = msg.getEndTimeInfo()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.toObject(includeInstance, f), - limit: jspb.Message.getFieldWithDefault(msg, 3, 0), - offset: jspb.Message.getFieldWithDefault(msg, 4, 0), - ascending: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 6, 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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.deserializeBinaryFromReader); - msg.setStartTimeInfo(value); - break; - case 2: - var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinaryFromReader); - msg.setEndTimeInfo(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLimit(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setOffset(value); - break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAscending(value); - break; - case 6: - 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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartTimeInfo(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.serializeBinaryToWriter - ); - } - f = message.getEndTimeInfo(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.serializeBinaryToWriter - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint32( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint32( - 4, - f - ); - } - f = message.getAscending(); - if (f) { - writer.writeBool( - 5, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 6, - f - ); - } -}; - - - - - -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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.toObject = function(includeInstance, msg) { - var f, obj = { - startTimeMs: jspb.Message.getFieldWithDefault(msg, 1, 0), - startTimeIncluded: 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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.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.setStartTimeMs(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStartTimeIncluded(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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartTimeMs(); - if (f !== 0) { - writer.writeUint64( - 1, - f - ); - } - f = message.getStartTimeIncluded(); - if (f) { - writer.writeBool( - 2, - f - ); + } } + return msg; }; /** - * optional uint64 start_time_ms = 1; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.getStartTimeMs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.setStartTimeMs = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.serializeBinaryToWriter + ); + } }; -/** - * optional bool start_time_included = 2; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.getStartTimeIncluded = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo.prototype.setStartTimeIncluded = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.repeatedFields_ = [2]; @@ -31311,8 +49555,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.toObject(opt_includeInstance, this); }; @@ -31321,14 +49565,15 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDa * @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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - endTimeMs: jspb.Message.getFieldWithDefault(msg, 1, 0), - endTimeIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + tokenId: msg.getTokenId_asB64(), + identityIdsList: msg.getIdentityIdsList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -31342,23 +49587,23 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDa /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.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.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -31366,12 +49611,16 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDa var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setEndTimeMs(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTokenId(value); break; case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIdentityIds(value); + break; + case 3: var value = /** @type {boolean} */ (reader.readBool()); - msg.setEndTimeIncluded(value); + msg.setProve(value); break; default: reader.skipField(); @@ -31386,9 +49635,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDa * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -31396,23 +49645,30 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDa /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEndTimeMs(); - if (f !== 0) { - writer.writeUint64( + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getEndTimeIncluded(); + f = message.getIdentityIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 2, + f + ); + } + f = message.getProve(); if (f) { writer.writeBool( - 2, + 3, f ); } @@ -31420,247 +49676,150 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDa /** - * optional uint64 end_time_ms = 1; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.getEndTimeMs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.setEndTimeMs = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional bool end_time_included = 2; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.getEndTimeIncluded = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo.prototype.setEndTimeIncluded = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional StartAtTimeInfo start_time_info = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getStartTimeInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setStartTimeInfo = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearStartTimeInfo = function() { - return this.setStartTimeInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasStartTimeInfo = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional EndAtTimeInfo end_time_info = 2; - * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getEndTimeInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo, 2)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setEndTimeInfo = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearEndTimeInfo = function() { - return this.setEndTimeInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasEndTimeInfo = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional uint32 limit = 3; - * @return {number} + * optional bytes token_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getLimit = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setLimit = function(value) { - return jspb.Message.setField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearLimit = function() { - return jspb.Message.setField(this, 3, undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasLimit = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 offset = 4; - * @return {number} + * repeated bytes identity_ids = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getOffset = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getIdentityIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + * repeated bytes identity_ids = 2; + * This is a type-conversion wrapper around `getIdentityIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setOffset = function(value) { - return jspb.Message.setField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getIdentityIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdentityIdsList())); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + * repeated bytes identity_ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentityIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.clearOffset = function() { - return jspb.Message.setField(this, 4, undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getIdentityIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdentityIdsList())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.hasOffset = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.setIdentityIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** - * optional bool ascending = 5; - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getAscending = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.addIdentityIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setAscending = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.clearIdentityIdsList = function() { + return this.setIdentityIdsList([]); }; /** - * optional bool prove = 6; + * optional bool prove = 3; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional GetVotePollsByEndDateRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} + * optional GetIdentitiesTokenBalancesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -31669,7 +49828,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.clearV0 = * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -31683,21 +49842,21 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.prototype.hasV0 = f * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.oneofGroups_[0])); }; @@ -31715,8 +49874,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.toObject(opt_includeInstance, this); }; @@ -31725,13 +49884,13 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.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.GetVotePollsByEndDateResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -31745,23 +49904,23 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.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.GetVotePollsByEndDateResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -31769,8 +49928,8 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -31786,9 +49945,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -31796,18 +49955,18 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.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.GetVotePollsByEndDateResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.serializeBinaryToWriter ); } }; @@ -31822,22 +49981,22 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.serializeBinaryToW * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.ResultCase = { RESULT_NOT_SET: 0, - VOTE_POLLS_BY_TIMESTAMPS: 1, + IDENTITY_TOKEN_BALANCES: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.oneofGroups_[0])); }; @@ -31855,8 +50014,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.toObject(opt_includeInstance, this); }; @@ -31865,13 +50024,13 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * @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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - votePollsByTimestamps: (f = msg.getVotePollsByTimestamps()) && proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.toObject(includeInstance, f), + identityTokenBalances: (f = msg.getIdentityTokenBalances()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.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) }; @@ -31887,23 +50046,23 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -31911,9 +50070,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinaryFromReader); - msg.setVotePollsByTimestamps(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.deserializeBinaryFromReader); + msg.setIdentityTokenBalances(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -31938,9 +50097,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -31948,18 +50107,18 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVotePollsByTimestamps(); + f = message.getIdentityTokenBalances(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.serializeBinaryToWriter ); } f = message.getProof(); @@ -31982,13 +50141,6 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -32004,8 +50156,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.toObject(opt_includeInstance, this); }; @@ -32014,14 +50166,14 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * @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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.toObject = function(includeInstance, msg) { var f, obj = { - timestamp: jspb.Message.getFieldWithDefault(msg, 1, 0), - serializedVotePollsList: msg.getSerializedVotePollsList_asB64() + identityId: msg.getIdentityId_asB64(), + balance: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -32035,23 +50187,23 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -32059,12 +50211,12 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTimestamp(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setIdentityId(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addSerializedVotePolls(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setBalance(value); break; default: reader.skipField(); @@ -32079,9 +50231,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -32089,22 +50241,22 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTimestamp(); - if (f !== 0) { - writer.writeUint64( + f = message.getIdentityId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getSerializedVotePollsList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64( 2, f ); @@ -32113,81 +50265,80 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** - * optional uint64 timestamp = 1; - * @return {number} + * optional bytes identity_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getTimestamp = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.setTimestamp = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); }; /** - * repeated bytes serialized_vote_polls = 2; - * @return {!Array} + * 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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getSerializedVotePollsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); }; /** - * repeated bytes serialized_vote_polls = 2; - * This is a type-conversion wrapper around `getSerializedVotePollsList()` - * @return {!Array} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getSerializedVotePollsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getSerializedVotePollsList())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * repeated bytes serialized_vote_polls = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSerializedVotePollsList()` - * @return {!Array} + * optional uint64 balance = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.getSerializedVotePollsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getSerializedVotePollsList())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.getBalance = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.setSerializedVotePollsList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.setBalance = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.addSerializedVotePolls = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.prototype.clearSerializedVotePollsList = function() { - return this.setSerializedVotePollsList([]); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.prototype.hasBalance = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -32197,7 +50348,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.repeatedFields_ = [1]; @@ -32214,8 +50365,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.toObject(opt_includeInstance, this); }; @@ -32224,15 +50375,14 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * @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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.toObject = function(includeInstance, msg) { var f, obj = { - votePollsByTimestampsList: jspb.Message.toObjectList(msg.getVotePollsByTimestampsList(), - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.toObject, includeInstance), - finishedResults: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + identityTokenBalancesList: jspb.Message.toObjectList(msg.getIdentityTokenBalancesList(), + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.toObject, includeInstance) }; if (includeInstance) { @@ -32246,23 +50396,23 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps; - return proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -32270,13 +50420,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.deserializeBinaryFromReader); - msg.addVotePollsByTimestamps(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFinishedResults(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.deserializeBinaryFromReader); + msg.addIdentityTokenBalances(value); break; default: reader.skipField(); @@ -32291,9 +50437,9 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -32301,111 +50447,86 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVotePollsByTimestampsList(); + f = message.getIdentityTokenBalancesList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp.serializeBinaryToWriter - ); - } - f = message.getFinishedResults(); - if (f) { - writer.writeBool( - 2, - f + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry.serializeBinaryToWriter ); } }; /** - * repeated SerializedVotePollsByTimestamp vote_polls_by_timestamps = 1; - * @return {!Array} + * repeated IdentityTokenBalanceEntry identity_token_balances = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.getVotePollsByTimestampsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.prototype.getIdentityTokenBalancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry, 1)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.setVotePollsByTimestampsList = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.prototype.setIdentityTokenBalancesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp=} opt_value + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry=} opt_value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.addVotePollsByTimestamps = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.prototype.addIdentityTokenBalances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntry, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} returns this - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.clearVotePollsByTimestampsList = function() { - return this.setVotePollsByTimestampsList([]); -}; - - -/** - * optional bool finished_results = 2; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.getFinishedResults = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} returns this - */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps.prototype.setFinishedResults = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances.prototype.clearIdentityTokenBalancesList = function() { + return this.setIdentityTokenBalancesList([]); }; /** - * optional SerializedVotePollsByTimestamps vote_polls_by_timestamps = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} + * optional IdentityTokenBalances identity_token_balances = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getVotePollsByTimestamps = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.getIdentityTokenBalances = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamps|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalances|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.setVotePollsByTimestamps = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.setIdentityTokenBalances = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.clearVotePollsByTimestamps = function() { - return this.setVotePollsByTimestamps(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.clearIdentityTokenBalances = function() { + return this.setIdentityTokenBalances(undefined); }; @@ -32413,7 +50534,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.hasVotePollsByTimestamps = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.hasIdentityTokenBalances = function() { return jspb.Message.getField(this, 1) != null; }; @@ -32422,7 +50543,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -32430,18 +50551,18 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -32450,7 +50571,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -32459,7 +50580,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -32467,18 +50588,18 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.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.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -32487,35 +50608,35 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndD * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetVotePollsByEndDateResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} + * optional GetIdentitiesTokenBalancesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -32524,7 +50645,7 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.clearV0 * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -32538,21 +50659,21 @@ proto.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.prototype.hasV0 = * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.oneofGroups_[0])); }; @@ -32570,8 +50691,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.toObject(opt_includeInstance, this); }; @@ -32580,13 +50701,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.t * @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.GetContestedResourceVoteStateRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -32600,23 +50721,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.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.GetContestedResourceVoteStateRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -32624,8 +50745,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserialize var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -32641,9 +50762,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.deserialize * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -32651,18 +50772,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.s /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.serializeBinaryToWriter ); } }; @@ -32674,7 +50795,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.serializeBi * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.repeatedFields_ = [4]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.repeatedFields_ = [2]; @@ -32691,8 +50812,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.toObject(opt_includeInstance, this); }; @@ -32701,21 +50822,15 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetConteste * @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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64(), - documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), - indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), - indexValuesList: msg.getIndexValuesList_asB64(), - resultType: jspb.Message.getFieldWithDefault(msg, 5, 0), - allowIncludeLockedAndAbstainingVoteTally: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), - startAtIdentifierInfo: (f = msg.getStartAtIdentifierInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.toObject(includeInstance, f), - count: jspb.Message.getFieldWithDefault(msg, 8, 0), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) + identityId: msg.getIdentityId_asB64(), + tokenIdsList: msg.getTokenIdsList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -32729,23 +50844,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetConteste /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -32754,38 +50869,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetConteste switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); + msg.setIdentityId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentTypeName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setIndexName(value); - break; - case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIndexValues(value); - break; - case 5: - var value = /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} */ (reader.readEnum()); - msg.setResultType(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setAllowIncludeLockedAndAbstainingVoteTally(value); - break; - case 7: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader); - msg.setStartAtIdentifierInfo(value); - break; - case 8: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCount(value); + msg.addTokenIds(value); break; - case 9: + case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -32802,9 +50892,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetConteste * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -32812,562 +50902,181 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetConteste /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); + f = message.getIdentityId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getDocumentTypeName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIndexName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getIndexValuesList_asU8(); + f = message.getTokenIdsList_asU8(); if (f.length > 0) { writer.writeRepeatedBytes( - 4, - f - ); - } - f = message.getResultType(); - if (f !== 0.0) { - writer.writeEnum( - 5, - f - ); - } - f = message.getAllowIncludeLockedAndAbstainingVoteTally(); - if (f) { - writer.writeBool( - 6, - f - ); - } - f = message.getStartAtIdentifierInfo(); - if (f != null) { - writer.writeMessage( - 7, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 8)); - if (f != null) { - writer.writeUint32( - 8, + 2, f ); } f = message.getProve(); if (f) { writer.writeBool( - 9, - f - ); - } -}; - - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType = { - DOCUMENTS: 0, - VOTE_TALLY: 1, - DOCUMENTS_AND_VOTE_TALLY: 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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.toObject = function(includeInstance, msg) { - var f, obj = { - startIdentifier: msg.getStartIdentifier_asB64(), - startIdentifierIncluded: 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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.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.setStartIdentifier(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStartIdentifierIncluded(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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartIdentifier_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getStartIdentifierIncluded(); - if (f) { - writer.writeBool( - 2, + 3, f ); - } -}; - - -/** - * optional bytes start_identifier = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes start_identifier = 1; - * This is a type-conversion wrapper around `getStartIdentifier()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartIdentifier())); -}; - - -/** - * optional bytes start_identifier = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartIdentifier()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartIdentifier())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifier = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bool start_identifier_included = 2; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifierIncluded = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifierIncluded = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional bytes contract_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes contract_id = 1; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); -}; - - -/** - * optional bytes contract_id = 1; - * 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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string document_type_name = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getDocumentTypeName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setDocumentTypeName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string index_name = 3; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setIndexName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * repeated bytes index_values = 4; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexValuesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); -}; - - -/** - * repeated bytes index_values = 4; - * This is a type-conversion wrapper around `getIndexValuesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexValuesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIndexValuesList())); -}; - - -/** - * repeated bytes index_values = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIndexValuesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getIndexValuesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIndexValuesList())); -}; - - -/** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setIndexValuesList = function(value) { - return jspb.Message.setField(this, 4, value || []); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.addIndexValues = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.clearIndexValuesList = function() { - return this.setIndexValuesList([]); -}; - - -/** - * optional ResultType result_type = 5; - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getResultType = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + } }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this + * optional bytes identity_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setResultType = function(value) { - return jspb.Message.setProto3EnumField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getIdentityId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bool allow_include_locked_and_abstaining_vote_tally = 6; - * @return {boolean} + * optional bytes identity_id = 1; + * This is a type-conversion wrapper around `getIdentityId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getAllowIncludeLockedAndAbstainingVoteTally = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getIdentityId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getIdentityId())); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} 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.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setAllowIncludeLockedAndAbstainingVoteTally = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); }; /** - * optional StartAtIdentifierInfo start_at_identifier_info = 7; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getStartAtIdentifierInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo, 7)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setStartAtIdentifierInfo = function(value) { - return jspb.Message.setWrapperField(this, 7, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this + * repeated bytes token_ids = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.clearStartAtIdentifierInfo = function() { - return this.setStartAtIdentifierInfo(undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getTokenIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * Returns whether this field is set. - * @return {boolean} + * repeated bytes token_ids = 2; + * This is a type-conversion wrapper around `getTokenIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.hasStartAtIdentifierInfo = function() { - return jspb.Message.getField(this, 7) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getTokenIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTokenIdsList())); }; /** - * optional uint32 count = 8; - * @return {number} + * repeated bytes token_ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getTokenIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTokenIdsList())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setCount = function(value) { - return jspb.Message.setField(this, 8, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.setTokenIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.clearCount = function() { - return jspb.Message.setField(this, 8, undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.addTokenIds = 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.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.hasCount = function() { - return jspb.Message.getField(this, 8) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.clearTokenIdsList = function() { + return this.setTokenIdsList([]); }; /** - * optional bool prove = 9; + * optional bool prove = 3; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional GetContestedResourceVoteStateRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} + * optional GetIdentityTokenInfosRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -33376,7 +51085,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.c * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -33390,21 +51099,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.prototype.h * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.oneofGroups_[0])); }; @@ -33422,8 +51131,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.toObject(opt_includeInstance, this); }; @@ -33432,13 +51141,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.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.GetContestedResourceVoteStateResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -33452,23 +51161,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.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.GetContestedResourceVoteStateResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -33476,8 +51185,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -33493,9 +51202,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.deserializ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -33503,18 +51212,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.serializeBinaryToWriter ); } }; @@ -33529,22 +51238,22 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.serializeB * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ResultCase = { RESULT_NOT_SET: 0, - CONTESTED_RESOURCE_CONTENDERS: 1, + TOKEN_INFOS: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.oneofGroups_[0])); }; @@ -33562,8 +51271,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.toObject(opt_includeInstance, this); }; @@ -33572,13 +51281,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * @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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - contestedResourceContenders: (f = msg.getContestedResourceContenders()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.toObject(includeInstance, f), + tokenInfos: (f = msg.getTokenInfos()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.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) }; @@ -33594,23 +51303,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -33618,9 +51327,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinaryFromReader); - msg.setContestedResourceContenders(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.deserializeBinaryFromReader); + msg.setTokenInfos(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -33645,9 +51354,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -33655,18 +51364,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContestedResourceContenders(); + f = message.getTokenInfos(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.serializeBinaryToWriter ); } f = message.getProof(); @@ -33704,8 +51413,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.toObject(opt_includeInstance, this); }; @@ -33714,18 +51423,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * @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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.toObject = function(includeInstance, msg) { var f, obj = { - finishedVoteOutcome: jspb.Message.getFieldWithDefault(msg, 1, 0), - wonByIdentityId: msg.getWonByIdentityId_asB64(), - finishedAtBlockHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), - finishedAtCoreBlockHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - finishedAtBlockTimeMs: jspb.Message.getFieldWithDefault(msg, 5, 0), - finishedAtEpoch: jspb.Message.getFieldWithDefault(msg, 6, 0) + frozen: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -33739,23 +51443,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -33763,28 +51467,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} */ (reader.readEnum()); - msg.setFinishedVoteOutcome(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWonByIdentityId(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFinishedAtBlockHeight(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFinishedAtCoreBlockHeight(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setFinishedAtBlockTimeMs(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setFinishedAtEpoch(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFrozen(value); break; default: reader.skipField(); @@ -33799,9 +51483,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -33809,213 +51493,242 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFinishedVoteOutcome(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getFrozen(); + if (f) { + writer.writeBool( 1, f ); } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBytes( - 2, - f - ); - } - f = message.getFinishedAtBlockHeight(); - if (f !== 0) { - writer.writeUint64( - 3, - f - ); - } - f = message.getFinishedAtCoreBlockHeight(); - if (f !== 0) { - writer.writeUint32( - 4, - f - ); - } - f = message.getFinishedAtBlockTimeMs(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getFinishedAtEpoch(); - if (f !== 0) { - writer.writeUint32( - 6, - f - ); - } }; /** - * @enum {number} + * optional bool frozen = 1; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome = { - TOWARDS_IDENTITY: 0, - LOCKED: 1, - NO_PREVIOUS_WINNER: 2 +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.getFrozen = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; + /** - * optional FinishedVoteOutcome finished_vote_outcome = 1; - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedVoteOutcome = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.setFrozen = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; -/** - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedVoteOutcome = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes won_by_identity_id = 2; - * @return {string} + * 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getWonByIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.toObject(opt_includeInstance, this); }; /** - * optional bytes won_by_identity_id = 2; - * This is a type-conversion wrapper around `getWonByIdentityId()` - * @return {string} + * 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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getWonByIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWonByIdentityId())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.toObject = function(includeInstance, msg) { + var f, obj = { + tokenId: msg.getTokenId_asB64(), + info: (f = msg.getInfo()) && proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes won_by_identity_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWonByIdentityId()` - * @return {!Uint8Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getWonByIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWonByIdentityId())); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} 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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setWonByIdentityId = function(value) { - return jspb.Message.setField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.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.setTokenId(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.deserializeBinaryFromReader); + msg.setInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.clearWonByIdentityId = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.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.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.hasWonByIdentityId = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry.serializeBinaryToWriter + ); + } }; /** - * optional uint64 finished_at_block_height = 3; - * @return {number} + * optional bytes token_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); }; /** - * optional uint32 finished_at_core_block_height = 4; - * @return {number} + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtCoreBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtCoreBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint64 finished_at_block_time_ms = 5; - * @return {number} + * optional TokenIdentityInfoEntry info = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtBlockTimeMs = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.getInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry, 2)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtBlockTimeMs = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntry|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.setInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * optional uint32 finished_at_epoch = 6; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.getFinishedAtEpoch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.clearInfo = function() { + return this.setInfo(undefined); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.prototype.setFinishedAtEpoch = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.prototype.hasInfo = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -34025,7 +51738,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.repeatedFields_ = [1]; @@ -34042,8 +51755,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.toObject(opt_includeInstance, this); }; @@ -34052,17 +51765,14 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * @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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.toObject = function(includeInstance, msg) { var f, obj = { - contendersList: jspb.Message.toObjectList(msg.getContendersList(), - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.toObject, includeInstance), - abstainVoteTally: jspb.Message.getFieldWithDefault(msg, 2, 0), - lockVoteTally: jspb.Message.getFieldWithDefault(msg, 3, 0), - finishedVoteInfo: (f = msg.getFinishedVoteInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.toObject(includeInstance, f) + tokenInfosList: jspb.Message.toObjectList(msg.getTokenInfosList(), + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.toObject, includeInstance) }; if (includeInstance) { @@ -34076,23 +51786,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos; + return proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -34100,22 +51810,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinaryFromReader); - msg.addContenders(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAbstainVoteTally(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLockVoteTally(value); - break; - case 4: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.deserializeBinaryFromReader); - msg.setFinishedVoteInfo(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.deserializeBinaryFromReader); + msg.addTokenInfos(value); break; default: reader.skipField(); @@ -34130,9 +51827,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -34140,107 +51837,160 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContendersList(); + f = message.getTokenInfosList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.serializeBinaryToWriter - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint32( - 2, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint32( - 3, - f - ); - } - f = message.getFinishedVoteInfo(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry.serializeBinaryToWriter ); } }; /** - * repeated Contender contenders = 1; - * @return {!Array} + * repeated TokenInfoEntry token_infos = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.prototype.getTokenInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.prototype.setTokenInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.prototype.addTokenInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos.prototype.clearTokenInfosList = function() { + return this.setTokenInfosList([]); +}; + + +/** + * optional TokenInfos token_infos = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.getTokenInfos = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfos|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.setTokenInfos = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.clearTokenInfos = function() { + return this.setTokenInfos(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.hasTokenInfos = 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getContendersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender, 1)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.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 {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setContendersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.oneofGroups_[0], value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.addContenders = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender, opt_index); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearContendersList = function() { - return this.setContendersList([]); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional uint32 abstain_vote_tally = 2; - * @return {number} + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getAbstainVoteTally = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.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 {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setAbstainVoteTally = function(value) { - return jspb.Message.setField(this, 2, value); + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearAbstainVoteTally = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; @@ -34248,35 +51998,36 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.hasAbstainVoteTally = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional uint32 lock_vote_tally = 3; - * @return {number} + * optional GetIdentityTokenInfosResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getLockVoteTally = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0, 1)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setLockVoteTally = function(value) { - return jspb.Message.setField(this, 3, value); + * @param {?proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.oneofGroups_[0], value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearLockVoteTally = function() { - return jspb.Message.setField(this, 3, undefined); +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; @@ -34284,49 +52035,158 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.hasLockVoteTally = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional FinishedVoteInfo finished_vote_info = 4; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} + * 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.getFinishedVoteInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo, 4)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.setFinishedVoteInfo = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + * 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.GetIdentitiesTokenInfosRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.toObject(opt_includeInstance, this); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} 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.GetIdentitiesTokenInfosRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.clearFinishedVoteInfo = function() { - return this.setFinishedVoteInfo(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders.prototype.hasFinishedVoteInfo = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.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.GetIdentitiesTokenInfosRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.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.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.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.GetIdentitiesTokenInfosRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.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.GetIdentitiesTokenInfosRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.serializeBinaryToWriter + ); + } }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.repeatedFields_ = [2]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -34342,8 +52202,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.toObject(opt_includeInstance, this); }; @@ -34352,15 +52212,15 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * @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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - identifier: msg.getIdentifier_asB64(), - voteCount: jspb.Message.getFieldWithDefault(msg, 2, 0), - document: msg.getDocument_asB64() + tokenId: msg.getTokenId_asB64(), + identityIdsList: msg.getIdentityIdsList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { @@ -34374,23 +52234,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -34399,15 +52259,15 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentifier(value); + msg.setTokenId(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setVoteCount(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addIdentityIds(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDocument(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -34422,9 +52282,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -34432,29 +52292,29 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentifier_asU8(); + f = message.getTokenId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeUint32( + f = message.getIdentityIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( 2, f ); } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeBytes( + f = message.getProve(); + if (f) { + writer.writeBool( 3, f ); @@ -34463,319 +52323,473 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContest /** - * optional bytes identifier = 1; + * optional bytes token_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getIdentifier = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getTokenId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes identifier = 1; - * This is a type-conversion wrapper around `getIdentifier()` + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getIdentifier_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getTokenId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentifier())); + this.getTokenId())); }; /** - * optional bytes identifier = 1; + * optional bytes token_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentifier()` + * This is a type-conversion wrapper around `getTokenId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getIdentifier_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getTokenId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentifier())); + this.getTokenId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.setIdentifier = function(value) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.setTokenId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 vote_count = 2; - * @return {number} + * repeated bytes identity_ids = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getVoteCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getIdentityIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + * repeated bytes identity_ids = 2; + * This is a type-conversion wrapper around `getIdentityIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.setVoteCount = function(value) { - return jspb.Message.setField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getIdentityIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getIdentityIdsList())); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + * repeated bytes identity_ids = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getIdentityIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.clearVoteCount = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getIdentityIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getIdentityIdsList())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.hasVoteCount = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.setIdentityIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); }; /** - * optional bytes document = 3; - * @return {string} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getDocument = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.addIdentityIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** - * optional bytes document = 3; - * This is a type-conversion wrapper around `getDocument()` - * @return {string} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getDocument_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDocument())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.clearIdentityIdsList = function() { + return this.setIdentityIdsList([]); }; /** - * optional bytes document = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDocument()` - * @return {!Uint8Array} + * optional bool prove = 3; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.getDocument_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getDocument())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.setDocument = function(value) { - return jspb.Message.setField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender} returns this + * optional GetIdentitiesTokenInfosRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.clearDocument = function() { - return jspb.Message.setField(this, 3, undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0, 1)); }; /** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender.prototype.hasDocument = function() { - return jspb.Message.getField(this, 3) != null; + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.oneofGroups_[0], value); }; /** - * optional ContestedResourceContenders contested_resource_contenders = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.getContestedResourceContenders = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContenders|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.setContestedResourceContenders = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.oneofGroups_[0], value); + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.clearContestedResourceContenders = function() { - return this.setContestedResourceContenders(undefined); -}; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.oneofGroups_ = [[1]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; /** - * Returns whether this field is set. - * @return {boolean} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.hasContestedResourceContenders = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.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.GetIdentitiesTokenInfosResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.toObject(opt_includeInstance, this); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.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.GetIdentitiesTokenInfosResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.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.GetIdentitiesTokenInfosResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.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.GetIdentitiesTokenInfosResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.serializeBinaryToWriter + ); + } }; + /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} 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.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); -}; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.oneofGroups_ = [[1,2]]; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + IDENTITY_TOKEN_INFOS: 1, + PROOF: 2 +}; /** - * Returns whether this field is set. - * @return {boolean} + * @return {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.oneofGroups_[0])); }; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional GetContestedResourceVoteStateResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} + * 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.GetContestedResourceVoteStateResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.toObject(opt_includeInstance, this); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + identityTokenInfos: (f = msg.getIdentityTokenInfos()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.toObject(includeInstance, f), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.deserializeBinaryFromReader); + msg.setIdentityTokenInfos(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; }; - -/** - * 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.GetContestedResourceVotersForIdentityRequest.oneofGroups_ = [[1]]; - /** - * @enum {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.VersionCase} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityTokenInfos(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -34789,8 +52803,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.toObject(opt_includeInstance, this); }; @@ -34799,13 +52813,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.pro * @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.GetContestedResourceVotersForIdentityRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.toObject(includeInstance, f) + frozen: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -34819,23 +52833,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.toO /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.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.GetContestedResourceVotersForIdentityRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -34843,9 +52857,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.des var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFrozen(value); break; default: reader.skipField(); @@ -34860,9 +52873,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.des * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -34870,30 +52883,40 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.pro /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getFrozen(); + if (f) { + writer.writeBool( 1, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.serializeBinaryToWriter + f ); } }; +/** + * optional bool frozen = 1; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.getFrozen = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.repeatedFields_ = [4]; +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.prototype.setFrozen = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + @@ -34910,8 +52933,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.toObject(opt_includeInstance, this); }; @@ -34920,21 +52943,14 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get * @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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64(), - documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), - indexName: jspb.Message.getFieldWithDefault(msg, 3, ""), - indexValuesList: msg.getIndexValuesList_asB64(), - contestantId: msg.getContestantId_asB64(), - startAtIdentifierInfo: (f = msg.getStartAtIdentifierInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.toObject(includeInstance, f), - count: jspb.Message.getFieldWithDefault(msg, 7, 0), - orderAscending: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 9, false) + identityId: msg.getIdentityId_asB64(), + info: (f = msg.getInfo()) && proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.toObject(includeInstance, f) }; if (includeInstance) { @@ -34948,23 +52964,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -34973,40 +52989,12 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); + msg.setIdentityId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentTypeName(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setIndexName(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addIndexValues(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContestantId(value); - break; - case 6: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader); - msg.setStartAtIdentifierInfo(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCount(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOrderAscending(value); - break; - case 9: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.deserializeBinaryFromReader); + msg.setInfo(value); break; default: reader.skipField(); @@ -35021,9 +53009,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -35031,79 +53019,116 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); + f = message.getIdentityId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getDocumentTypeName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIndexName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getIndexValuesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 4, - f - ); - } - f = message.getContestantId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getStartAtIdentifierInfo(); + f = message.getInfo(); if (f != null) { writer.writeMessage( - 6, + 2, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 7)); - if (f != null) { - writer.writeUint32( - 7, - f - ); - } - f = message.getOrderAscending(); - if (f) { - writer.writeBool( - 8, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 9, - f + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry.serializeBinaryToWriter ); } }; +/** + * optional bytes identity_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.getIdentityId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getIdentityId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.setIdentityId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional TokenIdentityInfoEntry info = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.getInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntry|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.setInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.clearInfo = function() { + return this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.prototype.hasInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.repeatedFields_ = [1]; @@ -35120,8 +53145,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.toObject(opt_includeInstance, this); }; @@ -35130,14 +53155,14 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get * @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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.toObject = function(includeInstance, msg) { var f, obj = { - startIdentifier: msg.getStartIdentifier_asB64(), - startIdentifierIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + tokenInfosList: jspb.Message.toObjectList(msg.getTokenInfosList(), + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.toObject, includeInstance) }; if (includeInstance) { @@ -35151,23 +53176,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos; + return proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -35175,12 +53200,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStartIdentifier(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStartIdentifierIncluded(value); + var value = new proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.deserializeBinaryFromReader); + msg.addTokenInfos(value); break; default: reader.skipField(); @@ -35195,9 +53217,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -35205,403 +53227,582 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.Get /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} message + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getStartIdentifier_asU8(); + f = message.getTokenInfosList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getStartIdentifierIncluded(); - if (f) { - writer.writeBool( - 2, - f + f, + proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry.serializeBinaryToWriter ); } }; /** - * optional bytes start_identifier = 1; - * @return {string} + * repeated TokenInfoEntry token_infos = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.prototype.getTokenInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry, 1)); }; /** - * optional bytes start_identifier = 1; - * This is a type-conversion wrapper around `getStartIdentifier()` - * @return {string} + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.prototype.setTokenInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartIdentifier())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.prototype.addTokenInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntry, opt_index); }; /** - * optional bytes start_identifier = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartIdentifier()` - * @return {!Uint8Array} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifier_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartIdentifier())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos.prototype.clearTokenInfosList = function() { + return this.setTokenInfosList([]); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} returns this + * optional IdentityTokenInfos identity_token_infos = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifier = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.getIdentityTokenInfos = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos, 1)); }; /** - * optional bool start_identifier_included = 2; - * @return {boolean} + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfos|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.setIdentityTokenInfos = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.getStartIdentifierIncluded = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.clearIdentityTokenInfos = function() { + return this.setIdentityTokenInfos(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo.prototype.setStartIdentifierIncluded = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.hasIdentityTokenInfos = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes contract_id = 1; - * @return {string} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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 = 1; - * 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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * optional bytes contract_id = 1; - * 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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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 string document_type_name = 2; - * @return {string} + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.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.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getDocumentTypeName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setDocumentTypeName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional string index_name = 3; - * @return {string} + * optional GetIdentitiesTokenInfosResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0, 1)); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setIndexName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; /** - * repeated bytes index_values = 4; - * @return {!Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexValuesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +proto.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * repeated bytes index_values = 4; - * This is a type-conversion wrapper around `getIndexValuesList()` - * @return {!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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexValuesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getIndexValuesList())); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.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.GetTokenStatusesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.toObject(opt_includeInstance, this); }; /** - * repeated bytes index_values = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIndexValuesList()` - * @return {!Array} + * 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.GetTokenStatusesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getIndexValuesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getIndexValuesList())); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setIndexValuesList = function(value) { - return jspb.Message.setField(this, 4, value || []); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest; + return proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} 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.GetTokenStatusesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.addIndexValues = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.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.GetTokenStatusesRequest.GetTokenStatusesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.deserializeBinaryFromReader); + msg.setV0(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.clearIndexValuesList = function() { - return this.setIndexValuesList([]); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * optional bytes contestant_id = 5; - * @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.GetTokenStatusesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContestantId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.serializeBinaryToWriter + ); + } }; + /** - * optional bytes contestant_id = 5; - * This is a type-conversion wrapper around `getContestantId()` - * @return {string} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContestantId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContestantId())); -}; +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes contestant_id = 5; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContestantId()` - * @return {!Uint8Array} + * 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.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getContestantId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContestantId())); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.toObject(opt_includeInstance, this); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} 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.GetTokenStatusesRequest.GetTokenStatusesRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setContestantId = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + tokenIdsList: msg.getTokenIdsList_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional StartAtIdentifierInfo start_at_identifier_info = 6; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getStartAtIdentifierInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo, 6)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0; + return proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.deserializeBinaryFromReader(msg, reader); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setStartAtIdentifierInfo = function(value) { - return jspb.Message.setWrapperField(this, 6, value); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.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.addTokenIds(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.clearStartAtIdentifierInfo = function() { - return this.setStartAtIdentifierInfo(undefined); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.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.GetTokenStatusesRequest.GetTokenStatusesRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.hasStartAtIdentifierInfo = function() { - return jspb.Message.getField(this, 6) != null; +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenIdsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } }; /** - * optional uint32 count = 7; - * @return {number} + * repeated bytes token_ids = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.getTokenIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * repeated bytes token_ids = 1; + * This is a type-conversion wrapper around `getTokenIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setCount = function(value) { - return jspb.Message.setField(this, 7, value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.getTokenIdsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getTokenIdsList())); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * repeated bytes token_ids = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenIdsList()` + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.clearCount = function() { - return jspb.Message.setField(this, 7, undefined); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.getTokenIdsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTokenIdsList())); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!(Array|Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.hasCount = function() { - return jspb.Message.getField(this, 7) != null; +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.setTokenIdsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** - * optional bool order_ascending = 8; - * @return {boolean} + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getOrderAscending = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.addTokenIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setOrderAscending = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.clearTokenIdsList = function() { + return this.setTokenIdsList([]); }; /** - * optional bool prove = 9; + * optional bool prove = 2; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 9, value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional GetContestedResourceVotersForIdentityRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} + * optional GetTokenStatusesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -35610,7 +53811,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.pro * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -35624,21 +53825,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.pro * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.oneofGroups_[0])); }; @@ -35656,8 +53857,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.toObject(opt_includeInstance, this); }; @@ -35666,13 +53867,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.pr * @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.GetContestedResourceVotersForIdentityResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -35686,23 +53887,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.to /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse; + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.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.GetContestedResourceVotersForIdentityResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -35710,8 +53911,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.de var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -35727,9 +53928,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.de * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -35737,18 +53938,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.serializeBinaryToWriter ); } }; @@ -35763,22 +53964,22 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.se * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ResultCase = { RESULT_NOT_SET: 0, - CONTESTED_RESOURCE_VOTERS: 1, + TOKEN_STATUSES: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.oneofGroups_[0])); }; @@ -35796,8 +53997,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.toObject(opt_includeInstance, this); }; @@ -35806,13 +54007,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * @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.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - contestedResourceVoters: (f = msg.getContestedResourceVoters()) && proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.toObject(includeInstance, f), + tokenStatuses: (f = msg.getTokenStatuses()) && proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.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) }; @@ -35828,23 +54029,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0; + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.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.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -35852,9 +54053,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinaryFromReader); - msg.setContestedResourceVoters(value); + var value = new proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.deserializeBinaryFromReader); + msg.setTokenStatuses(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -35879,9 +54080,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -35889,18 +54090,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContestedResourceVoters(); + f = message.getTokenStatuses(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.serializeBinaryToWriter ); } f = message.getProof(); @@ -35923,13 +54124,6 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -35945,8 +54139,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.toObject(opt_includeInstance, this); }; @@ -35955,14 +54149,14 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * @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.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.toObject = function(includeInstance, msg) { var f, obj = { - votersList: msg.getVotersList_asB64(), - finishedResults: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + tokenId: msg.getTokenId_asB64(), + paused: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -35976,23 +54170,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters; - return proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry; + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.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.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -36001,11 +54195,11 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addVoters(value); + msg.setTokenId(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); - msg.setFinishedResults(value); + msg.setPaused(value); break; default: reader.skipField(); @@ -36020,9 +54214,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -36030,21 +54224,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVotersList_asU8(); + f = message.getTokenId_asU8(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeBytes( 1, f ); } - f = message.getFinishedResults(); - if (f) { + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { writer.writeBool( 2, f @@ -36054,109 +54248,268 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** - * repeated bytes voters = 1; - * @return {!Array} + * optional bytes token_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getVotersList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * repeated bytes voters = 1; - * This is a type-conversion wrapper around `getVotersList()` - * @return {!Array} + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getVotersList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getVotersList())); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); }; /** - * repeated bytes voters = 1; + * optional bytes token_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getVotersList()` - * @return {!Array} + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getVotersList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getVotersList())); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.setVotersList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + * optional bool paused = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.addVoters = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.getPaused = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.clearVotersList = function() { - return this.setVotersList([]); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.setPaused = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * optional bool finished_results = 2; + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.clearPaused = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.getFinishedResults = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.prototype.hasPaused = function() { + return jspb.Message.getField(this, 2) != null; }; + /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters.prototype.setFinishedResults = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.toObject(opt_includeInstance, this); }; /** - * optional ContestedResourceVoters contested_resource_voters = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} + * 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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getContestedResourceVoters = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters, 1)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.toObject = function(includeInstance, msg) { + var f, obj = { + tokenStatusesList: jspb.Message.toObjectList(msg.getTokenStatusesList(), + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses; + return proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.deserializeBinaryFromReader); + msg.addTokenStatuses(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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.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.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenStatusesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated TokenStatusEntry token_statuses = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.prototype.getTokenStatusesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.prototype.setTokenStatusesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.prototype.addTokenStatuses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} returns this + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses.prototype.clearTokenStatusesList = function() { + return this.setTokenStatusesList([]); +}; + + +/** + * optional TokenStatuses token_statuses = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} + */ +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.getTokenStatuses = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVoters|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatuses|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.setContestedResourceVoters = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.setTokenStatuses = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.clearContestedResourceVoters = function() { - return this.setContestedResourceVoters(undefined); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.clearTokenStatuses = function() { + return this.setTokenStatuses(undefined); }; @@ -36164,7 +54517,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.hasContestedResourceVoters = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.hasTokenStatuses = function() { return jspb.Message.getField(this, 1) != null; }; @@ -36173,7 +54526,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -36181,18 +54534,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -36201,7 +54554,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; @@ -36210,7 +54563,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); }; @@ -36218,18 +54571,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.setMetadata = function(value) { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.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.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -36238,35 +54591,35 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.Ge * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.prototype.hasMetadata = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.prototype.hasMetadata = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional GetContestedResourceVotersForIdentityResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} + * optional GetTokenStatusesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -36275,7 +54628,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.pr * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetTokenStatusesResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -36289,21 +54642,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.pr * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.oneofGroups_[0])); }; @@ -36321,8 +54674,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.toObject(opt_includeInstance, this); }; @@ -36331,13 +54684,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototy * @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.GetContestedResourceIdentityVotesRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -36351,23 +54704,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.toObjec /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest; + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.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.GetContestedResourceIdentityVotesRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -36375,8 +54728,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deseria var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -36392,9 +54745,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.deseria * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -36402,18 +54755,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototy /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.serializeBinaryToWriter ); } }; @@ -36435,8 +54788,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.toObject(opt_includeInstance, this); }; @@ -36445,18 +54798,14 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetCont * @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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - identityId: msg.getIdentityId_asB64(), - limit: (f = msg.getLimit()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - offset: (f = msg.getOffset()) && google_protobuf_wrappers_pb.UInt32Value.toObject(includeInstance, f), - orderAscending: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), - startAtVotePollIdInfo: (f = msg.getStartAtVotePollIdInfo()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.toObject(includeInstance, f), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + tokenId: msg.getTokenId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -36470,23 +54819,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetCont /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0; + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -36495,28 +54844,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetCont switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); + msg.setTokenId(value); break; case 2: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setLimit(value); - break; - case 3: - var value = new google_protobuf_wrappers_pb.UInt32Value; - reader.readMessage(value,google_protobuf_wrappers_pb.UInt32Value.deserializeBinaryFromReader); - msg.setOffset(value); - break; - case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setOrderAscending(value); - break; - case 5: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.deserializeBinaryFromReader); - msg.setStartAtVotePollIdInfo(value); - break; - case 6: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -36533,9 +54863,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetCont * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -36543,175 +54873,20 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetCont /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityId_asU8(); + f = message.getTokenId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getLimit(); - if (f != null) { - writer.writeMessage( - 2, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getOffset(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_wrappers_pb.UInt32Value.serializeBinaryToWriter - ); - } - f = message.getOrderAscending(); - if (f) { - writer.writeBool( - 4, - f - ); - } - f = message.getStartAtVotePollIdInfo(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.serializeBinaryToWriter - ); - } f = message.getProve(); - if (f) { - writer.writeBool( - 6, - f - ); - } -}; - - - - - -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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.toObject = function(includeInstance, msg) { - var f, obj = { - startAtPollIdentifier: msg.getStartAtPollIdentifier_asB64(), - startPollIdentifierIncluded: 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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.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.setStartAtPollIdentifier(value); - break; - case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setStartPollIdentifierIncluded(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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getStartAtPollIdentifier_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getStartPollIdentifierIncluded(); if (f) { writer.writeBool( 2, @@ -36722,278 +54897,89 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetCont /** - * optional bytes start_at_poll_identifier = 1; + * optional bytes token_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartAtPollIdentifier = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.getTokenId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes start_at_poll_identifier = 1; - * This is a type-conversion wrapper around `getStartAtPollIdentifier()` + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartAtPollIdentifier_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.getTokenId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getStartAtPollIdentifier())); + this.getTokenId())); }; /** - * optional bytes start_at_poll_identifier = 1; + * optional bytes token_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getStartAtPollIdentifier()` + * This is a type-conversion wrapper around `getTokenId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartAtPollIdentifier_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.getTokenId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getStartAtPollIdentifier())); + this.getTokenId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.setStartAtPollIdentifier = function(value) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.setTokenId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional bool start_poll_identifier_included = 2; + * optional bool prove = 2; * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.getStartPollIdentifierIncluded = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.getProve = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo.prototype.setStartPollIdentifierIncluded = function(value) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0.prototype.setProve = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * optional bytes identity_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setIdentityId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional google.protobuf.UInt32Value limit = 2; - * @return {?proto.google.protobuf.UInt32Value} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getLimit = function() { - return /** @type{?proto.google.protobuf.UInt32Value} */ ( - jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.UInt32Value, 2)); -}; - - -/** - * @param {?proto.google.protobuf.UInt32Value|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setLimit = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.clearLimit = function() { - return this.setLimit(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.hasLimit = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional google.protobuf.UInt32Value offset = 3; - * @return {?proto.google.protobuf.UInt32Value} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getOffset = 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.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setOffset = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.clearOffset = function() { - return this.setOffset(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.hasOffset = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional bool order_ascending = 4; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getOrderAscending = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setOrderAscending = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); -}; - - -/** - * optional StartAtVotePollIdInfo start_at_vote_poll_id_info = 5; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getStartAtVotePollIdInfo = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo, 5)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfo|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setStartAtVotePollIdInfo = function(value) { - return jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.clearStartAtVotePollIdInfo = function() { - return this.setStartAtVotePollIdInfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.hasStartAtVotePollIdInfo = function() { - return jspb.Message.getField(this, 5) != null; -}; - - -/** - * optional bool prove = 6; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); -}; - - -/** - * optional GetContestedResourceIdentityVotesRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} + * optional GetTokenTotalSupplyRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -37002,7 +54988,7 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototy * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -37016,21 +55002,21 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.prototy * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.oneofGroups_[0])); }; @@ -37048,8 +55034,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.toObject(opt_includeInstance, this); }; @@ -37058,13 +55044,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.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.GetContestedResourceIdentityVotesResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -37078,23 +55064,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.toObje /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse; + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.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.GetContestedResourceIdentityVotesResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -37102,8 +55088,8 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deseri var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -37119,9 +55105,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.deseri * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -37129,18 +55115,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.protot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.serializeBinaryToWriter ); } }; @@ -37155,22 +55141,22 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.serial * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ResultCase = { RESULT_NOT_SET: 0, - VOTES: 1, + TOKEN_TOTAL_SUPPLY: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.oneofGroups_[0])); }; @@ -37188,8 +55174,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.toObject(opt_includeInstance, this); }; @@ -37198,13 +55184,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * @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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - votes: (f = msg.getVotes()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.toObject(includeInstance, f), + tokenTotalSupply: (f = msg.getTokenTotalSupply()) && proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.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) }; @@ -37220,23 +55206,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0; + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -37244,9 +55230,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinaryFromReader); - msg.setVotes(value); + var value = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.deserializeBinaryFromReader); + msg.setTokenTotalSupply(value); break; case 2: var value = new proto.org.dash.platform.dapi.v0.Proof; @@ -37271,9 +55257,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -37281,18 +55267,18 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVotes(); + f = message.getTokenTotalSupply(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.serializeBinaryToWriter ); } f = message.getProof(); @@ -37315,13 +55301,6 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -37337,8 +55316,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.toObject(opt_includeInstance, this); }; @@ -37347,15 +55326,15 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * @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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.toObject = function(includeInstance, msg) { var f, obj = { - contestedResourceIdentityVotesList: jspb.Message.toObjectList(msg.getContestedResourceIdentityVotesList(), - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.toObject, includeInstance), - finishedResults: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + tokenId: msg.getTokenId_asB64(), + totalAggregatedAmountInUserAccounts: jspb.Message.getFieldWithDefault(msg, 2, 0), + totalSystemAmount: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -37369,23 +55348,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry; + return proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -37393,13 +55372,16 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinaryFromReader); - msg.addContestedResourceIdentityVotes(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTokenId(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setFinishedResults(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalAggregatedAmountInUserAccounts(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotalSystemAmount(value); break; default: reader.skipField(); @@ -37414,9 +55396,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -37424,285 +55406,250 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} message + * @param {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContestedResourceIdentityVotesList(); + f = message.getTokenId_asU8(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.serializeBinaryToWriter + f ); } - f = message.getFinishedResults(); - if (f) { - writer.writeBool( + f = message.getTotalAggregatedAmountInUserAccounts(); + if (f !== 0) { + writer.writeUint64( 2, f ); } + f = message.getTotalSystemAmount(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } }; /** - * repeated ContestedResourceIdentityVote contested_resource_identity_votes = 1; - * @return {!Array} + * optional bytes token_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.getContestedResourceIdentityVotesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote, 1)); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.setContestedResourceIdentityVotesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * optional bytes token_id = 1; + * This is a type-conversion wrapper around `getTokenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.getTokenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenId())); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} + * optional bytes token_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.addContestedResourceIdentityVotes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote, opt_index); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.getTokenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenId())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.clearContestedResourceIdentityVotesList = function() { - return this.setContestedResourceIdentityVotesList([]); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.setTokenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional bool finished_results = 2; - * @return {boolean} + * optional uint64 total_aggregated_amount_in_user_accounts = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.getFinishedResults = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.getTotalAggregatedAmountInUserAccounts = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes.prototype.setFinishedResults = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.setTotalAggregatedAmountInUserAccounts = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; +/** + * optional uint64 total_system_amount = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.getTotalSystemAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 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} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry.prototype.setTotalSystemAmount = function(value) { + return jspb.Message.setProto3IntField(this, 3, 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * optional TokenTotalSupplyEntry token_total_supply = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.toObject = function(includeInstance, msg) { - var f, obj = { - voteChoiceType: jspb.Message.getFieldWithDefault(msg, 1, 0), - identityId: msg.getIdentityId_asB64() - }; +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.getTokenTotalSupply = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry, 1)); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntry|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.setTokenTotalSupply = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.oneofGroups_[0], value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.deserializeBinaryFromReader(msg, reader); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.clearTokenTotalSupply = function() { + return this.setTokenTotalSupply(undefined); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} */ (reader.readEnum()); - msg.setVoteChoiceType(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setIdentityId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.hasTokenTotalSupply = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.getProof = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getVoteChoiceType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeBytes( - 2, - f - ); - } + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.oneofGroups_[0], value); }; /** - * @enum {number} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType = { - TOWARDS_IDENTITY: 0, - ABSTAIN: 1, - LOCK: 2 +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; + /** - * optional VoteChoiceType vote_choice_type = 1; - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getVoteChoiceType = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} returns this + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.setVoteChoiceType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.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 bytes identity_id = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getIdentityId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * optional bytes identity_id = 2; - * This is a type-conversion wrapper around `getIdentityId()` - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getIdentityId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * optional bytes identity_id = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getIdentityId()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.getIdentityId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getIdentityId())); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} returns this + * optional GetTokenTotalSupplyResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.setIdentityId = function(value) { - return jspb.Message.setField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0, 1)); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.clearIdentityId = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.clearV0 = function() { + return this.setV0(undefined); }; @@ -37710,18 +55657,36 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.prototype.hasIdentityId = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.repeatedFields_ = [3]; +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.oneofGroups_[0])); +}; @@ -37738,8 +55703,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.toObject(opt_includeInstance, this); }; @@ -37748,16 +55713,13 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * @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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.toObject = function(includeInstance, msg) { var f, obj = { - contractId: msg.getContractId_asB64(), - documentTypeName: jspb.Message.getFieldWithDefault(msg, 2, ""), - serializedIndexStorageValuesList: msg.getSerializedIndexStorageValuesList_asB64(), - voteChoice: (f = msg.getVoteChoice()) && proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -37771,23 +55733,23 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote; - return proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoRequest; + return proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -37795,21 +55757,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setContractId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentTypeName(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addSerializedIndexStorageValues(value); - break; - case 4: - var value = new proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.deserializeBinaryFromReader); - msg.setVoteChoice(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.deserializeBinaryFromReader); + msg.setV0(value); break; default: reader.skipField(); @@ -37824,9 +55774,9 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -37834,227 +55784,262 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractId_asU8(); - if (f.length > 0) { - writer.writeBytes( - 1, - f - ); - } - f = message.getDocumentTypeName(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSerializedIndexStorageValuesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 3, - f - ); - } - f = message.getVoteChoice(); + f = message.getV0(); if (f != null) { writer.writeMessage( - 4, + 1, f, - proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.serializeBinaryToWriter ); } }; -/** - * optional bytes contract_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - -/** - * optional bytes contract_id = 1; - * This is a type-conversion wrapper around `getContractId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getContractId())); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes contract_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getContractId()` - * @return {!Uint8Array} + * 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getContractId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getContractId())); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.toObject(opt_includeInstance, this); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} 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.GetGroupInfoRequest.GetGroupInfoRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setContractId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + contractId: msg.getContractId_asB64(), + groupContractPosition: jspb.Message.getFieldWithDefault(msg, 2, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional string document_type_name = 2; - * @return {string} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getDocumentTypeName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0; + return proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.deserializeBinaryFromReader(msg, reader); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} 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.GetGroupInfoRequest.GetGroupInfoRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setDocumentTypeName = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.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.setContractId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGroupContractPosition(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * repeated bytes serialized_index_storage_values = 3; - * @return {!Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getSerializedIndexStorageValuesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * repeated bytes serialized_index_storage_values = 3; - * This is a type-conversion wrapper around `getSerializedIndexStorageValuesList()` - * @return {!Array} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getSerializedIndexStorageValuesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getSerializedIndexStorageValuesList())); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getGroupContractPosition(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 3, + f + ); + } }; /** - * repeated bytes serialized_index_storage_values = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSerializedIndexStorageValuesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getSerializedIndexStorageValuesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getSerializedIndexStorageValuesList())); + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setSerializedIndexStorageValuesList = function(value) { - return jspb.Message.setField(this, 3, value || []); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + * optional bytes contract_id = 1; + * 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.addSerializedIndexStorageValues = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.clearSerializedIndexStorageValuesList = function() { - return this.setSerializedIndexStorageValuesList([]); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional ResourceVoteChoice vote_choice = 4; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} + * optional uint32 group_contract_position = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.getVoteChoice = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice, 4)); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.getGroupContractPosition = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.setVoteChoice = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.setGroupContractPosition = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote} returns this + * optional bool prove = 3; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.clearVoteChoice = function() { - return this.setVoteChoice(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote.prototype.hasVoteChoice = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); }; /** - * optional ContestedResourceIdentityVotes votes = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} + * optional GetGroupInfoRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.getVotes = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotes|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.setVotes = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.clearVotes = function() { - return this.setVotes(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.clearV0 = function() { + return this.setV0(undefined); }; @@ -38062,119 +56047,147 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetCon * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.hasVotes = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoRequest.prototype.hasV0 = 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.oneofGroups_[0], value); -}; - /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); -}; - +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.oneofGroups_ = [[1]]; /** - * Returns whether this field is set. - * @return {boolean} + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 }; - /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * @return {proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.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.GetGroupInfoResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.oneofGroups_[0])); }; -/** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} 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.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.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.GetGroupInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional GetContestedResourceIdentityVotesResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse; + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.deserializeBinaryFromReader(msg, reader); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.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.GetGroupInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.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.GetGroupInfoResponse.GetGroupInfoResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.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.GetContestedResourceIdentityVotesResponse} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.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.GetGroupInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.serializeBinaryToWriter + ); + } }; @@ -38187,21 +56200,22 @@ proto.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.protot * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + GROUP_INFO: 1, + PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.oneofGroups_[0])); }; @@ -38219,8 +56233,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.toObject(opt_includeInstance, this); }; @@ -38229,13 +56243,15 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.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.GetPrefundedSpecializedBalanceRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.toObject(includeInstance, f) + groupInfo: (f = msg.getGroupInfo()) && proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.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) { @@ -38249,23 +56265,23 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest; - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0; + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.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.GetPrefundedSpecializedBalanceRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -38273,9 +56289,19 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.deserializeBinaryFromReader); + msg.setGroupInfo(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 4: + 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(); @@ -38290,9 +56316,9 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.deserializ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -38300,18 +56326,34 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); + f = message.getGroupInfo(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.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( + 4, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter ); } }; @@ -38333,8 +56375,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.toObject(opt_includeInstance, this); }; @@ -38343,14 +56385,14 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefund * @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.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + memberId: msg.getMemberId_asB64(), + power: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -38364,23 +56406,23 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefund /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0; - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry; + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.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.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -38389,11 +56431,11 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefund switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setId(value); + msg.setMemberId(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setPower(value); break; default: reader.skipField(); @@ -38408,9 +56450,9 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefund * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -38418,22 +56460,22 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefund /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); + f = message.getMemberId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getProve(); - if (f) { - writer.writeBool( + f = message.getPower(); + if (f !== 0) { + writer.writeUint32( 2, f ); @@ -38442,127 +56484,72 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefund /** - * optional bytes id = 1; + * optional bytes member_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getId = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.getMemberId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` + * optional bytes member_id = 1; + * This is a type-conversion wrapper around `getMemberId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getId_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.getMemberId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + this.getMemberId())); }; /** - * optional bytes id = 1; + * optional bytes member_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getId()` + * This is a type-conversion wrapper around `getMemberId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getId_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.getMemberId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); + this.getMemberId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.setId = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.setMemberId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional bool prove = 2; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 2, value); -}; - - -/** - * optional GetPrefundedSpecializedBalanceRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} - */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest} returns this + * optional uint32 power = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.prototype.setPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, 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>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_ = [[1]]; - -/** - * @enum {number} - */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 -}; - -/** - * @return {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.VersionCase} - */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.repeatedFields_ = [1]; @@ -38579,8 +56566,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.toObject(opt_includeInstance, this); }; @@ -38589,13 +56576,15 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.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.GetPrefundedSpecializedBalanceResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.toObject(includeInstance, f) + membersList: jspb.Message.toObjectList(msg.getMembersList(), + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.toObject, includeInstance), + groupRequiredPower: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -38609,23 +56598,23 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.toObject /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse; - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry; + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.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.GetPrefundedSpecializedBalanceResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -38633,9 +56622,13 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deseriali var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.deserializeBinaryFromReader); + msg.addMembers(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGroupRequiredPower(value); break; default: reader.skipField(); @@ -38650,9 +56643,9 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.deseriali * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -38660,52 +56653,89 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getMembersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry.serializeBinaryToWriter + ); + } + f = message.getGroupRequiredPower(); + if (f !== 0) { + writer.writeUint32( + 2, + f ); } }; +/** + * repeated GroupMemberEntry members = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.getMembersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry, 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.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.setMembersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.addMembers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry, opt_index); +}; + /** - * @enum {number} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - BALANCE: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.clearMembersList = function() { + return this.setMembersList([]); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.ResultCase} + * optional uint32 group_required_power = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.getGroupRequiredPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.prototype.setGroupRequiredPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -38719,8 +56749,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.toObject(opt_includeInstance, this); }; @@ -38729,15 +56759,13 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun * @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.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.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) + groupInfo: (f = msg.getGroupInfo()) && proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.toObject(includeInstance, f) }; if (includeInstance) { @@ -38751,23 +56779,23 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0; - return proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo; + return proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.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.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -38775,18 +56803,9 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBalance(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 = new proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.deserializeBinaryFromReader); + msg.setGroupInfo(value); break; default: reader.skipField(); @@ -38801,9 +56820,9 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -38811,62 +56830,85 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.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(); + f = message.getGroupInfo(); if (f != null) { writer.writeMessage( - 3, + 1, f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry.serializeBinaryToWriter ); } }; /** - * optional uint64 balance = 1; - * @return {number} + * optional GroupInfoEntry group_info = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.prototype.getGroupInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntry|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.prototype.setGroupInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getBalance = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.prototype.clearGroupInfo = function() { + return this.setGroupInfo(undefined); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.setBalance = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo.prototype.hasGroupInfo = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this + * optional GroupInfo group_info = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.clearBalance = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0], undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.getGroupInfo = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfo|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.setGroupInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.clearGroupInfo = function() { + return this.setGroupInfo(undefined); }; @@ -38874,7 +56916,7 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.hasBalance = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.hasGroupInfo = function() { return jspb.Message.getField(this, 1) != null; }; @@ -38883,7 +56925,7 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun * optional Proof proof = 2; * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getProof = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.getProof = function() { return /** @type{?proto.org.dash.platform.dapi.v0.Proof} */ ( jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.Proof, 2)); }; @@ -38891,18 +56933,18 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun /** * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.clearProof = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.clearProof = function() { return this.setProof(undefined); }; @@ -38911,35 +56953,35 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.hasProof = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.hasProof = function() { return jspb.Message.getField(this, 2) != null; }; /** - * optional ResponseMetadata metadata = 3; + * optional ResponseMetadata metadata = 4; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 3)); + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 4)); }; /** * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -38948,35 +56990,35 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefun * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional GetPrefundedSpecializedBalanceResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} + * optional GetGroupInfoResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfoResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -38985,7 +57027,7 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfoResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -38999,21 +57041,21 @@ proto.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.prototype * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.oneofGroups_[0])); }; @@ -39031,8 +57073,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.toObject(opt_includeInstance, this); }; @@ -39041,13 +57083,13 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.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.GetTotalCreditsInPlatformRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -39061,23 +57103,23 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.toObject = func /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest; - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosRequest; + return proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.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.GetTotalCreditsInPlatformRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39085,8 +57127,8 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBina var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -39102,9 +57144,9 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.deserializeBina * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39112,18 +57154,18 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.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.GetTotalCreditsInPlatformRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.serializeBinaryToWriter ); } }; @@ -39145,8 +57187,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.toObject(opt_includeInstance, this); }; @@ -39155,13 +57197,14 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCredits * @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.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.toObject = function(includeInstance, msg) { var f, obj = { - prove: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) + startGroupContractPosition: jspb.Message.getFieldWithDefault(msg, 1, 0), + startGroupContractPositionIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -39175,23 +57218,185 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCredits /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0; - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition; + return proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.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.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.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.setStartGroupContractPosition(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setStartGroupContractPositionIncluded(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.GetGroupInfosRequest.StartAtGroupContractPosition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.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.GetGroupInfosRequest.StartAtGroupContractPosition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartGroupContractPosition(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getStartGroupContractPositionIncluded(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional uint32 start_group_contract_position = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.prototype.getStartGroupContractPosition = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.prototype.setStartGroupContractPosition = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool start_group_contract_position_included = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.prototype.getStartGroupContractPositionIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.prototype.setStartGroupContractPositionIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, 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.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.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.GetGroupInfosRequest.GetGroupInfosRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + contractId: msg.getContractId_asB64(), + startAtGroupContractPosition: (f = msg.getStartAtGroupContractPosition()) && proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.toObject(includeInstance, f), + count: jspb.Message.getFieldWithDefault(msg, 3, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 4, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0; + return proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.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.GetGroupInfosRequest.GetGroupInfosRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39199,6 +57404,19 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCredits var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setContractId(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.deserializeBinaryFromReader); + msg.setStartAtGroupContractPosition(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCount(value); + break; + case 4: var value = /** @type {boolean} */ (reader.readBool()); msg.setProve(value); break; @@ -39215,9 +57433,9 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCredits * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39225,16 +57443,38 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCredits /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getStartAtGroupContractPosition(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint32( + 3, + f + ); + } f = message.getProve(); if (f) { writer.writeBool( - 1, + 4, f ); } @@ -39242,47 +57482,162 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCredits /** - * optional bool prove = 1; + * optional bytes contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional StartAtGroupContractPosition start_at_group_contract_position = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.getStartAtGroupContractPosition = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition, 2)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPosition|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.setStartAtGroupContractPosition = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.clearStartAtGroupContractPosition = function() { + return this.setStartAtGroupContractPosition(undefined); +}; + + +/** + * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.hasStartAtGroupContractPosition = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint32 count = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.setCount = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.clearCount = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.hasCount = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool prove = 4; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * optional GetTotalCreditsInPlatformRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} + * optional GetGroupInfosRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -39291,7 +57646,7 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.clear * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -39305,21 +57660,21 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.prototype.hasV0 * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.oneofGroups_[0])); }; @@ -39337,8 +57692,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.toObject(opt_includeInstance, this); }; @@ -39347,13 +57702,13 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.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.GetTotalCreditsInPlatformResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -39367,23 +57722,23 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.toObject = fun /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse; - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse; + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.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.GetTotalCreditsInPlatformResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39391,8 +57746,8 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBin var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -39408,9 +57763,9 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.deserializeBin * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39418,18 +57773,18 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.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.GetTotalCreditsInPlatformResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.serializeBinaryToWriter ); } }; @@ -39444,22 +57799,22 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.serializeBinar * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.ResultCase = { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.ResultCase = { RESULT_NOT_SET: 0, - CREDITS: 1, + GROUP_INFOS: 1, PROOF: 2 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.ResultCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.ResultCase} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.oneofGroups_[0])); }; @@ -39477,8 +57832,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.toObject(opt_includeInstance, this); }; @@ -39487,13 +57842,13 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit * @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.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - credits: jspb.Message.getFieldWithDefault(msg, 1, 0), + groupInfos: (f = msg.getGroupInfos()) && proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.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) }; @@ -39509,23 +57864,23 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0; - return proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0; + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.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.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39533,15 +57888,16 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCredits(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.deserializeBinaryFromReader); + msg.setGroupInfos(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: + case 4: var value = new proto.org.dash.platform.dapi.v0.ResponseMetadata; reader.readMessage(value,proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader); msg.setMetadata(value); @@ -39559,9 +57915,9 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39569,17 +57925,18 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {number} */ (jspb.Message.getField(message, 1)); + f = message.getGroupInfos(); if (f != null) { - writer.writeUint64( + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.serializeBinaryToWriter ); } f = message.getProof(); @@ -39593,7 +57950,7 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit f = message.getMetadata(); if (f != null) { writer.writeMessage( - 3, + 4, f, proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter ); @@ -39601,178 +57958,197 @@ proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCredit }; -/** - * optional uint64 credits = 1; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.getCredits = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.setCredits = function(value) { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0], value); -}; - -/** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.clearCredits = function() { - return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0], undefined); -}; +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.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.hasCredits = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.toObject(opt_includeInstance, this); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * 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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.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.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.oneofGroups_[0], value); -}; - +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.toObject = function(includeInstance, msg) { + var f, obj = { + memberId: msg.getMemberId_asB64(), + power: jspb.Message.getFieldWithDefault(msg, 2, 0) + }; -/** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry; + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.deserializeBinaryFromReader(msg, reader); }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.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.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.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.setMemberId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMemberId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes member_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.getMemberId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional GetTotalCreditsInPlatformResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} + * optional bytes member_id = 1; + * This is a type-conversion wrapper around `getMemberId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.getMemberId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMemberId())); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} returns this -*/ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.oneofGroups_[0], value); + * optional bytes member_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMemberId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.getMemberId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMemberId())); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.setMemberId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional uint32 power = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; - -/** - * 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.GetPathElementsRequest.oneofGroups_ = [[1]]; - /** - * @enum {number} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.prototype.setPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + + /** - * @return {proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetPathElementsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_[0])); -}; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.repeatedFields_ = [2]; @@ -39789,8 +58165,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.toObject(opt_includeInstance, this); }; @@ -39799,13 +58175,16 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.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.GetPathElementsRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.toObject(includeInstance, f) + groupContractPosition: jspb.Message.getFieldWithDefault(msg, 1, 0), + membersList: jspb.Message.toObjectList(msg.getMembersList(), + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.toObject, includeInstance), + groupRequiredPower: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -39819,23 +58198,23 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.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.GetPathElementsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsRequest; - return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry; + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.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.GetPathElementsRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39843,9 +58222,17 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setGroupContractPosition(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.deserializeBinaryFromReader); + msg.addMembers(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGroupRequiredPower(value); break; default: reader.skipField(); @@ -39860,9 +58247,9 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPathElementsRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -39870,30 +58257,118 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.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.GetPathElementsRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getGroupContractPosition(); + if (f !== 0) { + writer.writeUint32( 1, + f + ); + } + f = message.getMembersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, f, - proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry.serializeBinaryToWriter + ); + } + f = message.getGroupRequiredPower(); + if (f !== 0) { + writer.writeUint32( + 3, + f ); } }; +/** + * optional uint32 group_contract_position = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.getGroupContractPosition = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.setGroupContractPosition = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated GroupMemberEntry members = 2; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.getMembersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.setMembersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.addMembers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.clearMembersList = function() { + return this.setMembersList([]); +}; + + +/** + * optional uint32 group_required_power = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.getGroupRequiredPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.prototype.setGroupRequiredPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.repeatedFields_ = [1,2]; +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.repeatedFields_ = [1]; @@ -39910,8 +58385,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.toObject(opt_includeInstance, this); }; @@ -39920,15 +58395,14 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0. * @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.GetPathElementsRequest.GetPathElementsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.toObject = function(includeInstance, msg) { var f, obj = { - pathList: msg.getPathList_asB64(), - keysList: msg.getKeysList_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + groupInfosList: jspb.Message.toObjectList(msg.getGroupInfosList(), + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.toObject, includeInstance) }; if (includeInstance) { @@ -39942,23 +58416,23 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0. /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0; - return proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos; + return proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.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.GetPathElementsRequest.GetPathElementsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -39966,16 +58440,9 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0. var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addPath(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addKeys(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.deserializeBinaryFromReader); + msg.addGroupInfos(value); break; default: reader.skipField(); @@ -39990,9 +58457,9 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0. * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40000,200 +58467,196 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPathList_asU8(); + f = message.getGroupInfosList(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getKeysList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 2, - f - ); - } - f = message.getProve(); - if (f) { - writer.writeBool( - 3, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry.serializeBinaryToWriter ); } }; /** - * repeated bytes path = 1; - * @return {!Array} + * repeated GroupPositionInfoEntry group_infos = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getPathList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.prototype.getGroupInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry, 1)); }; /** - * repeated bytes path = 1; - * This is a type-conversion wrapper around `getPathList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getPathList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getPathList())); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.prototype.setGroupInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * repeated bytes path = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPathList()` - * @return {!Array} + * @param {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getPathList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getPathList())); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.prototype.addGroupInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntry, opt_index); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.setPathList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos.prototype.clearGroupInfosList = function() { + return this.setGroupInfosList([]); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + * optional GroupInfos group_infos = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.addPath = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.getGroupInfos = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos, 1)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.clearPathList = function() { - return this.setPathList([]); + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfos|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.setGroupInfos = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.oneofGroups_[0], value); }; /** - * repeated bytes keys = 2; - * @return {!Array} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getKeysList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.clearGroupInfos = function() { + return this.setGroupInfos(undefined); }; /** - * repeated bytes keys = 2; - * This is a type-conversion wrapper around `getKeysList()` - * @return {!Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getKeysList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getKeysList())); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.hasGroupInfos = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * repeated bytes keys = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getKeysList()` - * @return {!Array} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getKeysList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getKeysList())); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.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 {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.setKeysList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.addKeys = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + * optional ResponseMetadata metadata = 4; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.clearKeysList = function() { - return this.setKeysList([]); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.getMetadata = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 4)); }; /** - * optional bool prove = 3; - * @return {boolean} + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.getProve = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0.prototype.setProve = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional GetPathElementsRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} + * optional GetGroupInfosResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPathElementsRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupInfosResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -40202,7 +58665,7 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.clearV0 = funct * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupInfosResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -40216,21 +58679,21 @@ proto.org.dash.platform.dapi.v0.GetPathElementsRequest.prototype.hasV0 = functio * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.oneofGroups_[0])); }; @@ -40248,8 +58711,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.toObject(opt_includeInstance, this); }; @@ -40258,13 +58721,13 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.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.GetPathElementsResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -40278,23 +58741,23 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.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.GetPathElementsResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse; - return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsRequest; + return proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.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.GetPathElementsResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -40302,8 +58765,8 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinaryFromRea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -40319,9 +58782,9 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.deserializeBinaryFromRea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40329,49 +58792,31 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.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.GetPathElementsResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.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.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_ = [[1,2]]; - /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - ELEMENTS: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus = { + ACTIVE: 0, + CLOSED: 1 }; -/** - * @return {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ResultCase} - */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_[0])); -}; @@ -40388,8 +58833,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.toObject(opt_includeInstance, this); }; @@ -40398,15 +58843,14 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV * @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.GetPathElementsResponse.GetPathElementsResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.toObject = function(includeInstance, msg) { var f, obj = { - elements: (f = msg.getElements()) && proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.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) + startActionId: msg.getStartActionId_asB64(), + startActionIdIncluded: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { @@ -40420,23 +58864,23 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0; - return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId; + return proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.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.GetPathElementsResponse.GetPathElementsResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -40444,19 +58888,12 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.deserializeBinaryFromReader); - msg.setElements(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartActionId(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 {boolean} */ (reader.readBool()); + msg.setStartActionIdIncluded(value); break; default: reader.skipField(); @@ -40471,9 +58908,9 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40481,46 +58918,89 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getElements(); - if (f != null) { - writer.writeMessage( + f = message.getStartActionId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.serializeBinaryToWriter + f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getStartActionIdIncluded(); + if (f) { + writer.writeBool( 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 + f ); } }; +/** + * optional bytes start_action_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.getStartActionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes start_action_id = 1; + * This is a type-conversion wrapper around `getStartActionId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.getStartActionId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getStartActionId())); +}; + + +/** + * optional bytes start_action_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getStartActionId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.getStartActionId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getStartActionId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.setStartActionId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * optional bool start_action_id_included = 2; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.repeatedFields_ = [1]; +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.getStartActionIdIncluded = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.prototype.setStartActionIdIncluded = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + @@ -40537,8 +59017,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.toObject(opt_includeInstance, this); }; @@ -40547,13 +59027,18 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV * @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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - elementsList: msg.getElementsList_asB64() + contractId: msg.getContractId_asB64(), + groupContractPosition: jspb.Message.getFieldWithDefault(msg, 2, 0), + status: jspb.Message.getFieldWithDefault(msg, 3, 0), + startAtActionId: (f = msg.getStartAtActionId()) && proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.toObject(includeInstance, f), + count: jspb.Message.getFieldWithDefault(msg, 5, 0), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) }; if (includeInstance) { @@ -40567,23 +59052,23 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements; - return proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0; + return proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.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.GetPathElementsResponse.GetPathElementsResponseV0.Elements} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -40592,7 +59077,28 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addElements(value); + msg.setContractId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGroupContractPosition(value); + break; + case 3: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 4: + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.deserializeBinaryFromReader); + msg.setStartAtActionId(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCount(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); break; default: reader.skipField(); @@ -40607,9 +59113,9 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40617,218 +59123,251 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getElementsList_asU8(); + f = message.getContractId_asU8(); if (f.length > 0) { - writer.writeRepeatedBytes( + writer.writeBytes( 1, f ); } + f = message.getGroupContractPosition(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getStartAtActionId(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint32( + 5, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 6, + f + ); + } }; /** - * repeated bytes elements = 1; - * @return {!Array} + * optional bytes contract_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.getElementsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * repeated bytes elements = 1; - * This is a type-conversion wrapper around `getElementsList()` - * @return {!Array} + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.getElementsList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getElementsList())); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); }; /** - * repeated bytes elements = 1; + * optional bytes contract_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getElementsList()` - * @return {!Array} + * This is a type-conversion wrapper around `getContractId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.getElementsList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getElementsList())); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.setElementsList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} returns this + * optional uint32 group_contract_position = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.addElements = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getGroupContractPosition = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} returns this + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements.prototype.clearElementsList = function() { - return this.setElementsList([]); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.setGroupContractPosition = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional Elements elements = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} + * optional ActionStatus status = 3; + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.getElements = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getStatus = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.Elements|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.setElements = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_[0], value); + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this + * optional StartAtActionId start_at_action_id = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.clearElements = function() { - return this.setElements(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getStartAtActionId = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId, 4)); }; /** - * Returns whether this field is set. - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.hasElements = function() { - return jspb.Message.getField(this, 1) != null; + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionId|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.setStartAtActionId = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.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.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.clearStartAtActionId = function() { + return this.setStartAtActionId(undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.oneofGroups_[0], value); + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.hasStartAtActionId = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this + * optional uint32 count = 5; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.setCount = function(value) { + return jspb.Message.setField(this, 5, value); }; /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.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.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.clearCount = function() { + return jspb.Message.setField(this, 5, undefined); }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.hasCount = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} returns this + * optional bool prove = 6; + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.clearMetadata = function() { - return this.setMetadata(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 6, value); }; /** - * optional GetPathElementsResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} + * optional GetGroupActionsRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetPathElementsResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetPathElementsResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -40837,7 +59376,7 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.clearV0 = func * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -40851,21 +59390,21 @@ proto.org.dash.platform.dapi.v0.GetPathElementsResponse.prototype.hasV0 = functi * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.oneofGroups_[0])); }; @@ -40883,8 +59422,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.toObject(opt_includeInstance, this); }; @@ -40893,13 +59432,13 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.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.GetStatusRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -40913,23 +59452,23 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.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.GetStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusRequest; - return proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.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.GetStatusRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -40937,8 +59476,8 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinaryFromReader = f var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -40954,9 +59493,9 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -40964,24 +59503,50 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.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.GetStatusRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetGroupActionsResponse.GetGroupActionsResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + GROUP_ACTIONS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -40997,8 +59562,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.toObject(opt_includeInstance, this); }; @@ -41007,13 +59572,157 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.prototype.to * @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.GetStatusRequest.GetStatusRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.toObject = function(includeInstance, msg) { var f, obj = { + groupActions: (f = msg.getGroupActions()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.toObject(includeInstance, f), + proof: (f = msg.getProof()) && proto.org.dash.platform.dapi.v0.Proof.toObject(includeInstance, f), + metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetGroupActionsResponse.GetGroupActionsResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.deserializeBinaryFromReader); + msg.setGroupActions(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.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetGroupActionsResponse.GetGroupActionsResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupActions(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.serializeBinaryToWriter + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter + ); + } + f = message.getMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.toObject = function(includeInstance, msg) { + var f, obj = { + amount: jspb.Message.getFieldWithDefault(msg, 1, 0), + recipientId: msg.getRecipientId_asB64(), + publicNote: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -41027,29 +59736,41 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.toObject = f /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0; - return proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.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.GetStatusRequest.GetStatusRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.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.setAmount(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setRecipientId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); + break; default: reader.skipField(); break; @@ -41063,9 +59784,9 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.deserializeB * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41073,80 +59794,135 @@ proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.prototype.se /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getRecipientId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } }; /** - * optional GetStatusRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} + * optional uint64 amount = 1; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} returns this -*/ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetStatusRequest.oneofGroups_[0], value); + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusRequest} returns this + * optional bytes recipient_id = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.clearV0 = function() { - return this.setV0(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.getRecipientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes recipient_id = 2; + * This is a type-conversion wrapper around `getRecipientId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusRequest.prototype.hasV0 = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.getRecipientId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRecipientId())); }; +/** + * optional bytes recipient_id = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRecipientId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.getRecipientId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRecipientId())); +}; + /** - * 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 {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.setRecipientId = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + /** - * @enum {number} + * optional string public_note = 3; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase} + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetStatusResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.setPublicNote = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.clearPublicNote = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.prototype.hasPublicNote = function() { + return jspb.Message.getField(this, 3) != null; }; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -41160,8 +59936,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.toObject(opt_includeInstance, this); }; @@ -41170,13 +59946,14 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.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.GetStatusResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject(includeInstance, f) + amount: jspb.Message.getFieldWithDefault(msg, 1, 0), + publicNote: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -41190,23 +59967,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.toObject = function(includeIns /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.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.GetStatusResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41214,9 +59991,12 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinaryFromReader = var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); break; default: reader.skipField(); @@ -41231,9 +60011,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.deserializeBinaryFromReader = * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41241,23 +60021,83 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.serializeBinary = fu /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( 1, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.serializeBinaryToWriter + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f ); } }; +/** + * optional uint64 amount = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string public_note = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.setPublicNote = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.clearPublicNote = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.prototype.hasPublicNote = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -41274,8 +60114,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.toObject(opt_includeInstance, this); }; @@ -41284,18 +60124,14 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.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.GetStatusResponse.GetStatusResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.toObject = function(includeInstance, msg) { var f, obj = { - version: (f = msg.getVersion()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.toObject(includeInstance, f), - node: (f = msg.getNode()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject(includeInstance, f), - chain: (f = msg.getChain()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject(includeInstance, f), - network: (f = msg.getNetwork()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject(includeInstance, f), - stateSync: (f = msg.getStateSync()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject(includeInstance, f), - time: (f = msg.getTime()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject(includeInstance, f) + frozenId: msg.getFrozenId_asB64(), + publicNote: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -41309,23 +60145,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.toObject = /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.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.GetStatusResponse.GetStatusResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41333,34 +60169,12 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.deserializeBinaryFromReader); - msg.setVersion(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFrozenId(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinaryFromReader); - msg.setNode(value); - break; - case 3: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinaryFromReader); - msg.setChain(value); - break; - case 4: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinaryFromReader); - msg.setNetwork(value); - break; - case 5: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinaryFromReader); - msg.setStateSync(value); - break; - case 6: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinaryFromReader); - msg.setTime(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); break; default: reader.skipField(); @@ -41375,9 +60189,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.deserializ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41385,63 +60199,107 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getVersion(); - if (f != null) { - writer.writeMessage( + f = message.getFrozenId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.serializeBinaryToWriter + f ); } - f = message.getNode(); + f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { - writer.writeMessage( + writer.writeString( 2, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.serializeBinaryToWriter - ); - } - f = message.getChain(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.serializeBinaryToWriter - ); - } - f = message.getNetwork(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.serializeBinaryToWriter - ); - } - f = message.getStateSync(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.serializeBinaryToWriter - ); - } - f = message.getTime(); - if (f != null) { - writer.writeMessage( - 6, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.serializeBinaryToWriter + f ); } }; +/** + * optional bytes frozen_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.getFrozenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes frozen_id = 1; + * This is a type-conversion wrapper around `getFrozenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.getFrozenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFrozenId())); +}; + + +/** + * optional bytes frozen_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFrozenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.getFrozenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFrozenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.setFrozenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string public_note = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.setPublicNote = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.clearPublicNote = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.prototype.hasPublicNote = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -41458,8 +60316,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.toObject(opt_includeInstance, this); }; @@ -41468,14 +60326,14 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.pr * @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.GetStatusResponse.GetStatusResponseV0.Version} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.toObject = function(includeInstance, msg) { var f, obj = { - software: (f = msg.getSoftware()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject(includeInstance, f), - protocol: (f = msg.getProtocol()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.toObject(includeInstance, f) + frozenId: msg.getFrozenId_asB64(), + publicNote: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -41489,23 +60347,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.to /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.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.GetStatusResponse.GetStatusResponseV0.Version} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41513,14 +60371,12 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.de var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinaryFromReader); - msg.setSoftware(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFrozenId(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinaryFromReader); - msg.setProtocol(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); break; default: reader.skipField(); @@ -41535,9 +60391,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.de * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41545,31 +60401,107 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSoftware(); - if (f != null) { - writer.writeMessage( + f = message.getFrozenId_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.serializeBinaryToWriter + f ); } - f = message.getProtocol(); + f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { - writer.writeMessage( + writer.writeString( 2, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.serializeBinaryToWriter + f ); } }; +/** + * optional bytes frozen_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.getFrozenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes frozen_id = 1; + * This is a type-conversion wrapper around `getFrozenId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.getFrozenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFrozenId())); +}; + + +/** + * optional bytes frozen_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFrozenId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.getFrozenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFrozenId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.setFrozenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string public_note = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.setPublicNote = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.clearPublicNote = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.prototype.hasPublicNote = function() { + return jspb.Message.getField(this, 2) != null; +}; + + @@ -41586,8 +60518,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.toObject(opt_includeInstance, this); }; @@ -41596,15 +60528,15 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So * @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.GetStatusResponse.GetStatusResponseV0.Version.Software} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.toObject = function(includeInstance, msg) { var f, obj = { - dapi: jspb.Message.getFieldWithDefault(msg, 1, ""), - drive: jspb.Message.getFieldWithDefault(msg, 2, ""), - tenderdash: jspb.Message.getFieldWithDefault(msg, 3, "") + frozenId: msg.getFrozenId_asB64(), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + publicNote: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -41618,23 +60550,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.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.GetStatusResponse.GetStatusResponseV0.Version.Software} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41642,16 +60574,16 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setDapi(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setFrozenId(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDrive(value); + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setTenderdash(value); + msg.setPublicNote(value); break; default: reader.skipField(); @@ -41666,9 +60598,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41676,22 +60608,22 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDapi(); + f = message.getFrozenId_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeString( + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( 2, f ); @@ -41707,82 +60639,88 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So /** - * optional string dapi = 1; + * optional bytes frozen_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.getDapi = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.getFrozenId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + * optional bytes frozen_id = 1; + * This is a type-conversion wrapper around `getFrozenId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.setDapi = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.getFrozenId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getFrozenId())); }; /** - * optional string drive = 2; - * @return {string} + * optional bytes frozen_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getFrozenId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.getDrive = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.getFrozenId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getFrozenId())); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.setDrive = function(value) { - return jspb.Message.setField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.setFrozenId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + * optional uint64 amount = 2; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.clearDrive = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.hasDrive = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional string tenderdash = 3; + * optional string public_note = 3; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.getTenderdash = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.getPublicNote = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.setTenderdash = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.setPublicNote = function(value) { return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.clearTenderdash = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.clearPublicNote = function() { return jspb.Message.setField(this, 3, undefined); }; @@ -41791,7 +60729,7 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.So * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software.prototype.hasTenderdash = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.prototype.hasPublicNote = function() { return jspb.Message.getField(this, 3) != null; }; @@ -41812,8 +60750,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.toObject(opt_includeInstance, this); }; @@ -41822,14 +60760,15 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * @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.GetStatusResponse.GetStatusResponseV0.Version.Protocol} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.toObject = function(includeInstance, msg) { var f, obj = { - tenderdash: (f = msg.getTenderdash()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject(includeInstance, f), - drive: (f = msg.getDrive()) && proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject(includeInstance, f) + senderKeyIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), + recipientKeyIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), + encryptedData: msg.getEncryptedData_asB64() }; if (includeInstance) { @@ -41843,23 +60782,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.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.GetStatusResponse.GetStatusResponseV0.Version.Protocol} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41867,14 +60806,16 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinaryFromReader); - msg.setTenderdash(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setSenderKeyIndex(value); break; case 2: - var value = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinaryFromReader); - msg.setDrive(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setRecipientKeyIndex(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEncryptedData(value); break; default: reader.skipField(); @@ -41889,9 +60830,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -41899,28 +60840,111 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTenderdash(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.serializeBinaryToWriter - ); - } - f = message.getDrive(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.serializeBinaryToWriter - ); - } +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSenderKeyIndex(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getRecipientKeyIndex(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getEncryptedData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional uint32 sender_key_index = 1; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.getSenderKeyIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.setSenderKeyIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 recipient_key_index = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.getRecipientKeyIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.setRecipientKeyIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes encrypted_data = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.getEncryptedData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes encrypted_data = 3; + * This is a type-conversion wrapper around `getEncryptedData()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.getEncryptedData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEncryptedData())); +}; + + +/** + * optional bytes encrypted_data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEncryptedData()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.getEncryptedData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEncryptedData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.prototype.setEncryptedData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -41940,8 +60964,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.toObject(opt_includeInstance, this); }; @@ -41950,14 +60974,15 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * @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.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.toObject = function(includeInstance, msg) { var f, obj = { - p2p: jspb.Message.getFieldWithDefault(msg, 1, 0), - block: jspb.Message.getFieldWithDefault(msg, 2, 0) + rootEncryptionKeyIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), + derivationEncryptionKeyIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), + encryptedData: msg.getEncryptedData_asB64() }; if (includeInstance) { @@ -41971,23 +60996,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.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.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -41996,11 +61021,15 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); - msg.setP2p(value); + msg.setRootEncryptionKeyIndex(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); - msg.setBlock(value); + msg.setDerivationEncryptionKeyIndex(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEncryptedData(value); break; default: reader.skipField(); @@ -42015,9 +61044,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -42025,65 +61054,114 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getP2p(); + f = message.getRootEncryptionKeyIndex(); if (f !== 0) { writer.writeUint32( 1, f ); } - f = message.getBlock(); + f = message.getDerivationEncryptionKeyIndex(); if (f !== 0) { writer.writeUint32( 2, f ); } + f = message.getEncryptedData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } }; /** - * optional uint32 p2p = 1; + * optional uint32 root_encryption_key_index = 1; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.getP2p = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.getRootEncryptionKeyIndex = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.setP2p = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.setRootEncryptionKeyIndex = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** - * optional uint32 block = 2; + * optional uint32 derivation_encryption_key_index = 2; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.getBlock = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.getDerivationEncryptionKeyIndex = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash.prototype.setBlock = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.setDerivationEncryptionKeyIndex = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; +/** + * optional bytes encrypted_data = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.getEncryptedData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes encrypted_data = 3; + * This is a type-conversion wrapper around `getEncryptedData()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.getEncryptedData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEncryptedData())); +}; + + +/** + * optional bytes encrypted_data = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEncryptedData()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.getEncryptedData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEncryptedData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.prototype.setEncryptedData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + @@ -42100,8 +61178,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.toObject(opt_includeInstance, this); }; @@ -42110,14 +61188,17 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * @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.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.toObject = function(includeInstance, msg) { var f, obj = { - latest: jspb.Message.getFieldWithDefault(msg, 3, 0), - current: jspb.Message.getFieldWithDefault(msg, 4, 0) + recipientId: msg.getRecipientId_asB64(), + publicNote: jspb.Message.getFieldWithDefault(msg, 2, ""), + sharedEncryptedNote: (f = msg.getSharedEncryptedNote()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.toObject(includeInstance, f), + personalEncryptedNote: (f = msg.getPersonalEncryptedNote()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.toObject(includeInstance, f), + amount: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -42131,36 +61212,50 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.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.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.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.setRecipientId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); + break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLatest(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.deserializeBinaryFromReader); + msg.setSharedEncryptedNote(value); break; case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCurrent(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.deserializeBinaryFromReader); + msg.setPersonalEncryptedNote(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAmount(value); break; default: reader.skipField(); @@ -42175,9 +61270,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -42185,23 +61280,46 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getLatest(); - if (f !== 0) { - writer.writeUint32( - 3, + f = message.getRecipientId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, f ); } - f = message.getCurrent(); - if (f !== 0) { - writer.writeUint32( + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = message.getSharedEncryptedNote(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote.serializeBinaryToWriter + ); + } + f = message.getPersonalEncryptedNote(); + if (f != null) { + writer.writeMessage( 4, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote.serializeBinaryToWriter + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 5, f ); } @@ -42209,66 +61327,71 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr /** - * optional uint32 latest = 3; - * @return {number} + * optional bytes recipient_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.getLatest = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getRecipientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} returns this + * optional bytes recipient_id = 1; + * This is a type-conversion wrapper around `getRecipientId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.setLatest = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getRecipientId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRecipientId())); }; /** - * optional uint32 current = 4; - * @return {number} + * optional bytes recipient_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRecipientId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.getCurrent = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getRecipientId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRecipientId())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive.prototype.setCurrent = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.setRecipientId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional Tenderdash tenderdash = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} + * optional string public_note = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.getTenderdash = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this -*/ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.setTenderdash = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.setPublicNote = function(value) { + return jspb.Message.setField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.clearTenderdash = function() { - return this.setTenderdash(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.clearPublicNote = function() { + return jspb.Message.setField(this, 2, undefined); }; @@ -42276,36 +61399,36 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.hasTenderdash = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.hasPublicNote = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional Drive drive = 2; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} + * optional SharedEncryptedNote shared_encrypted_note = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.getDrive = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive, 2)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getSharedEncryptedNote = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote, 3)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.SharedEncryptedNote|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.setDrive = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.setSharedEncryptedNote = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.clearDrive = function() { - return this.setDrive(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.clearSharedEncryptedNote = function() { + return this.setSharedEncryptedNote(undefined); }; @@ -42313,36 +61436,36 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Pr * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.prototype.hasDrive = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.hasSharedEncryptedNote = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional Software software = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} + * optional PersonalEncryptedNote personal_encrypted_note = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.getSoftware = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getPersonalEncryptedNote = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote, 4)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.PersonalEncryptedNote|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.setSoftware = function(value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.setPersonalEncryptedNote = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.clearSoftware = function() { - return this.setSoftware(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.clearPersonalEncryptedNote = function() { + return this.setPersonalEncryptedNote(undefined); }; @@ -42350,45 +61473,26 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.pr * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.hasSoftware = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional Protocol protocol = 2; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.getProtocol = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol, 2)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this -*/ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.setProtocol = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.hasPersonalEncryptedNote = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} returns this + * optional uint64 amount = 5; + * @return {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.clearProtocol = function() { - return this.setProtocol(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.prototype.hasProtocol = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; @@ -42408,8 +61512,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.toObject(opt_includeInstance, this); }; @@ -42418,16 +61522,14 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.proto * @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.GetStatusResponse.GetStatusResponseV0.Time} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.toObject = function(includeInstance, msg) { var f, obj = { - local: jspb.Message.getFieldWithDefault(msg, 1, 0), - block: jspb.Message.getFieldWithDefault(msg, 2, 0), - genesis: jspb.Message.getFieldWithDefault(msg, 3, 0), - epoch: jspb.Message.getFieldWithDefault(msg, 4, 0) + actionType: jspb.Message.getFieldWithDefault(msg, 1, 0), + publicNote: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -42441,23 +61543,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.toObj /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.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.GetStatusResponse.GetStatusResponseV0.Time} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -42465,20 +61567,12 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deser var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLocal(value); + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType} */ (reader.readEnum()); + msg.setActionType(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBlock(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint64()); - msg.setGenesis(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setEpoch(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); break; default: reader.skipField(); @@ -42493,9 +61587,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.deser * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -42503,84 +61597,78 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.proto /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getLocal(); - if (f !== 0) { - writer.writeUint64( + f = message.getActionType(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 2)); + f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { - writer.writeUint64( + writer.writeString( 2, f ); } - f = /** @type {number} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeUint64( - 3, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 4)); - if (f != null) { - writer.writeUint32( - 4, - f - ); - } }; /** - * optional uint64 local = 1; - * @return {number} + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getLocal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType = { + PAUSE: 0, + RESUME: 1 +}; + +/** + * optional ActionType action_type = 1; + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.getActionType = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setLocal = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.setActionType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional uint64 block = 2; - * @return {number} + * optional string public_note = 2; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getBlock = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setBlock = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.setPublicNote = function(value) { return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.clearBlock = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.clearPublicNote = function() { return jspb.Message.setField(this, 2, undefined); }; @@ -42589,71 +61677,201 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.proto * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.hasBlock = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.prototype.hasPublicNote = function() { return jspb.Message.getField(this, 2) != null; }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional uint64 genesis = 3; - * @return {number} + * 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.GetStatusResponse.GetStatusResponseV0.Time.prototype.getGenesis = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.toObject(opt_includeInstance, this); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} 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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setGenesis = function(value) { - return jspb.Message.setField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.toObject = function(includeInstance, msg) { + var f, obj = { + tokenConfigUpdateItem: msg.getTokenConfigUpdateItem_asB64(), + publicNote: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.clearGenesis = function() { - return jspb.Message.setField(this, 3, undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.hasGenesis = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.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.setTokenConfigUpdateItem(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicNote(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint32 epoch = 4; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.getEpoch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.setEpoch = function(value) { - return jspb.Message.setField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenConfigUpdateItem_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional bytes token_config_update_item = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.getTokenConfigUpdateItem = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes token_config_update_item = 1; + * This is a type-conversion wrapper around `getTokenConfigUpdateItem()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.getTokenConfigUpdateItem_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTokenConfigUpdateItem())); +}; + + +/** + * optional bytes token_config_update_item = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTokenConfigUpdateItem()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.getTokenConfigUpdateItem_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTokenConfigUpdateItem())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.setTokenConfigUpdateItem = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string public_note = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.getPublicNote = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.setPublicNote = function(value) { + return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.clearEpoch = function() { - return jspb.Message.setField(this, 4, undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.clearPublicNote = function() { + return jspb.Message.setField(this, 2, undefined); }; @@ -42661,11 +61879,38 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.proto * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time.prototype.hasEpoch = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.prototype.hasPublicNote = 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 + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.oneofGroups_ = [[1,2,3]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.EventTypeCase = { + EVENT_TYPE_NOT_SET: 0, + TOKEN_EVENT: 1, + DOCUMENT_EVENT: 2, + CONTRACT_EVENT: 3 }; - +/** + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.EventTypeCase} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.getEventTypeCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.EventTypeCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.oneofGroups_[0])); +}; @@ -42682,8 +61927,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.toObject(opt_includeInstance, this); }; @@ -42692,14 +61937,15 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.proto * @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.GetStatusResponse.GetStatusResponseV0.Node} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.toObject = function(includeInstance, msg) { var f, obj = { - id: msg.getId_asB64(), - proTxHash: msg.getProTxHash_asB64() + tokenEvent: (f = msg.getTokenEvent()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.toObject(includeInstance, f), + documentEvent: (f = msg.getDocumentEvent()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.toObject(includeInstance, f), + contractEvent: (f = msg.getContractEvent()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.toObject(includeInstance, f) }; if (includeInstance) { @@ -42713,23 +61959,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.toObj /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.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.GetStatusResponse.GetStatusResponseV0.Node} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -42737,12 +61983,19 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deser 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.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.deserializeBinaryFromReader); + msg.setTokenEvent(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProTxHash(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.deserializeBinaryFromReader); + msg.setDocumentEvent(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.deserializeBinaryFromReader); + msg.setContractEvent(value); break; default: reader.skipField(); @@ -42757,9 +62010,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.deser * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -42767,119 +62020,138 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.proto /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getTokenEvent(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.serializeBinaryToWriter ); } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + f = message.getDocumentEvent(); if (f != null) { - writer.writeBytes( + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.serializeBinaryToWriter + ); + } + f = message.getContractEvent(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.serializeBinaryToWriter ); } }; /** - * optional bytes id = 1; - * @return {string} + * optional TokenEvent token_event = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.getTokenEvent = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent, 1)); }; /** - * optional bytes id = 1; - * This is a type-conversion wrapper around `getId()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getId())); + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.setTokenEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.oneofGroups_[0], value); }; /** - * 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} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getId_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getId())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.clearTokenEvent = function() { + return this.setTokenEvent(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.setId = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.hasTokenEvent = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes pro_tx_hash = 2; - * @return {string} + * optional DocumentEvent document_event = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getProTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.getDocumentEvent = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent, 2)); }; /** - * optional bytes pro_tx_hash = 2; - * This is a type-conversion wrapper around `getProTxHash()` - * @return {string} + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.setDocumentEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getProTxHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProTxHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.clearDocumentEvent = function() { + return this.setDocumentEvent(undefined); }; /** - * optional bytes pro_tx_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getProTxHash()` - * @return {!Uint8Array} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.getProTxHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProTxHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.hasDocumentEvent = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} returns this + * optional ContractEvent contract_event = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.setProTxHash = function(value) { - return jspb.Message.setField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.getContractEvent = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent, 3)); }; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.setContractEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.clearProTxHash = function() { - return jspb.Message.setField(this, 2, undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.clearContractEvent = function() { + return this.setContractEvent(undefined); }; @@ -42887,12 +62159,37 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.proto * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node.prototype.hasProTxHash = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.prototype.hasContractEvent = function() { + return jspb.Message.getField(this, 3) != 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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.TypeCase = { + TYPE_NOT_SET: 0, + CREATE: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.TypeCase} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.getTypeCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.TypeCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -42908,8 +62205,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.toObject(opt_includeInstance, this); }; @@ -42918,21 +62215,13 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prot * @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.GetStatusResponse.GetStatusResponseV0.Chain} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.toObject = function(includeInstance, msg) { var f, obj = { - catchingUp: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - latestBlockHash: msg.getLatestBlockHash_asB64(), - latestAppHash: msg.getLatestAppHash_asB64(), - latestBlockHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), - earliestBlockHash: msg.getEarliestBlockHash_asB64(), - earliestAppHash: msg.getEarliestAppHash_asB64(), - earliestBlockHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), - maxPeerBlockHeight: jspb.Message.getFieldWithDefault(msg, 9, 0), - coreChainLockedHeight: jspb.Message.getFieldWithDefault(msg, 10, 0) + create: (f = msg.getCreate()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.toObject(includeInstance, f) }; if (includeInstance) { @@ -42946,23 +62235,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.toOb /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.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.GetStatusResponse.GetStatusResponseV0.Chain} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -42970,40 +62259,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.dese var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCatchingUp(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLatestBlockHash(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLatestAppHash(value); - break; - case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setLatestBlockHeight(value); - break; - case 5: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEarliestBlockHash(value); - break; - case 6: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setEarliestAppHash(value); - break; - case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setEarliestBlockHeight(value); - break; - case 9: - var value = /** @type {number} */ (reader.readUint64()); - msg.setMaxPeerBlockHeight(value); - break; - case 10: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCoreChainLockedHeight(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.deserializeBinaryFromReader); + msg.setCreate(value); break; default: reader.skipField(); @@ -43018,9 +62276,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.dese * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -43028,357 +62286,396 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCatchingUp(); - if (f) { - writer.writeBool( - 1, - f - ); - } - f = message.getLatestBlockHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getLatestAppHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } - f = message.getLatestBlockHeight(); - if (f !== 0) { - writer.writeUint64( - 4, - f - ); - } - f = message.getEarliestBlockHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 5, - f - ); - } - f = message.getEarliestAppHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 6, - f - ); - } - f = message.getEarliestBlockHeight(); - if (f !== 0) { - writer.writeUint64( - 7, - f - ); - } - f = message.getMaxPeerBlockHeight(); - if (f !== 0) { - writer.writeUint64( - 9, - f - ); - } - f = /** @type {number} */ (jspb.Message.getField(message, 10)); + f = message.getCreate(); if (f != null) { - writer.writeUint32( - 10, - f + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.serializeBinaryToWriter ); } }; /** - * optional bool catching_up = 1; - * @return {boolean} + * optional DocumentCreateEvent create = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getCatchingUp = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.getCreate = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent, 1)); }; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setCatchingUp = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.setCreate = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.oneofGroups_[0], value); }; /** - * optional bytes latest_block_hash = 2; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.clearCreate = function() { + return this.setCreate(undefined); }; /** - * optional bytes latest_block_hash = 2; - * This is a type-conversion wrapper around `getLatestBlockHash()` - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLatestBlockHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEvent.prototype.hasCreate = function() { + return jspb.Message.getField(this, 1) != null; }; -/** - * optional bytes latest_block_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLatestBlockHash()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLatestBlockHash())); -}; - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setLatestBlockHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes latest_app_hash = 3; - * @return {string} + * 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.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestAppHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.toObject(opt_includeInstance, this); }; /** - * optional bytes latest_app_hash = 3; - * This is a type-conversion wrapper around `getLatestAppHash()` - * @return {string} + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestAppHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLatestAppHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.toObject = function(includeInstance, msg) { + var f, obj = { + createdDocument: msg.getCreatedDocument_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes latest_app_hash = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLatestAppHash()` - * @return {!Uint8Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestAppHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLatestAppHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} 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.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setLatestAppHash = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.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.setCreatedDocument(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint64 latest_block_height = 4; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getLatestBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setLatestBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCreatedDocument_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } }; /** - * optional bytes earliest_block_hash = 5; + * optional bytes created_document = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.prototype.getCreatedDocument = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes earliest_block_hash = 5; - * This is a type-conversion wrapper around `getEarliestBlockHash()` + * optional bytes created_document = 1; + * This is a type-conversion wrapper around `getCreatedDocument()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHash_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.prototype.getCreatedDocument_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEarliestBlockHash())); + this.getCreatedDocument())); }; /** - * optional bytes earliest_block_hash = 5; + * optional bytes created_document = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEarliestBlockHash()` + * This is a type-conversion wrapper around `getCreatedDocument()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHash_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.prototype.getCreatedDocument_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEarliestBlockHash())); + this.getCreatedDocument())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setEarliestBlockHash = function(value) { - return jspb.Message.setProto3BytesField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEvent.prototype.setCreatedDocument = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes earliest_app_hash = 6; - * @return {string} + * 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.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestAppHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.toObject(opt_includeInstance, this); }; /** - * optional bytes earliest_app_hash = 6; - * This is a type-conversion wrapper around `getEarliestAppHash()` - * @return {string} + * 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.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestAppHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getEarliestAppHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.toObject = function(includeInstance, msg) { + var f, obj = { + updatedContract: msg.getUpdatedContract_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional bytes earliest_app_hash = 6; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getEarliestAppHash()` - * @return {!Uint8Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestAppHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getEarliestAppHash())); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.deserializeBinaryFromReader(msg, reader); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} 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.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setEarliestAppHash = function(value) { - return jspb.Message.setProto3BytesField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.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.setUpdatedContract(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional uint64 earliest_block_height = 7; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getEarliestBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setEarliestBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpdatedContract_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } }; /** - * optional uint64 max_peer_block_height = 9; - * @return {number} + * optional bytes updated_contract = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getMaxPeerBlockHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.prototype.getUpdatedContract = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes updated_contract = 1; + * This is a type-conversion wrapper around `getUpdatedContract()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.prototype.getUpdatedContract_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getUpdatedContract())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this + * optional bytes updated_contract = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getUpdatedContract()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setMaxPeerBlockHeight = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.prototype.getUpdatedContract_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getUpdatedContract())); }; /** - * optional uint32 core_chain_locked_height = 10; - * @return {number} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.getCoreChainLockedHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.prototype.setUpdatedContract = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; + /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} 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.GetStatusResponse.GetStatusResponseV0.Chain.prototype.setCoreChainLockedHeight = function(value) { - return jspb.Message.setField(this, 10, value); -}; - +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.oneofGroups_ = [[1]]; /** - * Clears the field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.clearCoreChainLockedHeight = function() { - return jspb.Message.setField(this, 10, undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.TypeCase = { + TYPE_NOT_SET: 0, + UPDATE: 1 }; - /** - * Returns whether this field is set. - * @return {boolean} + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.TypeCase} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain.prototype.hasCoreChainLockedHeight = function() { - return jspb.Message.getField(this, 10) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.getTypeCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.TypeCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -43392,8 +62689,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.toObject(opt_includeInstance, this); }; @@ -43402,15 +62699,13 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.pr * @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.GetStatusResponse.GetStatusResponseV0.Network} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.toObject = function(includeInstance, msg) { var f, obj = { - chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), - peersCount: jspb.Message.getFieldWithDefault(msg, 2, 0), - listening: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + update: (f = msg.getUpdate()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.toObject(includeInstance, f) }; if (includeInstance) { @@ -43424,23 +62719,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.to /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.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.GetStatusResponse.GetStatusResponseV0.Network} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -43448,16 +62743,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.de var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setChainId(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setPeersCount(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setListening(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.deserializeBinaryFromReader); + msg.setUpdate(value); break; default: reader.skipField(); @@ -43472,9 +62760,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.de * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -43482,90 +62770,92 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.pr /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getChainId(); - if (f.length > 0) { - writer.writeString( + f = message.getUpdate(); + if (f != null) { + writer.writeMessage( 1, - f - ); - } - f = message.getPeersCount(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } - f = message.getListening(); - if (f) { - writer.writeBool( - 3, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent.serializeBinaryToWriter ); } }; /** - * optional string chain_id = 1; - * @return {string} + * optional ContractUpdateEvent update = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.getChainId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.getUpdate = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent, 1)); }; /** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} returns this - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.setChainId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.setUpdate = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.oneofGroups_[0], value); }; /** - * optional uint32 peers_count = 2; - * @return {number} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.getPeersCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.clearUpdate = function() { + return this.setUpdate(undefined); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.setPeersCount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEvent.prototype.hasUpdate = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional bool listening = 3; - * @return {boolean} + * 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.GetStatusResponse.GetStatusResponseV0.Network.prototype.getListening = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_ = [[1,2,3,4,5,6,7,8]]; /** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} returns this + * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network.prototype.setListening = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.TypeCase = { + TYPE_NOT_SET: 0, + MINT: 1, + BURN: 2, + FREEZE: 3, + UNFREEZE: 4, + DESTROY_FROZEN_FUNDS: 5, + TRANSFER: 6, + EMERGENCY_ACTION: 7, + TOKEN_CONFIG_UPDATE: 8 }; - +/** + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.TypeCase} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getTypeCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.TypeCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0])); +}; @@ -43582,8 +62872,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.toObject(opt_includeInstance, this); }; @@ -43592,20 +62882,20 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync. * @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.GetStatusResponse.GetStatusResponseV0.StateSync} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.toObject = function(includeInstance, msg) { var f, obj = { - totalSyncedTime: jspb.Message.getFieldWithDefault(msg, 1, 0), - remainingTime: jspb.Message.getFieldWithDefault(msg, 2, 0), - totalSnapshots: jspb.Message.getFieldWithDefault(msg, 3, 0), - chunkProcessAvgTime: jspb.Message.getFieldWithDefault(msg, 4, 0), - snapshotHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), - snapshotChunksCount: jspb.Message.getFieldWithDefault(msg, 6, 0), - backfilledBlocks: jspb.Message.getFieldWithDefault(msg, 7, 0), - backfillBlocksTotal: jspb.Message.getFieldWithDefault(msg, 8, 0) + mint: (f = msg.getMint()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.toObject(includeInstance, f), + burn: (f = msg.getBurn()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.toObject(includeInstance, f), + freeze: (f = msg.getFreeze()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.toObject(includeInstance, f), + unfreeze: (f = msg.getUnfreeze()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.toObject(includeInstance, f), + destroyFrozenFunds: (f = msg.getDestroyFrozenFunds()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.toObject(includeInstance, f), + transfer: (f = msg.getTransfer()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.toObject(includeInstance, f), + emergencyAction: (f = msg.getEmergencyAction()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.toObject(includeInstance, f), + tokenConfigUpdate: (f = msg.getTokenConfigUpdate()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.toObject(includeInstance, f) }; if (includeInstance) { @@ -43619,23 +62909,23 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync. /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync; - return proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.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.GetStatusResponse.GetStatusResponseV0.StateSync} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -43643,36 +62933,44 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync. var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {number} */ (reader.readUint64()); - msg.setTotalSyncedTime(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.deserializeBinaryFromReader); + msg.setMint(value); break; case 2: - var value = /** @type {number} */ (reader.readUint64()); - msg.setRemainingTime(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.deserializeBinaryFromReader); + msg.setBurn(value); break; case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setTotalSnapshots(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.deserializeBinaryFromReader); + msg.setFreeze(value); break; case 4: - var value = /** @type {number} */ (reader.readUint64()); - msg.setChunkProcessAvgTime(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.deserializeBinaryFromReader); + msg.setUnfreeze(value); break; case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSnapshotHeight(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.deserializeBinaryFromReader); + msg.setDestroyFrozenFunds(value); break; case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setSnapshotChunksCount(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.deserializeBinaryFromReader); + msg.setTransfer(value); break; case 7: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBackfilledBlocks(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.deserializeBinaryFromReader); + msg.setEmergencyAction(value); break; case 8: - var value = /** @type {number} */ (reader.readUint64()); - msg.setBackfillBlocksTotal(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.deserializeBinaryFromReader); + msg.setTokenConfigUpdate(value); break; default: reader.skipField(); @@ -43687,9 +62985,9 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync. * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -43697,351 +62995,765 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTotalSyncedTime(); - if (f !== 0) { - writer.writeUint64( + f = message.getMint(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent.serializeBinaryToWriter ); } - f = message.getRemainingTime(); - if (f !== 0) { - writer.writeUint64( + f = message.getBurn(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent.serializeBinaryToWriter ); } - f = message.getTotalSnapshots(); - if (f !== 0) { - writer.writeUint32( + f = message.getFreeze(); + if (f != null) { + writer.writeMessage( 3, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent.serializeBinaryToWriter ); } - f = message.getChunkProcessAvgTime(); - if (f !== 0) { - writer.writeUint64( + f = message.getUnfreeze(); + if (f != null) { + writer.writeMessage( 4, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent.serializeBinaryToWriter ); } - f = message.getSnapshotHeight(); - if (f !== 0) { - writer.writeUint64( + f = message.getDestroyFrozenFunds(); + if (f != null) { + writer.writeMessage( 5, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent.serializeBinaryToWriter ); } - f = message.getSnapshotChunksCount(); - if (f !== 0) { - writer.writeUint64( + f = message.getTransfer(); + if (f != null) { + writer.writeMessage( 6, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent.serializeBinaryToWriter ); } - f = message.getBackfilledBlocks(); - if (f !== 0) { - writer.writeUint64( + f = message.getEmergencyAction(); + if (f != null) { + writer.writeMessage( 7, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.serializeBinaryToWriter ); } - f = message.getBackfillBlocksTotal(); - if (f !== 0) { - writer.writeUint64( + f = message.getTokenConfigUpdate(); + if (f != null) { + writer.writeMessage( 8, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent.serializeBinaryToWriter ); } }; /** - * optional uint64 total_synced_time = 1; - * @return {number} + * optional MintEvent mint = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getTotalSyncedTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getMint = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent, 1)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setMint = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setTotalSyncedTime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearMint = function() { + return this.setMint(undefined); }; /** - * optional uint64 remaining_time = 2; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getRemainingTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasMint = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * optional BurnEvent burn = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setRemainingTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getBurn = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent, 2)); }; /** - * optional uint32 total_snapshots = 3; - * @return {number} + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setBurn = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getTotalSnapshots = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearBurn = function() { + return this.setBurn(undefined); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setTotalSnapshots = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasBurn = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional uint64 chunk_process_avg_time = 4; - * @return {number} + * optional FreezeEvent freeze = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getChunkProcessAvgTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getFreeze = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent, 3)); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setFreeze = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setChunkProcessAvgTime = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearFreeze = function() { + return this.setFreeze(undefined); }; /** - * optional uint64 snapshot_height = 5; - * @return {number} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getSnapshotHeight = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasFreeze = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional UnfreezeEvent unfreeze = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getUnfreeze = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent, 4)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setUnfreeze = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearUnfreeze = function() { + return this.setUnfreeze(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasUnfreeze = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional DestroyFrozenFundsEvent destroy_frozen_funds = 5; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getDestroyFrozenFunds = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent, 5)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setDestroyFrozenFunds = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearDestroyFrozenFunds = function() { + return this.setDestroyFrozenFunds(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasDestroyFrozenFunds = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional TransferEvent transfer = 6; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getTransfer = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent, 6)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TransferEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearTransfer = function() { + return this.setTransfer(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasTransfer = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional EmergencyActionEvent emergency_action = 7; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getEmergencyAction = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent, 7)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setEmergencyAction = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearEmergencyAction = function() { + return this.setEmergencyAction(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasEmergencyAction = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional TokenConfigUpdateEvent token_config_update = 8; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.getTokenConfigUpdate = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent, 8)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.setTokenConfigUpdate = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.clearTokenConfigUpdate = function() { + return this.setTokenConfigUpdate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEvent.prototype.hasTokenConfigUpdate = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.toObject = function(includeInstance, msg) { + var f, obj = { + actionId: msg.getActionId_asB64(), + event: (f = msg.getEvent()) && proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.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.setActionId(value); + break; + case 2: + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.deserializeBinaryFromReader); + msg.setEvent(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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getActionId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent.serializeBinaryToWriter + ); + } }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * optional bytes action_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setSnapshotHeight = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.getActionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional uint64 snapshot_chunks_count = 6; - * @return {number} + * optional bytes action_id = 1; + * This is a type-conversion wrapper around `getActionId()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getSnapshotChunksCount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.getActionId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getActionId())); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * optional bytes action_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getActionId()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setSnapshotChunksCount = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.getActionId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getActionId())); }; /** - * optional uint64 backfilled_blocks = 7; - * @return {number} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getBackfilledBlocks = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.setActionId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * optional GroupActionEvent event = 2; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setBackfilledBlocks = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.getEvent = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent, 2)); }; /** - * optional uint64 backfill_blocks_total = 8; - * @return {number} - */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.getBackfillBlocksTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.setEvent = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} returns this + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync.prototype.setBackfillBlocksTotal = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.clearEvent = function() { + return this.setEvent(undefined); }; /** - * optional Version version = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getVersion = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.prototype.hasEvent = function() { + return jspb.Message.getField(this, 2) != null; }; + /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setVersion = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} 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.GetStatusResponse.GetStatusResponseV0.prototype.clearVersion = function() { - return this.setVersion(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasVersion = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.toObject = function(includeInstance, msg) { + var f, obj = { + groupActionsList: jspb.Message.toObjectList(msg.getGroupActionsList(), + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional Node node = 2; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getNode = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node, 2)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions; + return proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.deserializeBinaryFromReader(msg, reader); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.deserializeBinaryFromReader); + msg.addGroupActions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearNode = function() { - return this.setNode(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasNode = function() { - return jspb.Message.getField(this, 2) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGroupActionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry.serializeBinaryToWriter + ); + } }; /** - * optional Chain chain = 3; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} + * repeated GroupActionEntry group_actions = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getChain = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain, 3)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.prototype.getGroupActionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setChain = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.prototype.setGroupActionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearChain = function() { - return this.setChain(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.prototype.addGroupActions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntry, 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.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasChain = function() { - return jspb.Message.getField(this, 3) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions.prototype.clearGroupActionsList = function() { + return this.setGroupActionsList([]); }; /** - * optional Network network = 4; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} + * optional GroupActions group_actions = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getNetwork = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network, 4)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.getGroupActions = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActions|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setNetwork = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.setGroupActions = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearNetwork = function() { - return this.setNetwork(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.clearGroupActions = function() { + return this.setGroupActions(undefined); }; @@ -44049,36 +63761,36 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype. * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasNetwork = function() { - return jspb.Message.getField(this, 4) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.hasGroupActions = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional StateSync state_sync = 5; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getStateSync = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync, 5)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetStatusResponse.GetStatusResponseV0.StateSync|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setStateSync = function(value) { - return jspb.Message.setWrapperField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearStateSync = function() { - return this.setStateSync(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; @@ -44086,36 +63798,36 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype. * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasStateSync = function() { - return jspb.Message.getField(this, 5) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional Time time = 6; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} + * optional ResponseMetadata metadata = 3; + * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.getTime = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time, 6)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetStatusResponse.GetStatusResponseV0.Time|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.setTime = function(value) { - return jspb.Message.setWrapperField(this, 6, value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.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.GetStatusResponse.GetStatusResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.clearTime = function() { - return this.setTime(undefined); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); }; @@ -44123,35 +63835,35 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype. * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.prototype.hasTime = function() { - return jspb.Message.getField(this, 6) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional GetStatusResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} + * optional GetGroupActionsResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetStatusResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetStatusResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionsResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -44160,7 +63872,7 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.clearV0 = function() * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionsResponse.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -44174,21 +63886,21 @@ proto.org.dash.platform.dapi.v0.GetStatusResponse.prototype.hasV0 = function() { * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.VersionCase = { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.oneofGroups_[0])); }; @@ -44206,8 +63918,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.toObject(opt_includeInstance, this); }; @@ -44216,13 +63928,13 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.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.GetCurrentQuorumsInfoRequest} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -44236,23 +63948,23 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.toObject = function /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest; - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest; + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.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.GetCurrentQuorumsInfoRequest} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -44260,8 +63972,8 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinaryFr var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -44277,9 +63989,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.deserializeBinaryFr * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -44287,23 +63999,31 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.serialize /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.serializeBinaryToWriter ); } }; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus = { + ACTIVE: 0, + CLOSED: 1 +}; + @@ -44320,8 +64040,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.toObject(opt_includeInstance, this); }; @@ -44330,13 +64050,17 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsIn * @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.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.toObject = function(includeInstance, msg) { var f, obj = { - + contractId: msg.getContractId_asB64(), + groupContractPosition: jspb.Message.getFieldWithDefault(msg, 2, 0), + status: jspb.Message.getFieldWithDefault(msg, 3, 0), + actionId: msg.getActionId_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) }; if (includeInstance) { @@ -44350,29 +64074,49 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsIn /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0; - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0; + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.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.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.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.setContractId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setGroupContractPosition(value); + break; + case 3: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setActionId(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; default: reader.skipField(); break; @@ -44386,9 +64130,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsIn * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -44396,39 +64140,212 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsIn /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getGroupContractPosition(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getActionId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 5, + f + ); + } }; /** - * optional GetCurrentQuorumsInfoRequestV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} + * optional bytes contract_id = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} returns this + * optional bytes contract_id = 1; + * This is a type-conversion wrapper around `getContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getContractId())); +}; + + +/** + * optional bytes contract_id = 1; + * 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.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getContractId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getContractId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.setContractId = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint32 group_contract_position = 2; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getGroupContractPosition = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.setGroupContractPosition = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional ActionStatus status = 3; + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getStatus = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional bytes action_id = 4; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getActionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes action_id = 4; + * This is a type-conversion wrapper around `getActionId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getActionId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getActionId())); +}; + + +/** + * optional bytes action_id = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getActionId()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getActionId_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getActionId())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.setActionId = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bool prove = 5; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional GetGroupActionSignersRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -44437,7 +64354,7 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.clearV0 = * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.prototype.hasV0 = function() { return jspb.Message.getField(this, 1) != null; }; @@ -44451,21 +64368,21 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.prototype.hasV0 = f * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.oneofGroups_ = [[1]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.VersionCase = { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.VersionCase = { VERSION_NOT_SET: 0, V0: 1 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.VersionCase} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.oneofGroups_[0])); }; @@ -44483,8 +64400,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.toObject(opt_includeInstance, this); }; @@ -44493,13 +64410,13 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.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.GetCurrentQuorumsInfoResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.toObject(includeInstance, f) + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.toObject(includeInstance, f) }; if (includeInstance) { @@ -44513,23 +64430,23 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.toObject = functio /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse; - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse; + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.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.GetCurrentQuorumsInfoResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -44537,8 +64454,8 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinaryF var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinaryFromReader); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.deserializeBinaryFromReader); msg.setV0(value); break; default: @@ -44554,9 +64471,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.deserializeBinaryF * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -44564,24 +64481,50 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.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.GetCurrentQuorumsInfoResponse} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getV0(); if (f != null) { writer.writeMessage( 1, f, - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.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.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + GROUP_ACTION_SIGNERS: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -44597,8 +64540,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.toObject(opt_includeInstance, this); }; @@ -44607,15 +64550,15 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.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.GetCurrentQuorumsInfoResponse.ValidatorV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.toObject = function(includeInstance, msg) { var f, obj = { - proTxHash: msg.getProTxHash_asB64(), - nodeIp: jspb.Message.getFieldWithDefault(msg, 2, ""), - isBanned: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) + groupActionSigners: (f = msg.getGroupActionSigners()) && proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.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) { @@ -44629,23 +64572,23 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObje /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0; - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0; + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.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.GetCurrentQuorumsInfoResponse.ValidatorV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -44653,16 +64596,19 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deseri var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setProTxHash(value); + var value = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.deserializeBinaryFromReader); + msg.setGroupActionSigners(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNodeIp(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.setIsBanned(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(); @@ -44677,9 +64623,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deseri * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -44687,121 +64633,39 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.protot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getProTxHash_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = message.getGroupActionSigners(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.serializeBinaryToWriter ); } - f = message.getNodeIp(); - 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.getIsBanned(); - 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 pro_tx_hash = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getProTxHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes pro_tx_hash = 1; - * This is a type-conversion wrapper around `getProTxHash()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getProTxHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getProTxHash())); -}; - - -/** - * 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.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getProTxHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getProTxHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.setProTxHash = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional string node_ip = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getNodeIp = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.setNodeIp = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool is_banned = 3; - * @return {boolean} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.getIsBanned = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.prototype.setIsBanned = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.repeatedFields_ = [3]; @@ -44818,8 +64682,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.toObject(opt_includeInstance, this); }; @@ -44828,17 +64692,14 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.pro * @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.GetCurrentQuorumsInfoResponse.ValidatorSetV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.toObject = function(includeInstance, msg) { var f, obj = { - quorumHash: msg.getQuorumHash_asB64(), - coreHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), - membersList: jspb.Message.toObjectList(msg.getMembersList(), - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.toObject, includeInstance), - thresholdPublicKey: msg.getThresholdPublicKey_asB64() + signerId: msg.getSignerId_asB64(), + power: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { @@ -44852,23 +64713,23 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toO /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0; - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner; + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.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.GetCurrentQuorumsInfoResponse.ValidatorSetV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -44877,20 +64738,11 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.des switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setQuorumHash(value); + msg.setSignerId(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); - msg.setCoreHeight(value); - break; - case 3: - var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.deserializeBinaryFromReader); - msg.addMembers(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setThresholdPublicKey(value); + msg.setPower(value); break; default: reader.skipField(); @@ -44905,9 +64757,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.des * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -44915,191 +64767,96 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.pro /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getQuorumHash_asU8(); + f = message.getSignerId_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } - f = message.getCoreHeight(); + f = message.getPower(); if (f !== 0) { writer.writeUint32( 2, f ); } - f = message.getMembersList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 3, - f, - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0.serializeBinaryToWriter - ); - } - f = message.getThresholdPublicKey_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } }; /** - * optional bytes quorum_hash = 1; + * optional bytes signer_id = 1; * @return {string} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getQuorumHash = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.getSignerId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes quorum_hash = 1; - * This is a type-conversion wrapper around `getQuorumHash()` + * optional bytes signer_id = 1; + * This is a type-conversion wrapper around `getSignerId()` * @return {string} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getQuorumHash_asB64 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.getSignerId_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getQuorumHash())); + this.getSignerId())); }; /** - * optional bytes quorum_hash = 1; + * optional bytes signer_id = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getQuorumHash()` + * This is a type-conversion wrapper around `getSignerId()` * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getQuorumHash_asU8 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.getSignerId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getQuorumHash())); + this.getSignerId())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setQuorumHash = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.setSignerId = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * optional uint32 core_height = 2; + * optional uint32 power = 2; * @return {number} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getCoreHeight = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.getPower = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setCoreHeight = function(value) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.prototype.setPower = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; -/** - * repeated ValidatorV0 members = 3; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getMembersList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setMembersList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); -}; - - -/** - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.addMembers = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.clearMembersList = function() { - return this.setMembersList([]); -}; - - -/** - * optional bytes threshold_public_key = 4; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getThresholdPublicKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * optional bytes threshold_public_key = 4; - * This is a type-conversion wrapper around `getThresholdPublicKey()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getThresholdPublicKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getThresholdPublicKey())); -}; - - -/** - * optional bytes threshold_public_key = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getThresholdPublicKey()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.getThresholdPublicKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getThresholdPublicKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.prototype.setThresholdPublicKey = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); -}; - - /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.repeatedFields_ = [1,3]; +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.repeatedFields_ = [1]; @@ -45116,8 +64873,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.toObject(opt_includeInstance, this); }; @@ -45126,18 +64883,14 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsI * @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.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.toObject = function(includeInstance, msg) { var f, obj = { - quorumHashesList: msg.getQuorumHashesList_asB64(), - currentQuorumHash: msg.getCurrentQuorumHash_asB64(), - validatorSetsList: jspb.Message.toObjectList(msg.getValidatorSetsList(), - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.toObject, includeInstance), - lastBlockProposer: msg.getLastBlockProposer_asB64(), - metadata: (f = msg.getMetadata()) && proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject(includeInstance, f) + signersList: jspb.Message.toObjectList(msg.getSignersList(), + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.toObject, includeInstance) }; if (includeInstance) { @@ -45151,23 +64904,23 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsI /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0; - return proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners; + return proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.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.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -45175,26 +64928,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsI var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.addQuorumHashes(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setCurrentQuorumHash(value); - break; - case 3: - var value = new proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.deserializeBinaryFromReader); - msg.addValidatorSets(value); - break; - case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setLastBlockProposer(value); - break; - case 5: - 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 proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.deserializeBinaryFromReader); + msg.addSigners(value); break; default: reader.skipField(); @@ -45209,9 +64945,9 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsI * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -45219,259 +64955,159 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsI /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getQuorumHashesList_asU8(); - if (f.length > 0) { - writer.writeRepeatedBytes( - 1, - f - ); - } - f = message.getCurrentQuorumHash_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getValidatorSetsList(); + f = message.getSignersList(); if (f.length > 0) { writer.writeRepeatedMessage( - 3, - f, - proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0.serializeBinaryToWriter - ); - } - f = message.getLastBlockProposer_asU8(); - if (f.length > 0) { - writer.writeBytes( - 4, - f - ); - } - f = message.getMetadata(); - if (f != null) { - writer.writeMessage( - 5, + 1, f, - proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter + proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner.serializeBinaryToWriter ); } }; /** - * repeated bytes quorum_hashes = 1; - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getQuorumHashesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * repeated bytes quorum_hashes = 1; - * This is a type-conversion wrapper around `getQuorumHashesList()` - * @return {!Array} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getQuorumHashesList_asB64 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsB64( - this.getQuorumHashesList())); -}; - - -/** - * repeated bytes quorum_hashes = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getQuorumHashesList()` - * @return {!Array} + * repeated GroupActionSigner signers = 1; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getQuorumHashesList_asU8 = function() { - return /** @type {!Array} */ (jspb.Message.bytesListAsU8( - this.getQuorumHashesList())); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.prototype.getSignersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner, 1)); }; /** - * @param {!(Array|Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setQuorumHashesList = function(value) { - return jspb.Message.setField(this, 1, value || []); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.prototype.setSignersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!(string|Uint8Array)} value + * @param {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner=} opt_value * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.addQuorumHashes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.prototype.addSigners = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigner, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.clearQuorumHashesList = function() { - return this.setQuorumHashesList([]); -}; - - -/** - * optional bytes current_quorum_hash = 2; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getCurrentQuorumHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes current_quorum_hash = 2; - * This is a type-conversion wrapper around `getCurrentQuorumHash()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getCurrentQuorumHash_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getCurrentQuorumHash())); -}; - - -/** - * optional bytes current_quorum_hash = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getCurrentQuorumHash()` - * @return {!Uint8Array} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getCurrentQuorumHash_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getCurrentQuorumHash())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setCurrentQuorumHash = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners.prototype.clearSignersList = function() { + return this.setSignersList([]); }; /** - * repeated ValidatorSetV0 validator_sets = 3; - * @return {!Array} + * optional GroupActionSigners group_action_signers = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getValidatorSetsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0, 3)); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.getGroupActionSigners = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners, 1)); }; /** - * @param {!Array} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSigners|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setValidatorSetsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.setGroupActionSigners = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.oneofGroups_[0], value); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0=} opt_value - * @param {number=} opt_index - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.addValidatorSets = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0, opt_index); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.clearGroupActionSigners = function() { + return this.setGroupActionSigners(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.clearValidatorSetsList = function() { - return this.setValidatorSetsList([]); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.hasGroupActionSigners = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional bytes last_block_proposer = 4; - * @return {string} + * optional Proof proof = 2; + * @return {?proto.org.dash.platform.dapi.v0.Proof} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getLastBlockProposer = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.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 last_block_proposer = 4; - * This is a type-conversion wrapper around `getLastBlockProposer()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getLastBlockProposer_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getLastBlockProposer())); + * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.oneofGroups_[0], value); }; /** - * optional bytes last_block_proposer = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getLastBlockProposer()` - * @return {!Uint8Array} + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getLastBlockProposer_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getLastBlockProposer())); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setLastBlockProposer = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.hasProof = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional ResponseMetadata metadata = 5; + * optional ResponseMetadata metadata = 3; * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.getMetadata = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.getMetadata = function() { return /** @type{?proto.org.dash.platform.dapi.v0.ResponseMetadata} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.ResponseMetadata, 5)); + 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.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(this, 5, value); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.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.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.clearMetadata = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.clearMetadata = function() { return this.setMetadata(undefined); }; @@ -45480,35 +65116,35 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsI * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0.prototype.hasMetadata = function() { - return jspb.Message.getField(this, 5) != null; +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional GetCurrentQuorumsInfoResponseV0 v0 = 1; - * @return {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} + * optional GetGroupActionSignersResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.getV0 = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0, 1)); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0, 1)); }; /** - * @param {?proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} returns this + * @param {?proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.setV0 = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse} returns this + * @return {!proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse} returns this */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.clearV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.prototype.clearV0 = function() { return this.setV0(undefined); }; @@ -45517,7 +65153,7 @@ proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.clearV0 * Returns whether this field is set. * @return {boolean} */ -proto.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.prototype.hasV0 = function() { +proto.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.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 11bc954b2d..962048d3a1 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 @@ -292,6 +292,96 @@ type PlatformgetCurrentQuorumsInfo = { readonly responseType: typeof platform_pb.GetCurrentQuorumsInfoResponse; }; +type PlatformgetIdentityTokenBalances = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetIdentityTokenBalancesRequest; + readonly responseType: typeof platform_pb.GetIdentityTokenBalancesResponse; +}; + +type PlatformgetIdentitiesTokenBalances = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetIdentitiesTokenBalancesRequest; + readonly responseType: typeof platform_pb.GetIdentitiesTokenBalancesResponse; +}; + +type PlatformgetIdentityTokenInfos = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetIdentityTokenInfosRequest; + readonly responseType: typeof platform_pb.GetIdentityTokenInfosResponse; +}; + +type PlatformgetIdentitiesTokenInfos = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetIdentitiesTokenInfosRequest; + readonly responseType: typeof platform_pb.GetIdentitiesTokenInfosResponse; +}; + +type PlatformgetTokenStatuses = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetTokenStatusesRequest; + readonly responseType: typeof platform_pb.GetTokenStatusesResponse; +}; + +type PlatformgetTokenTotalSupply = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetTokenTotalSupplyRequest; + readonly responseType: typeof platform_pb.GetTokenTotalSupplyResponse; +}; + +type PlatformgetGroupInfo = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetGroupInfoRequest; + readonly responseType: typeof platform_pb.GetGroupInfoResponse; +}; + +type PlatformgetGroupInfos = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetGroupInfosRequest; + readonly responseType: typeof platform_pb.GetGroupInfosResponse; +}; + +type PlatformgetGroupActions = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetGroupActionsRequest; + readonly responseType: typeof platform_pb.GetGroupActionsResponse; +}; + +type PlatformgetGroupActionSigners = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetGroupActionSignersRequest; + readonly responseType: typeof platform_pb.GetGroupActionSignersResponse; +}; + export class Platform { static readonly serviceName: string; static readonly broadcastStateTransition: PlatformbroadcastStateTransition; @@ -326,6 +416,16 @@ export class Platform { static readonly getPathElements: PlatformgetPathElements; static readonly getStatus: PlatformgetStatus; static readonly getCurrentQuorumsInfo: PlatformgetCurrentQuorumsInfo; + static readonly getIdentityTokenBalances: PlatformgetIdentityTokenBalances; + static readonly getIdentitiesTokenBalances: PlatformgetIdentitiesTokenBalances; + static readonly getIdentityTokenInfos: PlatformgetIdentityTokenInfos; + static readonly getIdentitiesTokenInfos: PlatformgetIdentitiesTokenInfos; + static readonly getTokenStatuses: PlatformgetTokenStatuses; + static readonly getTokenTotalSupply: PlatformgetTokenTotalSupply; + static readonly getGroupInfo: PlatformgetGroupInfo; + static readonly getGroupInfos: PlatformgetGroupInfos; + static readonly getGroupActions: PlatformgetGroupActions; + static readonly getGroupActionSigners: PlatformgetGroupActionSigners; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -648,5 +748,95 @@ export class PlatformClient { requestMessage: platform_pb.GetCurrentQuorumsInfoRequest, callback: (error: ServiceError|null, responseMessage: platform_pb.GetCurrentQuorumsInfoResponse|null) => void ): UnaryResponse; + getIdentityTokenBalances( + requestMessage: platform_pb.GetIdentityTokenBalancesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityTokenBalancesResponse|null) => void + ): UnaryResponse; + getIdentityTokenBalances( + requestMessage: platform_pb.GetIdentityTokenBalancesRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityTokenBalancesResponse|null) => void + ): UnaryResponse; + getIdentitiesTokenBalances( + requestMessage: platform_pb.GetIdentitiesTokenBalancesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesTokenBalancesResponse|null) => void + ): UnaryResponse; + getIdentitiesTokenBalances( + requestMessage: platform_pb.GetIdentitiesTokenBalancesRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesTokenBalancesResponse|null) => void + ): UnaryResponse; + getIdentityTokenInfos( + requestMessage: platform_pb.GetIdentityTokenInfosRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityTokenInfosResponse|null) => void + ): UnaryResponse; + getIdentityTokenInfos( + requestMessage: platform_pb.GetIdentityTokenInfosRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityTokenInfosResponse|null) => void + ): UnaryResponse; + getIdentitiesTokenInfos( + requestMessage: platform_pb.GetIdentitiesTokenInfosRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesTokenInfosResponse|null) => void + ): UnaryResponse; + getIdentitiesTokenInfos( + requestMessage: platform_pb.GetIdentitiesTokenInfosRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesTokenInfosResponse|null) => void + ): UnaryResponse; + getTokenStatuses( + requestMessage: platform_pb.GetTokenStatusesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenStatusesResponse|null) => void + ): UnaryResponse; + getTokenStatuses( + requestMessage: platform_pb.GetTokenStatusesRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenStatusesResponse|null) => void + ): UnaryResponse; + getTokenTotalSupply( + requestMessage: platform_pb.GetTokenTotalSupplyRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenTotalSupplyResponse|null) => void + ): UnaryResponse; + getTokenTotalSupply( + requestMessage: platform_pb.GetTokenTotalSupplyRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenTotalSupplyResponse|null) => void + ): UnaryResponse; + getGroupInfo( + requestMessage: platform_pb.GetGroupInfoRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupInfoResponse|null) => void + ): UnaryResponse; + getGroupInfo( + requestMessage: platform_pb.GetGroupInfoRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupInfoResponse|null) => void + ): UnaryResponse; + getGroupInfos( + requestMessage: platform_pb.GetGroupInfosRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupInfosResponse|null) => void + ): UnaryResponse; + getGroupInfos( + requestMessage: platform_pb.GetGroupInfosRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupInfosResponse|null) => void + ): UnaryResponse; + getGroupActions( + requestMessage: platform_pb.GetGroupActionsRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupActionsResponse|null) => void + ): UnaryResponse; + getGroupActions( + requestMessage: platform_pb.GetGroupActionsRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupActionsResponse|null) => void + ): UnaryResponse; + getGroupActionSigners( + requestMessage: platform_pb.GetGroupActionSignersRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupActionSignersResponse|null) => void + ): UnaryResponse; + getGroupActionSigners( + requestMessage: platform_pb.GetGroupActionSignersRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupActionSignersResponse|null) => void + ): UnaryResponse; } 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 5ba77dbcd4..8e713eaaaa 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 @@ -298,6 +298,96 @@ Platform.getCurrentQuorumsInfo = { responseType: platform_pb.GetCurrentQuorumsInfoResponse }; +Platform.getIdentityTokenBalances = { + methodName: "getIdentityTokenBalances", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetIdentityTokenBalancesRequest, + responseType: platform_pb.GetIdentityTokenBalancesResponse +}; + +Platform.getIdentitiesTokenBalances = { + methodName: "getIdentitiesTokenBalances", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetIdentitiesTokenBalancesRequest, + responseType: platform_pb.GetIdentitiesTokenBalancesResponse +}; + +Platform.getIdentityTokenInfos = { + methodName: "getIdentityTokenInfos", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetIdentityTokenInfosRequest, + responseType: platform_pb.GetIdentityTokenInfosResponse +}; + +Platform.getIdentitiesTokenInfos = { + methodName: "getIdentitiesTokenInfos", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetIdentitiesTokenInfosRequest, + responseType: platform_pb.GetIdentitiesTokenInfosResponse +}; + +Platform.getTokenStatuses = { + methodName: "getTokenStatuses", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetTokenStatusesRequest, + responseType: platform_pb.GetTokenStatusesResponse +}; + +Platform.getTokenTotalSupply = { + methodName: "getTokenTotalSupply", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetTokenTotalSupplyRequest, + responseType: platform_pb.GetTokenTotalSupplyResponse +}; + +Platform.getGroupInfo = { + methodName: "getGroupInfo", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetGroupInfoRequest, + responseType: platform_pb.GetGroupInfoResponse +}; + +Platform.getGroupInfos = { + methodName: "getGroupInfos", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetGroupInfosRequest, + responseType: platform_pb.GetGroupInfosResponse +}; + +Platform.getGroupActions = { + methodName: "getGroupActions", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetGroupActionsRequest, + responseType: platform_pb.GetGroupActionsResponse +}; + +Platform.getGroupActionSigners = { + methodName: "getGroupActionSigners", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetGroupActionSignersRequest, + responseType: platform_pb.GetGroupActionSignersResponse +}; + exports.Platform = Platform; function PlatformClient(serviceHost, options) { @@ -1297,5 +1387,315 @@ PlatformClient.prototype.getCurrentQuorumsInfo = function getCurrentQuorumsInfo( }; }; +PlatformClient.prototype.getIdentityTokenBalances = function getIdentityTokenBalances(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getIdentityTokenBalances, { + 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.getIdentitiesTokenBalances = function getIdentitiesTokenBalances(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getIdentitiesTokenBalances, { + 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.getIdentityTokenInfos = function getIdentityTokenInfos(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getIdentityTokenInfos, { + 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.getIdentitiesTokenInfos = function getIdentitiesTokenInfos(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getIdentitiesTokenInfos, { + 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.getTokenStatuses = function getTokenStatuses(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getTokenStatuses, { + 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.getTokenTotalSupply = function getTokenTotalSupply(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getTokenTotalSupply, { + 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.getGroupInfo = function getGroupInfo(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getGroupInfo, { + 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.getGroupInfos = function getGroupInfos(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getGroupInfos, { + 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.getGroupActions = function getGroupActions(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getGroupActions, { + 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.getGroupActionSigners = function getGroupActionSigners(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getGroupActionSigners, { + 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(); + } + }; +}; + exports.PlatformClient = PlatformClient; diff --git a/packages/rs-dpp/src/data_contract/v1/serialization/mod.rs b/packages/rs-dpp/src/data_contract/v1/serialization/mod.rs index 9939a80e85..87825f6c69 100644 --- a/packages/rs-dpp/src/data_contract/v1/serialization/mod.rs +++ b/packages/rs-dpp/src/data_contract/v1/serialization/mod.rs @@ -26,11 +26,11 @@ impl<'de> Deserialize<'de> for DataContractV1 { where D: Deserializer<'de>, { - let serialization_format = DataContractInSerializationFormat::deserialize(deserializer)?; + let serialization_format = DataContractInSerializationFormatV1::deserialize(deserializer)?; let current_version = PlatformVersion::get_current().map_err(|e| serde::de::Error::custom(e.to_string()))?; // when deserializing from json/platform_value/cbor we always want to validate (as this is not coming from the state) - DataContractV1::try_from_platform_versioned( + DataContractV1::try_from_platform_versioned_v1( serialization_format, true, &mut vec![], diff --git a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs index 5bf04af790..0591eb4079 100644 --- a/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs +++ b/packages/rs-dpp/src/state_transition/state_transitions/document/batch_transition/batched_transition/token_transition.rs @@ -3,7 +3,6 @@ use derive_more::{Display, From}; use serde::{Deserialize, Serialize}; use platform_value::Identifier; use bincode::{Encode, Decode}; -use data_contracts::SystemDataContract; use platform_version::version::PlatformVersion; use crate::balances::credits::TokenAmount; use crate::block::block_info::BlockInfo; @@ -33,6 +32,11 @@ use crate::state_transition::batch_transition::token_transfer_transition::v0::v0 use crate::state_transition::batch_transition::token_unfreeze_transition::v0::v0_methods::TokenUnfreezeTransitionV0Methods; use crate::tokens::token_event::TokenEvent; +pub const TOKEN_HISTORY_ID_BYTES: [u8; 32] = [ + 45, 67, 89, 21, 34, 216, 145, 78, 156, 243, 17, 58, 202, 190, 13, 92, 61, 40, 122, 201, 84, 99, + 187, 110, 233, 128, 63, 48, 172, 29, 210, 108, +]; + #[derive(Debug, Clone, Encode, Decode, From, PartialEq, Display)] #[cfg_attr( feature = "state-transition-serde-conversion", @@ -301,7 +305,7 @@ impl TokenTransitionV0Methods for TokenTransition { ) -> Identifier { let name = self.historical_document_type_name(); Document::generate_document_id_v0( - &SystemDataContract::TokenHistory.id(), + &(TOKEN_HISTORY_ID_BYTES.into()), &owner_id, name, owner_nonce.to_be_bytes().as_slice(), diff --git a/packages/token-history-contract/src/lib.rs b/packages/token-history-contract/src/lib.rs index 70dafcc26f..3bf08b2e25 100644 --- a/packages/token-history-contract/src/lib.rs +++ b/packages/token-history-contract/src/lib.rs @@ -7,8 +7,8 @@ use platform_version::version::PlatformVersion; use serde_json::Value; pub const ID_BYTES: [u8; 32] = [ - 92, 20, 14, 101, 92, 2, 101, 187, 194, 168, 8, 113, 109, 225, 132, 121, 133, 19, 89, 24, 173, - 81, 205, 253, 11, 118, 102, 75, 169, 91, 163, 124, + 45, 67, 89, 21, 34, 216, 145, 78, 156, 243, 17, 58, 202, 190, 13, 92, 61, 40, 122, 201, 84, 99, + 187, 110, 233, 128, 63, 48, 172, 29, 210, 108, ]; pub const OWNER_ID_BYTES: [u8; 32] = [0; 32]; diff --git a/yarn.lock b/yarn.lock index e4829725aa..64c545ee15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1878,6 +1878,22 @@ __metadata: languageName: node linkType: hard +"@dashevo/token-history-contract@workspace:packages/token-history-contract": + version: 0.0.0-use.local + resolution: "@dashevo/token-history-contract@workspace:packages/token-history-contract" + dependencies: + "@dashevo/wasm-dpp": "workspace:*" + chai: "npm:^4.3.10" + dirty-chai: "npm:^2.0.1" + eslint: "npm:^8.53.0" + eslint-config-airbnb-base: "npm:^15.0.0" + eslint-plugin-import: "npm:^2.29.0" + mocha: "npm:^10.2.0" + sinon: "npm:^17.0.1" + sinon-chai: "npm:^3.7.0" + languageName: unknown + linkType: soft + "@dashevo/wallet-lib@workspace:*, @dashevo/wallet-lib@workspace:packages/wallet-lib": version: 0.0.0-use.local resolution: "@dashevo/wallet-lib@workspace:packages/wallet-lib"